
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}

function gsResults (form) {
	var TestVar = form.inputbox.value;
	var search_href = '/content/search.htm?page_id=24&inCtx12txtBranchId=1779&inCtx12view=1&inCtx12txtKeyword=' +	 TestVar + '&inCtx12SearchSite=1&inCtx12txtMode=site';
	window.location.href = search_href;
}
function gsResultsTwo (form) {
	var TestVar = form.inputbox.value;
	var search_href = '/content/search.htm?page_id=24&inCtx12txtBranchId=21&inCtx12view=1&inCtx12txtKeyword=' +	 TestVar + '&inCtx12SearchSite=1&inCtx12txtMode=site';
	window.location.href = search_href;
}
function gsResultsThree (form) {
	var TestVar = form.inputbox.value;
	var search_href = '/content/search.htm?page_id=24&inCtx12txtBranchId=153&inCtx12view=1&inCtx12txtKeyword=' +	 TestVar + '&inCtx12SearchSite=1&inCtx12txtMode=site';
	window.location.href = search_href;
}

function onKeyPressOne(form) {
	NS4 = (document.layers)? true:false
	IE4 = (document.all)? true:false
	docom = (document.getElementById) ? true:false
	var TestVar = form.inputbox.value;
	var search_href = '/content/search.htm?page_id=24&inCtx12txtBranchId=1779&inCtx12view=1&inCtx12txtKeyword=' +	 TestVar + '&inCtx12SearchSite=1&inCtx12txtMode=site';
	var keycode;
	var strName = navigator.appName;

	if (NS4) keycode = e.which 
	else if (IE4) keycode = window.event.keyCode
	else if (docom)	keycode = e.keyCode

	if (keycode == 13) {
		if((IE4)&&(navigator.platform=='MacPPC')){
			document.frm.HiddenClick.value = '';
			//strName = strName + ' : ' + navigator.platform
			alert(strName)
		}else{
			//siteSearch()
			window.event.cancelBubble = true;
			window.event.returnValue = false;
			window.location.href = search_href;
		}
	}
}
function onKeyPressTwo(form) {

	NS4 = (document.layers)? true:false
	IE4 = (document.all)? true:false
	docom = (document.getElementById) ? true:false
	var TestVar = form.inputbox.value;
	var search_href = '/content/search.htm?page_id=24&inCtx12txtBranchId=21&inCtx12view=1&inCtx12txtKeyword=' +	 TestVar + '&inCtx12SearchSite=1&inCtx12txtMode=site';
	var keycode;
	var strName = navigator.appName;

	if (NS4) keycode = e.which 
	else if (IE4) keycode = window.event.keyCode
	else if (docom)	keycode = e.keyCode

	if (keycode == 13) {
		if((IE4)&&(navigator.platform=='MacPPC')){
			document.frm.HiddenClick.value = '';
			//strName = strName + ' : ' + navigator.platform
			alert(strName)
		}else{
			//siteSearch()
			window.event.cancelBubble = true;
			window.event.returnValue = false;
			window.location.href = search_href;
		}
	}
}

function onKeyPressThree(form) {

	NS4 = (document.layers)? true:false
	IE4 = (document.all)? true:false
	docom = (document.getElementById) ? true:false
	var TestVar = form.inputbox.value;
	var search_href = '/content/search.htm?page_id=24&inCtx12txtBranchId=153&inCtx12view=1&inCtx12txtKeyword=' +	 TestVar + '&inCtx12SearchSite=1&inCtx12txtMode=site';
	var keycode;
	var strName = navigator.appName;

	if (NS4) keycode = e.which 
	else if (IE4) keycode = window.event.keyCode
	else if (docom)	keycode = e.keyCode

	if (keycode == 13) {
		if((IE4)&&(navigator.platform=='MacPPC')){
			document.frm.HiddenClick.value = '';
			//strName = strName + ' : ' + navigator.platform
			alert(strName)
		}else{
			//siteSearch()
			window.event.cancelBubble = true;
			window.event.returnValue = false;
			window.location.href = search_href;
		}
	}
}


//////// ----- GLOBAL VARIABLE ----- /////////

var gStrAppend = 'inCtx12';
var gStrAlert = 'Please enter a keyword to search.';


//////// ----- GLOBAL VARIABLE ----- /////////


