/* [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 theSitetree=[ 
	['PAGE','2001',jdecode('Home'),jdecode(''),'/2001.html','true',[],''],
	['PAGE','2052',jdecode('Contact'),jdecode(''),'/2052.html','true',[],''],
	['PAGE','8201',jdecode('Products'),jdecode(''),'/8201/index.html','true',[ 
		['PAGE','42301',jdecode('ITA-BTCK101+%28Car+Kit%29'),jdecode(''),'/8201/42301.html','false',[],''],
		['PAGE','46001',jdecode('ITA-kinstar220+%28Car+Kit%29'),jdecode(''),'/8201/46001.html','false',[],''],
		['PAGE','10522',jdecode('ITR-officeSATA+%28enclosure%29'),jdecode(''),'/8201/10522.html','false',[],''],
		['PAGE','52901',jdecode('ITS-CarCam-1+%28car+camcorder%29'),jdecode(''),'/8201/52901.html','true',[],''],
		['PAGE','9101',jdecode('ITS-DTD-35+%28Data+Tray+Dock%29'),jdecode(''),'/8201/9101.html','true',[],''],
		['PAGE','47401',jdecode('ITS-DTD-25eS+%28HDD+Tray+Dock%29'),jdecode(''),'/8201/47401.html','true',[],'']
	],''],
	['PAGE','71701',jdecode('USB3.0+products+'),jdecode(''),'/71701/index.html','false',[ 
		['PAGE','87201',jdecode('ITD-NC300'),jdecode(''),'/71701/87201.html','true',[],''],
		['PAGE','71722',jdecode('ITD-PAS350-U3'),jdecode(''),'/71701/71722.html','true',[],''],
		['PAGE','71743',jdecode('ITD-SAS350-U3'),jdecode(''),'/71701/71743.html','true',[],''],
		['PAGE','86801',jdecode('ITH-XPC3.0'),jdecode(''),'/71701/86801.html','true',[],'']
	],''],
	['PAGE','42001',jdecode('Co-Products'),jdecode(''),'/42001/index.html','false',[ 
		['PAGE','74301',jdecode('ITC-IP70+%28IP+camera%29'),jdecode(''),'/42001/74301.html','true',[],''],
		['PAGE','18801',jdecode('ITD-350DS+%28Docking%29'),jdecode(''),'/42001/18801.html','true',[],''],
		['PAGE','35501',jdecode('ITD-NU240S%28DVD+enclosure%29'),jdecode(''),'/42001/35501.html','true',[],''],
		['PAGE','9301',jdecode('ITD-UF350SR%28RAID%29'),jdecode(''),'/42001/9301.html','true',[],''],
		['PAGE','50801',jdecode('ITJ-CKMT+%28Car+Kit%29'),jdecode(''),'/42001/50801.html','false',[],''],
		['PAGE','48601',jdecode('ITI-MP1100'),jdecode(''),'/42001/48601.html','false',[],''],
		['PAGE','42127',jdecode('ITM-DB120%28Converter%29'),jdecode(''),'/42001/42127.html','true',[],''],
		['PAGE','57701',jdecode('ITM-reader80%28Card+Reader%29'),jdecode(''),'/42001/57701.html','true',[],''],
		['PAGE','65801',jdecode('ITM-UPH260+%28HUB%29'),jdecode(''),'/42001/65801.html','true',[],''],
		['PAGE','42106',jdecode('ITM-DB253'),jdecode(''),'/42001/42106.html','false',[],''],
		['PAGE','42085',jdecode('ITM-DS240'),jdecode(''),'/42001/42085.html','false',[],''],
		['PAGE','9322',jdecode('ITP-HDMP'),jdecode(''),'/42001/9322.html','false',[],''],
		['PAGE','42064',jdecode('ITV-VP5700'),jdecode(''),'/42001/42064.html','false',[],''],
		['PAGE','42022',jdecode('ITV-GV6200'),jdecode(''),'/42001/42022.html','false',[],''],
		['PAGE','42043',jdecode('ITV-VP6060%28Digital+player%2Frecorder%29'),jdecode(''),'/42001/42043.html','false',[],''],
		['PAGE','23801',jdecode('PMP-IT09+%28MP4%29'),jdecode(''),'/42001/23801.html','true',[],''],
		['PAGE','18701',jdecode('ITD-MP400'),jdecode(''),'/42001/18701.html','false',[],''],
		['PAGE','32101',jdecode('ITD-SD2350'),jdecode(''),'/42001/32101.html','false',[],''],
		['PAGE','22601',jdecode('ITP-HD608'),jdecode(''),'/42001/22601.html','false',[],''],
		['PAGE','10543',jdecode('ITO-RAID4'),jdecode(''),'/42001/10543.html','false',[],''],
		['PAGE','42322',jdecode('ITZ-BTheadset'),jdecode(''),'/42001/42322.html','false',[],''],
		['PAGE','63801',jdecode('ITZ-MsdRA%28Card+reader%2FAdapter%29'),jdecode(''),'/42001/63801.html','false',[],''],
		['PAGE','59601',jdecode('ITZ-webradio%28Internet+Radio%29'),jdecode(''),'/42001/59601.html','false',[],'']
	],''],
	['PAGE','62001',jdecode('Media+Center'),jdecode(''),'/62001.html','false',[],''],
	['PAGE','37601',jdecode('Wire+Harness+'),jdecode(''),'/37601.html','true',[],''],
	['PAGE','28101',jdecode('Product+Logo'),jdecode(''),'/28101.html','true',[],''],
	['PAGE','33101',jdecode('Stock+items+clearing+'),jdecode(''),'/33101/index.html','false',[ 
		['PAGE','33501',jdecode('PV-390-1'),jdecode(''),'/33101/33501.html','true',[],''],
		['PAGE','33522',jdecode('FotoBar'),jdecode(''),'/33101/33522.html','true',[],'']
	],''],
	['PAGE','77101',jdecode('Office+photo'),jdecode(''),'/77101.html','true',[],''],
	['PAGE','12901',jdecode('What%26%23x27%3Bs+New+'),jdecode(''),'/12901/index.html','true',[ 
		['PAGE','80701',jdecode('ITR-CEB01+%28car+blanket%29'),jdecode(''),'/12901/80701.html','true',[],''],
		['PAGE','82501',jdecode('ITM-woofer1'),jdecode(''),'/12901/82501.html','true',[],'']
	],'']];
var siteelementCount=48;
theSitetree.topTemplateName='Multimedia';
theSitetree.paletteFamily='98B4CA';
theSitetree.keyvisualId='11366';
theSitetree.keyvisualName='kv_11366.jpg';
theSitetree.fontsetId='32005';
theSitetree.graphicsetId='13832';
theSitetree.contentColor='4B77A2';
theSitetree.contentBGColor='98B4CA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Multimedia',
				paletteFamily: 	'98B4CA',
				keyvisualId: 	'11366',
				keyvisualName: 	'kv_11366.jpg',
				fontsetId: 		'32005',
				graphicsetId: 	'13832',
				contentColor: 	'4B77A2',
				contentBGColor: '98B4CA',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20100511-050709'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2052',
internalId:  '',
customField: '20100218-090802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20091210-023428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20090118-063357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9322',
internalId:  '',
customField: '20090118-064027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20100617-080636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10522',
internalId:  '',
customField: '20090118-061731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20100407-072543'
};
webappMappings['7008']=webappMappings['7008-12186']={
webappId:    '7008',
documentId:  '2052',
internalId:  '12186',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10543',
internalId:  '',
customField: '20090118-063743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20090118-063936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20090118-085536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20090120-062415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20090410-000404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28101',
internalId:  '',
customField: '20090925-101245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32101',
internalId:  '',
customField: '20090320-071855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33101',
internalId:  '',
customField: '20090320-041918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20090320-031123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33522',
internalId:  '',
customField: '20090320-035548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35501',
internalId:  '',
customField: '20090405-220214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37601',
internalId:  '',
customField: '20100421-083815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42001',
internalId:  '',
customField: '20100401-104238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42043',
internalId:  '',
customField: '20090505-030841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42022',
internalId:  '',
customField: '20090505-000340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42322',
internalId:  '',
customField: '20090505-064016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42127',
internalId:  '',
customField: '20090630-071540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42106',
internalId:  '',
customField: '20090504-042635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42085',
internalId:  '',
customField: '20090504-042635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42064',
internalId:  '',
customField: '20090504-042635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42301',
internalId:  '',
customField: '20090629-052458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46001',
internalId:  '',
customField: '20090630-000017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47401',
internalId:  '',
customField: '20100421-000229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48601',
internalId:  '',
customField: '20090706-035901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50801',
internalId:  '',
customField: '20090709-054014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52901',
internalId:  '',
customField: '20100511-065930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57701',
internalId:  '',
customField: '20091126-013612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59601',
internalId:  '',
customField: '20091001-060147'
};
webappMappings['7060']=webappMappings['7060-448990fdd7b62c63b467476054276826']={
webappId:    '7060',
documentId:  '62001',
internalId:  '448990fdd7b62c63b467476054276826',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62001',
internalId:  '',
customField: '20091020-032321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63801',
internalId:  '',
customField: '20091103-022716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65801',
internalId:  '',
customField: '20091119-030448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71701',
internalId:  '',
customField: '20100406-082301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71722',
internalId:  '',
customField: '20091216-051420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71743',
internalId:  '',
customField: '20091216-044800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74301',
internalId:  '',
customField: '20100106-223937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77101',
internalId:  '',
customField: '20100416-055733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80701',
internalId:  '',
customField: '20100401-095908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82501',
internalId:  '',
customField: '20100720-031205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86801',
internalId:  '',
customField: '20100406-081414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87201',
internalId:  '',
customField: '20100406-080936'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INEE0Q';
var companyName   = '+++Car+Camcorder+-+special+designed+for+vehicle+drivers+';
var htmlTitle	  = 'ITsupplier';
var metaKeywords  = 'bluetooth%2C+enclosure%2C+storage%2C+RAID%2C+MP4+player%2C+MP3+player%2C+';
var metaContents  = 'ITsupplier+';
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();
};
