/*-----------------------*/
function menu_loadswap() {

home_off = new Image;(60,40)
home_off.src = "/t/template19/pics0/menu_home_off.jpg";
home_on = new Image;(60,40)
home_on.src = "/t/template19/pics0/menu_home_on.jpg";

emailme_off = new Image;(75,40)
emailme_off.src = "/t/template19/pics0/menu_emailme_off.jpg";
emailme_on = new Image;(75,40)
emailme_on.src = "/t/template19/pics0/menu_emailme_on.jpg";

exclusivelistings_off = new Image;(95,40)
exclusivelistings_off.src = "/t/template19/pics0/menu_exclusivelistings_off.jpg";
exclusivelistings_on = new Image;(95,40)
exclusivelistings_on.src = "/t/template19/pics0/menu_exclusivelistings_on.jpg";

exclusivelistings_off = new Image;(95,40)
exclusivelistings_off.src = "/t/template19/pics0/menu_exclusivelistings_off.jpg";
exclusivelistings_on = new Image;(95,40)
exclusivelistings_on.src = "/t/template19/pics0/menu_exclusivelistings_on.jpg";

instantmls_off = new Image;(115,40)
instantmls_off.src = "/t/template19/pics0/menu_instantmls_off.jpg";
instantmls_on = new Image;(115,40)
instantmls_on.src = "/t/template19/pics0/menu_instantmls_on.jpg";

mortgagecalc_off = new Image;(96,40)
mortgagecalc_off.src = "/t/template19/pics0/menu_mortgagecalc_off.jpg";
mortgagecalc_on = new Image;(96,40)
mortgagecalc_on.src = "/t/template19/pics0/menu_mortgagecalc_on.jpg";

buyers_off = new Image;(96,40)
buyers_off.src = "/t/template19/pics0/menu_buyers_off.jpg";
buyers_on = new Image;(96,40)
buyers_on.src = "/t/template19/pics0/menu_buyers_on.jpg";

sellers_off = new Image;(96,40)
sellers_off.src = "/t/template19/pics0/menu_sellers_off.jpg";
sellers_on = new Image;(96,40)
sellers_on.src = "/t/template19/pics0/menu_sellers_on.jpg";

buyerlogin_off = new Image;(112,40)
buyerlogin_off.src = "/t/template19/pics0/menu_buyerlogin_off.jpg";
buyerlogin_on = new Image;(112,40)
buyerlogin_on.src = "/t/template19/pics0/menu_buyerlogin_on.jpg";

}

function menu_loadswap_index() {

sold_off = new Image;(144,148)
sold_off.src = "/t/template19/pics0/button_sold.jpg";
sold_on = new Image;(144,148)
sold_on.src = "/t/template19/pics0/button_sold_on.jpg";

town_off = new Image;(144,148)
town_off.src = "/t/template19/pics0/button_townhouse.jpg";
town_on = new Image;(144,148)
town_on.src = "/t/template19/pics0/button_townhouse_on.jpg";

low_off = new Image;(144,148)
low_off.src = "/t/template19/pics0/button_lowrise.jpg";
low_on = new Image;(144,148)
low_on.src = "/t/template19/pics0/button_lowrise_on.jpg";

high_off = new Image;(144,148)
high_off.src = "/t/template19/pics0/button_highrise.jpg";
high_on = new Image;(144,148)
high_on.src = "/t/template19/pics0/button_highrise_on.jpg";

vacant_off = new Image;(144,148)
vacant_off.src = "/t/template19/pics0/button_land.jpg";
vacant_on = new Image;(144,148)
vacant_on.src = "/t/template19/pics0/button_land_on.jpg";

est_off = new Image;(144,148)
est_off.src = "/t/template19/pics0/button_estateproperties.jpg";
est_on = new Image;(144,148)
est_on.src = "/t/template19/pics0/button_estateproperties_on.jpg";

res_off = new Image;(144,148)
res_off.src = "/t/template19/pics0/button_residentialhomes.jpg";
res_on = new Image;(144,148)
res_on.src = "/t/template19/pics0/button_residentialhomes_on.jpg";

resort_off = new Image;(144,148)
resort_off.src = "/t/template19/pics0/button_altaAndBc.jpg";
resort_on = new Image;(144,148)
resort_on.src = "/t/template19/pics0/button_altaAndBc_on.jpg";

rentalpool_off = new Image;(144,148)
rentalpool_off.src = "/t/template19/pics0/button_rental_pool_off.jpg";
rentalpool_on = new Image;(144,148)
rentalpool_on.src = "/t/template19/pics0/button_rental_pool_on.jpg";

resLots_off = new Image;(144,148)
resLots_off.src = "/t/template19/pics0/button_resLots.jpg";
resLots_on = new Image;(144,148)
resLots_on.src = "/t/template19/pics0/button_resLots_on.jpg";

ruralLand_off = new Image;(144,148)
ruralLand_off.src = "/t/template19/pics0/button_ruralLand.jpg";
ruralLand_on = new Image;(144,148)
ruralLand_on.src = "/t/template19/pics0/button_ruralLand_on.jpg";

adultcondos_off = new Image;(144,148)
adultcondos_off.src = "/t/template19/pics0/button_adult_condos_off.jpg";
adultcondos_on = new Image;(144,148)
adultcondos_on.src = "/t/template19/pics0/button_adult_condos_on.jpg";


}




