
function go(box) {
		var val = box.options[box.selectedIndex].value;
		if (val != "") {
					window.location.href = val;
				}
			}
			
function OpenWindow(page){ var cal = window.open(page, "popup", "directories=no,height=400,location=no,menubar=no,scrollbars=yes,status=no,resizable=1,width=500"); 
} 


function PopUp(URL,Window,w,h,x,y) {
	var popupwin = window.open(URL,Window,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+w+",height="+h+",left="+x+",top="+y);
}



function OpenTest() {
	PopUp('/testimonials.asp','Test','590','360','10','10');
}



function Jump(Location) {
	opener.location.href = Location;window.close()
}


var br
if(navigator.appName == "Netscape" && navigator.appVersion.charAt(0)=="4"){br="N";}
else if(navigator.appName == "Microsoft Internet Explorer" && document.all != null){br="IE";}
else if(navigator.appName == "Netscape" && document.getElementById != null && navigator.appVersion.charAt(0)=="5"){br="N5";}
else{br=null}



	
function QuickCheck() {

if (document.fSite.Name.value == "" && (document.fSite.Sub.value == "" ) ) {
	alert("Please Specify a Search Term");
	document.fSite.Name.focus();return false
	}


if(document.fSite.Name.value.length < 3 && document.fSite.Sub.value.length < 3 ) {
		alert('You need to specify more than 2 letters to search for.');
		return false;
	}
	

}



function confirmAction() {
    return confirm("THIS ACTION WILL DELETE THIS COMPLETELY..\n\nClick OK to DELETE!\nClick Cancel to ABORT!")
}




// dhtml menu items
// define menu attributes here
menuColor="#E6E4E4"
menuColorOn="#F27920"
fontColorOn="#ffffff"
fontColorOff="#000000"
lineColor = "#E6E4E4"

separator="<img src=/assets/images/spacer.gif height=1 width=1>"

// shows the drop down menu expected arg is active div

function showDDNav(){
	args = showDDNav.arguments;
	var divName = args[0];
	var divRef;
	
	if(br=="N"){
		divRef=eval("document." + divName);
		if(divRef.visibility=='hide'){
			divRef.visibility = 'show';
		}
	} else {
		if (br=="NS6") {
			divRef=eval("document.getElementById('" + divName + "')");
		} else {
			divRef=eval("document.all." + divName);
		}
		if(divRef.style.visibility=='hidden'){
			divRef.style.visibility = 'visible';
		}
	}
}

// hides the drop down menu 
// expected arg is active div 
function hideDDNav(){
	args = hideDDNav.arguments;
	var divName = args[0];
	var divRef;
	
	if(br=="N"){
		divRef=eval("document." + divName);
		if(divRef.visibility=='show'){
			divRef.visibility = 'hide';
		}
	} else {
		if (br=="NS6") {
			divRef=eval("document.getElementById('" + divName + "')");
		} else {
			divRef=eval("document.all." + divName);
		}
		if(divRef.style.visibility=='visible'){
			divRef.style.visibility = 'hidden';
		}
	}
}

// hides drop down menu when menu is active IE & NS6
// expected arg is active menu
function hideDiv(){
	args = hideDiv.arguments;
	var divName = args[0];
	var divRef;
	// fix menu flicker problem in IE
	if(br=="IE"){
		divRef=eval("document.all." + divName);
		// calculate active size of menu
		leftDiv=divRef.offsetLeft +2
		rightDiv=divRef.offsetLeft + divRef.clientWidth -2
		topDiv=divRef.offsetTop +2
		bottomDiv=divRef.offsetTop + divRef.clientHeight -2		
		if(window.event.clientY > bottomDiv || 
			window.event.clientY < topDiv || 
			window.event.clientX < leftDiv || 
			window.event.clientX > rightDiv){
				divRef.style.visibility = 'hidden';
		}
	// NS6
	} else {
		divRef=eval("document.getElementById('" + divName + "')");
		divRef.style.visibility = 'hidden';
	}	
}

// highlight menuitem in IE & NS6
// expected arg is active menuitem
function divOver(){
	args = divOver.arguments;
	var divName = args[0];
	var divRef;
	
	if (br=="NS6") {
		divRef=eval("document.getElementById('" + divName + "')");
		divRef.style.cursor = "pointer";
	} else {
		divRef=eval("document.all." + divName);
	}
	divRef.style.backgroundColor = menuColorOn;
	divRef.style.color = fontColorOn;
}

