/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var POS_TARGET=8;
var theSitetree=[ 
	['PAGE','52',jdecode('Home'),jdecode(''),'/52.html','true',[],'',''],
	['PAGE','9201',jdecode('NEW%21++Balloon+Drop%2FRelease'),jdecode(''),'/9201.html','true',[],'',''],
	['PAGE','11601',jdecode('Products'),jdecode(''),'/11601/index.html','true',[ 
		['PAGE','6201',jdecode('Balloon-A-Hoops'),jdecode(''),'/11601/6201.html','true',[],'',''],
		['PAGE','82',jdecode('Professional+Balloon+Tools'),jdecode(''),'/11601/82.html','true',[],'',''],
		['PAGE','91',jdecode('Automatic+Balloon+Clips'),jdecode(''),'/11601/91.html','true',[],'',''],
		['PAGE','100',jdecode('Balloon+Corrals'),jdecode(''),'/11601/100.html','true',[],'',''],
		['PAGE','1713',jdecode('Professional+Balloon+Transporters'),jdecode(''),'/11601/1713.html','true',[],'',''],
		['PAGE','1722',jdecode('Holey+Box+Balloon+Sizer'),jdecode(''),'/11601/1722.html','true',[],'',''],
		['PAGE','1731',jdecode('Balloon+Nets+%26+Drop+Bags'),jdecode(''),'/11601/1731.html','true',[],'',''],
		['PAGE','18412',jdecode('NEW%21+Decorator+Gridz'),jdecode(''),'/11601/18412.html','true',[],'','']
	],'',''],
	['PAGE','14612',jdecode('How+Do+I...%3F%3A+Education'),jdecode(''),'/14612/index.html','true',[ 
		['PAGE','14633',jdecode('Eduardo+Seiti+Balloon+Design+and+Engineering'),jdecode(''),'/14612/14633.html','true',[],'',''],
		['PAGE','73',jdecode('Corral+Rigging+Info'),jdecode(''),'/14612/73.html','true',[],'','']
	],'',''],
	['PAGE','109',jdecode('Offers'),jdecode(''),'/109.html','true',[],'',''],
	['PAGE','118',jdecode('Contact'),jdecode(''),'/118/index.html','true',[ 
		['PAGE','127',jdecode('Distributors+near+you'),jdecode(''),'/118/127.html','true',[],'',''],
		['PAGE','1819',jdecode('Directions'),jdecode(''),'/118/1819.html','true',[],'','']
	],'',''],
	['PAGE','1832',jdecode('Guestbook'),jdecode(''),'/1832/index.html','true',[ 
		['PAGE','1831',jdecode('Read+Guestbook'),jdecode(''),'/1832/1831.html','false',[],'','']
	],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='5351C2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10894';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'5351C2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10894',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'5351C2',
				e_color: 		'5351C2',
				f_color: 		'5351C2',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '1819',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73',
internalId:  '',
customField: '20110804-220359'
};
webappMappings['1002']=webappMappings['1002-1832AHW050IN3UIH']={
webappId:    '1002',
documentId:  '1832',
internalId:  '1832AHW050IN3UIH',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '52',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52',
internalId:  '',
customField: '20110804-224937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82',
internalId:  '',
customField: '20110801-234938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91',
internalId:  '',
customField: '20110802-001335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100',
internalId:  '',
customField: '20080403-062956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1713',
internalId:  '',
customField: '20080403-202450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1722',
internalId:  '',
customField: '20080403-212143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1731',
internalId:  '',
customField: '20080403-065243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109',
internalId:  '',
customField: '20110804-225212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118',
internalId:  '',
customField: '20110804-203101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127',
internalId:  '',
customField: '20110806-022132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1819',
internalId:  '',
customField: '20071203-013912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1832',
internalId:  '',
customField: '20080405-012738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1831',
internalId:  '',
customField: '20071203-014322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14633',
internalId:  '',
customField: '20110804-214236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14612',
internalId:  '',
customField: '20110804-220339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20090808-095327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20110804-213223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11601',
internalId:  '',
customField: '20110806-030546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18412',
internalId:  '',
customField: '20110817-172036'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3UIH';
var companyName   = 'Silver+Rainbow+Company';
var htmlTitle	  = 'Silver+Rainbow+Company+-+Innovations+Engineered+Exclusively+for+Balloon+Professionals%21';
var metaKeywords  = 'Klips%2C+Clips%2C+Balloon+Clips%2C+Balloons%2C+Helium%2C+Balloon+Decoration%2C+Proms%2C+Sky+Sculptures%2C+Spiral%2C+Balloon+Spirals%2C+Balloon+Corral%2C+Balloon+Drop%2C+Balloon+Drops%2C+Balloon+Sculptures%2C+Balloon+Release%2C+Silver+Rainbow%2C+Silver+Rainbow+Co%2C+Silver+Rainbow+Company%2C+John+McGrath%2C+John+E+McGrath%2C+John+E.+McGrath%2C+Graduation%2C+Party%2C+Balloon-A-Hoops%2C+Automatic+Balloon+Clips%2C+Automatic+Balloon+Klips%2C+Professional+Balloon+Tools%2C+Professional+Balloon%2C+Holey+Box%2C+Holey+Box+Balloon+Sizer%2C+Balloon+Nets%2C+Balloon+Professionals%2C+How+to+make+a+balloon+arch%2C+how+to+make+a+balloon+sculpture%2C+helium+balloons%2C+mylar+balloons%2C+Eduardo+Seiti';
var metaContents  = 'SilverRainbow%2C+SilverRainbowCo%2C+Silver+Rainbow%2C+Silver+Rainbow+Co%2C+Silver+Rainbow+Company';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};

