/* [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','801',jdecode('Home'),jdecode(''),'/801/index.html','true',[ 
		['PAGE','852',jdecode('About+us'),jdecode(''),'/801/852.html','true',[],''],
		['PAGE','43468',jdecode('Resume+Expert'),jdecode(''),'/801/43468.html','true',[],''],
		['PAGE','16601',jdecode('Testimonials'),jdecode(''),'/801/16601.html','true',[],''],
		['PAGE','16622',jdecode('Need+help%3F+Test+yourself.'),jdecode(''),'/801/16622.html','false',[],''],
		['PAGE','21101',jdecode('Why+Do+We+Write%3F'),jdecode(''),'/801/21101.html','false',[],''],
		['PAGE','31101',jdecode('Favorite+Charities'),jdecode(''),'/801/31101.html','false',[],'']
	],''],
	['PAGE','2201',jdecode('Our+Services+A-Z'),jdecode(''),'/2201/index.html','true',[ 
		['PAGE','28301',jdecode('Our+Services+A-Z+%28follow+up+page%29'),jdecode(''),'/2201/28301.html','false',[],'']
	],''],
	['PAGE','1041',jdecode('Sample+Writing+%26+Photos'),jdecode(''),'/1041.html','true',[],''],
	['PAGE','957',jdecode('Contact'),jdecode(''),'/957.html','true',[],''],
	['PAGE','33301',jdecode('Monthly+Specials'),jdecode(''),'/33301/index.html','false',[ 
		['PAGE','42068',jdecode('December'),jdecode(''),'/33301/42068.html','false',[],''],
		['PAGE','27301',jdecode('November'),jdecode(''),'/33301/27301.html','false',[],''],
		['PAGE','4401',jdecode('October+'),jdecode(''),'/33301/4401.html','false',[],''],
		['PAGE','46836',jdecode('February'),jdecode(''),'/33301/46836.html','false',[],''],
		['PAGE','48136',jdecode('March+'),jdecode(''),'/33301/48136.html','false',[],''],
		['PAGE','48936',jdecode('April+'),jdecode(''),'/33301/48936.html','false',[],''],
		['PAGE','50836',jdecode('May'),jdecode(''),'/33301/50836.html','false',[],''],
		['PAGE','50857',jdecode('June'),jdecode(''),'/33301/50857.html','false',[],''],
		['PAGE','52436',jdecode('July'),jdecode(''),'/33301/52436.html','false',[],''],
		['PAGE','53236',jdecode('August'),jdecode(''),'/33301/53236.html','false',[],'']
	],''],
	['PAGE','2222',jdecode('Terms'),jdecode(''),'/2222.html','true',[],''],
	['PAGE','1020',jdecode('Tips+%26+Tricks'),jdecode(''),'/1020/index.html','true',[ 
		['PAGE','28801',jdecode('Helpful+Links+for+Writers'),jdecode(''),'/1020/28801.html','true',[],'']
	],''],
	['PAGE','3706',jdecode('Guestbook'),jdecode(''),'/3706.html','false',[],''],
	['PAGE','3701',jdecode('Read+Guestbook'),jdecode(''),'/3701.html','false',[],''],
	['PAGE','6401',jdecode('Your+Opinion+Counts%21'),jdecode(''),'/6401.html','false',[],''],
	['PAGE','7101',jdecode('Your+Opinion+Counts%21+%28follow+up+page%29'),jdecode(''),'/7101.html','false',[],''],
	['PAGE','6422',jdecode('Polls'),jdecode(''),'/6422.html','false',[],''],
	['PAGE','47436',jdecode('Find+the+%22Oops%22+'),jdecode(''),'/47436/index.html','false',[ 
		['PAGE','47336',jdecode('Oops%21'),jdecode(''),'/47436/47336.html','true',[],'']
	],''],
	['PAGE','6443',jdecode('Forums'),jdecode(''),'/6443.html','false',[],''],
	['PAGE','27001',jdecode('%22Phunny+Photos%22'),jdecode(''),'/27001.html','false',[],''],
	['PAGE','40354',jdecode('Just+for+Kids'),jdecode(''),'/40354.html','false',[],'']];
var siteelementCount=35;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='1427';
theSitetree.keyvisualName='tastatur.jpg';
theSitetree.fontsetId='232';
theSitetree.graphicsetId='294';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Startup',
				paletteFamily: 	'000000',
				keyvisualId: 	'1427',
				keyvisualName: 	'tastatur.jpg',
				fontsetId: 		'232',
				graphicsetId: 	'294',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-3706ahw050invnme']={
webappId:    '1002',
documentId:  '3706',
internalId:  '3706ahw050invnme',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1020',
internalId:  '',
customField: '20081029-084105'
};
webappMappings['7005']=webappMappings['7005-2']={
webappId:    '7005',
documentId:  '6422',
internalId:  '2',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-ahw050invnme11c431c7f61']={
webappId:    '1003',
documentId:  '6443',
internalId:  'ahw050invnme11c431c7f61',
customField: 'en:US:'
};
webappMappings['1001']=webappMappings['1001-ahw050invnme11c4da21a7b']={
webappId:    '1001',
documentId:  '6401',
internalId:  'ahw050invnme11c4da21a7b',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050invnme11c4da21a7b']={
webappId:    '1001',
documentId:  '7101',
internalId:  'ahw050invnme11c4da21a7b',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20090521-140007'
};
webappMappings['1001']=webappMappings['1001-ahw050invnme11d2b2710cf']={
webappId:    '1001',
documentId:  '2201',
internalId:  'ahw050invnme11d2b2710cf',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050invnme11d2b2710cf']={
webappId:    '1001',
documentId:  '28301',
internalId:  'ahw050invnme11d2b2710cf',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1041',
internalId:  '',
customField: '20081030-141054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31101',
internalId:  '',
customField: '20090110-105021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20090110-110137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20081029-184739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21101',
internalId:  '',
customField: '20081029-185007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20081031-202045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16622',
internalId:  '',
customField: '20081101-081443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4401',
internalId:  '',
customField: '20081029-195706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27301',
internalId:  '',
customField: '20081028-144136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2222',
internalId:  '',
customField: '20090127-133214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20081101-160719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '957',
internalId:  '',
customField: '20090127-131954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27001',
internalId:  '',
customField: '20081030-122925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33301',
internalId:  '',
customField: '20081029-201351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3706',
internalId:  '',
customField: '20080908-122832'
};
webappMappings['1501']=webappMappings['1501-2885263']={
webappId:    '1501',
documentId:  '801',
internalId:  '2885263',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28301',
internalId:  '',
customField: '20081023-142059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3701',
internalId:  '',
customField: '20080908-122832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6401',
internalId:  '',
customField: '20081203-102000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20080910-135941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6422',
internalId:  '',
customField: '20081106-121500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6443',
internalId:  '',
customField: '20090401-144026'
};
webappMappings['7060']=webappMappings['7060-26647a7385e3a53b7eb872069d06e612']={
webappId:    '7060',
documentId:  '27001',
internalId:  '26647a7385e3a53b7eb872069d06e612',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-3c71c15c09030cde5932cc04418c28e0']={
webappId:    '7060',
documentId:  '27001',
internalId:  '3c71c15c09030cde5932cc04418c28e0',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-c7f43e257b70fdfc354991dff3b4f9e1']={
webappId:    '7060',
documentId:  '27001',
internalId:  'c7f43e257b70fdfc354991dff3b4f9e1',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-e10e6cadaf650e916067c588c83b9179']={
webappId:    '7060',
documentId:  '27001',
internalId:  'e10e6cadaf650e916067c588c83b9179',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40354',
internalId:  '',
customField: '20090110-055735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42068',
internalId:  '',
customField: '20081129-105659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43468',
internalId:  '',
customField: '20081219-174834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46836',
internalId:  '',
customField: '20090128-072026'
};
webappMappings['7008']=webappMappings['7008-1588']={
webappId:    '7008',
documentId:  '47336',
internalId:  '1588',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47436',
internalId:  '',
customField: '20090128-075124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47336',
internalId:  '',
customField: '20090128-075317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48136',
internalId:  '',
customField: '20090221-072935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48936',
internalId:  '',
customField: '20090401-144535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50836',
internalId:  '',
customField: '20090521-102147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50857',
internalId:  '',
customField: '20090521-134112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52436',
internalId:  '',
customField: '20090521-140837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53236',
internalId:  '',
customField: '20090729-094123'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INVNME';
var companyName   = 'WRITERS+4+RENT';
var htmlTitle	  = 'writers4rent.com';
var metaKeywords  = 'memory%2C+memories%2C+memoir%2C+preservation%2C+family%2C+keepsakes%2C+letters%2C+letter%2C+email%2C+write%2C+communication%2C+resume%2C+writer%2C+proofreader%2C+editor%2C+photographer%2C+spelling%2C+grammar%2C+punctuation%2C+misunderstood%2C+help%2C+business';
var metaContents  = 'Writing%2C+editing+and+proofreading%2C+specializing+in+keepsake+and+letter+writing%2C+memoirs%2C+and+resumes.++';
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();
};

