/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401%2Findex.html'), 'true',[ 
		['PAGE','94345',jdecode('Map'),jdecode(''), jdecode('%2F401%2F94345.html'), 'true',[],'',''],
		['PAGE','58501',jdecode('Photos'),jdecode(''), jdecode('%2F401%2F58501.html'), 'true',[],'','']
	],'',''],
	['PAGE','1601',jdecode('About+Us'),jdecode(''), jdecode('%2F1601.html'), 'true',[],'',''],
	['PAGE','33701',jdecode('Our+Staff'),jdecode(''), jdecode('%2F33701.html'), 'true',[],'',''],
	['PAGE','37801',jdecode('Grants+Pass'),jdecode(''), jdecode('%2F37801.html'), 'true',[],'',''],
	['PAGE','37822',jdecode('Cave+Junction'),jdecode(''), jdecode('%2F37822.html'), 'true',[],'',''],
	['PAGE','37843',jdecode('Glendale'),jdecode(''), jdecode('%2F37843.html'), 'true',[],'',''],
	['PAGE','75638',jdecode('Canyonville'),jdecode(''), jdecode('%2F75638.html'), 'true',[],'',''],
	['PAGE','1643',jdecode('Opening+Hours'),jdecode(''), jdecode('%2F1643.html'), 'true',[],'',''],
	['PAGE','1685',jdecode('Services+Provided'),jdecode(''), jdecode('%2F1685%2Findex.html'), 'true',[ 
		['PAGE','31801',jdecode('Orthopedics'),jdecode(''), jdecode('%2F1685%2F31801.html'), 'true',[],'',''],
		['PAGE','41901',jdecode('Hand+Therapy'),jdecode(''), jdecode('%2F1685%2F41901.html'), 'true',[],'',''],
		['PAGE','41922',jdecode('Aquatic+Therapy'),jdecode(''), jdecode('%2F1685%2F41922.html'), 'true',[],'',''],
		['PAGE','77747',jdecode('Women%26%23x27%3Bs+Health'),jdecode(''), jdecode('%2F1685%2F77747.html'), 'true',[],'',''],
		['PAGE','89745',jdecode('Cardiac+Rehab+Program'),jdecode(''), jdecode('%2F1685%2F89745.html'), 'true',[],'','']
	],'',''],
	['PAGE','74876',jdecode('Clinic+Brochures'),jdecode(''), jdecode('%2F74876.html'), 'true',[],'',''],
	['PAGE','75366',jdecode('Newsletter'),jdecode(''), jdecode('%2F75366.html'), 'true',[],'',''],
	['PAGE','77756',jdecode('For+New+Patients'),jdecode(''), jdecode('%2F77756%2Findex.html'), 'true',[ 
		['PAGE','84045',jdecode('Schedule+Appointment'),jdecode(''), jdecode('%2F77756%2F84045.html'), 'true',[],'','']
	],'',''],
	['PAGE','76579',jdecode('For+Physicians'),jdecode(''), jdecode('%2F76579.html'), 'true',[],'',''],
	['PAGE','87845',jdecode('Frequently+Asked+Questions'),jdecode(''), jdecode('%2F87845.html'), 'true',[],'',''],
	['PAGE','88345',jdecode('Residency+and+Fellowship'),jdecode(''), jdecode('%2F88345%2Findex.html'), 'true',[ 
		['PAGE','74630',jdecode('Orthopedic+Residency'),jdecode(''), jdecode('%2F88345%2F74630.html'), 'true',[],'',''],
		['PAGE','75516',jdecode('Tuition%2FFees'),jdecode(''), jdecode('%2F88345%2F75516.html'), 'true',[],'',''],
		['PAGE','78548',jdecode('Benefit+Package'),jdecode(''), jdecode('%2F88345%2F78548.html'), 'true',[],'',''],
		['PAGE','74782',jdecode('How+to+Apply'),jdecode(''), jdecode('%2F88345%2F74782.html'), 'true',[],'',''],
		['PAGE','75565',jdecode('Application+Deadline'),jdecode(''), jdecode('%2F88345%2F75565.html'), 'true',[],'',''],
		['PAGE','73767',jdecode('Events+Calendar'),jdecode(''), jdecode('%2F88345%2F73767.html'), 'true',[],'',''],
		['PAGE','88366',jdecode('Spine+Fellowship'),jdecode(''), jdecode('%2F88345%2F88366.html'), 'true',[],'','']
	],'',''],
	['PAGE','80645',jdecode('Residency+vs.+Fellowship'),jdecode(''), jdecode('%2F80645.html'), 'true',[],'',''],
	['PAGE','64601',jdecode('Employment'),jdecode(''), jdecode('%2F64601%2Findex.html'), 'true',[ 
		['PAGE','75220',jdecode('Benefits'),jdecode(''), jdecode('%2F64601%2F75220.html'), 'true',[],'','']
	],'',''],
	['PAGE','1706',jdecode('Contact+Us'),jdecode(''), jdecode('%2F1706.html'), 'true',[],'',''],
	['PAGE','11001',jdecode('Other+Links'),jdecode(''), jdecode('%2F11001.html'), 'true',[],'','']];
