/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','14401',jdecode('Imaging+Diagnostic+Service'),jdecode(''),'/14401.html','true',[],''],
	['PAGE','10901',jdecode('Imaging+Equipment'),jdecode(''),'/10901.html','true',[],''],
	['PAGE','8201',jdecode('Medical+Equipment'),jdecode(''),'/8201.html','true',[],''],
	['PAGE','594',jdecode('Contact+Us'),jdecode(''),'/594.html','true',[],''],
	['PAGE','636',jdecode('Region+oF+Service'),jdecode(''),'/636.html','true',[],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1754';
theSitetree.keyvisualName='krankenhaus.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1754',
				keyvisualName: 	'krankenhaus.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20091015-022409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20090113-105301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20091015-022503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20090101-193607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20090705-052501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20090410-022446'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2W8T';
var companyName   = 'Technology+For+Today';
var htmlTitle	  = 'Hill+Imaging+Medical+Diagnostic+X-ray+Imaging+Equipment+Repair+Service+and+Sales';
var metaKeywords  = 'hill+imaging+inc.%2C+hill+imaging%2C+san+diego+county%2C+San+Diego%2C++x-ray+service%2C++x-ray+equipment%2C+x-ray+installation%2Cx-ray+move%2C+x-ray+relocation%2C+x-ray%2C+x-ray+repair%2C+x-ray+parts%2C+x-ray+rooms%2C+diagnostic+x-ray%2C+x-ray+machine%2C+dr%2C+digital+radiography%2C+digital+x-ray%2C+dr+x-ray%2C+medical+equipment+surplus%2C++medical+suppliers%2C++medical+equipment+%2C++medical+equipment+distributors%2C+medical+equipment+refurbished%2C++used+equipment%2C+hospital+equipment%2C+biomed+equipment%2C+biomed%2C+medical+surplus%2C+x-ray+surplus%2C+medical+equipment%2C+medical+equipment+%2C+medical+equipment+distributor%2C+medical+health+care%2C+medical+equipment+orthopedic%2C+medical+supply%2C+medical+companies%2C+medical+equipment+solutions%2C+medical+equipment+corporation%2C+instruments+equipment%2C+medical+equipment+testing%2C+scientific+equipment%2C+medical+equipment+suction%2C+medical+equipment+devices%2C+medical+equipment+laser%2C+medical+equipment+diagnostic%2C+++manufacturers+equipment%2C+medical+equipment+oxygen%2C+lab+medical%2C+medical+equipment+ultrasound%2C+medical+products%2C+safety+equipment%2C+instrument+equipment%2C+medical+in+india%2C+laboratory+medical%2C+disposable+equipment%2C+manufacturer+equipment%2C+medical+instrument%2C+medical+equipment+market%2C+medical+scientific%2C+medical+used%2C+ltd+equipment%2C+sales+equipment%2C+medical+equipment+device%2C+plastic+equipment%2C+medical+surgery%2C+medical+dental%2C+medical+healthcare%2C+medical+surgical%2C+manufacturing+equipment%2C+machine+equipment%2C+equipment+products%2C+equipment+supply%2C+imaging%2C+medical+imaging%2C+new+equipment%2C+used+equipment';
var metaContents  = 'Quality+Diagnostic+X-ray+Imaging+Service++in+Southern+California.19+years+of+experience+and+training+to+serve+you+better.++Timely+professional+diagnosis+to+keep+you+up+and+running.Competitive+pricing+to+help+your+pocketbook';
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();
};
