/* [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','75601',jdecode('OTO%C3%91O+INVIERNO+2010'),jdecode(''),'/75601.html','true',[],'',''],
	['PAGE','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','552',jdecode('%C2%BFQUI%C3%89NES+SOMOS%3F'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','92101',jdecode('PRODUCTOS'),jdecode(''),'/92101/index.html','true',[ 
		['PAGE','92143',jdecode('BOTA'),jdecode(''),'/92101/92143.html','true',[],'',''],
		['PAGE','106623',jdecode('MOCASIN'),jdecode(''),'/92101/106623.html','true',[],'',''],
		['PAGE','92122',jdecode('VALERINAS'),jdecode(''),'/92101/92122.html','true',[],'','']
	],'',''],
	['PAGE','615',jdecode('CONTAC.+Y+COMP.'),jdecode(''),'/615.html','true',[],'',''],
	['PAGE','5606',jdecode('LIBRO+DE+VISITAS'),jdecode(''),'/5606/index.html','true',[ 
		['PAGE','5601',jdecode('LEER+COMENTARIOS'),jdecode(''),'/5606/5601.html','false',[],'','']
	],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Circulation';
theSitetree.paletteFamily='FC2323';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10587';
theSitetree.graphicsetId='10561';
theSitetree.contentColor='37C976';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Circulation',
				paletteFamily: 	'FC2323',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10587',
				graphicsetId: 	'10561',
				contentColor: 	'37C976',
				contentBGColor: '000000',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '75601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-5606avec10inlnsp']={
webappId:    '1002',
documentId:  '5606',
internalId:  '5606avec10inlnsp',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20100119-140502'
};
webappMappings['7008']=webappMappings['7008-3885']={
webappId:    '7008',
documentId:  '615',
internalId:  '3885',
customField: 'language:es;country:ES;'
};
webappMappings['7005']=webappMappings['7005-425']={
webappId:    '7005',
documentId:  '501',
internalId:  '425',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100305-133649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92101',
internalId:  '',
customField: '20100305-132816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92122',
internalId:  '',
customField: '20100305-132946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92143',
internalId:  '',
customField: '20100305-131725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20100119-140620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5606',
internalId:  '',
customField: '20100119-140801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20080826-140600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106623',
internalId:  '',
customField: '20100804-133739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75601',
internalId:  '',
customField: '20100305-132721'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLNSP';
var companyName   = 'Exclusivas+VERA';
var htmlTitle	  = 'Lo+mejor+de+OTO%C3%91O+INVIERNO+2010+';
var metaKeywords  = 'zapater%C3%ADas%2C+calzado%2C+alpargatas%2C+botas%2C+zapatos+para+dama%2C+calzado+para+dama%2Ccalzado+entre+fino+y+fino%2C+zapater%C3%ADas+en+guadalajara%2C+shoes+woman';
var metaContents  = 'zapater%C3%ADas%2C+calzado%2C+alpargatas%2C+botas%2C+zapatos+para+dama%2C+calzado+para+dama%2C+calzado+entre+fino+y+fino%2C+zapater%C3%ADas+en+guadalajara%2C+shoes+woman';
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();
};
