/* [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','6301',jdecode('Home'),jdecode(''), jdecode('%2F6301.html'), 'true',[],'',''],
	['PAGE','10501',jdecode('Party+Accessories'),jdecode(''), jdecode('%2F10501.html'), 'true',[],'',''],
	['PAGE','10522',jdecode('Coupon'),jdecode(''), jdecode('%2F10522.html'), 'true',[],'',''],
	['PAGE','10564',jdecode('Contact'),jdecode(''), jdecode('%2F10564.html'), 'true',[],'',''],
	['PAGE','10543',jdecode('Location'),jdecode(''), jdecode('%2F10543.html'), 'true',[],'','']];
var siteelementCount=5;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1746';
theSitetree.keyvisualName='feier.jpg';
theSitetree.fontsetId='290';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1746',
				keyvisualName: 	'feier.jpg',
				fontsetId: 		'290',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20120124-122155'
};
webappMappings['7008']=webappMappings['7008-22106']={
webappId:    '7008',
documentId:  '10564',
internalId:  '22106',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20120124-122304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10522',
internalId:  '',
customField: '20111012-121635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10543',
internalId:  '',
customField: '20110124-022123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10564',
internalId:  '',
customField: '20120124-122330'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-11619516']={
webappId:    '1501',
documentId:  '6301',
internalId:  '11619516',
customField: '1501'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10543',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10564',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10522',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10501',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6301',
internalId:  '',
customField: 'language:en;country:US;'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7KMR1';
var companyName   = '';
var htmlTitle	  = 'PARTY+AND+BALLOON+NEEDS';
var metaKeywords  = 'party%2C+party+store%2C+balloon%2C+balloons%2C+disney+party+supplies%2C+tableware%2C+plasticware%2C+theme%2C+themed%2C+tiaras%2C+first+birthday%2C+1st+birthday%2C+bday%2C+b-day%2C+party+places%2C+pinatas%2C+pinata%2C+balons%2C+halloween%2C+costume%2C+over+the+hill%2C+favors%2C+favor%2C+kids+birthday%2C+childs+birthday%2C+girls+birthday%2C+boys+birthday%2C+bachelorette%2C+bachlorette%2C+adult+birthdays%2C+charachters%2C+luau%2C+princess%2C+prince%2C+mardi+gras%2C+mardi+grass%2C+masks%2C+hats%2C+baby+favors%2C+costumes%2C+confetti%2C+candles%2C+punch+bowls%2C+serving+supplies%2C+plasticware%2C+wastern%2C+fiesta%2C+valentine%27s+day%2C+valentines%2C+st.+patrics%2C+st+pattys%2C+easter%2C+mylar%2C+latex%2C+sports%2C+banner%2C+banners%2C+sashes%2C+new+year%2C+christmas%2C+holiday+theme%2C+football%2C+superbowl%2C+tablecovers%2C+streamers%2C+soccer%2C+baseball%2C+treat+bags%2C+pulll+string%2C+party+hats%2C+retirement%2C+sweet+sixteen%2C+disney+birthday%2C+cake+toppers%2C+beads%2C+tye+dye%2C+circus%2C+tiana%2C+princess+and+the+frog%2C+tinkerbelle%2C+tinkerbell%2C+dora%2C+diego%2C+spongebob%2C+sponge+bob%2C+star+wars%2C+transformers%2C+spiderman%2C+disney+cars%2C+serving+utensils%2C+centerpieces%2C+shot+glasses%2C+bridal+shower%2C+invitations%2C+thank+you%27s%2C+graduation%2C+deco+packs%2C+stand+ups%2C+cardboard+cutouts%2C+cutouts%2C+silly+string%2C+hair+color%2C+make+up%2C+casino%2C+rock+and+roll%2C+ticket+roll%2C+balloon+tanks%2C+balloon+pumps%2C+helium+tanks%2C+flashing+tiaras%2C+tissue%2C+cards%2C+cake%2C+baking+supplies%2C+easter+baskets%2C+30th+birthday%2C+40th+birthday%2C+50th+birthday%2C+60th+birthday%2C+21st+birthday%2C+18th+birthday%2C+carnival%2C+carnivel%2C+gift+bags%2C+bags%2C+decorations%2C+table+ware%2C+table+setting%2C+stockton%2C+california%2C+hammer+lane%2C+hammer+ln.%2C++west+lane%2C+baby+favors%2C+baby+shower+favors%2C+';
var metaContents  = 'Stockton%2C+California.++Party+supply+store+that+is+the+largest+in+the+san+joaquin+valley.++we+have+licensed+birthday%2C+generic+birthday+and+over+the+hill+birthday+supplies.++We+have+western%2C+fiesta%2C+luau%2C+rock+and+roll%2C+wedding+and+tye+dye+party+supplies.++we+also+offer+balloon+bouquets+for+any+occasion.++dont+forget+about+our+large+selection+of+halloween+costumes+during+the+halloween+season.';
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();
};