function siteSearch() {
	var term = document.getElementById("term").value ;
	if (term == '') { 
		alert(gStrAlert);
		return false ; 
	}else{
		var search_href = '/content/search.htm?' + gStrAppend + 'txtKeyword=' + term + '&' + gStrAppend + 'cmdKeywordSearch=search&' + gStrAppend + 'txtMode=site';
		//alert(search_href);
		window.location.href = search_href ;
	}
	window.event.cancelBubble = true;
	window.event.returnValue = false;
}
function siteSearch1() {
	var term1 = document.getElementById("term1").value ;
	if (term1 == '') { 
		alert(gStrAlert);
		return false ; 
	}else{
		var search_href = '/content/search.htm?' + gStrAppend + 'txtKeyword=' + term1 + '&' + gStrAppend + 'cmdKeywordSearch=search&' + gStrAppend + 'txtMode=site';
		//alert(search_href);
		window.location.href = search_href ;
	}
	window.event.cancelBubble = true;
	window.event.returnValue = false;
}



function onKeyPress(e) {

	NS4 = (document.layers)? true:false
	IE4 = (document.all)? true:false
	docom = (document.getElementById) ? true:false

	var keycode;
	var strName = navigator.appName;

	if (NS4) keycode = e.which 
	else if (IE4) keycode = window.event.keyCode
	else if (docom)	keycode = e.keyCode

	if (keycode == 13) {
		if((IE4)&&(navigator.platform=='MacPPC')){
			document.frm.HiddenClick.value = '';
			//strName = strName + ' : ' + navigator.platform
			alert(strName)
		}else{
			siteSearch()
			window.event.cancelBubble = true;
			window.event.returnValue = false;
		}
	}
}





////////////////////////////////////////////////
////////// ----- REGULAR SEARCH ----- //////////
//--------------------------------------------//

function siteSearchMain() {
	var term = document.getElementById(gStrAppend + "txtKeyword").value ;
	var qu = '' ;
	if (term == '') { 
		alert(gStrAlert);
		event.returnValue=false;
		return false ; 
	}else{
		cmsForm.action = '/content/search.htm';
		cmsForm.submit();
		event.returnValue=false;
	}
}

function onKeyPressMain(e, oCtrl) {

	NS4 = (document.layers)? true:false
	IE4 = (document.all)? true:false
	docom = (document.getElementById) ? true:false

	var keycode;
	var strName = navigator.appName;

	if (NS4) keycode = e.which 
	else if (IE4) keycode = window.event.keyCode
	else if (docom)	keycode = e.keyCode

	if (keycode == 13) {
		if((IE4)&&(navigator.platform=='MacPPC')){
			document.frm.HiddenClick.value = '';
			//strName = strName + ' : ' + navigator.platform
			alert(strName)
		}else{
			siteSearchMain()
		}
	}
}

//--------------------------------------------//
////////// ----- REGULAR SEARCH ----- //////////
////////////////////////////////////////////////





////////////////////////////////////////////////
////////// ----- ADVANCE SEARCH ----- //////////
//--------------------------------------------//

function setDates(fdate, edate) {
	var start_dt = document.getElementById(gStrAppend + 'txtStartDate') ;
	var end_dt = document.getElementById(gStrAppend + 'txtEndDate');
	start_dt.value = fdate ;
	end_dt.value = edate ;
}
	
function calcDate(rng) {
	var x = new Date()
	var y = new Date()
	x.setDate(x.getDate() - 1)

	var oRange = document.getElementById('range');
	if (rng == '7') {
		y.setDate(x.getDate() - 7)
	} else if (rng == '30') {
		y.setMonth(x.getMonth() - 1)
	} else if (rng == '90') {
		y.setMonth(x.getMonth() - 3)
	} else if (rng == '365') {
		y.setYear(x.getFullYear() - 1)
	}
	if (rng == 'B' || rng == 'D') {
		setDates('','') ;
	} else {
		fdate = parseInt(y.getMonth()+1) + '/' + y.getDate() + '/' + y.getFullYear()
		edate = parseInt(x.getMonth()+1) + '/' + x.getDate() + '/' + x.getFullYear()
		setDates(fdate, edate)
	}
}

//--------------------------------------------//
////////// ----- ADVANCE SEARCH ----- //////////
////////////////////////////////////////////////



////////////////////////////////////////////////
////////// ----- inCalendar ----- //////////////
//--------------------------------------------//
function SetDropdownName(strThis){
	var strT;
	return true;
	if (strThis != null){
		strT = strThis.name;
		strT = strT.substring(0, strT.length-4);
		document.getElementById('hidDropPrefix').value = strT;
	}
}
//--------------------------------------------//
////////// ----- inCalendar ----- //////////////
////////////////////////////////////////////////





function onKeyPress1(e) {

	NS4 = (document.layers)? true:false
	IE4 = (document.all)? true:false
	docom = (document.getElementById) ? true:false

	var keycode;
	var strName = navigator.appName;

	if (NS4) keycode = e.which 
	else if (IE4) keycode = window.event.keyCode
	else if (docom)	keycode = e.keyCode

	if (keycode == 13) {
		/*if((IE4)&&(navigator.platform=='MacPPC')){
			document.frm.HiddenClick.value = '';
			//strName = strName + ' : ' + navigator.platform
			alert(strName)
		}else{*/
			siteSearchOne()
			window.event.cancelBubble = true;
			window.event.returnValue = false;
		//}
	}
}





