/* [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','4597',jdecode('Home'),jdecode(''),'/4597.html','true',[],'',''],
	['PAGE','10101',jdecode('Alberca+de+Pelotas'),jdecode(''),'/10101.html','true',[],'',''],
	['PAGE','5501',jdecode('Animadores'),jdecode(''),'/5501.html','true',[],'',''],
	['PAGE','14323',jdecode('Bungy%3A+1+y+4+plazas'),jdecode(''),'/14323.html','true',[],'',''],
	['PAGE','44201',jdecode('Esfera+Gigante'),jdecode(''),'/44201.html','true',[],'',''],
	['PAGE','9001',jdecode('Inflables'),jdecode(''),'/9001.html','true',[],'',''],
	['PAGE','5001',jdecode('Little+Tikes'),jdecode(''),'/5001.html','true',[],'',''],
	['PAGE','11601',jdecode('Lo+Nuevo'),jdecode(''),'/11601.html','true',[],'',''],
	['PAGE','36501',jdecode('Mesas+de+Juego'),jdecode(''),'/36501.html','true',[],'',''],
	['PAGE','41301',jdecode('Snacks'),jdecode(''),'/41301.html','true',[],'',''],
	['PAGE','61222',jdecode('Sky+Course+%22Nuevo%22'),jdecode(''),'/61222.html','true',[],'',''],
	['PAGE','57301',jdecode('Toro+%22Nuevo%22'),jdecode(''),'/57301.html','true',[],'',''],
	['PAGE','13228',jdecode('Eventos+Corporativos'),jdecode(''),'/13228.html','true',[],'',''],
	['PAGE','12801',jdecode('Precios'),jdecode(''),'/12801.html','true',[],'',''],
	['PAGE','5528',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/5528.html','true',[],'',''],
	['PAGE','4702',jdecode('Libro+de+visitas'),jdecode(''),'/4702/index.html','true',[ 
		['PAGE','4703',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/4702/4703.html','false',[],'','']
	],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Party';
theSitetree.paletteFamily='A217B6';
theSitetree.keyvisualId='3519';
theSitetree.keyvisualName='kv_3519.jpg';
theSitetree.fontsetId='10441';
theSitetree.graphicsetId='10807';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='A217B6';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Party',
				paletteFamily: 	'A217B6',
				keyvisualId: 	'3519',
				keyvisualName: 	'kv_3519.jpg',
				fontsetId: 		'10441',
				graphicsetId: 	'10807',
				contentColor: 	'FFFFFF',
				contentBGColor: 'A217B6',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'E6FFAB',
				e_color: 		'E6FFAB',
				f_color: 		'E6FFAB',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4597',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-101830']={
webappId:    '1501',
documentId:  '4597',
internalId:  '101830',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57301',
internalId:  '',
customField: '20090827-211730'
};
webappMappings['1002']=webappMappings['1002-4702AVEC10INXXPG']={
webappId:    '1002',
documentId:  '4702',
internalId:  '4702AVEC10INXXPG',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4597',
internalId:  '',
customField: '20100116-235203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20090701-205923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20090701-210056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14323',
internalId:  '',
customField: '20100216-194046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44201',
internalId:  '',
customField: '20100215-192837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20100215-193247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20090701-210444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11601',
internalId:  '',
customField: '20091221-182715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36501',
internalId:  '',
customField: '20090701-210632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41301',
internalId:  '',
customField: '20100116-231805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13228',
internalId:  '',
customField: '20070618-185802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20100203-131659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5528',
internalId:  '',
customField: '20090701-210838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4702',
internalId:  '',
customField: '20050331-181438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4703',
internalId:  '',
customField: '20050331-181438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61222',
internalId:  '',
customField: '20100203-131443'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXXPG';
var companyName   = 'DIVERTIMUNDO';
var htmlTitle	  = 'DIVERTIMUNDO';
var metaKeywords  = 'Inflables%2C+fiestas+infantiles%2C+juegos+inflables%2C+inflables%2C+brincolines%2C+renta+de+inflables%2C+Little+Tikes%2C+juegos+infantiles%2C';
var metaContents  = 'Renta+de+juegos+Infantiles%2C+Inflables+Little+Tikes.+Animadores%2C+maquillaje+infantil.+Organizaci%C3%B3n+Total+de+tu+fiesta%21';
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();
};
