function checkDebug(text) { try { return (top.document.location.href.toLowerCase().indexOf(text.toLowerCase()) >= 0); } catch (e) { return false; } }

function whichBrowser() {
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1) return 'Opera';
	if (agt.indexOf("staroffice") != -1) return 'Star Office';
	if (agt.indexOf("webtv") != -1) return 'WebTV';
	if (agt.indexOf("beonex") != -1) return 'Beonex';
	if (agt.indexOf("chimera") != -1) return 'Chimera';
	if (agt.indexOf("netpositive") != -1) return 'NetPositive';
	if (agt.indexOf("phoenix") != -1) return 'Phoenix';
	if (agt.indexOf("firefox") != -1) return 'Firefox';
	if (agt.indexOf("safari") != -1) return 'Safari';
	if (agt.indexOf("skipstone") != -1) return 'SkipStone';
	if (agt.indexOf("msie") != -1) return 'Internet Explorer';
	if (agt.indexOf("netscape") != -1) return 'Netscape';
	if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
	if (agt.indexOf('\/') != -1) {
		if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
			return navigator.userAgent.substr(0,agt.indexOf('\/'));
		} else
			return 'Netscape';
	} else {
		if (agt.indexOf(' ') != -1)
			return navigator.userAgent.substr(0,agt.indexOf(' '));
		else
			return navigator.userAgent;
	}
}


isIE = (whichBrowser() == 'Internet Explorer');
isSafari = (whichBrowser() == 'Safari');
isOpera = (whichBrowser() == 'Opera');

if (checkDebug("debugbrowser"))
	alert("whichBrowser: " + whichBrowser() + "\nisIE: " + isIE + "\nisSafari: " + isSafari);

function objExtensionAddEvent(eventName,functionToCall) {
	if (typeof this.addEventListener == "function") {
		this.addEventListener(eventName,functionToCall,true);
	} else {
		this.attachEvent("on" + eventName,functionToCall);
	}
}
function objExtensionRemoveEvent(eventName,functionToCall) {
	if (typeof this.removeEventListener == "function") {
		this.removeEventListener(eventName,functionToCall,true);
	} else {
		this.detachEvent(eventName,functionToCall);
	}
}
function objExtensionGetLocation(corner) {
	var totalOffsetTop = this.offsetTop;
	var totalOffsetLeft = this.offsetLeft;
	var op = this.offsetParent;
	while (op) {
		totalOffsetTop += op.offsetTop;
		totalOffsetLeft += op.offsetLeft;
		if (op == op.offsetParent)
			op = null;
		else
			op = op.offsetParent;
	}

	if (corner != null) {
		if (corner.toLowerCase().indexOf("b") >= 0) totalOffsetTop += this.offsetHeight;  // bottom
		if (corner.toLowerCase().indexOf("r") >= 0) totalOffsetLeft += this.offsetWidth;  // right
	}
	return [totalOffsetTop, totalOffsetLeft];
}
function objExtensionGetStyle(name) {
	try {
		var response = "";
//		alert("objExtensionGetStyle\nwindow.getComputedStyle: " + typeof window.getComputedStyle + "\nthis.currentStyle: " + this.currentStyle);
		if (typeof window.getComputedStyle != "undefined" && window.getComputedStyle) {
			var mydivstyle = window.getComputedStyle(this, "");
			response = eval("mydivstyle." + name);
		} else {
			if (typeof this.currentStyle != "undefined") {
				response = eval("this.currentStyle." + name);
			} else {
				response = eval("this.style." + name);
			}
		}
		return response;
	} catch (e) {
//		alert("error getting style\nmessage: " + e.message + "\nstyle: " + eval("this.style." + name));
		return "error: " + e.message;
	}
}
function objExtensionHide() {
	var objType = this.tagName.toLowerCase();
	if (objType != 'iframe') {
		var orig = this.getStyle('display');
		this.style.display = "none";
		return orig;
	} else { // iframes
		if (this.offsetHeight > 0) {
			this.objExtension_originalHeight = this.getStyle('height');
			this.objExtension_originalWidth  = this.getStyle('width');
		}

		this.style.overflow = 'hidden';
		this.style.width = 0;
		this.style.height = 0;
		return [this.objExtension_originalHeight,this.objExtension_originalWidth];
	}
};
function objExtensionShow() {
	var objType = this.tagName.toLowerCase();
	if (objType != 'iframe') {
		var newStyle = "block";
		switch (objType) {
			case "li"		:	newStyle = "list-item";		break;
			case "table"	:	newStyle = "table"; 		break;
			case "tr"		:	newStyle = "table-row";		break;
			case "td"		:	newStyle = "table-cell";	break;
			case "th"		:	newStyle = "table-cell";	break;
			case "tfoot"	:	newStyle = "table-footer-group"; break;
			case "thead"	:	newStyle = "table-header-group"; break;
			case "colgroup"	:	newStyle = "table-column-group"; break;
			case "caption"	:	newStyle = "caption";		break;
			case "img"		:	newStyle = "inline";		break;
		}

		try {
			this.style.display = newStyle;
		} catch (e) {
			this.style.display = "block";
		}
		return newStyle;
	} else {  // iframes
		if (typeof what.objExtension_originalHeight != "undefined") {
			this.style.height = this.objExtension_originalHeight;
			this.style.width = this.objExtension_originalWidth;
		}
		return [this.objExtension_originalHeight, this.objExtension_originalWidth];
	}
}
function objExtensionToggleDisplay() {
	var objType = this.tagName.toLowerCase();
	if (objType != 'iframe') {
		var currentStyle = this.getStyle('display');
		if (currentStyle.toLowerCase() == "none")
			this.show();
		else
			this.hide();
	} else {
		var currentHeight = this.getStyle('height').toLowerCase();
		if (this.getStyle('height').toLowerCase() == '0px')
			this.show();
		else
			this.hide();
	}
}

function objExtensionDisable(bgColor) {
	try {
		this.disabled = true;
		if (bgColor != null) {
			this.style.backgroundColor = bgColor;
		}
	} catch (e) {}
}
function objExtensionEnable(bgColor,setFocus) {
	try {
		this.disabled = false;
		if (bgColor != null) {
			this.style.backgroundColor = bgColor;
		}
		if (setFocus) {
			this.focus();
		}
	} catch (e) {}
}

function fw$(which) {
	if ( (typeof which == "string") || (typeof which == "String") )
		what = document.getElementById(which);
	else
		what = which;

	if ( (what != null ) && (typeof what == "object") && (what.nodeType == 1) ) {
		try {
			what.getStyle 		= objExtensionGetStyle;
			what.show 		    = objExtensionShow;
			what.hide 		    = objExtensionHide;
			what.toggleDisplay	= objExtensionToggleDisplay;
			what.addEvent     	= objExtensionAddEvent;
			what.removeEvent  	= objExtensionRemoveEvent;
			what.disable	  	= objExtensionDisable;
			what.enable			= objExtensionEnable;
			what.getLocation	= objExtensionGetLocation;
		} catch (e) {
//			alert(e.message());
		}
	}
	return what;
}
String.prototype.trim = function () {return this.replace(/^[ \t\n]*/g,'').replace(/[ \t\n]*$/g,'');}
String.prototype.substringBefore = function (text) {var loc = this.indexOf(text); return (loc == -1 ? "" : this.substr(0,loc));}
String.prototype.substringAfter  = function (text) {var loc = this.indexOf(text); return (loc == -1 ? "" : this.substr(loc+text.length));}


