/* [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','852',jdecode('Curriculum+Vitae'),jdecode(''),'/852/index.html','true',[ 
		['PAGE','27222',jdecode('%D8%A7%D9%84%D8%B3%D9%8A%D8%B1%D9%87+%D8%A7%D9%84%D8%B0%D8%A7%D8%AA%D9%8A%D9%87+'),jdecode(''),'/852/27222.html','true',[],'']
	],''],
	['PAGE','25101',jdecode('Virtual+Clinic'),jdecode(''),'/25101/index.html','true',[ 
		['PAGE','27390',jdecode('%D8%A7%D9%84%D8%B9%D9%8A%D8%A7%D8%AF%D9%87+%D8%A7%D9%84%D8%AA%D9%81%D8%A7%D8%B9%D9%84%D9%8A%D9%87+'),jdecode(''),'/25101/27390.html','true',[],'']
	],''],
	['PAGE','10901',jdecode('My+Personal+Art+Gallery'),jdecode(''),'/10901.html','true',[],''],
	['PAGE','18501',jdecode('Links+for+Dermatologists'),jdecode(''),'/18501.html','true',[],''],
	['PAGE','873',jdecode('Spectrum+of+Practice'),jdecode(''),'/873/index.html','false',[ 
		['PAGE','27243',jdecode('%D9%86%D8%B7%D8%A7%D9%82+%D8%A7%D9%84%D8%AA%D8%AE%D8%B5%D8%B5+'),jdecode(''),'/873/27243.html','true',[],''],
		['PAGE','8201',jdecode('Special+Programs'),jdecode(''),'/873/8201.html','false',[],''],
		['PAGE','27264',jdecode('%D8%A8%D8%B1%D8%A7%D9%85%D8%AC+%D9%85%D8%AA%D8%AE%D8%B5%D8%B5%D9%87+'),jdecode(''),'/873/27264.html','false',[],'']
	],''],
	['PAGE','18522',jdecode('Links+for+Patients'),jdecode(''),'/18522.html','true',[],''],
	['PAGE','801',jdecode('Home'),jdecode(''),'/801/index.html','false',[ 
		['PAGE','27201',jdecode('%D8%A7%D9%84%D8%B5%D9%81%D8%AD%D9%87+%D8%A7%D9%84%D8%B1%D8%A6%D9%8A%D8%B3%D9%8A%D9%87'),jdecode(''),'/801/27201.html','true',[],'']
	],''],
	['PAGE','27306',jdecode('Offers'),jdecode(''),'/27306/index.html','false',[ 
		['PAGE','27327',jdecode('%D8%B9%D8%B1%D9%88%D8%B6%D9%86%D8%A7+'),jdecode(''),'/27306/27327.html','true',[],'']
	],''],
	['PAGE','915',jdecode('Contact'),jdecode(''),'/915/index.html','false',[ 
		['PAGE','29901',jdecode('%D9%83%D9%8A%D9%81+%D8%AA%D8%AA%D8%B5%D9%84+%D8%A8%D9%86%D8%A7+'),jdecode(''),'/915/29901.html','true',[],'']
	],''],
	['PAGE','17401',jdecode('Appointments'),jdecode(''),'/17401/index.html','false',[ 
		['PAGE','27348',jdecode('%D8%A7%D9%84%D9%85%D9%88%D8%A7%D8%B9%D9%8A%D8%AF'),jdecode(''),'/17401/27348.html','true',[],'']
	],''],
	['PAGE','17422',jdecode('Forms'),jdecode(''),'/17422/index.html','false',[ 
		['PAGE','42599',jdecode('Forms+%28follow+up+page%29'),jdecode(''),'/17422/42599.html','false',[],''],
		['PAGE','27369',jdecode('%D8%A7%D9%84%D9%86%D9%85%D8%A7%D8%B0%D8%AC+%D8%A8%D8%A7%D9%84%D8%B9%D8%B1%D8%A8%D9%8A%D9%87+%D8%A7%D8%B6%D8%BA%D8%B7+%D9%87%D9%86%D8%A7'),jdecode(''),'/17422/27369/index.html','true',[ 
			['PAGE','42621',jdecode('%D8%A7%D9%84%D9%86%D9%85%D8%A7%D8%B0%D8%AC+%D8%A8%D8%A7%D9%84%D8%B9%D8%B1%D8%A8%D9%8A%D9%87+%D8%A7%D8%B6%D8%BA%D8%B7+%D9%87%D9%86%D8%A7+%28follow+up+page%29'),jdecode(''),'/17422/27369/42621.html','false',[],'']
		],'']
	],''],
	['PAGE','10506',jdecode('Patient+stories'),jdecode(''),'/10506/index.html','true',[ 
		['PAGE','10501',jdecode('Read+the+stories'),jdecode(''),'/10506/10501.html','false',[],'']
	],''],
	['PAGE','894',jdecode('Jobs'),jdecode(''),'/894/index.html','false',[ 
		['PAGE','29922',jdecode('%D9%81%D8%B1%D8%B5+%D9%88%D8%B8%D9%8A%D9%81%D9%8A%D9%87+'),jdecode(''),'/894/29922.html','true',[],'']
	],'']];
var siteelementCount=27;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1736';
theSitetree.keyvisualName='beauty.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1736',
				keyvisualName: 	'beauty.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '852',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20090215-232917'
};
webappMappings['1002']=webappMappings['1002-10506AHW050INXX1W']={
webappId:    '1002',
documentId:  '10506',
internalId:  '10506AHW050INXX1W',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '852',
internalId:  '1501',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-13479d05d2ff3db0a0a17f44f8c9656c']={
webappId:    '7060',
documentId:  '10901',
internalId:  '13479d05d2ff3db0a0a17f44f8c9656c',
customField: 'language:en;country:US;'
};
webappMappings['1001']=webappMappings['1001-ahw050inxx1w11a9b37450b']={
webappId:    '1001',
documentId:  '17422',
internalId:  'ahw050inxx1w11a9b37450b',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inxx1w11a9b37450b']={
webappId:    '1001',
documentId:  '42599',
internalId:  'ahw050inxx1w11a9b37450b',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050inxx1w11a9b3e4525']={
webappId:    '1001',
documentId:  '27369',
internalId:  'ahw050inxx1w11a9b3e4525',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inxx1w11a9b3e4525']={
webappId:    '1001',
documentId:  '42621',
internalId:  'ahw050inxx1w11a9b3e4525',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27201',
internalId:  '',
customField: '20090215-231643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20090215-234444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27222',
internalId:  '',
customField: '20090215-232855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '873',
internalId:  '',
customField: '20080927-182745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27243',
internalId:  '',
customField: '20090215-230513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20080615-072030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27264',
internalId:  '',
customField: '20080614-133649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27306',
internalId:  '',
customField: '20080615-072103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27327',
internalId:  '',
customField: '20080614-134214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '915',
internalId:  '',
customField: '20090215-232133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29901',
internalId:  '',
customField: '20090215-232226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20090215-225510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27348',
internalId:  '',
customField: '20080820-170905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17422',
internalId:  '',
customField: '20090215-225546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42599',
internalId:  '',
customField: '20080618-062748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27369',
internalId:  '',
customField: '20080819-132935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42621',
internalId:  '',
customField: '20080618-063526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20090215-225727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27390',
internalId:  '',
customField: '20090215-225835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18501',
internalId:  '',
customField: '20090216-042557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18522',
internalId:  '',
customField: '20090216-042526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10506',
internalId:  '',
customField: '20090216-042457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20080613-123313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20080618-080521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '894',
internalId:  '',
customField: '20090216-042314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29922',
internalId:  '',
customField: '20090216-042418'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXX1W';
var companyName   = 'Dermatologyclinics.net';
var htmlTitle	  = 'dermatologyclinics.net';
var metaKeywords  = 'dermatology%2C+cosmetics%2C+medical%2Ciqbal+bukhari%2Clasers%2C+peels%2C';
var metaContents  = 'dermatology%2C+cosmetics%2C+medical%2Ciqbal+bukhari%2Cprivate+clinics+in+saudi+arabia';
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();
};
