/* [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','11001',jdecode('Home'),jdecode(''), jdecode('%2F11001%2Findex.html'), 'true',[ 
		['PAGE','62401',jdecode('Guestbook'),jdecode(''), jdecode('%2F11001%2F62401.html'), 'true',[],'',''],
		['PAGE','61943',jdecode('Blog'),jdecode(''), jdecode('%2F11001%2F61943.html'), 'true',[],'',''],
		['PAGE','62548',jdecode('Forum'),jdecode(''), jdecode('%2F11001%2F62548.html'), 'true',[],'',''],
		['PAGE','101715',jdecode('Voting'),jdecode(''), jdecode('%2F11001%2F101715.html'), 'true',[],'',''],
		['PAGE','96271',jdecode('Chat+Room'),jdecode(''), jdecode('%2F11001%2F96271.html'), 'true',[],'',''],
		['PAGE','61901',jdecode('Second+Life'),jdecode(''), jdecode('%2F11001%2F61901.html'), 'true',[],'','']
	],'',''],
	['PAGE','62422',jdecode('Tery+%26+Pinky'),jdecode(''), jdecode('%2F62422%2Findex.html'), 'true',[ 
		['PAGE','62443',jdecode('About+us'),jdecode(''), jdecode('%2F62422%2F62443.html'), 'true',[],'',''],
		['PAGE','62464',jdecode('Gallery'),jdecode(''), jdecode('%2F62422%2F62464.html'), 'true',[],'',''],
		['PAGE','62611',jdecode('Tomboi+Fashions'),jdecode(''), jdecode('%2F62422%2F62611.html'), 'true',[],'','']
	],'',''],
	['PAGE','11501',jdecode('Lesbian+Mob'),jdecode(''), jdecode('%2F11501%2Findex.html'), 'true',[ 
		['PAGE','62485',jdecode('Mission'),jdecode(''), jdecode('%2F11501%2F62485.html'), 'true',[],'',''],
		['PAGE','62506',jdecode('Events'),jdecode(''), jdecode('%2F11501%2F62506.html'), 'true',[],'',''],
		['PAGE','62527',jdecode('Gallery'),jdecode(''), jdecode('%2F11501%2F62527.html'), 'true',[],'',''],
		['PAGE','62901',jdecode('What%26%23x27%3Bs+New'),jdecode(''), jdecode('%2F11501%2F62901.html'), 'true',[],'',''],
		['PAGE','62590',jdecode('Rainbow+Moon'),jdecode(''), jdecode('%2F11501%2F62590.html'), 'true',[],'','']
	],'',''],
	['PAGE','97271',jdecode('Calendar'),jdecode(''), jdecode('%2F97271.html'), 'true',[],'',''],
	['PAGE','63301',jdecode('Links'),jdecode(''), jdecode('%2F63301.html'), 'true',[],'',''],
	['PAGE','62632',jdecode('Contact+Us'),jdecode(''), jdecode('%2F62632.html'), 'true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Filofax';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='442';
theSitetree.keyvisualName='frau_rot.jpg';
theSitetree.fontsetId='61';
theSitetree.graphicsetId='62';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLYTC24G'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Filofax',
				paletteFamily: 	'003366',
				keyvisualId: 	'442',
				keyvisualName: 	'frau_rot.jpg',
				fontsetId: 		'61',
				graphicsetId: 	'62',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'66CCFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20100216-150227'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20100216-170455'
};
webappMappings['7050']=webappMappings['7050-2227']={
webappId:    '7050',
documentId:  '61943',
internalId:  '2227',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61901',
internalId:  '',
customField: '20100216-005025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61943',
internalId:  '',
customField: '20100217-150521'
};
webappMappings['1002']=webappMappings['1002-62401ahw050inz4fa']={
webappId:    '1002',
documentId:  '62401',
internalId:  '62401ahw050inz4fa',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-df2bef13b024a2e2761ebb9faede3798']={
webappId:    '7060',
documentId:  '62464',
internalId:  'df2bef13b024a2e2761ebb9faede3798',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-8e1cbc37b472126b894cce6f6b21cfba']={
webappId:    '7060',
documentId:  '62527',
internalId:  '8e1cbc37b472126b894cce6f6b21cfba',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-ahw050inz4fa126d487db34']={
webappId:    '1003',
documentId:  '62548',
internalId:  'ahw050inz4fa126d487db34',
customField: 'en:US'
};
webappMappings['7008']=webappMappings['7008-6730']={
webappId:    '7008',
documentId:  '62632',
internalId:  '6730',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62401',
internalId:  '',
customField: '20100217-150501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62422',
internalId:  '',
customField: '20100217-150721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62443',
internalId:  '',
customField: '20100217-152928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62464',
internalId:  '',
customField: '20100216-174846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62485',
internalId:  '',
customField: '20100216-184018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62506',
internalId:  '',
customField: '20100217-225826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62527',
internalId:  '',
customField: '20100216-005701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62548',
internalId:  '',
customField: '20100217-150605'
};
webappMappings['7005']=webappMappings['7005-541']={
webappId:    '7005',
documentId:  '101715',
internalId:  '541',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62590',
internalId:  '',
customField: '20100217-230434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62611',
internalId:  '',
customField: '20100216-174330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62632',
internalId:  '',
customField: '20100215-212859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62901',
internalId:  '',
customField: '20100217-153039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63301',
internalId:  '',
customField: '20100217-171400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96271',
internalId:  '',
customField: '20100217-234027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97271',
internalId:  '',
customField: '20100217-150638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101715',
internalId:  '',
customField: '20100217-225413'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INZ4FA';
var companyName   = 'Uni-Together.com';
var htmlTitle	  = 'UNI-TOGETHER';
var metaKeywords  = '';
var metaContents  = '';
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();
};

