/* [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','4481',jdecode('HOME'),jdecode(''),'/4481.html','true',[],'',''],
	['PAGE','61931',jdecode('LOTTERIA'),jdecode(''),'/61931.html','true',[],'',''],
	['PAGE','27634',jdecode('STYLE+ON+ICE+'),jdecode(''),'/27634/index.html','true',[ 
		['PAGE','35603',jdecode('Italiano'),jdecode(''),'/27634/35603.html','true',[],'',''],
		['PAGE','35630',jdecode('Deutsch'),jdecode(''),'/27634/35630.html','true',[],'',''],
		['PAGE','35657',jdecode('Fran%C3%A7ais'),jdecode(''),'/27634/35657.html','true',[],'',''],
		['PAGE','35684',jdecode('English'),jdecode(''),'/27634/35684.html','true',[],'',''],
		['PAGE','41649',jdecode('Nederlands'),jdecode(''),'/27634/41649.html','true',[],'','']
	],'',''],
	['PAGE','61514',jdecode('MAGAZINE'),jdecode(''),'/61514.html','true',[],'',''],
	['PAGE','60390',jdecode('PRESS'),jdecode(''),'/60390.html','true',[],'',''],
	['PAGE','37314',jdecode('NOVITA-NEWS'),jdecode(''),'/37314.html','true',[],'',''],
	['PAGE','54088',jdecode('VISA_MASTERCARD'),jdecode(''),'/54088.html','true',[],'',''],
	['PAGE','46249',jdecode('Espo-Veranstaltungen'),jdecode(''),'/46249.html','true',[],'',''],
	['PAGE','38762',jdecode('GLI++ATLETI'),jdecode(''),'/38762.html','true',[],'',''],
	['PAGE','36859',jdecode('ALBUM+PHOTO'),jdecode(''),'/36859.html','true',[],'',''],
	['PAGE','64488',jdecode('Feedback'),jdecode(''),'/64488.html','true',[],'',''],
	['PAGE','40007',jdecode('LINKS'),jdecode(''),'/40007.html','true',[],'',''],
	['PAGE','36273',jdecode('CONTACT'),jdecode(''),'/36273.html','true',[],'',''],
	['PAGE','61673',jdecode('Mappa+di+Accesso'),jdecode(''),'/61673.html','true',[],'',''],
	['PAGE','36300',jdecode('Advertencia-+warning'),jdecode(''),'/36300.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Art';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='1782';
theSitetree.keyvisualName='duene.jpg';
theSitetree.fontsetId='283';
theSitetree.graphicsetId='350';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'it',
  country: 'IT'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Art',
				paletteFamily: 	'000000',
				keyvisualId: 	'1782',
				keyvisualName: 	'duene.jpg',
				fontsetId: 		'283',
				graphicsetId: 	'350',
				contentColor: 	'DDDDDD',
				contentBGColor: '000000',
				a_color: 		'000000',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '61673',
internalId:  'location',
customField: 'language:it;country:IT;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4481',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-901ae8943aeb30d7774b38c89c58ec26']={
webappId:    '7060',
documentId:  '36859',
internalId:  '901ae8943aeb30d7774b38c89c58ec26',
customField: 'language:it;country:IT;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4481',
internalId:  '',
customField: '20100104-120054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61931',
internalId:  '',
customField: '20100322-173452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27634',
internalId:  '',
customField: '20091226-092056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35603',
internalId:  '',
customField: '20100104-122155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35630',
internalId:  '',
customField: '20091226-093210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35657',
internalId:  '',
customField: '20091226-095038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35684',
internalId:  '',
customField: '20091226-105541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41649',
internalId:  '',
customField: '20091226-105706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61514',
internalId:  '',
customField: '20090323-092944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60390',
internalId:  '',
customField: '20100104-123203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37314',
internalId:  '',
customField: '20091226-105220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54088',
internalId:  '',
customField: '20080321-080702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46249',
internalId:  '',
customField: '20100113-151253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38762',
internalId:  '',
customField: '20100104-123340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36859',
internalId:  '',
customField: '20080321-080738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40007',
internalId:  '',
customField: '20100104-124307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36273',
internalId:  '',
customField: '20081109-125518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61673',
internalId:  '',
customField: '20081109-125352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36300',
internalId:  '',
customField: '20080126-093707'
};
webappMappings['1002']=webappMappings['1002-64488ahopt0in3iec']={
webappId:    '1002',
documentId:  '64488',
internalId:  '64488ahopt0in3iec',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64488',
internalId:  '',
customField: '20110119-143053'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3IEC';
var companyName   = 'ASEN+ARANDA+++++++style+on+ice';
var htmlTitle	  = 'dellasanta-ateliermoda.com';
var metaKeywords  = 'Sarah+meier%2C+Stephane+Lambiel%2C+Vivianne+K%C3%A4ser%2C+Jamal+Othman%2C+Asen+Aranda%2C+Asen+Della+Santa+Aranda%2C+vestiti+di+pattinaggio+artistico%2C+vestidos+para+el+patinaje+artistico%2C+cavalli%2C+western+%2C+modelos+exclusivos%2C+modelli+esclusivi%2C+Olimpiade+di+Torino+2006%2C+Giuliana+Cassani+Zarri%2C+american+quarter+horse+champion%2C+Eislaufbekleidung%2C+skating+dresses.+';
var metaContents  = 'Sarah+Meier%2C+Stephane+Lambiel%2C+Jamal+Othman%2C+Vivianne+K%C3%A4ser%2C+Asen+Aranda%2C+vestiti+di+pattinaggio+artistico%2C+vestidos+para+patinaje+art%C3%ADstico%2C+modelos+esclusivos%2C+Olimpiade+di+Torino+2006.+Cavalli%2C+Giuliana+Cassani+Zarri%2C+Asen+Della+Santa%2C+Cristalli+di+Swarovski%2C+Atelier+moda+%2C+Eislaufbekleidung%2C+ba%C3%B1adores.+skating+dresses.+';
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();
};

