
function SwapWhite(Font, inout)
{
  if (inout == 1)
      Font.style.color = "white";
  else
      Font.style.color = "";    
}

function GoPage()
{	var dropdown = document.getElementById('SelectSearch');
	var myindex  = dropdown.selectedIndex;
	var SelValue = dropdown.options[myindex].value;
	var baseURL = "index.htm";
	
	if (SelValue==1) baseURL="LoanApplication.aspx";
	if (SelValue==2) baseURL="RealEstate.htm";
	if (SelValue==3) baseURL="RealEstate.htm";
	if (SelValue==4) baseURL="InsuranceForm.aspx";
	if (SelValue==5) baseURL="QA.htm";
	if (SelValue==6) baseURL="Glossary.htm";
	if (SelValue==8) baseURL="Contact.aspx";
	if (SelValue==7) 
	   {
	      ShowPolicy();
	   }   
	else
	{
	  top.location.href = baseURL;
	  return true;
	}  
}

function lightup(imageobject, opacity){
 if (navigator.appName.indexOf("Netscape")!=-1 && parseInt(navigator.appVersion)>=5)
    imageobject.style.MozOpacity=opacity/100;
 else if (navigator.appName.indexOf("Microsoft")!= -1 && parseInt(navigator.appVersion)>=4)
    imageobject.filters.alpha.opacity=opacity;
}

function ShowPolicy()
{
   	p = "Privacy.htm";
	win1=window.open(p,"","width=630,height=600,left=10,top=10,scrollbars=yes,menubar=yes,resizable=yes");
}

function FindAString(str,str1)
{ var i=-1;	

	i = str.indexOf(str1);
	if (i != -1)
		return(i);
	else
		return(-1);  		    
}	

function LoadText()
{
	var urltext = location.search;//<META content="Microsoft Visual Studio .NET 7.1" name="Originator">
	var ind, j;
	var cad;
	var newcad;
	
	ind = FindAString(urltext,"submit=true");  
	if (ind != -1)  // success finding result
	{
		j = FindAString(urltext,"id=1&");
		if (j != -1) {
		    cad = "Your Form has been received. <BR>We will work on the information you supplied to answer as soon as possible.";
		}     
		else {
		    cad = "Your message has been received. <BR>One of our representatives will contact you soon using the information you supplied before.";
		}     
	}   
    else
	{
		j = FindAString(urltext,"id=1&");
		if (j != -1)
		    cad = "For some reason the Form could not be submitted. <BR>You can call us or try again later.";
		else
            cad = "For some reason your message could not be sent. Call us or try again later."; 
	}
	document.getElementById("CellMsg").innerHTML = cad; 
}

function ShowZoomed(url)
{ var features; 
  features = "width=600,height=560,left=10,top=10,scrollbars=yes,resizable=yes";
  win2 = window.open(url ,"BigWindow",features);
}