function getScroll() {
	var scrOfX = 0, scrOfY = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		scrOfY = window.pageYOffset;
		scrOfX = window.pageXOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		scrOfY = document.body.scrollTop;
		scrOfX = document.body.scrollLeft;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
		scrOfX = document.documentElement.scrollLeft;
	}
	return [ scrOfX, scrOfY ];
}

function getMousePosition(e) {
  var xcoord, ycoord;
  if( !e ) { e = window.event; }
  if( !e ) { return; }
  if( typeof( e.pageX ) == 'number' ) {
    xcoord = e.pageX;
    ycoord = e.pageY;
  } else if( typeof( e.clientX ) == 'number' ) {
    xcoord = e.clientX;
    ycoord = e.clientY;
    if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
      xcoord += document.body.scrollLeft;
      ycoord += document.body.scrollTop;
    } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
      xcoord += document.documentElement.scrollLeft;
      ycoord += document.documentElement.scrollTop;
    }
  } else { return; }
  return [xcoord,ycoord];
}

/********************************************************************************************/
/*                                                                                          */
/*  matchHeight - resize the main content and it's children                                 */
/*                                                                                          */
/*                                                                                          */
/*	which = the outer object to be adjusted (height)                                        */
/*	extraHeight = amount of padding top + bottom                                            */
/*                                                                                          */
/*	The tallest first child of each child is used as "tallest"                              */
/*	Each child will be set to "tallest"                                                     */
/*	The outer (which) will be set to "tallest" + extra Height                               */
/*                                                                                          */
/*	If the item above the page footer is adjusted, then the footer is moved too.            */
/*                                                                                          */
/********************************************************************************************/
lastMatchHeight = "";
function matchHeight(which,extraHeight) {
	var what = fw$(which);
	lastMatchHeight = which;
	if (typeof XSLFilename != 'undefined' && XSLFilename.indexOf('interior') >= 0)
		return;  // don't run match height from interior template - ever

	try {
		alertOut += "homePageContent offsetHeight: " + fw$("homePageContent").offsetHeight + "<br>";
		alertOut += "homePageSlider offsetHeight: " + fw$("homePageSlider").offsetHeight + "<br>";
	} catch (e) {}
	var alertOut = "Fixing height - which = " + which + "<br/>what: " + what + "\n<br/>Children are:<br/>\n";
	if (what != null) {
		if (isIE) {
			var tallest = 0;

			for (var i = 0; i < what.children.length; i++) {
				try {
					alertOut += what.children[i].id + " -> " + what.children[i].children[0].id + " height: " + what.children[i].children[0].offsetHeight + " <br/>\n";
				} catch (e) {}
				try {
					tallest = (tallest > what.children[i].children[0].offsetHeight) ? tallest : what.children[i].children[0].offsetHeight;
				} catch (e) {}
			}

			alertOut += "Tallest: " + tallest + " <br/>\n";

			what.style.height = tallest + extraHeight;

			for (i = 0; i < what.children.length; i++) {
				alertOut += "setting child: " + what.children[i].id + " to " + tallest + " <br/>\n";
				what.children[i].style.height = tallest;
			}

			var pf = fw$("pageFooter");
			if (pf != null) {
				if (pf.below == which) {
					var below = fw$(pf.below);
					if (below != null) {
						var aboveBottom = below.getLocation("bl");
						pf.style.top = aboveBottom[0] + 10;
						alertOut += "moving footer below " + below + " at " + pf.getStyle("top") + " <br/>\n";
					}
				}
			}
		} else {  // Mozilla
			var tallest = 0;
			var fixThese = new Array();
			for (var i = 0; i < what.childNodes.length; i++) {
				if (what.childNodes[i].nodeType == 1) {
					firstGrandchild = -1;
					for (var j = 0; j < what.childNodes[i].childNodes.length; j++) {
						alertOut += "j: " + j + " of " + what.childNodes[i].childNodes.length + " nodeType: " + what.childNodes[i].childNodes[j].nodeType + " tagName: " +  what.childNodes[i].childNodes[j].tagName + " (" + what.childNodes[i].childNodes[j].id + ")<br/>";
						if (firstGrandchild == -1 && what.childNodes[i].childNodes[j].nodeType == 1) {
							firstGrandchild = j;
						}
					}
					alertOut += what.childNodes[i].id + " -> ";
					alertOut += what.childNodes[i].childNodes[firstGrandchild].tagName;
					alertOut += " height: " + what.childNodes[i].childNodes[firstGrandchild].offsetHeight + " <br/>\n";
					tallest = (tallest > what.childNodes[i].childNodes[firstGrandchild].offsetHeight) ? tallest : what.childNodes[i].childNodes[firstGrandchild].offsetHeight;
					fixThese[fixThese.length] = what.childNodes[i];
				}
			}

			alertOut += "Tallest: " + tallest + " <br/>\n";

			what.style.height = (tallest + extraHeight) + "px";


			for (i = 0; i < fixThese.length; i++) {
				fixThese[i].style.height = tallest + "px";
				alertOut += "Fixing " + fixThese[i].tagName + " (" +  fixThese[i].id + ")<br/>";
			}

			var pf = fw$("pageFooter");
			if (pf != null) {
				if (pf.below == which) {
					var below = fw$(pf.below);
					if (below != null) {
						var aboveBottom = below.getLocation("bl");
						pf.style.top = (aboveBottom[0] + 10) + "px";
						alertOut += "moving footer below " + below + " at " + pf.getStyle("top") + " <br/>\n";
					}
				}
			}
		}
	} else {
		alertOut += "Not processing - requested object is null";
	}
	return alertOut;
}

function popUpMedia(url) {

	if (url.toLowerCase().indexOf("http") < 0) {
		url = contentServer + url;
	}

//	if (url.indexOf("?") > 0) {
//		url = url.replace(/\?/,"?gsnt&");
//	} else {
//		url += "?gsnt";
//	}

	newWindow = document.open("/popups/popup_noprint.html?" + url,"_blank","width=800, height=600, location=no, menubars=no, statusbar=no, resizable=yes");
	newWindow.focus();
	return false;
}

function popUp(url) {

	if (url.toLowerCase().indexOf("http") < 0) {
		url = contentServer + url;
	}

//	if (url.indexOf("?") > 0) {
//		url = url.replace(/\?/,"?gsnt&");
//	} else {
//		url += "?gsnt";
//	}

	newWindow = document.open("/popups/popup_noprint.html?" + url,"_blank","width=600, height=500, location=no, menubars=no, statusbar=no, resizable=yes");
	newWindow.focus();
	return false;
}
function popUpNoheader(url) {

	if (url.toLowerCase().indexOf("http") < 0) {
		url = contentServer + url;
	}

//	if (url.indexOf("?") > 0) {
//		url = url.replace(/\?/,"?gsnt&");
//	} else {
//		url += "?gsnt";
//	}

	newWindow = document.open(url,"_blank","width=600, height=500, location=no, menubars=no, statusbar=no, resizable=yes");
	newWindow.focus();
	return false;
}

function popUpSecured(url) {

	if (url.toLowerCase().indexOf("http") < 0) {
		url = contentServer + url;
	}
	url = url.replace(/http:/i,"https:");

	var securedCobbledServer = cobbledServer.replace(/http:/i,"https:");

//	if (url.indexOf("?") > 0) {
//		url = url.replace(/\?/,"?gsnt&");
//	} else {
//		url += "?gsnt";
//	}

	newWindow = document.open(securedCobbledServer + url,"_blank","width=800, height=600, location=no, menubars=no, statusbar=no, resizable=yes");
	newWindow.focus();
	return false;
}

