
if (document.images) {  			   
	toc1on = new Image(); 
	toc1on.src = "/images/tabs-on_02.gif";
	toc1off = new Image(); 
	toc1off.src = "/images/tabs-off_02.gif"; 
	
	toc2on = new Image(); 
	toc2on.src = "/images/tabs-on_03.gif";
	toc2off = new Image(); 
	toc2off.src = "/images/tabs-off_03.gif";

	toc3on = new Image(); 
	toc3on.src = "/images/tabs-on_04.gif";
	toc3off = new Image(); 
	toc3off.src = "/images/tabs-off_04.gif";

	toc4on = new Image(); 
	toc4on.src = "/images/tabs-on_05.gif";
	toc4off = new Image(); 
	toc4off.src = "/images/tabs-off_05.gif";
	
	toc5on = new Image(); 
	toc5on.src = "/images/tabs-on_06.gif";
	toc5off = new Image(); 
	toc5off.src = "/images/tabs-off_06.gif";
	
	toc6on = new Image(); 
	toc6on.src = "/images/tabs-on_07.gif";
	toc6off = new Image(); 
	toc6off.src = "/images/tabs-off_07.gif"; 
}

function img_onact(imgName) {
	if (document.images) {
		imgOn = eval(imgName + "on.src");
		document [imgName].src = imgOn;
		}
	}

function img_offoffinact(imgName) {
	if (document.images) {
		imgOff = eval(imgName + "off.src");
		document [imgName].src = imgOff;
		}
	}
	
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

 function validForm(form) {
	if (form.ABR.value.length== 0 ) {
	alert("Please Select a State.");
    form.ABR.focus();
    return false;
	}
    return true;
}

 function validZip(form1) {
 var ZIPLENGTH = 5;
 
 if (form1.fZipCode.value.length==0)
	{
		alert("Please enter a zip code.");
   		form1.fZipCode.focus();
   		return false;
	} else if
	(form1.fZipCode.value.length<ZIPLENGTH )
    {
		alert("Please enter a valid zip code.");
   		form1.fZipCode.focus();
   		return false;
	}
	return true;
}

function openCookie() {
	var data = getCookie("Mortgage2004");
	if (!data) {
	window.open("/content/popup/index.asp","PopUp","toolbar=no,location=0,directories=0,status=0,menubar=no,scrollbars=no,resizable=no,width=720,height=300")
	self.focus();
	}
}

function getCookie(name){
var cname = name + "=";               
var dc = document.cookie;             
    if (dc.length > 0) {              
    begin = dc.indexOf(cname);       
        if (begin != -1) {           
        begin += cname.length;       
        end = dc.indexOf(";", begin);
            if (end == -1) end = dc.length;
            return unescape(dc.substring(begin, end));
        } 
    }
return null;
}


function openCalculator() {
	var data = getCalculator("CALC2004");
	if (!data) {
	window.open("/content/popup/calc_redirect.asp","calculator","toolbar=yes,location=0,directories=0,status=0,menubar=yes,scrollbars=Yes,resizable=Yes,width=800,height=600")
	self.focus();
	}
}

//function openCalculator() {
//	var data = getCalculator("CALC2004");
//	if (!data) {
//	window.open("/content/popup/calc.asp","calculator","toolbar=no,location=0,directories=0,status=0,menubar=no,scrollbars=no,resizable=no,width=720,height=300")
//	self.focus();
//	}
//}

function getCalculator(name){
var cname = name + "=";               
var dc = document.cookie;             
    if (dc.length > 0) {              
    begin = dc.indexOf(cname);       
        if (begin != -1) {           
        begin += cname.length;       
        end = dc.indexOf(";", begin);
            if (end == -1) end = dc.length;
            return unescape(dc.substring(begin, end));
        } 
    }
return null;
}