function menu_swap(x,y) {
   document.images[x].src=eval(y+'.src');
}



function menu_click( inURL ) {
	window.location = inURL;
}

access = "Access Services";
contact = "Contact Us";
find = "Property Finder";
home = "Home Evaluation";
search = "Search MLS";

function quick_nav_over( objTarget, strKey ) {
	if ( objTarget ) {
		if ( objTarget.className == 'quick_nav_on' ) {
			objTarget.className = 'quick_nav_off';
		} else {
			objTarget.className = 'quick_nav_on';
		}
	}
	
	if ( strKey ) {
		objNavHelp = document.all?document.all['quick_nav_help']:document.getElementById('quick_nav_help');
	
		if ( objNavHelp != '' && objNavHelp != null && objNavHelp != 'undefined' ) {
			objNavHelp.innerHTML = eval(strKey);
		}
	}
}

function quick_nav_out ( objTarget ) {
	if ( objTarget ) {
		if ( objTarget.className == 'quick_nav_on' ) {
			objTarget.className = 'quick_nav_off';
		} else {
			objTarget.className = 'quick_nav_on';
		}
	}
}

function MenuOn(tableCellRef) {
	tableCellRef.style.backgroundColor = '#FFFFFF';
	tableCellRef.style.cursor='hand';
}

function MenuOff(tableCellRef) {
	tableCellRef.style.backgroundColor = '#EEEEEE';
	tableCellRef.style.cursor='hand';
}

function OpenNewSite(newLocation) {
    newwin=window.open(newLocation, "dispwin","width=800,height=500,scrollbars,resizable,menubar,location");
}

function NavBarClick( tableCellRef, navStyle, url ) {
	NavBar( tableCellRef, 0, navStyle );
	GoTo( url );
}

function OpenSlideShow(propertyID) {
    newwin=open("intermediate_listingDetailsSlideShow.jsp?searchType=slideShow&listingNumber="+propertyID, "dispwin","width=800,height=500,scrollbars=yes,menubar=no,location=no,resize=yes,top=20,left=20')");
}

function OpenVirtualTour(propertyID) {
    newwin=open("intermediate_listingDetailsVirtualTour.jsp?searchType=virtualTour&listingNumber="+propertyID, "dispwin","width=800,height=500,scrollbars=yes,menubar=no,location=no,resize=yes,top=20,left=20");
}