// Usage: displayPopUp(URL[, width[, height[, x[, y[, options]]]]]) where:
// URL 		url to display in the newly created window
// width	initial width of the window,  default value 580
// height	initial height of the window. default value 480
// x,y		Position of the window on the screen  (left, top)
// options	values to use for opening the window - the other parameters already passed in will override any duplicate specifications
//			Default value
//			if the URL ends with .doc, .ppt, .xls (case insensitive):
//				"toolbar=no,menubar=yes,resizable=yes,scrollbars=yes,location=yes";
//			otherwise
//				"toolbar=no,menubar=no,resizable=yes,scrollbars=yes,location=no";
function displayPopUp(docName,w,h,x,y,inOptions) {

	var MSDocs = /.*\.doc$|.*\.ppt$|.*\.xls$/

	var rightNow = new Date();
	iUnique = rightNow.getTime();

	if ( (w <= 125) && (h <=125) ) {
		itemp = w;
		w = x;
		x = itemp;
		itemp = h;
		h = y;
		y = itemp;
	}

	if (MSDocs.test(docName.toLowerCase()))
		strOptions = "toolbar=no,menubar=yes,resizable=yes,scrollbars=yes,location=yes";
	else
		strOptions = "toolbar=no,menubar=no,resizable=yes,scrollbars=yes,location=no";

	if (inOptions != null)
		strOptions = inOptions;

	if (w != null)
		strOptions += ",width=" + w;
	else
		strOptions += ",width=580";

	if (h != null)
		strOptions += ",height=" + h;
	else
		strOptions += ",height=480";

	if (x != null)
		strOptions += ",screenX=" + x + ",left=" + x;

	if (y != null)
		strOptions += ",screenY=" + y + ",top=" + y;

	newWindow = window.open(docName,'puWindow'+iUnique,strOptions);
	newWindow.focus();
	return false;
}

function getPage(url) {
	var i = 0;

	if (window.XMLHttpRequest) {  // native XMLHttpRequest object, Mozilla, etc.
		try {
			xmlhttp = new XMLHttpRequest();
		} catch( e ) {
			xmlhttp = false
		}
	} else if (window.ActiveXObject) {	// IE/Windows ActiveX version
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				xmlhttp = false;
			}
		}
	}
	try {
		if( xmlhttp ) {
			xmlhttp.open("GET",url,false);
			xmlhttp.setRequestHeader("Pragma", "no-cache");
			xmlhttp.setRequestHeader("Cache-Control", "no-cache");
			xmlhttp.send(null);
			if (xmlhttp.status == 200)
				return xmlhttp.responseText;
			else
				return "ERROR - " + xmlhttp.status + " -  " + xmlhttp.statusText;
		} else {
			return "ERROR - Browser does not support object";
		}
	} catch (e) {
		if (checkDebug("nbc1"))
			alert("NBC1 error - " + e);
		return "ERROR - Error thrown during retrieval of document: " + e.message;
	}
}

function getPageAsync(url,funcAddr,inParentObject) {
	var parentObject;
	var localxmlhttp;
	if (inParentObject == null)
		parentObject = "localxmlhttp";
	else
		parentObject = inParentObject;

	var i = 0;

	if (window.XMLHttpRequest) {  // native XMLHttpRequest object, Mozilla, etc.
		try {
			eval(parentObject + ' = new XMLHttpRequest()');
		} catch( e ) {
			eval(parentObject + ' = false');
		}
	} else if (window.ActiveXObject) {	// IE/Windows ActiveX version
		try {
			eval(parentObject + ' = new ActiveXObject("Msxml2.XMLHTTP.5.0")');
		} catch(e) {
			try {
				eval(parentObject + ' = new ActiveXObject("Microsoft.XMLHTTP")');
			} catch(e) {
				eval(parentObject + ' = false');
			}
		}
	}
	try {
		if( eval(parentObject) ) {
			eval(parentObject + '.onreadystatechange = funcAddr');
			eval(parentObject + '.open("GET",url,true)');
			eval(parentObject + '.setRequestHeader("Pragma", "no-cache")');
			eval(parentObject + '.setRequestHeader("Cache-Control", "no-cache")');
			eval(parentObject + '.send(null)');;
			return eval(parentObject);
		} else {
			return "ERROR - Browser does not support object";
		}
	} catch (e) {
		return "ERROR - Error thrown during retrieval of document: " + e.message;
	}
}

function setDefaultRegion(bu,region,saveDefault,goToPage) {

	if (saveDefault == null || saveDefault) {
//		alert("setting cookie " + bu + " " + region);
		// set 90 day cookie
		if (bu != "") {
			var nintyDays = new Date();
			nintyDays.setTime(nintyDays.getTime() + (90*24*60*60*1000));
			var expires = "; expires=" + nintyDays.toGMTString();

			var value = bu + "," + region;


			document.cookie = "nthp=" + value.replace(/ /g,"") + expires + "; path=/";
		} else {
			document.cookie = "nthp=;path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT";
		}
//		alert("cookie: " + document.cookie);
	}

	if (goToPage != null && goToPage) {
		var jumpTo = "/pws/jsp/display2.jsp?TYPE=landing&XML=pages/ntlanding/" + bu + "_" + region + "&pageTimeout=600";
		document.location.href = jumpTo;
	}

	return true;
}

function getCookie(name) {

	try {
		var dc = document.cookie;
		var allCookies = dc.split(';');

		for (var i = 0; i < allCookies.length; i++) {
			var parts = allCookies[i].split('=');
			parts[0] = parts[0].replace(/^ /,"");
			if (parts[0] == name) {
				var returnThis = "";
				for (var j = 1; j < parts.length; j++) {
					if (returnThis != "") {
						returnThis += "=";
					}
					returnThis += parts[j];
				}
				// if any application has to ask what their branding style sheet is, and it's "ppp" they shouldn't be using it
				if ( (name == "BrandStylesheet") && returnThis.toLowerCase().indexOf("/appls/ppp/stylesf2.css") >= 0) {
					returnThis = "";
				}
				return returnThis;
			}
		}
		return "";
	} catch (e) {
		return "";
	}
}

function moveLargeOverlayForPrint() {
	if (currentlyDisplayedLargeOverlay) {
		originalTop = currentlyDisplayedLargeOverlay.getStyle("top");
		originalLeft = currentlyDisplayedLargeOverlay.getStyle("left");
		currentlyDisplayedLargeOverlay.style.top  = "10px";
		currentlyDisplayedLargeOverlay.style.left = "10px";

	}
}

function moveLargeOverlayForView() {
	if (currentlyDisplayedLargeOverlay) {
		currentlyDisplayedLargeOverlay.style.top  = originalTop;
		currentlyDisplayedLargeOverlay.style.left = originalLeft;
	}
}

currentlyDisplayedLargeOverlay = null;
window.onbeforeprint = moveLargeOverlayForPrint;
window.onafterprint = moveLargeOverlayForView;


