<!--
function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
<!--
function checkLoanPurpose() {}
function checkPropertyTypes() {}

function nexttab(ctrl, nextCtrl ) {
	try {
		if ( ctrl.value.length == ctrl.maxLength ) {
			document.getElementById(nextCtrl).focus();
		}
	}
	catch (ex) {}		
}

function CheckNonEmpty(elt, FieldName) {

  if ( elt.value.length == 0 ) {
    alert("Please specify " + FieldName );
    elt.focus();
    return false;
  }
  return true;
}

function Check (elt, FieldName) {
/* alert('In Check');
 alert('elt.value.length '+elt.value.length);
  alert('elt.maxLength '+elt.maxLength);
 */
  if (elt.value.length != elt.maxLength) {
    alert("Please enter exactly " + elt.maxLength + " digits in the "+FieldName+" field." );
    elt.focus();
    return false;
  }

  var containsNonDigits = /\D/.test( elt.value );

// alert(/\D/.test( elt.value ));

  if (containsNonDigits) {
    alert("Please enter only numbers in the "+FieldName+" field." );
    elt.focus();
    return false;
  }
	
	return true;
}


function FreeMaterial_onsubmit() {
 
 	var theForm = document.Form1;

	if ( !CheckNonEmpty( theForm.fname         , "First Name" ) ) return false;
	if ( !CheckNonEmpty( theForm.lname         , "Last Name" ) ) return false;
	if ( !CheckNonEmpty( theForm.company         , "Company" ) ) return false;
	if ( !CheckNonEmpty( theForm.address       , "Address" ) ) return false;
	if ( !CheckNonEmpty( theForm.city          , "City"   ) ) return false;
	if ( !CheckNonEmpty( theForm.state         , "State" ) ) return false;

	if ( !Check( theForm.zip           , "Zip" ) ) return false;
	if ( !Check( theForm.workphone1          , "Home phone area code"           ) ) return false;
	if ( !Check( theForm.workphone2       , "Home phone"        ) ) return false;
	if ( !Check( theForm.workphone3       , "Home phone"        ) ) return false;
	
	if ( !CheckNonEmpty( theForm.email         , "Email" ) ) return false;
	if ( !CheckNonEmpty( theForm.email2         , "Confirm Email" ) ) return false;
	
	if(theForm.email.value!=theForm.email2.value){
	alert('Your Email fields do not match.');
	theForm.email.focus();
	return false;
	}
	
	//var features = "menubar=no,toolbar=no,location=no,directories=no,statusbar=0,copyhistory=no,width=330,height=440";
	//wnd = window.open( 'about:blank', theForm.target, features );
	theForm.submit();
	return true ;
}

function home101_onsubmit() {
 
 	var theForm = document.Form1;

	if ( !CheckNonEmpty( theForm.fname         , "First Name" ) ) return false;
	if ( !CheckNonEmpty( theForm.lname         , "Last Name" ) ) return false;
	if ( !CheckNonEmpty( theForm.address       , "Address" ) ) return false;
	if ( !CheckNonEmpty( theForm.city          , "City"   ) ) return false;
	if ( !CheckNonEmpty( theForm.state         , "State" ) ) return false;
	if ( !Check( theForm.zip           , "Zip" ) ) return false;
	
	if ( !CheckNonEmpty( theForm.email         , "Email" ) ) return false;
	if ( !CheckNonEmpty( theForm.email2         , "Confirm Email" ) ) return false;
	
	if(theForm.email.value!=theForm.email2.value){
	alert('Your Email fields do not match.');
	theForm.email.focus();
	return false;
	}
	
	//var features = "menubar=no,toolbar=no,location=no,directories=no,statusbar=0,copyhistory=no,width=330,height=440";
	//wnd = window.open( 'about:blank', theForm.target, features );
	theForm.submit();
	return true ;
}