// highlight off menuitem in IE & NS6
// expected arg is active menuitem
function divOut(){
	args = divOut.arguments;
	var divName = args[0];
	var divRef;
	
	if (br=="NS6") {
		divRef=eval("document.getElementById('" + divName + "')");
	} else {
		divRef=eval("document.all." + divName);
	}
	divRef.style.backgroundColor=menuColor;
	divRef.style.color = fontColorOff;
}

// highlight on menuitem in netscape 4.x expected arg is active menuitem

function menuOver(){
	var args, theMenu;
	args = menuOver.arguments;
	theMenu = eval(args[0]);
	theMenu.bgColor=menuColorOn 
}

// highlight off menuitem in netscape 4.x expected arg is active menuitem

function menuOut(){
	var args, theMenu;
	args = menuOut.arguments;
	theMenu = eval(args[0]);
	theMenu.bgColor=menuColor 
}

// goes to specified url expected arg is url 

function gotoUrl(){
	args = gotoUrl.arguments;
	var CM_RefferingURL, CM_Location, CM_Exists, CM_Javascript;
	//CM_ReferringURL = window.location.href;
	//CM_ReferringURL = CM_ReferringURL.split("&referringurl=");
	//CM_ReferringURL = CM_ReferringURL[0].split("?referringurl=");
	//CM_Exists = args[0].indexOf('?');
	CM_Javascript = args[0].indexOf('javascript');
	//if (CM_Exists == -1) {
		//CM_Location = args[0] + '?referringurl=' + escape(CM_ReferringURL[0])
	//}
	//else {
		CM_Location = args[0] //+ escape(CM_ReferringURL[0])
	//}
	if (CM_Javascript != -1) {CM_Location = args[0]}
	location.href = (CM_Location)
}

// hides specified tag

function hideElement(HTMLtag)
{
	for (i = 0; i < document.all.tags(HTMLtag).length; i++)
	{
		obj = document.all.tags(HTMLtag)[i];
		obj.style.visibility = "hidden";
	}
}

// shows specified tag

function showElement(HTMLtag)
{
	for (i = 1; i < document.all.tags(HTMLtag).length; i++)
	{
		obj = document.all.tags(HTMLtag)[i];
		obj.style.visibility = "visible";
	}
}

// build the divs for IE & Netscape 6
// expected args are 'div name','x in menudata aray','menu left coord','top in pixels' 

var tdID = 0
function doDiv(){
	args = doDiv.arguments;
	var divID = args[0];
	var x = args[1];
	var divLeft = args[2];
	var divTop = args[3];
	var divWidth = args[4];

	objDiv = "<div id=\"" + divID + "\" style=\"position:absolute; width:" + divWidth + "px; z-index:2; top:"+ divTop +"px; left: " + divLeft + "; background-color: #E6E4E4; border:1 solid #737437; visibility: hidden;\" onMouseover=\"showDDNav('"+ divID +"')\" onMouseout=\"hideDiv('"+ divID +"')\">"
	objDiv += "<div id=\"spacer\" style=\"position:relative; height:6px; width:" + eval(divWidth - 10) + "px; z-index:3; left: 5; font-size:1;\"></div>"
	
	for (y = 0; y < 17; y++){
	    if(menuData[x][y][0]!=null){
		
		   if(menuData[x][y][0]=="bar"){
		   
		   objDiv += "<div id=\"spacer\" style=\"position:relative; height:3px; width:" + eval(divWidth - 10) + "px; z-index:3; left: 5; font-size:1;\"></div>"
		   objDiv += "<div id=\"bar\" style=\"position:relative; height:1; width:" + eval(divWidth - 10) + "px; z-index:3; left: 5; background-color:#CCCCCC;\">" + separator + "</div>"
           objDiv += "<div id=\"spacer\" style=\"position:relative; height:3px; width:" + eval(divWidth - 10) + "px; z-index:3; left: 5; font-size:1;\"></div>"
		
		   } else {
		   
		   objDiv += "<div id=\"x" + tdID + "\" style=\"position:relative; background-color:"+ menuColor +"; width:" + eval(divWidth - 10) + "px; z-index:3; left: 5;\" onMouseover=\"divOver('x" + tdID + "')\" onMouseout=\"divOut('x" + tdID + "')\" class=\"dhtmlNav\" onClick=\"gotoUrl('"+menuData[x][y][1]+"')\">&nbsp;"+ menuData[x][y][0] +"&nbsp;</div>"
		   
		   }
		
		tdID = tdID +1
		}
	}
	objDiv += "<div id=\"bar\" style=\"position:relative; height:1; width:" + eval(divWidth - 10) + "px; z-index:3; left: 5; background-color:" + lineColor + ";\">" + separator + "</div>"
	objDiv += "<div id=\"spacer\" style=\"position:relative; height:6px; width:" + eval(divWidth - 10) + "px; z-index:3; left: 5; font-size:1;\"></div></div>"
	
	document.write(objDiv);
}

