function MM_reloadPage(init) {

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true);

// -->



function MM_findObj(n, d) { 

  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 tmt_findObj(n){

	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");

	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");

	}else{x=document.getElementById(n)}return x;

}



function loadimages()

{

	MM_preloadImages('/images/header_nav/nav_business_f2.gif','/images/header_nav/nav_homeowner_f2.gif','/images/header_nav/nav_records_f2.gif','/images/header_nav/nav_voting_f2.gif','/images/header_nav/nav_online_f2.gif','/images/utilities_nav/about_us_f2.gif','/images/utilities_nav/contact_us_f2.gif','/images/utilities_nav/links_f2.gif','/images/utilities_nav/downloads_f2.gif','/images/utilities_nav/sitemap_f2.gif','/images/utilities_nav/faq_f2.gif');

}



function MM_showHideLayers() { 

  var i,p,v,obj,args=MM_showHideLayers.arguments;if(document.getElementById){

   for (i=0; i<(args.length-2); i+=3){ obj=tmt_findObj(args[i]);v=args[i+2];

   v=(v=='show')?'visible':(v='hide')?'hidden':v;

   if(obj)obj.style.visibility=v;}} else{

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];

    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }

    obj.visibility=v; }}

}



function MM_swapImgRestore() { 

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_preloadImages() { 

  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_swapImage() {

  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];}

}



function popup(mypage, myname, w, h, scroll,tool,stat) { //popup window in the center of screen

	var winl = (screen.width - w) / 2;

	var wint = (screen.height - h) / 2;

	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,toolbar='+tool+',status='+stat+''

	win = window.open(mypage, myname, winprops)

	if (parseInt(navigator.appVersion) >= 4) 

		{ 

			win.window.focus(); 

		}

}

function getHTTPVariable(_var, _loc)

	{

		var input = _loc.search.substring(1);

		if (input)

			{

				var _search = input.split("&");

				var _tmp = new Array();

				for (i = 0; i < _search.length; i++)

					{

						_tmp = _search[i].split("=");

						if (_tmp[0] == _var)

							return _tmp[1];

						}

							if(_search.length <= 0)

							{

								_tmp = _input.split('=');

								return _tmp[1];

							}

						return "";

					}

				return "";

	}

function trim(str) 

{ 

    str.replace(/^\s*/, '').replace(/\s*$/, ''); 

	return str;

}

function hideall_layers() {
	MM_showHideLayers('lyrnav01','','hide','lyrnav02','','hide','lyrnav03','','hide','lyrnav04','','hide');
}

function OpenChildWindow(sPath,sName,sOptions) 
{
		self.name = 'info';
		var x = window.open(sPath,sName,sOptions);
		if(parseInt(navigator.appVersion)>3) 
			{x.focus();}
}
function OCW(sPath,sName,sOptions) {
	OpenChildWindow(sPath,sName,sOptions);
}


function application_check(_form)
{
	if(_form.bname.value == "")
	{
		alert("Please specify your business name. Thank you.");
		_form.str_add.focus();
	}
	else if(_form.str_add.value == "")
	{
		alert("Please specify your street address. Thank you.");	
		_form.str_add.focus();
	}
	else if(_form.city.value == "")
	{
		alert("Please specify your city. Thank you.");
		_form.city.focus();
	}
	else if(_form.zip.value == "")
	{
		alert("Please specify your zip code. Thank you.");
		_form.zip.focus();
	}
	else if(isNaN(_form.zip.value))
	{
		alert("Zip code should contain numbers only. Thank you.");	
		_form.zip.focus();
	}
	else if(_form.date.value == "")
	{
		alert("Please specify your date. Thank you.");
		_form.date.focus();	
	}	
	else if(_form.owner1.value == "")
	{
		alert("Please specify name of Owner #1. Thank you.");
		_form.owner1.focus();	
	}
	else if(_form.add1.value == "")
	{
		alert("Please specify Address for Owner #1. Thank you.");
		_form.add1.focus();	
	}
	else if(_form.city1.value == "")
	{
		alert("Please specify City for Owner #1. Thank you.");
		_form.city1.focus();	
	}	
	else if(_form.zip1.value == "")
	{
		alert("Please specify Zip Code of Owner #1. Thank you.");
		_form.zip1.focus();	
	}
	else if(isNaN(_form.zip1.value))
	{
		alert("Zip code should contain numbers only. Thank you.");	
		_form.zip1.focus();
	}
	else if((_form.zip2.value != "") && (isNaN(_form.zip2.value)))
	{
		alert("Zip code should contain numbers only. Thank you.");	
		_form.zip2.focus();	
	}
	else if((_form.zip3.value != "") && (isNaN(_form.zip3.value)))
	{
		alert("Zip code should contain numbers only. Thank you.");	
		_form.zip3.focus();	
	}
	else if((_form.zip4.value != "") && (isNaN(_form.zip4.value)))
	{
		alert("Zip code should contain numbers only. Thank you.");	
		_form.zip4.focus();	
	}	
	else
	{
		_form.submit();
	}
}


var IE = document.all?true:false
if (!IE) document.captureEvents(Event.MOUSEMOVE)

document.onmousemove = getMouseXY;

var tempX = 0
var tempY = 0

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
 if ((tempX < 174) || (tempX > 824) || (tempY < 23) || (tempY > 494)) {
 hideall_layers();
 }
 //document.Show.MouseX.value = tempX
 //document.Show.MouseY.value = tempY
  
  return true
}