function displayLargeOverlay(which) {

	try {
		if (checkDebug("debuglargeoverlay")) {
			alert("showing large overlay");
		}
		var scrollX = isIE || isOpera ? document.documentElement.scrollLeft : window.scrollX;
		var scrollY = isIE || isOpera ? document.documentElement.scrollTop  : window.scrollY;

		var what = fw$(which);
		var whatInner = fw$(which);
		if (what) {
			showWashout();
			what.show();
			if (checkDebug("debuglargeoverlay")) {
				alert("\nwhat.offsetWidth: " + what.offsetWidth + "\nscrollX: " + scrollX);
			}
			var ow = document.documentElement.offsetWidth;
			if (ow < 1000) {
				what.style.left = (Math.max(0,(ow - what.offsetWidth) / 2) + scrollX) + "px";
			} else {
				what.style.left = (Math.max(0,(1000 - what.offsetWidth) / 2) + scrollX) + "px";
			}

			var oh = document.documentElement.offsetHeight;
			if (oh > 300) {
				if (scrollY < 200) {
					what.style.top = "200px";
				} else {
					what.style.top = scrollY + "px";
				}
			} else {
				what.style.top = oh / 2 + scrollY + "px";
			}
		} else {
			alert('Overlay (' + which + ' = ' + what + ') not currently available');
		}

		currentlyDisplayedLargeOverlay = what;
	} catch (e) {
		if (checkDebug("debugoverlay") || checkDebug("debuglargeoverlay"))
			alert("Error showing large overlay\n" + e.message)
	}

	return false;
}

function hideLargeOverlay(which) {
	try {
		if (checkDebug("debugoverlay")) alert("hiding large overlay");
		var what = fw$(which);
		if (what) {
			if (checkDebug("debugoverlay")) alert("found " + which);
			hideWashout();
			what.hide();
			currentlyDisplayedLargeOverlay.hide();
		} else
			if (checkDebug("debugoverlay")) alert("can't find " + which);

		currentlyDisplayedLargeOverlay = null;
	} catch (e) {
		if (checkDebug("debugoverlay"))
			alert("Error hiding large overlay\n" + e.message)
	}
	return false;
}

function showWashout() {
	try {
		var what = fw$('fullPageWashout');
		what.show();

	//	height = isIE ? document.documentElement.offsetHeight : 0;
	//	width  = isIE ? document.documentElement.offsetWidth : 0


	//	if (fw$('locIndexPage') || (fw$("pageFooter").style.top == "") )
	//		what.style.height = (fw$("locIndexPage").offsetHeight + 110) + "px"
	//	else
	//		what.style.height = (parseInt(fw$("pageFooter").style.top.replace(/px/,'')) + fw$("pageFooter").offsetHeight) + "px";

		if( window.innerHeight && window.scrollMaxY ) { // Firefox
			pageWidth = window.innerWidth + window.scrollMaxX;
			pageHeight = window.innerHeight + window.scrollMaxY;
		} else {
			if( document.body.scrollHeight > document.body.offsetHeight ) { // all but Explorer Mac
				pageWidth = document.body.scrollWidth;
				pageHeight = document.body.scrollHeight;
			} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
				pageWidth = document.body.offsetWidth + document.body.offsetLeft; pageHeight = document.body.offsetHeight + document.body.offsetTop;
			}
		}

		if (pageHeight == 0) {
			if (fw$("pageFooter").getLocation()[0] > 300) {
				pageHeight = fw$("pageFooter").getLocation()[0] + 100;
			} else {
				pageHeight = 1500;
			}
		}

		what.style.height = pageHeight + "px";
		what.style.width = pageWidth + "px";

		if (checkDebug("debugoverlay")) {
			what.style.backgroundColor = "#FF0000";
			alert("showing washout size (h,w) (" + pageHeight + "," + pageWidth + ")");

		}

	//	what.style.width = "940px";
	} catch (e) {
		if (checkDebug("debugoverlay"))
			alert("Error showing washout\n" + e.message)
	}
}

function hideWashout() {

	try {
		if (checkDebug("debugoverlay"))
			alert (typeof fw$('fullPageWashout').children);
		if (typeof fw$('fullPageWashout').children == "object") {
			for(var i = 0; i < fw$('fullPageWashout').children.length; i++) {
				fw$('fullPageWashout').children[i].style.display="none";
			}
		}
		fw$('fullPageWashout').hide();
	} catch (e) {
		if (checkDebug("debugoverlay"))
			alert("Error hiding washout\n" + e.message)
	}

}

// Usage: getParameter(name) where
// name is the name of the parameter you want the value of.

function getParameter(name,defaultValue) {
	var qs = document.location.search.substr(1);
	var allParameters = qs.split('&');
	for (var i = 0; i < allParameters.length; i++) {
		var parts = allParameters[i].split('=',2);
		if (parts[0] == name) {
			return parts[1];
		}
	}
	if (defaultValue != null)
		return defaultValue;
	else
		return "";
}

function riskUniverseDisplayClicked() {
	dateSI = document.riskUniverse.date.selectedIndex;
	dateValue = document.riskUniverse.date[dateSI].value;

	planTypeSI = document.riskUniverse.plantype.selectedIndex;
	planTypeValue = document.riskUniverse.plantype[planTypeSI].value;

	displaySI = document.riskUniverse.display.selectedIndex;
	displayValue = document.riskUniverse.display[displaySI].value;

	docu = dateValue + "/" + planTypeValue + "_" + displayValue + ".pdf";
	winnam = dateValue + planTypeValue + displayValue;
	var alphanumeric = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
	for (var i = 0; i < winnam.length; i++) {
		if (alphanumeric.indexOf(winnam.substr(i,1)) < 0) {
			winnam = winnam.substr(0,i) + "x" + winnam.substr(i+1);
		}
	}
	popUp(docu);
//	window.open(docu,winnam,"toolbar=no,menubar=no,status=yes,resizable=yes");
}


/*************************
 *                       *
 *   Web Side Story      *
 *                       *
 *************************/

