/* [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','501',jdecode('Home'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','552',jdecode('Misi%C3%B3n'),jdecode(''), jdecode('%2F552.html'), 'true',[],'',''],
	['PAGE','9601',jdecode('Visi%C3%B3n'),jdecode(''), jdecode('%2F9601.html'), 'true',[],'',''],
	['PAGE','9622',jdecode('Bodas'),jdecode(''), jdecode('%2F9622.html'), 'true',[],'',''],
	['PAGE','9664',jdecode('Quincea%C3%B1eras'),jdecode(''), jdecode('%2F9664.html'), 'true',[],'',''],
	['PAGE','9706',jdecode('Bautizos'),jdecode(''), jdecode('%2F9706.html'), 'true',[],'',''],
	['PAGE','9727',jdecode('Primera+Comuni%C3%B3n'),jdecode(''), jdecode('%2F9727.html'), 'true',[],'',''],
	['PAGE','9748',jdecode('Fiestas+Infantiles'),jdecode(''), jdecode('%2F9748.html'), 'true',[],'',''],
	['PAGE','312123',jdecode('EMPRESARIALES'),jdecode(''), jdecode('%2F312123.html'), 'true',[],'',''],
	['PAGE','228812',jdecode('GRATIS+20+FOTOS+'),jdecode(''), jdecode('%2F228812.html'), 'true',[],'',''],
	['PAGE','9790',jdecode('Servicios'),jdecode(''), jdecode('%2F9790%2Findex.html'), 'true',[ 
		['PAGE','9811',jdecode('Producci%C3%B3n'),jdecode(''), jdecode('%2F9790%2F9811.html'), 'true',[],'',''],
		['PAGE','74901',jdecode('Productos'),jdecode(''), jdecode('%2F9790%2F74901.html'), 'true',[],'',''],
		['PAGE','9832',jdecode('Renta+de+Equipo'),jdecode(''), jdecode('%2F9790%2F9832.html'), 'true',[],'',''],
		['PAGE','9853',jdecode('Audio+e+Iluminaci%C3%B3n'),jdecode(''), jdecode('%2F9790%2F9853.html'), 'true',[],'',''],
		['PAGE','9769',jdecode('Eventos+Especiales'),jdecode(''), jdecode('%2F9790%2F9769.html'), 'true',[],'','']
	],'',''],
	['PAGE','9874',jdecode('Evento+del+mes'),jdecode(''), jdecode('%2F9874%2Findex.html'), 'true',[ 
		['PAGE','451139',jdecode('OLGA+Y+KARIM'),jdecode(''), jdecode('%2F9874%2F451139.html'), 'true',[],'',''],
		['PAGE','444106',jdecode('MARTHA+PATRICIA'),jdecode(''), jdecode('%2F9874%2F444106.html'), 'true',[],'',''],
		['PAGE','438533',jdecode('PAOLA+Y+RAFAEL'),jdecode(''), jdecode('%2F9874%2F438533.html'), 'true',[],'','']
	],'',''],
	['PAGE','251212',jdecode('album+digital'),jdecode(''), jdecode('%2F251212.html'), 'true',[],'',''],
	['PAGE','35201',jdecode('Promocion+del+Mes'),jdecode(''), jdecode('%2F35201.html'), 'true',[],'',''],
	['PAGE','615',jdecode('Cont%C3%A1ctenos'),jdecode(''), jdecode('%2F615.html'), 'true',[],'',''],
	['PAGE','26006',jdecode('Libro+de+visitas'),jdecode(''), jdecode('%2F26006%2Findex.html'), 'true',[ 
		['PAGE','26001',jdecode('Leer+el+libro+de+Visitas'),jdecode(''), jdecode('%2F26006%2F26001.html'), 'false',[],'','']
	],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Optic';
theSitetree.paletteFamily='AB8F30';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10508';
theSitetree.graphicsetId='11051';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='C4A848';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'grp13-hostin',
  product: 'WSCSYSSSSLY0XJEZ'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Optic',
				paletteFamily: 	'AB8F30',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10508',
				graphicsetId: 	'11051',
				contentColor: 	'000000',
				contentBGColor: 'C4A848',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'C8C7C7',
				e_color: 		'C8C7C7',
				f_color: 		'C8C7C7',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-26006avec10ineber']={
webappId:    '1002',
documentId:  '26006',
internalId:  '26006avec10ineber',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '9874',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20070516-205503'
};
webappMappings['7008']=webappMappings['7008-2200']={
webappId:    '7008',
documentId:  '615',
internalId:  '2200',
customField: 'language:es;country:ES;'
};
webappMappings['1501']=webappMappings['1501-2850931']={
webappId:    '1501',
documentId:  '9874',
internalId:  '2850931',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20070520-115033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20070520-121453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20120203-153526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9664',
internalId:  '',
customField: '20120203-154807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9706',
internalId:  '',
customField: '20120203-154100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9727',
internalId:  '',
customField: '20120203-154323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9748',
internalId:  '',
customField: '20120203-154442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9790',
internalId:  '',
customField: '20071028-222119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9811',
internalId:  '',
customField: '20070220-105037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74901',
internalId:  '',
customField: '20071109-010953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9832',
internalId:  '',
customField: '20070220-105940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9853',
internalId:  '',
customField: '20070220-112014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9769',
internalId:  '',
customField: '20070220-101544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9874',
internalId:  '',
customField: '20120205-202208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '251212',
internalId:  '',
customField: '20101117-010126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '312123',
internalId:  '',
customField: '20120115-231947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '451139',
internalId:  '',
customField: '20120206-000951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '438533',
internalId:  '',
customField: '20111223-175337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '444106',
internalId:  '',
customField: '20120203-154612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '228812',
internalId:  '',
customField: '20090106-002040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35201',
internalId:  '',
customField: '20100616-235347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20090712-001635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26006',
internalId:  '',
customField: '20070220-123238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26001',
internalId:  '',
customField: '20070220-123238'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INEBER';
var companyName   = 'VippStudio+++Fotografia+y+Video';
var htmlTitle	  = 'VippStudio';
var metaKeywords  = 'vippstudio%2C++Fotos%2C++video%2C++audio%2C++iluminacion%2C++bodas%2C++xv+a%C3%B1os%2C++gratis%2C+ROSSY+CABRERA+FOTOS';
var metaContents  = '';
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();
};

