/* [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','4521',jdecode('WELCOME'),jdecode(''),'/4521.html','true',[],'',''],
	['PAGE','4632',jdecode('MONTRES'),jdecode(''),'/4632/index.html','true',[ 
		['PAGE','52364',jdecode('CHOPARD'),jdecode(''),'/4632/52364.html','true',[],'',''],
		['PAGE','52385',jdecode('EBEL'),jdecode(''),'/4632/52385.html','true',[],'',''],
		['PAGE','52427',jdecode('HERM%C3%88S'),jdecode(''),'/4632/52427.html','true',[],'',''],
		['PAGE','52322',jdecode('LOUIS+ERARD'),jdecode(''),'/4632/52322.html','true',[],'',''],
		['PAGE','58301',jdecode('MONTBLANC'),jdecode(''),'/4632/58301.html','true',[],'',''],
		['PAGE','52469',jdecode('ORIS'),jdecode(''),'/4632/52469.html','true',[],'',''],
		['PAGE','52301',jdecode('UNIVERSAL+Gen%C3%A8ve'),jdecode(''),'/4632/52301.html','true',[],'',''],
		['PAGE','76501',jdecode('ZENITH'),jdecode(''),'/4632/76501.html','true',[],'','']
	],'',''],
	['PAGE','4659',jdecode('BIJOUX+%26+ACC.'),jdecode(''),'/4659/index.html','true',[ 
		['PAGE','24775',jdecode('ABC+du+diamant'),jdecode(''),'/4659/24775.html','true',[],'',''],
		['PAGE','24531',jdecode('Atelier+de+cr%C3%A9ations'),jdecode(''),'/4659/24531.html','true',[],'','']
	],'',''],
	['PAGE','22626',jdecode('SERVICES%2FSAV'),jdecode(''),'/22626/index.html','true',[ 
		['PAGE','22653',jdecode('Conseils+d%26%23x27%3Bentretien'),jdecode(''),'/22626/22653.html','true',[],'',''],
		['PAGE','22680',jdecode('R%C3%A9vision+compl%C3%A8te'),jdecode(''),'/22626/22680.html','true',[],'',''],
		['PAGE','22707',jdecode('Contr%C3%B4le+%C3%A9tanch%C3%A9it%C3%A9'),jdecode(''),'/22626/22707.html','true',[],'',''],
		['PAGE','23649',jdecode('Conseils+utiles'),jdecode(''),'/22626/23649.html','true',[],'',''],
		['PAGE','23899',jdecode('Restauration'),jdecode(''),'/22626/23899.html','true',[],'','']
	],'',''],
	['PAGE','5004',jdecode('NEWS'),jdecode(''),'/5004.html','true',[],'',''],
	['PAGE','5031',jdecode('CONTACT'),jdecode(''),'/5031/index.html','true',[ 
		['PAGE','45588',jdecode('Inscription+Newsletter'),jdecode(''),'/5031/45588.html','true',[],'','']
	],'',''],
	['PAGE','40743',jdecode('GUEST+BOOK'),jdecode(''),'/40743/index.html','true',[ 
		['PAGE','40742',jdecode('Entr%C3%A9es'),jdecode(''),'/40743/40742.html','false',[],'','']
	],'',''],
	['PAGE','9703',jdecode('LIENS'),jdecode(''),'/9703.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='003399';
theSitetree.keyvisualId='1267';
theSitetree.keyvisualName='alte_moebel.jpg';
theSitetree.fontsetId='190';
theSitetree.graphicsetId='228';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Profile',
				paletteFamily: 	'003399',
				keyvisualId: 	'1267',
				keyvisualName: 	'alte_moebel.jpg',
				fontsetId: 		'190',
				graphicsetId: 	'228',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'003399',
				b_color: 		'000066',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4521',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1060841']={
webappId:    '1501',
documentId:  '4521',
internalId:  '1060841',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-40743abw0x0inx2wv']={
webappId:    '1002',
documentId:  '40743',
internalId:  '40743abw0x0inx2wv',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4632',
internalId:  '',
customField: '20100315-224503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58301',
internalId:  '',
customField: '20080721-234011'
};
webappMappings['7008']=webappMappings['7008-396']={
webappId:    '7008',
documentId:  '45588',
internalId:  '396',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4521',
internalId:  '',
customField: '20100311-220329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52301',
internalId:  '',
customField: '20080501-171022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52322',
internalId:  '',
customField: '20080501-173513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52364',
internalId:  '',
customField: '20080501-175327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52385',
internalId:  '',
customField: '20080501-175036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52427',
internalId:  '',
customField: '20080501-155517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52469',
internalId:  '',
customField: '20080501-155517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4659',
internalId:  '',
customField: '20100311-230303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24775',
internalId:  '',
customField: '20060330-101903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24531',
internalId:  '',
customField: '20060129-200314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22626',
internalId:  '',
customField: '20071126-235355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22653',
internalId:  '',
customField: '20080325-035425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22680',
internalId:  '',
customField: '20071126-234443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22707',
internalId:  '',
customField: '20060910-185257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23649',
internalId:  '',
customField: '20060910-184934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23899',
internalId:  '',
customField: '20080325-035602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5004',
internalId:  '',
customField: '20081128-233125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5031',
internalId:  '',
customField: '20080331-015817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45588',
internalId:  '',
customField: '20080331-023244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40743',
internalId:  '',
customField: '20080331-020045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40742',
internalId:  '',
customField: '20080309-235943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9703',
internalId:  '',
customField: '20081128-233447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76501',
internalId:  '',
customField: '20100311-224303'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INX2WV';
var companyName   = 'Horlogerie+-+Bijouterie+PIGUET';
var htmlTitle	  = 'PIGUET+Horlogerie-Bijouterie';
var metaKeywords  = 'Piguet+PIGUET+piguet+ZENITH+EL+PRIMERO+ELITE+CHRONOGRAPHE+DINH+VAN+Jaeger+Jaeger-LeCoultre+Piguet+Bijouterie+Horlogerie+Horloger+Bijoutier+Blancpain+Oris+Gucci+Universal+Compax+Uni-Compax+Medico-Compax+Aero-Compax+Tri-Compax+Polerouter+le+glorieux+Microtor+Chantecler+Chopard+Happy+diamonds+Happy+spirit+Happy+Sport+Happy+fish+Happy+Beach+Happy+Sport+Mille+miglia+Chronographe+automatique+montre+pendule+Atmos+diamant+rubis+saphir+%C3%A9meraude+service+cr%C3%A9ation+conseil+Pomellato+Girard-Perregaux+Fope+Reverso+Master+Compressor+Williams+R%C3%A9paration+Restauration+Vintage+Cats+Eye+1911+Beluga+Classic+Wave+Ebelissimo+Richeville+Evo3+Laureato+Id%C3%A9ale+Luna+Baby+Nudo+Sheherazade+Sassi+Sabbia+Lola+Hamptom+Milleis+Capeland+Riviera+Classima+Executive+Linea+Strada+TT1+Artelier+Miles+Sinatra+Big+Crown+L%C3%A9man+Villeret+Le+Brassus+Horsebite+DoDo+dodo+DODO+Meister+UG+100+UG+101+Uni-Timer+Timer+Chronograph+Okeanos+Compax+Okeanos+Aero-Compax+Okeanos+Moon+Chrongraph+Okeanos+Moon-Timer+Okeanos+Traveller+Anthea+Diamond+A.+Lange++S%C3%B6hne+Aerowatch+Alpina+Andersen+Gen%C3%A8ve+Antoine+Preziuso+Armin+Strom+Arnold++Son+Audemars+Piguet+B.R.M.+Ball+Watch+Bedat++Co.+Bell++Ross+BNB+CONCEPT+Boucheron+Bovet+Fleurier+Breguet+Breitling+Bucherer+Bulgari+Bulova+Calabrese+Carl+F.+Bucherer+Cartier+Chanel+Chaumet+Chronographe+Suisse+Chronoswiss+Concord+Corum+Cuervo+y+Sobrinos+Cvstos+Daniel+Roth+de+Grisogono+deLaCour+Delance+Delaneau+DeWitt+Dior+Dubey++Schaldenbrand+Eberhard++Co+Eterna+F.P.Journe+Favre+Leuba+Franc+Vila+Franck+Muller+Fr%C3%A9d%C3%A9rique+Constant+G%C3%A9rald+Genta+Glash%C3%BCtte+Glycine+Graham+Greubel+Forsey+Hamilton+Harry+Winston+Hautlence+Hublot+Hysek+Ikepod+IWC+Jaquet+Droz+L.U.C+L%C3%A9on+Hatot+Longines+Louis+Vuitton+Matthew+Norman+Mauboussin+Maurice+Lacroix+MBF+Michel+Jordi+Minerva+Montblanc+Movado+Omega+Panerai+Parmigiani+Patek+Philippe+Perrelet+Piaget+Poiray+Rado+Reuge+Richard+Mille+Roger+Dubuis+Rolex+Romain+Jerome+Sarcar+Gen%C3%A8ve+Sinn+Suunto+Swatch+Swiza+Tabbah+TAG+Heuer+Technomarine+Tiffany+Co+Tudor+Ulysse+Nardin+Vacheron+Constantin+Van+Cleef++Arpels+Van+Der+Bauwede+Ventura+Viator+Villemont';
var metaContents  = 'PIGUET%2C+Horlogerie-Bijouterie+depuis+1966+%C3%A0+Nyon.+Concessionnaire+officiel+pour+les+plus+grandes+marques%3A+ZENITH%2C+LOUIS+GOLAY%2C+DINH+VAN%2C+UNIVERSAL+Gen%C3%A8ve%2C+LOUIS+ERARD%2C+MONTBLANC%2C+MONTEGRAPPA%2C+BLANCPAIN%2C+JAEGER-LECOULTRE%2C+GIRARD-PERREGAUX%2C+CHOPARD%2C+CHANTECLER%2C+POMELLATO%2C+DODO%2C+BAUME+et+MERCIER%2C+GUCCI%2C+ORIS%2C+EBEL%2C+ERWIN+SATTLER.+R%C3%A9paration+et+restauration+de+toutes+marques+horlog%C3%A8res+et+bijoux.+Cr%C3%A9ations+exclusives+de+bijoux...';
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();
};
