/* [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','352',jdecode('Mission+%26+Values'),jdecode(''),'/352.html','true',[],'',''],
	['PAGE','31501',jdecode('Sassan+Behjat'),jdecode(''),'/31501.html','true',[],'',''],
	['PAGE','36601',jdecode('Homeopathy'),jdecode(''),'/36601.html','true',[],'',''],
	['PAGE','6443',jdecode('CAM+Consultancy'),jdecode(''),'/6443.html','true',[],'',''],
	['PAGE','6422',jdecode('Workshops'),jdecode(''),'/6422.html','true',[],'',''],
	['PAGE','19301',jdecode('Photo+Album'),jdecode(''),'/19301.html','false',[],'',''],
	['PAGE','36622',jdecode('Contact'),jdecode(''),'/36622.html','true',[],'',''],
	['PAGE','6485',jdecode('Disclaimer'),jdecode(''),'/6485.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Groove';
theSitetree.paletteFamily='B7B0F5';
theSitetree.keyvisualId='6037';
theSitetree.keyvisualName='kv_6037.jpg';
theSitetree.fontsetId='11123';
theSitetree.graphicsetId='12911';
theSitetree.contentColor='5F5F60';
theSitetree.contentBGColor='E4E4E6';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Groove',
				paletteFamily: 	'B7B0F5',
				keyvisualId: 	'6037',
				keyvisualName: 	'kv_6037.jpg',
				fontsetId: 		'11123',
				graphicsetId: 	'12911',
				contentColor: 	'5F5F60',
				contentBGColor: 'E4E4E6',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6422',
internalId:  '',
customField: '20100228-235811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6443',
internalId:  '',
customField: '20100228-235747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20100522-045321'
};
webappMappings['7060']=webappMappings['7060-cd0de946732fdb8176adfe9079801710']={
webappId:    '7060',
documentId:  '19301',
internalId:  'cd0de946732fdb8176adfe9079801710',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20100228-235837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6485',
internalId:  '',
customField: '20090310-205318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31501',
internalId:  '',
customField: '20100308-184231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36601',
internalId:  '',
customField: '20100228-235710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36622',
internalId:  '',
customField: '20100522-044303'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZWHI';
var companyName   = '.+++++Medblend+++++.';
var htmlTitle	  = 'Alternative+Medicine+%7C+Homeopathy+%7C+Integrative+Medicine+%7C+CAM+%7C+Natural+Health+%7C';
var metaKeywords  = 'integrative+medicine%2C+complementary+medicine%2C+holistic+health%2C+project+management%2C+biopharm%2C+biotechnology%2C+law%2C+projects%2C+alliance%2C+management%2C+planning+health%2C+insurance%2C+decisions%2C+homeopathy%2C+natural%2C+cancer%2C+allergy%2C+children%2C+cough%2C+cold%2C+pain%2C+holistic%2C+homoeopathy%2C+research%2C+sassan%2C+CAM%2C+TCAM%2C+WHO%2C+UAE%2C+USA%2C+US%2C+California%2C+Los+Gatos%2C+Cupertino%2C+Sunnyvale%2C+Bay+Area%2C+healthy%2C+health%2C+disease%2C+safe%2C+side-effect%2C+side+effect%2C+allopathy%2C+colic%2C+neck%2C+eyes%2C+nature%2C+CA%2C+diseases%2C+disease%2C+kids%2C+arnica%2C+bryonia%2C+allergy%2C+pollen%2C+cold%2C+cough%2C+flu%2C+IBS%2C+Sassan%2C+Behjat%2C+Regulatory%2C+Regulations%2C+OTC%2C+practitioner%2C+anxiety%2C+stress%2C+stressfree%2C+Abu+Dhabi%2C+Arab%2C+Iran%2C+India%2C+Bahai%2C+Jamshedpur%2C+Bihar%2C+help%2C+diet%2C+Ministry%2C+Exams%2C+Exam%2C+Self%2C+';
var metaContents  = 'Homeopathy+provides+a+unique+approach+to+life+and+wellbeing.+It+can+help+in+greater+self+confidence%2C+providing+an+opportunity+to+take+an+active+role+in+self-care%2C+wellbeing%2C+freedom+and+happiness.+Sassan+has+been+practicing+and+promoting+rational+and+safe+homeopathic+practice+for+the+past+20+years...';
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();
};