// build the layers for netscape4 expected args are 'div name','x in menudata aray','menu left coord','top in pixels' 

function doLayer(){
	args = doLayer.arguments;
	var nestLayerID=0
	var layerID = args[0];
	var x = args[1];
	var layerLeft = args[2];
	var layerTop = args[3];
	var layerWidth = args[4];

	if(navigator.platform.indexOf("Win") < 0){layerInc=16;layerStyle="netMenuMac";}
	else{layerInc=15;layerStyle="netMenu";}	
		
	objDiv = "<layer id=\""+ layerID +"\" Z-INDEX=1 BGCOLOR=\""+ menuColor +"\" WIDTH=" + layerWidth + " LEFT="+ layerLeft +" TOP="+ layerTop +" VISIBILITY=HIDE onmouseover=\"showDDNav('"+ layerID +"')\" onmouseout=\"hideDDNav('"+ layerID +"')\">"
	
	var nestTop=10
		for (y = 0; y < 17; y++){
				
		    if(menuData[x][y][0]!=null){

				if(menuData[x][y][0]=="bar"){
		   
			    objDiv += "<layer id=\"spacer\" BGCOLOR=\""+ menuColor +"\" WIDTH=" + eval(layerWidth - 10) + " HEIGHT=5 Z-INDEX=8 LEFT=5 TOP="+ nestTop +">"+ separator +"</layer>"
				nestLayerID=nestLayerID+1
				nestTop=nestTop+5			    
				
				objDiv += "<layer id=\"line2\" BGCOLOR=#CCCCCC WIDTH=" + eval(layerWidth - 10) + " HEIGHT=1 Z-INDEX=11 LEFT=5 TOP="+ nestTop +">"+ separator +"</layer>"
				nestLayerID=nestLayerID+1
				nestTop=nestTop+1
				
				objDiv += "<layer id=\"spacer2\" BGCOLOR=\""+ menuColor +"\" WIDTH=" + eval(layerWidth - 10) + " HEIGHT=5 Z-INDEX=8 LEFT=5 TOP="+ nestTop +">"+ separator +"</layer>"				
				nestLayerID=nestLayerID+1
				nestTop=nestTop+5
				
				} else {
		   			    
				objDiv += "<layer id=\"x"+nestLayerID+"\" class=\""+ layerStyle +"\" Z-INDEX=7 BGCOLOR=\""+ menuColor +"\" HEIGHT=19 WIDTH=" + eval(layerWidth - 10) + " LEFT=5 TOP="+ nestTop +" onmouseover=\"menuOver('document.layers[\\'"+ layerID +"\\'].document.layers[\\'x"+nestLayerID+"\\']')\" onmouseout=\"menuOut('document.layers[\\'"+ layerID +"\\'].document.layers[\\'x"+nestLayerID+"\\']')\"><a id=navstyle  href=javascript:gotoUrl('"+menuData[x][y][1]+"')><font color=" + fontColorOff + ">"+ menuData[x][y][0]
				objDiv +="</font></a></layer>"		
				nestLayerID=nestLayerID+1
				nestTop=nestTop+layerInc+1
							
				}
			
			}
		}
		//objDiv += "<layer id=\"line2\" BGCOLOR=\""+ lineColor +"\" WIDTH=" + eval(layerWidth - 10) + " LEFT=5 HEIGHT=1 Z-INDEX=8 TOP="+ nestTop +">"+ separator +"</layer>"
		objDiv +="<layer id=\"lineEnd\" BGCOLOR=\""+ menuColor +"\" WIDTH=" + layerWidth + " HEIGHT=8 Z-INDEX=7 TOP="+ nestTop +"></layer></layer>"

	document.write(objDiv)
}