function OpenMortgageCalc(price, propertyTax) {
    newwin=open("mortgage_calc.jsp?price="+price+"&propertyTax="+propertyTax, "dispwin","width=800,height=550,scrollbars=yes,menubar=no,location=no,resize=yes,top=20,left=20");
}
function OpenNewWindow(location) {
    newwin = open(location, "dispwin","width=800,height=550,scrollbars=yes,menubar=no,resize=yes,top=20,left=20");
}
function OpenPrivacyWindow(location) {
    newwin = open(location, "dispwin","width=620,height=500,scrollbars=no,menubar=no,resize=yes,top=20,left=20");
}
function swapImage(imgName,imgObjName) {
   if (document.images) {
     document.images[imgName].src = eval(imgObjName + ".src");
   }
}
function openMainMortCalc() {
	window.open('main_mortgage_calc.jsp', 'new_window', 'width=550,height=475');
}
function openMainNewListing() {
	window.open('new_listing.jsp', 'new_window', 'width=550,height=450');
}
function openMainEmailMe() {
	window.open('main_email_me.jsp', 'new_window', 'width=550,height=450');
}
function openSuperMainEmailMe(text) {
	window.open('main_email_me.jsp?emailMessage='+text, 'new_window', 'width=550,height=450');
}
function openWhatIsRP() {
	window.open('what_is_rp.jsp', 'new_window', 'width=600,height=500,scrollbars=yes,resize=yes');
}
function jumpTo(URL_List){
   var URL = URL_List.options[URL_List.selectedIndex].value;
   window.location.href = URL;
}
function validateEmail(theForm)
{
	if (theForm.name.value.length < 1) 
	{
		alert("You Need to enter a name, thank you.");
		theForm.name.focus();
		return false;
    }
	
	if (theForm.phone1.value.length < 1) 
	{
		alert("You Need to enter a phone number, thank you.");
		theForm.phone1.focus();
		return false;
    }
    
    var checkTLD=1;

		var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
		var emailPat=/^(.+)@(.+)$/;
		var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
		var validChars="\[^\\s" + specialChars + "\]";
		var quotedUser="(\"[^\"]*\")";
		var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
		var atom=validChars + '+';
		var word="(" + atom + "|" + quotedUser + ")";
		var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
		var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
		var matchArray=theForm.email.value.match(emailPat);
		if (matchArray==null) {
			alert("You must use a valid e-mail address to continue.");
			theForm.email.focus();
			return false;
		}
		var user=matchArray[1];
		var domain=matchArray[2];
		for (i=0; i<user.length; i++) {
			if (user.charCodeAt(i)>127) {
				alert("You must use a valid e-mail address to continue.");
				theForm.email.focus();
				return false;
				}
			}
		for (i=0; i<domain.length; i++) {
			if (domain.charCodeAt(i)>127) {
				alert("You must use a valid e-mail address to continue.");
				theForm.email.focus();
				return false;
			}
		}
		if (user.match(userPat)==null) {
			alert("You must use a valid e-mail address to continue.");
			theForm.email.focus();
			return false;
		}
		var IPArray=domain.match(ipDomainPat);
		if (IPArray!=null) {
			for (var i=1;i<=4;i++) {
				if (IPArray[i]>255) {
					alert("You must use a valid e-mail address to continue.");
					theForm.email.focus();
					return false;
				}
			}
		}
		var atomPat=new RegExp("^" + atom + "$");
		var domArr=domain.split(".");
		var len=domArr.length;
		for (i=0;i<len;i++) {
		if (domArr[i].search(atomPat)==-1) {
			alert("You must use a valid e-mail address to continue.");
			theForm.email.focus();
			return false;
		}
	}
	if (checkTLD && domArr[domArr.length-1].length!=2 && 
	domArr[domArr.length-1].search(knownDomsPat)==-1) {
		alert("You must use a valid e-mail address to continue.");
		theForm.email.focus();
		return false;
	}
	if (len<2) {
		alert("You must use a valid e-mail address to continue.");
		theForm.email.focus();
		return false;
	}
}


<!--
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;
}

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.01
  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 && d.getElementById) x=d.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];}
}
//-->