var gStrUrl1 = 'search.asp'

function siteSearchOne() {
	//alert("here")
	var oObj = document.getElementById("SiteSearchUrl");
	if(oObj != null){
		//alert(document.getElementById("SiteSearchUrl").value);
		gStrUrl1 = document.getElementById("SiteSearchUrl").value;
	}

	var term = document.getElementById("q").value ;
	var client = document.getElementById("client").value ;
	var proxystylesheet = document.getElementById("proxystylesheet").value ;
	var output = document.getElementById("output").value ;
	var site = document.getElementById("site").value ;
	
	
	
	if (term == '') { 
		alert(gStrAlert);
		return false ; 
	}else{
		var search_href = '/' + gStrUrl1 + '?' + 'client=' + client + '&proxystylesheet=' + proxystylesheet + '&output=' + output + '&site=' + site + '&q=' + term + '&btnSearch=Search';
		//alert(search_href);
		window.location.href = search_href ;
	}
	window.event.cancelBubble = true;
	window.event.returnValue = false;
}





function onKeyPress2(e) {

	NS4 = (document.layers)? true:false
	IE4 = (document.all)? true:false
	docom = (document.getElementById) ? true:false

	var keycode;
	var strName = navigator.appName;

	if (NS4) keycode = e.which 
	else if (IE4) keycode = window.event.keyCode
	else if (docom)	keycode = e.keyCode

	if (keycode == 13) {
		if((IE4)&&(navigator.platform=='MacPPC')){
			document.frm.HiddenClick.value = '';
			//strName = strName + ' : ' + navigator.platform
			alert(strName)
		}else{
			siteSearchTwo()
			window.event.cancelBubble = true;
			window.event.returnValue = false;
		}
	}
}



function siteSearchTwo() {
	//alert("here")
	var oObj = document.getElementById("SiteSearchUrl");
	if(oObj != null){
		//alert(document.getElementById("SiteSearchUrl").value);
		gStrUrl1 = document.getElementById("SiteSearchUrl").value;
	}

	var term = document.getElementById("q2").value ;
	var client = document.getElementById("client").value ;
	var proxystylesheet = document.getElementById("proxystylesheet").value ;
	var output = document.getElementById("output").value ;
	var site = document.getElementById("site2").value ;
	
	 
	
	if (term == '') { 
		alert(gStrAlert);
		return false ; 
	}else{
		var search_href = '/' + gStrUrl1 + '?' + 'client=' + client + '&proxystylesheet=' + proxystylesheet + '&output=' + output + '&site=' + site + '&q=' + term + '&btnSearch=Search';
		//alert(search_href);
		window.location.href = search_href ;
	}
	window.event.cancelBubble = true;
	window.event.returnValue = false;
}







function onKeyPress3(e) {

	NS4 = (document.layers)? true:false
	IE4 = (document.all)? true:false
	docom = (document.getElementById) ? true:false

	var keycode;
	var strName = navigator.appName;

	if (NS4) keycode = e.which 
	else if (IE4) keycode = window.event.keyCode
	else if (docom)	keycode = e.keyCode

	if (keycode == 13) {
		if((IE4)&&(navigator.platform=='MacPPC')){
			document.frm.HiddenClick.value = '';
			//strName = strName + ' : ' + navigator.platform
			alert(strName)
		}else{
			siteSearchThree()
			window.event.cancelBubble = true;
			window.event.returnValue = false;
		}
	}
}



function siteSearchThree() {
	//alert("here")
	var oObj = document.getElementById("SiteSearchUrl");
	if(oObj != null){
		//alert(document.getElementById("SiteSearchUrl").value);
		gStrUrl1 = document.getElementById("SiteSearchUrl").value;
	}

	var term = document.getElementById("q3").value ;
	var client = document.getElementById("client").value ;
	var proxystylesheet = document.getElementById("proxystylesheet").value ;
	var output = document.getElementById("output").value ;
	var site = document.getElementById("site3").value ;
	
	 
	
	if (term == '') { 
		alert(gStrAlert);
		return false ; 
	}else{
		var search_href = '/' + gStrUrl1 + '?' + 'client=' + client + '&proxystylesheet=' + proxystylesheet + '&output=' + output + '&site=' + site + '&q=' + term + '&btnSearch=Search';
		//alert(search_href);
		window.location.href = search_href ;
	}
	window.event.cancelBubble = true;
	window.event.returnValue = false;
}