function logWebSideStory(site,path,pageName,hrf,pec,hc1,hc2,hc3,hc4,seg) {

	// sir # chi-82964 (start)
	if (seg == 1) seg = 14;
	hc3 = seg;
	// sir # chi-82964 (end)


	_hbEC=0,_hbE=new Array;
	hbx=_hbEvent("pv");
	hbx.vpc="HBX0200u";
	hbx.gn="middlefieldbank.com";
	hbx.acct="DM570909MCSS";

	if (pageName.indexOf("Locations") == 0) {
		pageName = pageName.replace(/ - /g,"/");
		path = path + "/" + pageName;
		path = path.replace(/\/\//g,"/");
		var lastSlash = path.lastIndexOf("/");
		pageName = path.substr(lastSlash+1);
		path = path.substr(0,lastSlash).replace(/Locations\/Locations/,"Locations");
	}

	pageName = pageName.replace(/&amp;/g,"_");
	pageName = pageName.replace(/[&'",?]/g,"_");
	if (pageName != null) {
		hbx.pn = pageName;
	} else {
		hbx.pn = document.title;
	}
	if (path != null) {
		hbx.mlc=path;
	} else {
		hbx.mlc = document.location.pathname.replace(/\/[^\/]*$/,'');
	}

	hbx.mlc = hbx.mlc.replace(/\"\&\'\<\>/,"_"); 	// "

	hbx.pndef="title";//DEFAULT PAGE NAME
	hbx.ctdef="full";//DEFAULT CONTENT CATEGORY

	//OPTIONAL PAGE VARIABLES
	//ACTION SETTINGS
	hbx.fv="";//FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME
	hbx.lt="auto";//LINK TRACKING
	hbx.dlf="n";//DOWNLOAD FILTER
	hbx.dft="n";//DOWNLOAD FILE NAMING
	hbx.elf="n";//EXIT LINK FILTER

	//SEGMENTS AND FUNNELS
	hbx.seg= (seg != null) ? seg : getCookie("ut"); //VISITOR SEGMENTATION
	switch (hbx.seg) {
		case "p"	: hbx.seg = "0";	break;
		case "t"	: hbx.seg = "14";	break;
		case "c"	: hbx.seg = "2";	break;
	}
	hbx.fnl="";//FUNNELS

	//CAMPAIGNS
	hbx.cmp="";//CAMPAIGN ID
	hbx.cmpn="";//CAMPAIGN ID IN QUERY
	hbx.dcmp="";//DYNAMIC CAMPAIGN ID
	hbx.dcmpn="";//DYNAMIC CAMPAIGN ID IN QUERY
	hbx.dcmpe="";//DYNAMIC CAMPAIGN EXPIRATION
	hbx.dcmpre="";//DYNAMIC CAMPAIGN RESPONSE EXPIRATION
	hbx.hra="";//RESPONSE ATTRIBUTE
	hbx.hqsr="";//RESPONSE ATTRIBUTE IN REFERRAL QUERY
	hbx.hqsp="";//RESPONSE ATTRIBUTE IN QUERY
	hbx.hlt="";//LEAD TRACKING
	hbx.hla="";//LEAD ATTRIBUTE
	hbx.gp="";//CAMPAIGN GOAL
	hbx.gpn="";//CAMPAIGN GOAL IN QUERY
	hbx.hcn="";//CONVERSION ATTRIBUTE
	hbx.hcv="";//CONVERSION VALUE
	hbx.cp="null";//LEGACY CAMPAIGN
	hbx.cpd="";//CAMPAIGN DOMAIN

	//CUSTOM VARIABLES
	hbx.ci="";//CUSTOMER ID
	hbx.hc1 = (hc1 != null) ? hc1 : "";//CUSTOM 1
	hbx.hc2 = (hc2 != null) ? hc2 : "";//CUSTOM 2
	hbx.hc3 = (hc3 != null) ? hc3 : "";//CUSTOM 3
	hbx.hc4 = (hc4 != null) ? hc4 : "";//CUSTOM 4

	hbx.hrf = (hrf != null) ? hrf : "";//CUSTOM REFERRER coming from jsp

	hbx.pec = (pec != null) ? pec : "";//ERROR CODES

	//INSERT CUSTOM EVENTS

	if (document.location.href.toLowerCase().indexOf("debugwss") > 0)
		alert("mlc: " + hbx.mlc + "\npn:  " + hbx.pn + "\nhc1: " + hbx.hc1 + "\nhc2: " + hbx.hc2 + "\nhc3: " + hbx.hc3 + "\nhc4: " + hbx.hc4 + "\nhrf: " + hbx.hrf + "\npec: " + hbx.pec + "\nseg: " + hbx.seg);

	_vjs="HBX0201.03u";
	_dl=".exe,.zip,.wav,.wmv,.mp3,.mov,.mpg,.avi,.doc,.pdf,.xls,.ppt,.gz,.bin,.hqx,.dmg";
	_mn=_hbq="";
	_hbA=_NA();
	_hud="undefined";
	_huf="function";
	_ec=_if=_ll=_hec=_hfs=_hfc=_hfa=_ic=_pC=_fc=_pv=0;
	_hbi=_hbs=new Image();
	_hbin=_NA();
	_pA=_NA();
	_lvid=_lvpos=_lvl="";_hbE=_D("hbE")?_hbE:"";_hbEC=_D("hbEC")?_hbEC:0;var _ex="expires=Wed, 1 Jan 2020 00:00:00 GMT";
	_lvm=300;
	_lidt="lid";
	_lpost="lpos";
	_pum=_erf=_hif=0;

	_VL();

	_EV(window,"error",_ER);

	_mlc=_PP(_mlc,0,_II( _mlc,";"),"CONTENT+CATEGORY");
	_pn=_PP(_pn,1,_II(_pn,";"),"PUT+PAGE+NAME+HERE");

	__r=".referrer";
	_rf=_A(eval("document"+__r));
	_et=0;
	_oe=0;
	_we=0;
	_ar="";
	_hM=(!(_II(navigator.userAgent,"Mac")>-1));
	_tls="";
	_bv=parseInt(navigator.appVersion);_bv=(_bv>99)?(_bv/100):_bv;var __f;
	_hrat=_D("hra");
	_hra="";
	__c="catch(_e)";
	_fa=0;
	_hlfs=0;
	_hoc=0;

	_hlf='';
	_ce='';
	_ln='';
	_pl='';
	_bn=navigator.appName;
	_bn=(_II(_bn,"Microsoft")?_bn:"MSIE");
	_bnN=(_bn=="Netscape");
	_bnI=(_bn=="MSIE");
	_hck="*; path=/; "+(_D("cpd")&&_D("cpd")!=""?(" domain=."+_D("cpd")+"; "):"")+_ex;
	_N6=(_bnN&&_bv>4)
	_I5=false;
	_ss="na";
	_sc="na";
	_sv=11;
	_cy="u";
	_hp="u";

	_tp=_D("ptc");
	if(_bn=="MSIE"){
		_nua=navigator.userAgent;
		_is=_II(_nua,_bn);
		_if=_II(_nua,".",_is);
		if(_if>_is)
			_I5=_nua.substring(_is+5,_if)>=5
	}

	if(_N6||_I5)
		eval("try{_tls=top.location.search}catch(_e){}");

	_PV();

	_EV(window,"load",__X);

	_EV(window,"unload",_FU);
	eval('setTimeout("__X()",3000)');

	return false;

} // end logWebSideStory





function _hbOnPrePV(req){
	for(var a=0;a<_IL(document.links);a++){
	if(_lvid.length+_lvpos.length<_lvm)
		_LV(document.links[a]);
	else break;
	}
	_ar += "&lv.id="+_lvid+"&lv.pos="+_lvpos;
	_lvl=-1;
}

function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}
function _NA(a){return new Array(a?a:0)}
function _D(v){return(typeof eval("window._"+v)!=_hud)?eval("window._"+v):""}
function _DD(v){return(typeof v!=_hud)?1:0}
function _A(v,c){return escape((_D("lc")=="y"&&_DD(c))?_TL(v):v)}
function _B(){return 0}
function _GP(){return (_IL(_D("protocol"))>0)?_protocol+"://":(location.protocol=="https:"?"https://":"http://")}
function _IC(a,b,c){return a.charAt(b)==c?1:0}
function _II(a,b,c){return a.indexOf(b,c?c:0)}
function _IL(a){return a!=_hud?a.length:0}
function _IF(a,b,c){return a.lastIndexOf(b,c?c:_IL(a))}
function _IP(a,b){return a.split(b)}
function _IS(a,b,c){return b>_IL(a)?"":a.substring(b,c!=null?c:_IL(a))}
function _RP(a,b,c,d){d=_II(a,b);if(d>-1){a=_RP(_IS(a,0,d)+","+_IS(a,d+_IL(b),_IL(a)),b,c)}return a}
function _TL(a){return a.toLowerCase()}
function _TS(a){return a.toString()}
function _TV(){_hbSend()}
function _SV(a,b,c){_hbSet(a,b,c)}
function _VS(a,b,c,d){c=['C','P','R'];for(d=0;d<_IL(c);d++){if(_II(""+b,"_"+c[d]+"::")==0)b=eval("_R"+c[d]+"V(_IS(b,4,_IL(b)))")}eval("_"+a+"='"+b+"'")}
function _VC(a,b,c,d){b=_IP(a,",");for(c=0;c<_IL(b);c++){d=_IP(b[c],"|");_VS(d[0],(_D(d[0]))?_D(d[0]):d[1]?d[1]:"")}}
function _VL(a,b){for(a=0;a<_hbEC;a++){_pv=_hbE[a];if(_pv._N=="pv"){for(b in _pv){if(_EE(b)&&typeof _pv[b]!=_huf){_VS(b,_pv[b])}}}}_VC("pn|PUT+PAGE+NAME+HERE,mlc|CONTENT+CATEGORY,elf|n,dlf|n,dft|n,pndef|title,ctdef|full,cp|null,hcn|")}
function _ER(a,b,c){if(_erf++==0)_hbi.src=_GP()+_gn+"/HG?hc="+_mn+"&hb="+_A(_acct)+"&hec=1&vjs="+_vjs+"&vpc=ERR&ec=1&err="+((typeof a=="string")?_A(a+"-"+c):"Unknown");_XT("Error",a);}
function _EE(a){return(a!="_N"&&a!="_C")?1:0}
function _hbSend(c,a,i){a="";_hec++;for(i in _hbA)if(typeof _hbA[i]!=_huf)a+="&"+i+"="+_hbA[i];_Q(_hbq+"&hec="+_hec+a+_hbSendEV());_hbA=_NA()}
function _hbSet(a,b,c,d,e){d=_II(_hbq,"&"+a+"=");if(d>-1){e=_II(_hbq,"&",d+1);e=e>d?e:_IL(_hbq);if(a=="n"||a=="vcon"){_hbq=_IS(_hbq,0,d)+"&"+a+"="+b+_IS(_hbq,e);_hec=-1;if(a=="n"){_pn=b}else{_mlc=b}}else{_hbq=_IS(_hbq,0,d)+_IS(_hbq,e)}}if((a!="n")&&(a!="vcon"))_hbA[a]=(c==0)?b:_A(b)}
function _hbRedirect(a,b,c,d,e,f,g){_SV("n",a);_SV("vcon",b);if(_DD(d)&&_IL(d)>0){d=_IC(d,0,"&")?_IS(d,1,_IL(d)):d;e=_IP(d,"&");for(f=0;f<_IL(e);
f++){g=_IP(e[f],"=");_SV(g[0],g[1])}}_TV();if(c!=""){_SV("hec",0);setTimeout("location.href='"+c+"'",500)}}
function _hbSendEV(a,b,c,d,e,f,x,i){a='',c='',e=_IL(_hbE);for(b=0;b<e;b++){c=_hbE[b];for(var d in c){if(_EE(d)&&c[d].match){x=c[d].match(/\[\]/g);
if(x!=null&&_IL(x)>c._C)c._C=_IL(x)}}for(d in c){if(_EE(d)&&c[d].match){x=c[d].match(/\[\]/g);x=(x==null)?0:_IL(x);for(i=x;i<c._C;i++)c[d]+="[]"}}}
for(b=0;b<e;b++){c=_hbE[b];for(f=b+1;f<e;f++){if(_hbE[f]!=null&&c._N==_hbE[f]._N){for(d in c){if(_EE(d)&&_hbE[f]!=null)c[d]+="[]"+_hbE[f][d];
_hbE[f][d]=""}}}for(d in c){if(_EE(d)&&c._N!=""&&c._N!="pv"){a+="&"+c._N+"."+d+"="+_RP(_A(c[d]),"%5B%5D",",")}}}_hbE=_NA();_hbEC=0;return a}
function _hbM(a,b,c,d){_SV('n',a);_SV('vcon',b);if(_IL(c)>0)_SV(c,d);_TV()}
function _hbPageView(p,m){_hec=-1;_hbM(p,m,"")}
function _hbExitLink(n){_hbM(_pn,_mlc,"el",n)}
function _hbDownload(n){_hbM(_pn,_mlc,"fn",n)}
function _hbVisitorSeg(n,p,m){_SV("n",p);_SV("vcon",m);_SV("seg",n,1);_TV()}
function _hbCampaign(n,p,m){_hbM(p,m,"cmp",n)}
function _hbFunnel(n,p,m){_hbM(p,m,"fnl",n)}
function _hbGoalPage(n,p,m){_hbM(p,m,"gp",n)}
function _hbLink(a,b,c){_SV("lid",a);if(_DD(b))_SV("lpos",b);_XT("Link","");_TV()}
function _hbForm(a,b,c,d,e,f){if(_DD(c))_hlf=c;_hfs=0,_fa=1,f='Complete',_hfa=0;if(a==0){f='Abandon';_hfa=1}_XT("Form"+f,b)}
function _hbCookie(a,b,c){document.cookie=a+"="+b+";path=/;"+((_DD(c)==1)?"expires="+c:"")}
function _LE(a,b,c,d,e,f,g,h,i,j,k,l){b="([0-9A-Za-z\\-]*\\.)",c=location.hostname,d=a.href,h='',i='';eval("__f=/"+b+"*"+b+"/");if(_DD(__f)){__f.exec(c);j=(_DD(_elf))?_elf:"";if(j!="n"){if(_II(j,"!")>-1){h=_IS(j,0,_II(j,"!"));i=_IS(j,_II(j,"!")+1,_IL(j))}else{h=j}}k=0;if(_DD(_elf)&&_elf!="n"){if(_IL(i)){l=_IP(i,",");for(g=0;g<_IL(l);g++)if(_II(d,l[g])>-1)return}if(_IL(h)){l=_IP(h,",");for(g=0;g<_IL(h);g++)if(_II(d,l[g])>-1)k=1}}if(_II(a.hostname,RegExp.$2)<0||k){	e=_IL(d)-1;return _IC(d,e,'/')?_IS(d,0,e):d}}}
function _LD(a,b,c,d,e,f){b=a.pathname,d='',e='';b=_IS(b,_IF(b,"/")+1,_IL(b));c=(_DD(_dlf))?_dlf:"";if(c!="n"){if(_II(c,"!")>-1){d=","+_IS(c,0,_II(c,"!"));e=","+_IS(c,_II(c,"!")+1,_IL(c))}else{d=","+c}}f=_II(b,"?");b=(f>-1)?_IS(b,0,f):b;if(_IF(b,".")>-1){f=_IS(b,_IF(b,"."),_IL(b));if(_II(_dl+d,f)>-1&&_II(e,f)<0){var dl=b;if(_DD(_dft)){if(_dft=="y"&&a.name){dl=a.name}else if(_dft=="full"){dl=a.pathname;if(!_IC(dl,0,'/'))dl='/'+dl}}return dl}}}
function _LP(a,b){for(b=0;b<_IL(a);b++){if(_IL(_lvl)<_lvm)_LV(a[b]);_EV(a[b],'mousedown',_LT)}}
function _LV(a,b,c){b=_LN(a);c=b[0]+b[1];if(_IL(b[0])){_lvid+=_A(b[0])+",";_lvpos+=_A(b[1])+",";_lvl+=c}}
function _LN(a,b,c,d){b=a.href;b+=a.name?a.name:"";c=_LVP(b,_lidt);d=_LVP(b,_lpost);return[c,d]}
function _LT(e){if((e.which&&e.which==1)||(e.button&&e.button==1)){var a=document.all?window.event.srcElement:this;for(var i=0;i<4;i++){if(a.tagName&&
_TL(a.tagName)!="a"&&_TL(a.tagName)!="area"){a=a.parentElement}}var b=_LN(a),c='',d='';a.lid=b[0];a.lpos=b[1];if(_D("lt")&&_lt!="manual"){if((a.tagName&&
_TL(a.tagName)=="area")){if(!_IL(a.lid)){if(a.parentNode){if(a.parentNode.name)a.lid=a.parentNode.name;else a.lid=a.parentNode.id}}if(!_IL(a.lpos))
a.lpos=a.coords}else{if(_IL(a.lid)<1)a.lid=_LS(a.text?a.text:a.innerText?a.innerText:"");if(!_IL(a.lid)||_II(_TL(a.lid),"<img")>-1)a.lid=_LI(a)}}
if(!_IL(a.lpos)&&_D("lt")=="auto_pos"&&a.tagName&&_TL(a.tagName)!="area"){c=document.links;for(d=0;d<_IL(c);d++){if(a==c[d]){a.lpos=d+1;break}}}
var _f=0,j='',k='',l=(a.protocol)?_TL(a.protocol):"";
if(l&&l!="mailto:"&&l!="javascript:"){j=_LE(a),k=_LD(a);if(_DD(k))a.fn=k;else if(_DD(j))a.el=j}
if(_D("lt")&&_IC(_lt,0,"n")!=1&&_DD(a.lid)&&_IL(a.lid)>0){_SV("lid",a.lid);if(_DD(a.lpos))_SV("lpos",a.lpos);_f=1}if(_DD(a.fn)){_SV("fn",a.fn);_XT("Download",a);_f=2}
else if(_DD(a.el)){_SV("el",a.el);_XT("ExitLink",a);_f=1}if(_f>0){_XT("Link",a);_TV()}}}
function _LVP(a,b,c,d,e){c=_II(a,"&"+b+"=");c=c<0?_II(a,"?"+b+"="):c;if(c>-1){d=_II(a,'&',c+_IL(b)+2);e=_IS(a,c+_IL(b)+2,d>-1?d:_IL(a));
if(!_ec){if(!(_II(e,"//")==0))return e}else return e}return ""}
function _LI(a){var b=""+a.innerHTML,bu=_TL(b),i=_II(bu,"<img");if(bu&&i>-1){eval("__f=/ src\s*=\s*['\"]?([^'\" ]+)['\"]?/i");__f.exec(b);
if(RegExp.$1)b=RegExp.$1}return b}
function _LSP(a,b,c,d){d=_IP(a,b);return d.join(c)}
function _LS(a,b,c,d,e,f,g){c=_D("lim")?_lim:100;b=(_IL(a)>c)?_A(_IS(a,0,c)):_A(a);b=_LSP(b,"%0A","%20");b=_LSP(b,"%0D","%20");b=_LSP(b,"%09","%20");
c=_IP(b,"%20");d=_NA();e=0;for(f=0;f<_IL(c);f++){g=_RP(c[f],"%20","");if(_IL(g)>0){d[e++]=g}}b=d.join("%20");return unescape(b)}
function _EM(a,b,c,d){a=_D("fv");b=_II(a,";"),c=parseInt(a);d=3;if(_TL(a)=="n"){d=999;_fv=""}else if(b>-1){d=_IS(a,0,b);_fv=_IS(a,b+1,_IL(a))}
else if(c>0){d=c;_fv=""}return d}
function _FF(e){var a=(_bnN)?this:_EVO(e);_hlf=(a.lf)?a.lf:""}
function _FU(e){if(_hfs==0&&_IL(_hlf)>0&&_fa==1){_hfs=1;if(_hfc&&!_hfa){_SV("sf","1");_XT("FormComplete",_hfc)}else if(_IL(_hlf)>0){_SV("lf",_hlf);_XT("FormAbandon",_hlf)}
_TV();_hlf="",_hfs=0,_hfc=0}}
function _FO(e){var a=true;if(_DD(this._FS))eval("try{a=this._FS()}catch(e){}");if(a!=false)_hfc=1;return a}
function _FA(a,b,c,d,e,f,g,h,i,ff,fv,s){b=a.forms;ff=new Object();f=_EM();for(c=0;c<_IL(b);c++){ff=b[c],d=0,s=0,e=ff.elements;
g=ff.name?ff.name:"forms["+c+"]";for(h=0;h<_IL(e);h++){if(e[h].type&&"hiddenbuttonsubmitimagereset".indexOf(e[h].type)<0&&d++>=f)break}if(d>=f){_fa=1;
for(h=0;h<_IL(e);h++){i=e[h];if(i.type&&"hiddenbuttonsubmitimagereset".indexOf(i.type)<0){i.lf=g+".";i.lf+=(i.name&&i.name!="")?i.name:"elements["+h+"]";
_EV(i,"focus",_FF)}}ff._FS=null;ff._FS=ff.onsubmit;if(_DD(ff._FS)&&ff._FS!=null){ff.onsubmit=_FO}else if(!(_bnN&&_bv<5)&&_hM&&!(_bnI&&!_I5)){if((!_bnI)||
(_II(navigator.userAgent,"Opera")>-1)){ff.onsubmit=_FO}else{_EV(ff,"submit",_FO);
eval("try{document.forms["+c+"]._FS=document.forms["+c+"].submit;document.forms["+c+"].submit=_FO;throw ''}catch(E){}")}}}}}
function _GR(a,b,c,d){if(!_D("hrf"))return a;if(_II(_hrf,"http",0)>-1)return _hrf;b=window.location.search;b=_IL(b)>1?_IS(b,1,_IL(b)):"";
c=_II(b,_hrf+"=");if(c>-1){ d=_II(b,"&",c+1);d=d>c?d:_IL(b);b=_IS(b,c+_IL(_hrf)+1,d)}return(b!=_hud&&_IL(b)>0)?b:a}
function _PO(a,b,c,d,e,f,g){d=location,e=d.pathname,f=_IS(e,_IF(e,"/")+1),g=document.title;if(a&&b==c){return(_pndef=="title"&&g!=""&&g!=d&&
!(_bnN&&_II(g,"http")>0))?g:f?f:_pndef}else{return b==c?(e==""||e=="/")?"/":_IS(e,(_ctdef!="full")?_IF(e,"/",_IF(e,"/")-2):_II(e,"/"),_IF(e,"/"))
:(b=="/")?b:((_II(b,"/")?"/":"")+(_IF(b,"/")==_IL(b)-1?_IS(b,0,_IL(b)-1):b))}}
function _PP(a,b,c,d){return ""+(c>-1?_PO(b,_IS(a,0,c),d)+";"+_PP(_IS(a,c+1),b,_II(_IS(a,c+1),";")):_PO(b,a,d))}
function _NN(a){return _D(a)!="none"}
function _E(a){var b="";var d=_IP(a,",");for(var c=0;c<_IL(d);c++)b+="&"+d[c]+"="+_A(_D(d[c]));return b}
function _F(a,b){return(!_II(a,"?"+b+"="))?0:_II(a,"&"+b+"=")}
function _G(a,b,c,d){var e=_F(a,b);if(d&&e<0&&top&&window!=top){e=_F(_tls,b);if(e>-1)a=_tls};return(e>-1)?_IS(a,e+2+_IL(b),(_II(a,"&",e+1)>-1)?_II(a,"&",e+1):_IL(a)):c}
function _H(a,b,c){if(!a)a=c;if(_I5||_N6){eval("try{_vv=_G(location.search,'"+a+"','"+b+"',1)}"+__c+"{}")}else{_vv=_G(location.search,a,b,1)}return unescape(_vv)}
function _I(a,b,c,d){__f=_IS(a,_II(a,"?"));if(b){if(_I5||_N6){eval("try{_hra=_G(__f,_hqsr,_hra,0)}"+__c+"{}")}else{_hra=_G(__f,_hqsr,_hra,0)}};if(c&&!_hra){if(_I5||_N6){eval("try{_hra=_G(location.search,_hqsp,_hra,1)}"+__c+"{}")}else{_hra=_G(location.search,_hqsp,_hra,1)}};if(d&&!_hra)_hra=d;return _hra}
function _J(a,b,c,d){c=_II(a,"CP=");d=_II(a,b,c+3);return(c<0)?"null":_IS(a,c+3,(d<0)?_IL(a):d)}
function _PV(){_dcmpe=_H(_D("dcmpe"),_D("dcmpe"),"DCMPE");_dcmpre=_H(_D("dcmpre"),_D("dcmpre"),"DCMPRE");_vv="";_cmp=_H(_D("cmpn"),_D("cmp"),"CMP");
_gp=_H(_D("gpn"),_D("gp"),"GP");_dcmp=_H(_D("dcmpn"),_D("dcmp"),"DCMP");if(_II(_cmp,"SFS-")>-1){document.cookie="HBCMP="+_cmp+"; path=/;"+
(_D("cpd")&&_D("cpd")!=""?(" domain=."+_D("cpd")+"; "):"")+_ex}if(_bnI&&_bv>3)_ln=navigator.userLanguage;
if(_bnN){if(_bv>3)_ln=navigator.language;if(_bv>2)for(var i=0;i<_IL(navigator.plugins);i++)_pl+=navigator.plugins[i].name+":"};_cp=_D("cp");
if(location.search&&_TL(_cp)=="null")_cp=_J(location.search,"&");if(_II(document.cookie,"CP=")>-1){
_ce="y";_hd=_J(document.cookie,"*");if(_TL(_hd)!="null"&&_cp=="null"){_cp=_hd}else{document.cookie="CP="+_cp+_hck}}else{document.cookie="CP="+_cp+_hck;
_ce=(_II(document.cookie,"CP=")>-1)?"y":"n"};if(window.screen){_sv=12;_ss=screen.width+"*"+screen.height;_sc=_bnI?screen.colorDepth:screen.pixelDepth;
if(_sc==_hud)_sc="na"};_ra=_NA();if(_ra.toSource||(_bnI&&_ra.shift))_sv=13;if(!(_bnN&&_bv<5)&&!_bnI&&_hM)eval("try{throw _sv=14}catch(e){}");
if((new Date()).toDateString)_sv=15;if(_hbA.every)_sv=16;if(_I5&&_hM){if(_II(""+navigator.appMinorVersion,"Privacy")>-1)_ce="p";
if(document.body&&document.body.addBehavior){document.body.addBehavior("#default#homePage");_hp=document.body.isHomePage(location.href)?"y":"n";
document.body.addBehavior("#default#clientCaps");_cy=document.body.connectionType}};var _hcc=(_DD(_hcn))?_D("hcv"):"";if(!_D("gn"))_gn="ehg.hitbox.com";
if(_D("ct")&&!_D("mlc"))_mlc=_ct;_XT("PrePVR","");_ar=_GP()+_gn+"/HG?hc="+_mn+"&hb="+_A(_acct)+"&cd=1&hv=6&n="+_A(_pn,1)+"&con=&vcon="+_A(_mlc,1)+"&tt="
+_D("lt")+"&ja="+(navigator.javaEnabled()?"y":"n")+"&dt="+(new Date()).getHours()+"&zo="+(new Date()).getTimezoneOffset()+"&lm="+
Date.parse(document.lastModified)+(_tp?("&pt="+_tp):"")+_E((_bnN?"bn,":"")+"ce,ss,sc,sv,cy,hp,ln,vpc,vjs,hec,pec,cmp,gp,dcmp,dcmpe,dcmpre,cp,fnl")
+"&seg="+_D("seg")+"&epg="+_D("epg")+"&cv="+_A(_hcc)+"&gn="+_A(_D("hcn"))+"&ld="+_A(_D("hlt"))+"&la="+_A(_D("hla"))+"&c1="+_A(_D("hc1"))+"&c2="+
_A(_D("hc2"))+"&c3="+_A(_D("hc3"))+"&c4="+_A(_D("hc4"))+"&customerid="+_A(_D("ci")?_ci:_D("cid"))+"&ttt="+_lidt+","+_lpost;
if(_I5||_N6){eval("try{_rf=_A(top.document"+__r+")+''}"+__c+"{_rf=_A(document"+__r+")+''}")}
else{if(top.document&&_IL(parent.frames)>1){_rf=_A(eval("document"+__r))+""}else if(top.document){_rf=_A(eval("top.document"+__r))+""}}if((_rf==_hud)||
(_rf==""))_rf="bookmark";_rf=unescape(_rf);_rf=_GR(_rf);_hra=_I(_rf,_D("hqsr"),_D("hqsp"),_hrat);_ar+="&ra="+_A(_hra)+"&pu="+_A(_IS(eval("document.URL")
+"",0,_pum))+_hbSendEV()+"&rf=";_ar+=(_IL(_ar)+_IL(_rf)<2048)?_A(_rf):"bookmark";if(_IL(_ar)+_IL(_pl)<2048)_ar+="&pl="+_A(_pl);
_XT("PrePV",_ar);if(_D("onlyMedia")!="y")_hbi.src=_ar+"&hid="+Math.random();_hbq=_IS(_ar,0,_II(_ar,"&hec"));_XT("PostPV",_ar);_hbE=_NA()}
function _Q(a){a+="&hid="+Math.random();if(_hif==0){_hif=1;_hbs="";_hbs=new Image();_hbs.src=a}else{_hif=0;_hbi="";_hbi=new Image();_hbi.src=a}}
function __X(a){if(_ec==0){_ec=1;a=document;if(_NN("lt")||_NN("dlf")||_NN("elf"))_LP(a.links);if(_NN("fv"))_FA(a);if(_NN("lt")&&_IL(_lvl)>0&&_lvl!=-1){_SV('lv.id',_lvid,1);_SV('lv.pos',_lvpos,1);_TV()}}}
function _EV(a,b,c,d){if(a.addEventListener){a.addEventListener(b,c,false)}else if(a.attachEvent){a.attachEvent(((d==1)?"":"on")+b,c)}}
function _EVO(e){return document.all?window.event.srcElement:this}
function _RCV(a,b,c,d){b=document.cookie;c=_II(b,a+"=");d="";if(c>-1){d=_II(b,";",c+1);d=(d>0)?d:_IL(b);d=(d>c)?_IS(b,c+_IL(a)+1,d):""}return d}
function _RRV(a){return(_LVP(document.referrer,a))}
function _RPV(a){return(_LVP(document.URL,a))}
function _XT(a,b){if(typeof _D("hbOn"+a)==_huf)eval("_hbOn"+a+"(b)")}


