/* [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','4601',jdecode('Home'),jdecode(''), jdecode('%2F4601.html'), 'true',[],'',''],
	['PAGE','5101',jdecode('Our+Services'),jdecode(''), jdecode('%2F5101%2Findex.html'), 'true',[ 
		['PAGE','12001',jdecode('Customer+Care+Services'),jdecode(''), jdecode('%2F5101%2F12001.html'), 'true',[],'',''],
		['PAGE','12022',jdecode('Lead+Generation+and+Customer+Acquisition+Services'),jdecode(''), jdecode('%2F5101%2F12022.html'), 'true',[],'',''],
		['PAGE','12043',jdecode('Contact+Center+Services'),jdecode(''), jdecode('%2F5101%2F12043.html'), 'true',[],'',''],
		['PAGE','12064',jdecode('Technical+Support+and+IT+Helpdesk+Services'),jdecode(''), jdecode('%2F5101%2F12064.html'), 'true',[],'',''],
		['PAGE','12085',jdecode('Benefits+of+Outsourcing+'),jdecode(''), jdecode('%2F5101%2F12085.html'), 'true',[],'','']
	],'',''],
	['PAGE','5122',jdecode('About+us'),jdecode(''), jdecode('%2F5122%2Findex.html'), 'true',[ 
		['PAGE','12106',jdecode('Our+Mission+Statement'),jdecode(''), jdecode('%2F5122%2F12106.html'), 'true',[],'',''],
		['PAGE','12127',jdecode('Our+Vision'),jdecode(''), jdecode('%2F5122%2F12127.html'), 'true',[],'',''],
		['PAGE','12148',jdecode('Our+Values'),jdecode(''), jdecode('%2F5122%2F12148.html'), 'true',[],'',''],
		['PAGE','12169',jdecode('Management+Team'),jdecode(''), jdecode('%2F5122%2F12169.html'), 'true',[],'','']
	],'',''],
	['PAGE','12190',jdecode('Recruitment+and+Training'),jdecode(''), jdecode('%2F12190.html'), 'true',[],'',''],
	['PAGE','12211',jdecode('Our+Price'),jdecode(''), jdecode('%2F12211.html'), 'true',[],'',''],
	['PAGE','5143',jdecode('Join+Our+Sales+Team'),jdecode(''), jdecode('%2F5143.html'), 'true',[],'',''],
	['PAGE','5164',jdecode('Contact+Us'),jdecode(''), jdecode('%2F5164.html'), 'true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Champagne';
theSitetree.paletteFamily='426388';
theSitetree.keyvisualId='11355';
theSitetree.keyvisualName='kv_11355.jpg';
theSitetree.fontsetId='31943';
theSitetree.graphicsetId='13786';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='426388';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp13-cbeyon',
  product: 'WSCSYSSSSLYTC2ZA'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Champagne',
				paletteFamily: 	'426388',
				keyvisualId: 	'11355',
				keyvisualName: 	'kv_11355.jpg',
				fontsetId: 		'31943',
				graphicsetId: 	'13786',
				contentColor: 	'000000',
				contentBGColor: '426388',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-22791']={
webappId:    '7008',
documentId:  '5143',
internalId:  '22791',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20110408-210006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20110408-211436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20110408-210934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5143',
internalId:  '',
customField: '20110221-213430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5164',
internalId:  '',
customField: '20110228-203944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20110408-210430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12022',
internalId:  '',
customField: '20110408-210519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12043',
internalId:  '',
customField: '20110408-210544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12064',
internalId:  '',
customField: '20110408-210633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12190',
internalId:  '',
customField: '20110408-210804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12211',
internalId:  '',
customField: '20110408-210853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12106',
internalId:  '',
customField: '20110408-211002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12127',
internalId:  '',
customField: '20110408-211031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12148',
internalId:  '',
customField: '20110408-211911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12169',
internalId:  '',
customField: '20110408-211950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12085',
internalId:  '',
customField: '20110408-205552'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7KJWN';
var companyName   = 'InterContinental';
var htmlTitle	  = 'www.intercontinentalcorp.com+';
var metaKeywords  = 'Intercontinental%2C+intercontinental+corporation%2C+Call+Center%2C+Philippines+Call+Center%2C+Inbound+call+center%2C+cheap+call+center%2C+BPO%2C+Intercontinental%2C+Intercontinental+corp%2C+Call+Center%2C+Philippines+Call+Center%2C+Inbound+call+center%2C+cheap+call+center%2C+BPO++';
var metaContents  = 'Welcome+to+Intercontinental+Corp%27s+official+website.+%0D%0AIntercontinetal+Corp%0D%0A1800+E+McFadden+Ave%0D%0ASuite+2-A%0D%0ASanta+Ana%2C+CA+9270%0D%0AToll+Free-+%28888%29+319-4969%0D%0AToll+Free+Fax-+%28866%29+976-1023%0D%0Asupport%40intercontinentalcorp.com+%0D%0A';
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();
};