function onKeyPress4(e) {

	NS4 = (document.layers)? true:false
	IE4 = (document.all)? true:false
	docom = (document.getElementById) ? true:false

	var keycode;
	var strName = navigator.appName;

	if (NS4) keycode = e.which 
	else if (IE4) keycode = window.event.keyCode
	else if (docom)	keycode = e.keyCode

	if (keycode == 13) {
		if((IE4)&&(navigator.platform=='MacPPC')){
			document.frm.HiddenClick.value = '';
			//strName = strName + ' : ' + navigator.platform
			alert(strName)
		}else{
			siteSearchFour()
			window.event.cancelBubble = true;
			window.event.returnValue = false;
		}
	}
}



function siteSearchFour() {
	//alert("here")
	var oObj = document.getElementById("SiteSearchUrl");
	if(oObj != null){
		//alert(document.getElementById("SiteSearchUrl").value);
		gStrUrl1 = document.getElementById("SiteSearchUrl").value;
	}

	var term = document.getElementById("q4").value ;
	var client = document.getElementById("client").value ;
	var proxystylesheet = document.getElementById("proxystylesheet").value ;
	var output = document.getElementById("output").value ;
	var site = document.getElementById("site4").value ;
	
	 
	
	if (term == '') { 
		alert(gStrAlert);
		return false ; 
	}else{
		var search_href = '/' + gStrUrl1 + '?' + 'client=' + client + '&proxystylesheet=' + proxystylesheet + '&output=' + output + '&site=' + site + '&q=' + term + '&btnSearch=Search';
		//alert(search_href);
		window.location.href = search_href ;
	}
	window.event.cancelBubble = true;
	window.event.returnValue = false;
}

//--------------------------------------------------------------------------------------------

var formSet = document.getElementsByTagName("form");

var theForm = formSet[0]

if(theForm != null)
{
	theForm.onkeypress = function(e)
	{     
		var kc;

		if(window.event) { kc = window.event.keyCode; }
		else if(e.keyCode) { kc = e.keyCode; }
		else{ kc = e.which; }

		if(kc == 13) {
			return false;
		}
	}
}



//-------------------------------------------------------------------------------------------


function onKeyPressX(e) {

	NS4 = (document.layers)? true:false
	IE4 = (document.all)? true:false
	docom = (document.getElementById) ? true:false

	var keycode;
	var strName = navigator.appName;

	if (NS4) keycode = e.which 
	else if (IE4) keycode = window.event.keyCode
	else if (docom)	keycode = e.keyCode

	if (keycode == 13) {
		if((IE4)&&(navigator.platform=='MacPPC')){
			document.frm.HiddenClick.value = '';
			//strName = strName + ' : ' + navigator.platform
			alert(strName)
		}else{
			siteSearchX()
			window.event.cancelBubble = true;
			window.event.returnValue = false;
		}
	}
}

function siteSearchX() {
	
	var oObj = document.getElementById("SiteSearchUrl");
	if(oObj != null){
		//alert(document.getElementById("SiteSearchUrl").value);
		gStrUrl1 = document.getElementById("SiteSearchUrl").value;
	}

	var term = document.getElementById("q5").value ;
	var client = document.getElementById("client").value ;
	var proxystylesheet = document.getElementById("proxystylesheet").value ;
	var output = document.getElementById("output").value ;
	var site = document.getElementById("site").value ;
	
	
	
	if (term == '') { 
		alert(gStrAlert);
		return false ; 
	}else{
		var search_href = '/' + gStrUrl1 + '?' + 'client=' + client + '&proxystylesheet=' + proxystylesheet + '&output=' + output + '&site=' + site + '&q=' + term + '&btnSearch=Search';
		//alert(search_href);
		window.location.href = search_href
	}
	//window.event.cancelBubble = true;
	//window.event.returnValue = false;
}


 

///// ---- used for inTouch Form ------///////////

function inTouchButton(strThis){

            if (Page_ClientValidate()==true){

                        var obj = document.getElementById('divPleaseWait');

                        obj.style.display = "block";

                        strThis.value = "Processing...";

            }

}

 

if(document.cmsForm)

{

            document.cmsForm.onkeypress = function(e)

            {     

                        var kc;

 

                        if(window.event) { kc = window.event.keyCode; }

                        else if(e.keyCode) { kc = e.keyCode; }

                        else{ kc = e.which; }

 

                        if(kc == 13) {

                                    return false;

                        }

            }

}

else if(document.frm)

{

            document.frm.onkeypress = function(e)

            {     

                        var kc;

 

                        if(window.event) { kc = window.event.keyCode; }

                        else if(e.keyCode) { kc = e.keyCode; }

                        else{ kc = e.which; }

 

                        if(kc == 13) {

                                    return false;

                        }

            }

}

 