function Form1_onsubmit() {
 
 	var theForm = document.Form1;

	if ( !CheckNonEmpty( theForm.fname         , "First Name" ) ) return false;
	if ( !CheckNonEmpty( theForm.lname         , "Last Name" ) ) return false;
	if ( !CheckNonEmpty( theForm.address       , "Address" ) ) return false;
	if ( !CheckNonEmpty( theForm.city          , "City"   ) ) return false;
	if ( !CheckNonEmpty( theForm.state         , "State" ) ) return false;

	if ( !Check( theForm.zip           , "Zip" ) ) return false;
	if ( !Check( theForm.homephone1          , "Home phone area code"           ) ) return false;
	if ( !Check( theForm.homephone2       , "Home phone"        ) ) return false;
	if ( !Check( theForm.homephone3       , "Home phone"        ) ) return false;
	if ( !Check( theForm.phonetocall1   , "Contact phone area code"    ) ) return false;
	if ( !Check( theForm.phonetocall2, "Contact phone" ) ) return false;
	if ( !Check( theForm.phonetocall3       , "Contact phone" ) ) return false;

	if ( !CheckNonEmpty( theForm.besttime         , "Best Time to Call" ) ) return false;
	
	if ( !CheckNonEmpty( theForm.email         , "Email" ) ) return false;
	if ( !CheckNonEmpty( theForm.email2         , "Confirm Email" ) ) return false;
	
	if(theForm.email.value!=theForm.email2.value){
	alert('Your Email fields do not match.');
	theForm.email.focus();
	return false;
	}
	
	if ( !CheckNonEmpty( theForm.loaninterested, "Loan Purpose" ) ) return false;
	if ( !CheckNonEmpty( theForm.propertyvalue , "Approximate Home Value" ) ) return false;
	if ( !CheckNonEmpty( theForm.creditrating  , "Credit Rating" ) ) return false;
	if ( !CheckNonEmpty( theForm.borrowrequest , "Approximate Loan Amount" ) ) return false;
	if ( !CheckNonEmpty( theForm.mortgagerating  , "Mortgage Rating" ) ) return false;
	if ( !CheckNonEmpty( theForm.mortgagebalance     , "Approximate 1st Mortgage Balance" ) ) return false;
	if ( !CheckNonEmpty( theForm.hometype      , "Type of Home" ) ) return false;
	if ( !CheckNonEmpty( theForm.interestrate  , "Current Interest Rate" ) ) return false;

	//var features = "menubar=no,toolbar=no,location=no,directories=no,statusbar=0,copyhistory=no,width=330,height=440";
	//wnd = window.open( 'about:blank', theForm.target, features );
	theForm.submit();
	return true ;
}


function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	document.images["sublinks"].src = "images/header_4.jpg";
}

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 MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

if ((MM_swapImage.arguments[0])=='loans'){
document.images["sublinks"].src = "images/sublinks_loans.jpg";
}

}


var visibleLayer="disagree";

function closethis(){
window.close();
opener.focus();
}

function layerToggle(layerName){
	//note that the layer name must be unique for any object on the page (you cannot
	//even have a button or field and a layer with the same name) 
	if (layerName == visibleLayer) return; //else continue execution
	if (document.layers) { //netscape 4
		l1 = eval("document.layers." + visibleLayer);
		l2 = eval("document.layers." + layerName);
		}
	else { //IE4 & up & Mozilla 5 & up
		l1 = eval("document.getElementById('" + visibleLayer + "')");
		l2 = eval("document.getElementById('" + layerName + "')");
		}
	l1.style.visibility = "hidden";
	l2.style.visibility = "visible";
	visibleLayer = layerName;
	
}//layerToggle


function newwin(path, height, width){
window.open(path,"Add","Height="+height+",Width="+width+", scrollbars=yes");
}

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

function newaction(path, height, width,ID){
if(confirm("Are you sure you want to delete ID "+ID+"?")){
		window.open(path,"Delete","Height="+height+",Width="+width);
	}
else{
	alert ("No action was taken.");
	}
}

function doPic(imgName) {
if (ns3up || ie4up) {
imgOn = ("images/header_" + imgName + ".jpg");

document.header.src = imgOn;
}
}

function openpopup(path, height, width){
window.open(path,"Add","Height="+height+",Width="+width);
}


function preloadImages() {
	var doc=document;
	if(doc.images){
		if(!doc.p)
			doc.p=new Array();
		var count,j=doc.p.length,a=preloadImages.arguments;
		for(count=0; count<a.length; count++)
			if (a[count].indexOf("#")!=0){
				doc.p[j]=new Image;
				doc.p[j++].src=a[count];
			}
	}
}


//-->
