/* [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','6101',jdecode('Home'),jdecode(''), jdecode('%2F6101%2Findex.html'), 'true',[ 
		['PAGE','17801',jdecode('Contact'),jdecode(''), jdecode('%2F6101%2F17801.html'), 'true',[],'','']
	],'',''],
	['PAGE','7201',jdecode('O%26W+Watches'),jdecode(''), jdecode('%2F7201%2Findex.html'), 'true',[ 
		['PAGE','16201',jdecode('M-1'),jdecode(''), jdecode('%2F7201%2F16201.html'), 'true',[],'',''],
		['PAGE','16222',jdecode('M-2A'),jdecode(''), jdecode('%2F7201%2F16222.html'), 'true',[],'',''],
		['PAGE','16243',jdecode('M-4'),jdecode(''), jdecode('%2F7201%2F16243.html'), 'true',[],'',''],
		['PAGE','16264',jdecode('M-5'),jdecode(''), jdecode('%2F7201%2F16264.html'), 'false',[],'',''],
		['PAGE','16285',jdecode('M-6'),jdecode(''), jdecode('%2F7201%2F16285.html'), 'false',[],'',''],
		['PAGE','16306',jdecode('ID-3066+chronograph'),jdecode(''), jdecode('%2F7201%2F16306.html'), 'true',[],'',''],
		['PAGE','16701',jdecode('Mirage+III'),jdecode(''), jdecode('%2F7201%2F16701.html'), 'true',[],'',''],
		['PAGE','16764',jdecode('Flieger'),jdecode(''), jdecode('%2F7201%2F16764.html'), 'true',[],'',''],
		['PAGE','16743',jdecode('Toledo'),jdecode(''), jdecode('%2F7201%2F16743.html'), 'true',[],'',''],
		['PAGE','16327',jdecode('Cougar'),jdecode(''), jdecode('%2F7201%2F16327.html'), 'true',[],'',''],
		['PAGE','41501',jdecode('Cougar+II'),jdecode(''), jdecode('%2F7201%2F41501.html'), 'true',[],'',''],
		['PAGE','41801',jdecode('Cougar+III'),jdecode(''), jdecode('%2F7201%2F41801.html'), 'true',[],'',''],
		['PAGE','16722',jdecode('3095'),jdecode(''), jdecode('%2F7201%2F16722.html'), 'true',[],'',''],
		['PAGE','17290',jdecode('Ocean+Master'),jdecode(''), jdecode('%2F7201%2F17290.html'), 'true',[],'',''],
		['PAGE','36201',jdecode('Ocean+Master+6%2F9'),jdecode(''), jdecode('%2F7201%2F36201.html'), 'true',[],'',''],
		['PAGE','36222',jdecode('Cobra'),jdecode(''), jdecode('%2F7201%2F36222.html'), 'true',[],'','']
	],'',''],
	['PAGE','9601',jdecode('Aviation+Watches'),jdecode(''), jdecode('%2F9601%2Findex.html'), 'true',[ 
		['PAGE','17001',jdecode('34017'),jdecode(''), jdecode('%2F9601%2F17001.html'), 'true',[],'',''],
		['PAGE','45201',jdecode('34017-33'),jdecode(''), jdecode('%2F9601%2F45201.html'), 'true',[],'',''],
		['PAGE','17101',jdecode('44017'),jdecode(''), jdecode('%2F9601%2F17101.html'), 'true',[],'',''],
		['PAGE','17122',jdecode('44018'),jdecode(''), jdecode('%2F9601%2F17122.html'), 'true',[],'',''],
		['PAGE','17143',jdecode('6081'),jdecode(''), jdecode('%2F9601%2F17143.html'), 'true',[],'',''],
		['PAGE','17164',jdecode('6087'),jdecode(''), jdecode('%2F9601%2F17164.html'), 'true',[],'','']
	],'',''],
	['PAGE','9622',jdecode('Other+Watches'),jdecode(''), jdecode('%2F9622%2Findex.html'), 'false',[ 
		['PAGE','17269',jdecode('154+ZENITH'),jdecode(''), jdecode('%2F9622%2F17269.html'), 'true',[],'',''],
		['PAGE','37801',jdecode('Dalil+Monte-Carlo'),jdecode(''), jdecode('%2F9622%2F37801.html'), 'false',[],'','']
	],'',''],
	['PAGE','7964',jdecode('Watch+parts'),jdecode(''), jdecode('%2F7964.html'), 'false',[],'',''],
	['PAGE','8301',jdecode('Order'),jdecode(''), jdecode('%2F8301.html'), 'true',[],'',''],
	['PAGE','17822',jdecode('Prices'),jdecode(''), jdecode('%2F17822.html'), 'true',[],'',''],
	['PAGE','18501',jdecode('Search'),jdecode(''), jdecode('%2F18501.html'), 'true',[],'',''],
	['PAGE','18522',jdecode('Guestbook'),jdecode(''), jdecode('%2F18522.html'), 'true',[],'',''],
	['PAGE','18901',jdecode('Customer+letters'),jdecode(''), jdecode('%2F18901.html'), 'true',[],'','']];
var siteelementCount=35;
theSitetree.topTemplateName='Speed';
theSitetree.paletteFamily='CC0000';
theSitetree.keyvisualId='2342';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='373';
theSitetree.graphicsetId='423';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='CC0000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Speed',
				paletteFamily: 	'CC0000',
				keyvisualId: 	'2342',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'373',
				graphicsetId: 	'423',
				contentColor: 	'FFFFFF',
				contentBGColor: 'CC0000',
				a_color: 		'CC0000',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20100512-195827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7201',
internalId:  '',
customField: '20100801-153527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17822',
internalId:  '',
customField: '20100509-111203'
};
webappMappings['7008']=webappMappings['7008-9696']={
webappId:    '7008',
documentId:  '8301',
internalId:  '9696',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20100509-111221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7964',
internalId:  '',
customField: '20100505-134128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20100511-223246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20110512-144756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20110822-112026'
};
webappMappings['7008']=webappMappings['7008-9724']={
webappId:    '7008',
documentId:  '17801',
internalId:  '9724',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-9725']={
webappId:    '7008',
documentId:  '17822',
internalId:  '9725',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20100516-104748'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '18501',
internalId:  'search',
customField: 'language:de;country:CH;'
};
webappMappings['1002']=webappMappings['1002-18522abw0x0in25qy']={
webappId:    '1002',
documentId:  '18522',
internalId:  '18522abw0x0in25qy',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20100521-100127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16222',
internalId:  '',
customField: '20100801-153542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16243',
internalId:  '',
customField: '20100521-100150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18901',
internalId:  '',
customField: '20100526-131047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16306',
internalId:  '',
customField: '20100518-165943'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6101',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-31427989']={
webappId:    '1501',
documentId:  '6101',
internalId:  '31427989',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16264',
internalId:  '',
customField: '20100516-104952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16285',
internalId:  '',
customField: '20100516-105018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16327',
internalId:  '',
customField: '20100604-085847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16722',
internalId:  '',
customField: '20100516-105233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16743',
internalId:  '',
customField: '20100714-184150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16764',
internalId:  '',
customField: '20100801-153446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17001',
internalId:  '',
customField: '20110512-150224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17122',
internalId:  '',
customField: '20100714-184616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17143',
internalId:  '',
customField: '20100714-184649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17164',
internalId:  '',
customField: '20100714-184729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20100714-184549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17269',
internalId:  '',
customField: '20100525-122729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17290',
internalId:  '',
customField: '20100714-184051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18501',
internalId:  '',
customField: '20100511-175310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18522',
internalId:  '',
customField: '20100511-175327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36201',
internalId:  '',
customField: '20100714-184003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36222',
internalId:  '',
customField: '20100714-183820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37801',
internalId:  '',
customField: '20100526-165751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20100616-194850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41801',
internalId:  '',
customField: '20100616-194650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45201',
internalId:  '',
customField: '20110512-150913'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN25QY';
var companyName   = '+++++++++++++++O%26W+Watches+by+A.+Wajs';
var htmlTitle	  = '';
var metaKeywords  = 'Ollech+%26+Wajs%2C+O%26W%2C+Aviation%2C+Chronograph%2C+Army+watches%2C+Divers.';
var metaContents  = 'High+quality+Swiss+made+military+watches+since+the+1950%27s.+M-1%2C+M-2A%2C+M-4%2C+M-5%2C+M-6%2C+ID-3066+chronograph%2C+707+Cougar%2C+Mirage+III%2C+3095%2C+Toledo%2C+Flieger%2C+Ocean+Master.';
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();
};

