/* [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','14701',jdecode('Home'),jdecode(''),'/14701.html','true',[],''],
	['PAGE','14752',jdecode('About+us'),jdecode(''),'/14752.html','true',[],''],
	['PAGE','14815',jdecode('Contact'),jdecode(''),'/14815.html','true',[],''],
	['PAGE','15901',jdecode('Top+Girls'),jdecode(''),'/15901.html','true',[],''],
	['PAGE','15922',jdecode('Rates'),jdecode(''),'/15922/index.html','true',[ 
		['PAGE','14836',jdecode('Specials'),jdecode(''),'/15922/14836.html','true',[],'']
	],''],
	['PAGE','41801',jdecode('more+links'),jdecode(''),'/41801.html','true',[],''],
	['PAGE','78201',jdecode('ling'),jdecode(''),'/78201.html','false',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Heart';
theSitetree.paletteFamily='C14F4F';
theSitetree.keyvisualId='7760';
theSitetree.keyvisualName='kv_7760.jpg';
theSitetree.fontsetId='16807';
theSitetree.graphicsetId='12279';
theSitetree.contentColor='410A0A';
theSitetree.contentBGColor='F6CDCD';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Heart',
				paletteFamily: 	'C14F4F',
				keyvisualId: 	'7760',
				keyvisualName: 	'kv_7760.jpg',
				fontsetId: 		'16807',
				graphicsetId: 	'12279',
				contentColor: 	'410A0A',
				contentBGColor: 'F6CDCD',
				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:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20100112-230733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14752',
internalId:  '',
customField: '20090407-045452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20090407-045901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14815',
internalId:  '',
customField: '20080826-042701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14836',
internalId:  '',
customField: '20080826-071210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15922',
internalId:  '',
customField: '20080826-071049'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '14701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41801',
internalId:  '',
customField: '20090803-122831'
};
webappMappings['1501']=webappMappings['1501-15605271']={
webappId:    '1501',
documentId:  '14701',
internalId:  '15605271',
customField: '1501'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14701',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14752',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14815',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '15901',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '15922',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14836',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '41801',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78201',
internalId:  '',
customField: '20090224-044206'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '78201',
internalId:  '',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INE0Y3';
var companyName   = 'Ottawa+Escorts+Asian+Fantasy+';
var htmlTitle	  = 'ottawa+escorts++';
var metaKeywords  = 'escorts%2Cescort%2Cescort+ottawa%2Cottawa+escorts%2C+ottawa+escort+services%2C+asian+escorts%2C+escort+services+in+ottawa%2C+massage+and+escorts%3B+massage+in+ottawa%2C+fantasy+ottawa+escorts%2C+ottawasexy%2C+girlsexy%2C+girls.nightlife%2Cadult%2Cadult+entertainment%2Cpersonal+services%2Cpersonalsadult+services';
var metaContents  = 'asianfantasy+ottawa+escorts+services+with+huge+selection+of+girls.+our+beautiful+asian+escorts+are+for+all+occasions%2C++visiting+your+residence%2C+hotel+or+accompanying+you+to+any+type+of+social+event.+';
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();
};
