/* [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','4599',jdecode('Swiss+VIP++Home'),jdecode(''), jdecode('%2F4599.html'), 'true',[],'',''],
	['PAGE','19303',jdecode('Swiss+VIP++Infos'),jdecode(''), jdecode('%2F19303.html'), 'true',[],'',''],
	['PAGE','4818',jdecode('Swiss+VIP++Contact+++'),jdecode(''), jdecode('%2F4818%2Findex.html'), 'true',[ 
		['PAGE','7912',jdecode('Contact+%28follow+up+page%29'),jdecode(''), jdecode('%2F4818%2F7912.html'), 'false',[],'','']
	],'',''],
	['PAGE','4683',jdecode('Swiss+VIP++Services'),jdecode(''), jdecode('%2F4683.html'), 'true',[],'',''],
	['PAGE','58079',jdecode('Swiss+VIP+CHALET+'),jdecode(''), jdecode('%2F58079.html'), 'true',[],'',''],
	['PAGE','53697',jdecode('Swiss+VIP+Bateau'),jdecode(''), jdecode('%2F53697.html'), 'true',[],'',''],
	['PAGE','59664',jdecode('Swiss+VIP+MAISON+GENEVE'),jdecode(''), jdecode('%2F59664.html'), 'true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='AC2323';
theSitetree.keyvisualId='1765';
theSitetree.keyvisualName='urlaub.jpg';
theSitetree.fontsetId='290';
theSitetree.graphicsetId='356';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AC2323';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2QE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'AC2323',
				keyvisualId: 	'1765',
				keyvisualName: 	'urlaub.jpg',
				fontsetId: 		'290',
				graphicsetId: 	'356',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AC2323',
				a_color: 		'AC2323',
				b_color: 		'480F0F',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4599',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59664',
internalId:  '',
customField: '20110209-102045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4599',
internalId:  '',
customField: '20110209-101633'
};
webappMappings['7008']=webappMappings['7008-3627']={
webappId:    '7008',
documentId:  '4818',
internalId:  '3627',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19303',
internalId:  '',
customField: '20111130-111322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4818',
internalId:  '',
customField: '20110209-101823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7912',
internalId:  '',
customField: '20050211-181136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4683',
internalId:  '',
customField: '20110209-101907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58079',
internalId:  '',
customField: '20110209-101945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53697',
internalId:  '',
customField: '20110209-102016'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXLH6';
var companyName   = '*****++Welcome++to++SWISSVIP++%21+';
var htmlTitle	  = 'SWISS+VIP.CH+++%2B+++SWISSVIP+++*****++Swiss+VIP+Services+*****++SWISSVIP+++%2B+++SWISS+VIP.CH';
var metaKeywords  = 'head+META+Http-Equiv%3DContent-Type+Content%3Dtext%2Fhtml%3B+charset%3DISO-8859-1+META+Http-Equiv%3DContent-Language+Content%3Den%2Cfr+TITLE+SWISS+VIP%2FTITLE+META+Name%3DTitle+Lang%3Den+Content%3DSWISS+VIP+META+Name%3DDescription+Lang%3Den++Content%3DSWISS+VIP+services%2CVIP%2Cswiss%2Cswitzerland%2CVIP%2C+SWISSVIP%2C+VIP+services%2CSWISS%2CPrivate+Executive+Jet%2Cswiss+Helicopter%2C+swiss+paradise%2CReal+Estate%2C+luxury+property%2CRental+VIP+Boat%2CSWISS+VIP%2Cswiss+Medical+Services%2C+META+Name%3DKeywords+Lang%3Den+Content%3DSWISS+VIP%2CVIP%2CSWISS%2Cswiss+tourism%2CHealthcare+Medical+Services%2Cswissvip%2CVIP+SWISS%2Cswitzerland%2CPrivate+Executive+Jet%2Cswiss+Helicopter%2C+Swiss+VIP+services%2Cswiss+watch%2CReal+Estate+luxury+property%2C+flights+switzerland%2CAesthetic+surgery%2Clast+minute+airfares+%2C+villa+a+acheter+geneve%2Cairfare%2Climousine+service%2C+first+class+airfare%2CRental+VIP+Boat%2Cswiss+Medical+Services%2Ccontact+lens%2Cswiss+paradise%2CSWISS++HOTELS++BOOKING%2Cwelcome+to+switzerland%2CRELAX+ONE%2Cswiss+hotels+META+Name%3DLanguage+Content%3Den%2Cfr%2C+META+Name%3DReply-To+Content%3Dinfo%40swissvip.ch+META+Name%3DCategory+Content%3DInternet+META+NAME%3Drobots+CONTENT%3DALL+META+Name%3DDistribution+Content%3Dglobal+META+Name%3DRevisit-After+Content%3D7+days+META+Name%3DAuthor+Lang%3Dfr+Content%3DJames+META+Name%3DPublisher+Content%3D+META+Name%3DCopyright+Content%3D%3FSwissVIPConsulting+META+Name%3DGenerator+Content%3D+META+Name%3DIdentifier-URL+Content%3Dhttp%3A%2F%2Fwww.swissvip.ch+META+Name%3DExpires+Content%3Dnever+META+Name%3DDate-Creation-yyyymmdd+Content%3D20030214+META+Name%3DDate-Revision-yyyymmdd++Content%3D20101221%2Fhead';
var metaContents  = 'THE+SWISS+BEST+CONSULTING+FOR+VIP%2CSwissVIP%2CLes+services+medicaux+pour+VIP%2Cconseils+en+recherche+de+marche+ainsi+que+dans+toutes+operations+immobilieres+et+financieres+Worldwide%2CSWISS+VIP+services%2Cbookings+SWISS+hotels%2Cvilla+a+acheter+15+km+geneve%2Cmaison+a+vendre+geneva%2CSwiss+Medical+Services+for+VIP%2CSUISSE+VIP%2Cswiss+paradise%2Cswitzerland%2Cswiss+hotels%2Cswiss+vip+amenity%2CVIP+SWISS%2Cswiss+airline%2Cswiss+watch%2CPrivate+Executive+Jet%2CHelicopter%2CReal+Estate%2Cswiss+luxury+property%2Cswiss+tourism%2CSwiss+luxury+Boat%2CSwiss+Medical+%2CHealthcare+Medical+Services%2CWelcome%2Cswiss+casino%2Crelax+one%2Cswitzerland%2Clast+minute+airfares%2C+first+class+airfare%2Cswiss+privilege%2C+jetset%2C+jet+set%2Cmagnifique+chalet+a+vendre+meuble%2Cnax%2C+valais%2CYacht+de+croisiere%2Cswiss+vip+services%2CBelle+Maison+%C3%A0+vendre+avec+terrain%2C+vue+d%C3%A9gag%C3%A9e+et+imprenable%2C+discr%C3%A9tion%2C+calme+et+s%C3%A9r%C3%A9nit%C3%A9+15+km+de+GENEVE%2C';
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();
};

