/* [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','4586',jdecode('Page+d%26%23x27%3Baccueil'),jdecode(''), jdecode('%2F4586.html'), 'true',[],'',''],
	['PAGE','460015',jdecode('Articles+Thermo'),jdecode(''), jdecode('%2F460015.html'), 'true',[],'',''],
	['PAGE','459988',jdecode('Bonnets'),jdecode(''), jdecode('%2F459988.html'), 'true',[],'',''],
	['PAGE','456592',jdecode('Boxers+Messieurs'),jdecode(''), jdecode('%2F456592.html'), 'true',[],'',''],
	['PAGE','70570',jdecode('Chaussettes'),jdecode(''), jdecode('%2F70570%2Findex.html'), 'true',[ 
		['PAGE','456277',jdecode('Premier+prix+'),jdecode(''), jdecode('%2F70570%2F456277.html'), 'true',[],'',''],
		['PAGE','460629',jdecode('Derby'),jdecode(''), jdecode('%2F70570%2F460629.html'), 'true',[],'',''],
		['PAGE','456286',jdecode('Fil+d%26%23x27%3BEcosse+'),jdecode(''), jdecode('%2F70570%2F456286.html'), 'true',[],'',''],
		['PAGE','456295',jdecode('Invisibles'),jdecode(''), jdecode('%2F70570%2F456295.html'), 'true',[],'',''],
		['PAGE','456450',jdecode('M%C3%A9dicales'),jdecode(''), jdecode('%2F70570%2F456450.html'), 'true',[],'',''],
		['PAGE','456313',jdecode('Mini+chaussettes'),jdecode(''), jdecode('%2F70570%2F456313.html'), 'true',[],'',''],
		['PAGE','456322',jdecode('Sport'),jdecode(''), jdecode('%2F70570%2F456322.html'), 'true',[],'','']
	],'',''],
	['PAGE','459997',jdecode('Echarpes'),jdecode(''), jdecode('%2F459997.html'), 'true',[],'',''],
	['PAGE','460006',jdecode('Gants'),jdecode(''), jdecode('%2F460006.html'), 'true',[],'',''],
	['PAGE','459852',jdecode('Maillots+de+corps'),jdecode(''), jdecode('%2F459852.html'), 'true',[],'',''],
	['PAGE','456601',jdecode('Slips+Messieurs'),jdecode(''), jdecode('%2F456601.html'), 'true',[],'',''],
	['PAGE','456619',jdecode('Polos+%26+T-shirts'),jdecode(''), jdecode('%2F456619.html'), 'true',[],'',''],
	['PAGE','460024',jdecode('Pulls+%26+D%C3%A9bardeurs'),jdecode(''), jdecode('%2F460024%2Findex.html'), 'true',[ 
		['PAGE','460172',jdecode('D%C3%A9bardeurs'),jdecode(''), jdecode('%2F460024%2F460172.html'), 'true',[],'',''],
		['PAGE','460181',jdecode('Pulls'),jdecode(''), jdecode('%2F460024%2F460181.html'), 'true',[],'',''],
		['PAGE','460190',jdecode('Pulls+polaires'),jdecode(''), jdecode('%2F460024%2F460190.html'), 'true',[],'','']
	],'',''],
	['PAGE','461741',jdecode('Kappa'),jdecode(''), jdecode('%2F461741.html'), 'true',[],'',''],
	['PAGE','461611',jdecode('Puma'),jdecode(''), jdecode('%2F461611.html'), 'true',[],'',''],
	['PAGE','461647',jdecode('Sergio+Tacchini'),jdecode(''), jdecode('%2F461647.html'), 'true',[],'',''],
	['PAGE','461750',jdecode('Sherpa'),jdecode(''), jdecode('%2F461750.html'), 'true',[],'',''],
	['PAGE','22990',jdecode('Contact'),jdecode(''), jdecode('%2F22990%2Findex.html'), 'true',[ 
		['PAGE','72002',jdecode('Contact+%28Folgeseite%29'),jdecode(''), jdecode('%2F22990%2F72002.html'), 'false',[],'','']
	],'',''],
	['PAGE','88230',jdecode('Plans'),jdecode(''), jdecode('%2F88230%2Findex.html'), 'true',[ 
		['PAGE','88176',jdecode('Plainpalais'),jdecode(''), jdecode('%2F88230%2F88176.html'), 'true',[],'','']
	],'',''],
	['PAGE','328525',jdecode('Banni%C3%A8res'),jdecode(''), jdecode('%2F328525.html'), 'true',[],'',''],
	['PAGE','351925',jdecode('+Liens'),jdecode(''), jdecode('%2F351925.html'), 'true',[],'',''],
	['PAGE','351952',jdecode('Annuaires+%26+Moteurs'),jdecode(''), jdecode('%2F351952.html'), 'true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Deejay';
theSitetree.paletteFamily='1322E1';
theSitetree.keyvisualId='4625';
theSitetree.keyvisualName='kv_4625.jpg';
theSitetree.fontsetId='10838';
theSitetree.graphicsetId='11310';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Deejay',
				paletteFamily: 	'1322E1',
				keyvisualId: 	'4625',
				keyvisualName: 	'kv_4625.jpg',
				fontsetId: 		'10838',
				graphicsetId: 	'11310',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'26BB1F',
				e_color: 		'26BB1F',
				f_color: 		'26BB1F',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-804930']={
webappId:    '1501',
documentId:  '4586',
internalId:  '804930',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4586',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '461750',
internalId:  '-',
customField: '20111110-062011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '461647',
internalId:  '',
customField: '20110719-175327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4586',
internalId:  '',
customField: '20110719-180921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '459997',
internalId:  '',
customField: '20090924-081903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '459988',
internalId:  '',
customField: '20090924-075656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70570',
internalId:  '',
customField: '20090924-080733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '456277',
internalId:  '',
customField: '20110717-161433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '456286',
internalId:  '',
customField: '20110717-161540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '456295',
internalId:  '',
customField: '20110717-161628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '456450',
internalId:  '',
customField: '20110717-161733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '456313',
internalId:  '',
customField: '20110717-161756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '456322',
internalId:  '',
customField: '20110717-161820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '461611',
internalId:  '',
customField: '20110719-170624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '456592',
internalId:  '',
customField: '20090924-075924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '456601',
internalId:  '',
customField: '20090924-082235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '456619',
internalId:  '',
customField: '20090924-082331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22990',
internalId:  '',
customField: '20090924-083012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72002',
internalId:  '',
customField: '20040912-074446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88230',
internalId:  '',
customField: '20110717-162044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460006',
internalId:  '',
customField: '20090924-081957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88176',
internalId:  '',
customField: '20110717-162108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '328525',
internalId:  '',
customField: '20110714-100326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '351925',
internalId:  '',
customField: '20110717-162133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '351952',
internalId:  '',
customField: '20110713-102404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460172',
internalId:  '',
customField: '20090924-082611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460181',
internalId:  '',
customField: '20090924-082707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460190',
internalId:  '',
customField: '20110717-162016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460629',
internalId:  '',
customField: '20090924-081208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '459852',
internalId:  '',
customField: '20090924-082138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460015',
internalId:  '',
customField: '20110717-161259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460024',
internalId:  '',
customField: '20090924-082439'
};
webappMappings['7008']=webappMappings['7008-2417']={
webappId:    '7008',
documentId:  '22990',
internalId:  '2417',
customField: 'language:fr;country:FR;'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXX63';
var companyName   = '+';
var htmlTitle	  = 'gardif+march%C3%A9s';
var metaKeywords  = 'PRODUITS+MANUFACTURES+%2C+CHAUSSETTES%2C+MARCHES%2C+ARTICLES+BAZAR';
var metaContents  = 'Produits+manufactur%C3%A9s++sur+les+march%C3%A9s+de+Gen%C3%A8ve.Chaussettes+fil+dEcosse+Articles+BazarTitleGARDIF+March%C3%A9s%2FTitleMeta+Name%3DTitle+Content%3DGARDIF+March%C3%A9s+Meta+Name%3DDescription+Content%3DProduits+manufactur%C3%A9s+sur+les+march%C3%A9s+de+Gen%C3%A8ve.+chaussettes+fil+dEcosseMeta+Name%3DKeywords+Content%3DCHAUSSURES+CHAUSSURES_DAME+CHAUSSURES_HOMME+CHAUSSETTES+MARCHES+GENEVEMeta+Name%3DAuthor+Content%3DC.+GarciaMeta+Name%3DReply-To+Content%3Dgardif%40bluewin.chMeta+Name%3DRobots+Content%3Dindex%2Cfollow%2CallMeta+Name%3DRevisit-After+Content%3D14+DAYSMeta+Name%3DLanguage+Content%3DfrMeta+Http-Equiv%3Dcontent-Language+Content%3DfrMeta+Name%3DRating+Content%3DInternet%21--Meta+gratuits+g%C3%A9n%C3%A9r%C3%A9s+par+Booster4+http%3A%2F%2Fwww.booster4.com--';
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();
};