var siteelementCount=35;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1748';
theSitetree.keyvisualName='freizeit.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1748',
				keyvisualName: 	'freizeit.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-223868']={
webappId:    '1501',
documentId:  '401',
internalId:  '223868',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20120204-162605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73767',
internalId:  '',
customField: '20120120-101314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94345',
internalId:  '',
customField: '20120203-174047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58501',
internalId:  '',
customField: '20090429-013713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20111020-000723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78548',
internalId:  '',
customField: '20110917-011102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37801',
internalId:  '',
customField: '20120204-163129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37822',
internalId:  '',
customField: '20110801-234648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37843',
internalId:  '',
customField: '20110802-000318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1643',
internalId:  '',
customField: '20110802-000138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33701',
internalId:  '',
customField: '20111215-235646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1685',
internalId:  '',
customField: '20111201-085223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31801',
internalId:  '',
customField: '20101207-022616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20101208-004626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41922',
internalId:  '',
customField: '20111201-090631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84045',
internalId:  '',
customField: '20111020-002148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64601',
internalId:  '',
customField: '20111020-010034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1706',
internalId:  '',
customField: '20120127-095028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20080815-132754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74630',
internalId:  '',
customField: '20111020-003541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74782',
internalId:  '',
customField: '20110917-015111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74876',
internalId:  '',
customField: '20101208-003938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75220',
internalId:  '',
customField: '20111020-003939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75366',
internalId:  '',
customField: '20101222-014220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75516',
internalId:  '',
customField: '20110906-005018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75565',
internalId:  '',
customField: '20110917-005552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75638',
internalId:  '',
customField: '20111216-001541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80645',
internalId:  '',
customField: '20110429-013541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77756',
internalId:  '',
customField: '20120127-094258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77747',
internalId:  '',
customField: '20111020-001937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76579',
internalId:  '',
customField: '20120127-095133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87845',
internalId:  '',
customField: '20111020-005830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88345',
internalId:  '',
customField: '20111027-004443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88366',
internalId:  '',
customField: '20120123-141759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89745',
internalId:  '',
customField: '20111201-093847'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INX30Y';
var companyName   = 'Riverside+Physical+Therapy';
var htmlTitle	  = 'Riverside+Physical+Therapy+in+Southern+Oregon';
var metaKeywords  = '+physical+therapy+++Grants+Pass%2C+Oregon+++hand+therapy';
var metaContents  = 'Riverside+Physical+Therapy+in+Grants+Pass%2C+Oregon++providing+orthopedic+physical+therapy+and+hand+therapy+in+Grants+Pass+Oregon++';
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();
};