// Netscape Resize Function for Layers

//function reDo(){window.location.reload()}
//function setResize(){setTimeout("window.onresize=reDo",500);}
//	if(br=="N"){
//	window.onload = setResize;
//}




// menu data arrays

menuData = new Array()
for (i=0; i < 10; i++) {
	menuData[i] = new Array(40)
	for (j=0; j < 20; j++) {
		menuData[i][j] = new Array(2)}}
		
menuData[0][0][0]="cc&r's";		
menuData[0][0][1]="/mytitle/cc_r.asp";
menuData[0][1][0]="mortgage reports";
menuData[0][1][1]="/mytitle/mortgage_reports.asp";
menuData[0][2][0]="ownership search";
menuData[0][2][1]="/mytitle/ownership_search.asp";
menuData[0][3][0]="plat maps";
menuData[0][3][1]="/mytitle/plat_maps.asp";
menuData[0][4][0]="property e-profiles";
menuData[0][4][1]="/mytitle/eproperty_profiles.asp";
menuData[0][5][0]="sales reports";
menuData[0][5][1]="/mytitle/sales_reports.asp";
menuData[0][6][0]="survey search";
menuData[0][6][1]="/mytitle/survey_search.asp";

menuData[1][1][0]="homeowner associations";
menuData[1][1][1]="/hoa.asp";
menuData[1][2][0]="real estate links";
menuData[1][2][1]="/related_links.asp";
menuData[1][3][0]="why title insurance?";
menuData[1][3][1]="/title_insurance.asp";
//menuData[1][4][0]="BCT Buzz";
//menuData[1][4][1]="/bct_buzz.aspx";
menuData[1][4][0]="closing cost calculator";
menuData[1][4][1]="/closing_cost.asp";


menuData[2][0][0]="employee directory";
menuData[2][0][1]="/employee_directory.asp";
menuData[2][1][0]="contact us";
menuData[2][1][1]="/contact_us.asp";






// browser css functions
browser = navigator.appName;
  version = navigator.appVersion;
  os = navigator.platform;
  ie = "Microsoft Internet Explorer";
  nn = "Netscape";

    // sniff for netscape
  if (browser == nn) {
  	// sniff for Mac and give them the default stylesheet
    if (os == "MacPPC") {
  	  document.write('<link href="/css/default.css" rel="stylesheet" type="text/css" title="master">');
	}
	// sniff for anything greater than version 4 of Netscape and give them the default stylesheet
	if (version.charAt(0) > 4) {
	  document.write('<link href="/css/default.css" rel="stylesheet" type="text/css" title="master">');
	}
	// give Netscape 4.x users the netscape stylesheet
	else {
	  document.write('<link href="/css/netscape.css" rel="stylesheet" type="text/css" title="master">');
  	}
  }
  // give everyone else (IE) the default stylesheet
  else {
    document.write('<link href="/css/default.css" rel="stylesheet" type="text/css" title="master">');
  }

// reload the window upon resize to fix a bug in Netscape 4.x

if(navigator.appName == 'Netscape') {
	if(document.layers) {br="N"}
	else if(document.getElementById) {br="NS6"}
} else{br="IE";}

function reDo(){window.location.reload()}
function setResize(){setTimeout("window.onresize=reDo",500);}
	if(br=="N"){
	window.onload = setResize;
}

//if (browser == nn) {
//	document.write('<link rel=stylesheet type="text/css" href="/css/netscape.css" title=master>');
//} 

//else {
//	document.write('<link rel=stylesheet type="text/css" href="/css/default.css" title=master>');
//}


// layer coordinants

if(br=="N"){

	doLayer('mytitle',0,0,102,175)
	doLayer('title',1,144,102,175)
	doLayer('company',2,370,102,175)

}
else {
    doDiv('mytitle',0,0,102,175)
	doDiv('title',1,144,102,175)
	doDiv('company',2,295,102,175)
	
}

