var resize = '';							
var titlebar = '';
var wvalue = screen.width - 7;
var hvalue = screen.height - 75;
var IE =(document.all);
var NS = (document.layers);
var DOM = (document.getElementById);
var agt=navigator.userAgent.toLowerCase();
var is_major=parseInt(navigator.appVersion);
var is_ie=((agt.indexOf("msie")!=-1) && (agt.indexOf("opera")==-1));
var isNT=agt.indexOf("windows nt")!=-1;
var IE=(document.all);
var IE4=(is_ie && (is_major==4) && (agt.indexOf("msie 4")!=-1));
var isMac = (navigator.appVersion.indexOf("Mac") == -1);
var allString = "document.";
allString += (IE)?"all.":(DOM)?"getElementById(\"":"";
var styleString = (IE)?".style":(DOM)?"\").style":"";
var endAllString = (DOM && !IE)?"\")":"";
var px = (DOM)?"px":"";
function fixAlignment() {
	var RightOffset = 190;
	var siteNS6 = (DOM && !IE)?3:0;
	var NSConTop = (NS)?20:0;
	var NSSiteTop = (NS)?11:0;
	var offTop = (NS)?".top":".offsetTop";
	var offLeft = (NS)?".left":".offsetLeft";
	var offWidth = (NS)?".clip.width":".offsetWidth";
	var offHeight = (NS)?".clip.height":".offsetHeight";
	var pageWidth = parseInt(window.innerWidth); 	
	if (pageWidth < 800) pageWidth = 786;
	document.MakeItHappen.left = pageWidth - RightOffset;
	var sndRightOff = 0;
	if(pageWidth == 786) sndRightOff = 9;
	if(isMac){
		document.RightMenuDiv.left = pageWidth - RightOffset + 5 + sndRightOff;
		document.SearchSite.left = pageWidth - RightOffset + sndRightOff + 5;
		document.SearchSite2.left = pageWidth - RightOffset + sndRightOff + 5;		
	} else {
		document.RightMenuDiv.left = pageWidth - RightOffset + 14;
		document.SearchSite.left = pageWidth - RightOffset + 23;
		document.SearchSite2.left = pageWidth - RightOffset + 23;
	}
	var GreaterHeight = 0;
	var rightClip = document.RightMenuDiv.clip.height;
	var rightTop = document.RightMenuDiv.top;
	var contentClip = document.Content.clip.height;
	var contentTop = document.Content.top;
	menuClip = document.LeftMenusDiv.clip.height;
	menuTop = document.LeftMenusDiv.top;
	var rightHeight = parseInt(rightClip + rightTop);
	var contentHeight = parseInt(contentClip + contentTop);
	var menuHeight = parseInt(menuClip + menuTop);
	if (rightHeight > GreaterHeight) GreaterHeight = rightHeight;
	if (menuHeight > GreaterHeight) GreaterHeight = menuHeight;
	if (contentHeight > GreaterHeight) GreaterHeight = contentHeight;
	document.PageFooter.top = GreaterHeight + 10;
	document.LeftBackMenuBlock.visibility = "hidden";
	document.LeftBackMenuBlock.document.images.lftMnu.height = GreaterHeight - 70;
	document.LeftBackMenuBlock.clip.height = GreaterHeight - 70;
	document.LeftBackMenuBlock.visibility = "visible"
	if (menuHeight < GreaterHeight)	{
		blockHeight = document.LeftBackMenuBlock.clip.height;
		document.LeftMenusDiv.document.OptionsDiv.visibility = "hidden";
		document.LeftBackMenuBlock.visibility = "hidden";
		document.LeftBackMenuBlock.visibility = "visible";
	}
	document.LeftMenusDiv.document.OptionsDiv.visibility = "visible";
	document.RightMenuDiv.visibility = "visible";
	document.SearchSite.visibility = "visible";
	document.SearchSite2.visibility = "visible";
	document.PageFooter.visibility = "visible";
	document.height = eval(allString + "PageFooter" + styleString).top + 35 +px;	
}
var resizeWidth = (NS)?parseInt(window.innerWidth):0;
var resizeHeight = (NS)?parseInt(window.innerHeight):0;
function checkReload(){
	if(NS && (resizeWidth != parseInt(window.innerWidth) || resizeHeight != parseInt(window.innerHeight))) location.reload();
	else fixAlignment();
}
var hide = 1;
var hideEvent = 0;
var newposition = ""
function showFlyOuts(whichmenu) {	
}
function hideAllFlyOuts() {
}
function startHide() {
	if (hide==1) {
		hideAllFlyOuts();
		hideSposo();	
	}
}
function showBlack(whichlayer, subLayer) {
	hide=0;
	var whichmenu = "";
	whichmenu = "menugray";
	var nsDrill = (NS)?whichmenu+whichlayer+".document.":"";
	eval(allString+nsDrill+whichmenu+whichlayer+subLayer+styleString).backgroundColor="#000000";
}
function hideBlack(whichlayer, subLayer) {
	hide=1;
	var whichmenu = "";
	whichmenu = "menugray";
	var nsDrill = (NS)?whichmenu+whichlayer+".document.":"";
	eval(allString+nsDrill+whichmenu+whichlayer+subLayer+styleString).backgroundColor="#666666";
}
function showSposo() {
	hideAllFlyOuts();
	hideSposo();
	document.LeftMenusDiv.document.Sposo.visibility="visible";
	hideEvent = setInterval("startHide()", 1500);
}
function hideSposo() {
	document.LeftMenusDiv.document.Sposo.visibility="hidden";
	clearInterval(hideEvent);
}
function showBlue(subLayer) {
}
function hideBlue(subLayer) {
}
function printPage(){
	eval(allString+"LeftMenusDiv"+styleString).visibility="hidden";
	eval(allString+"RightMenuDiv"+styleString).visibility="hidden";
	eval(allString+"OptionsDiv"+styleString).visibility="hidden";
	eval(allString+"SiteMap"+styleString).visibility="hidden";
	eval(allString+"LeftBackMenuBlock"+styleString).visibility="hidden";
	eval(allString+"SearchSite"+styleString).visibility="hidden";
	eval(allString+"SearchSite2"+styleString).visibility="hidden";
	eval(allString+"PageFooter"+styleString).visibility="hidden";
	eval(allString+"Content"+styleString).left="0px";
	eval(allString+"Content"+styleString).width="640px";
	eval(allString+"MakeItHappen"+styleString).left="450px";
	hideAllFlyOuts();
	hideSposo();
	self.window.print();
	self.location.reload();
}
function GoToPages1(form){
	if (form.dest2a.options[form.dest2a.selectedIndex].value == "default.asp"){
		window.location = "default.asp";
		return true;
	}else{
		form.action =window.open( form.dest2a.options[form.dest2a.selectedIndex].value);
		window.location = "default.asp";
		return true;
	}
}
function stripSpaces(strString){
	var returnStr="";
	for(i=0; i<strString.length; i++){
		if (strString.charAt(i) == ' '){
		}else{
			returnStr = returnStr + strString.charAt(i)
		}	
	}
	return returnStr;
}
function IsNumeric(strString){
	var strValidChars = "0123456789";
	var strChar;
	var blnResult = true;
	for (i = 0; i < strString.length && blnResult == true; i++)	{
		strChar = strString.charAt(i);
		if (strValidChars.indexOf(strChar) == -1){
			blnResult = false;
		}
	}
	return blnResult;
}
function NewWindow(page) {
	OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes,width=785, height=580,status=yes");
}