function passwordvalidate(form){
	 var msg = "";
	 var pwd = form.password.value;
	 var pwd2 = form.passwordConfirm.value;
	 if(pwd == pwd2){
		 msg = "";
	 } else {
	 	msg = "Passwords do not match.  Please re-enter.";
	 }
	 if(form.username.value==""){msg="Please enter a user name";}
	 if (msg == ""){
	 form.submit();
	 } else {
	 alert(msg);
	 return false;
	 }
}
function accountvalidate(form){
	 var msg = "";
	 var user = form.username.value;
	 var pwd = form.password.value;
	 var pwd2 = form.passwordConfirm.value;
	 if(user==""){
		 msg = "Please enter a username";
	 }
	 if(pwd==""){
		 msg = "Please enter a password";
	 }
	 if(pwd == pwd2){
		 msg = "";
	 } else {
	 	msg = "Passwords do not match.  Please re-enter.";
	 }
	 if (msg == ""){
	 form.submit();
	 } else {
	 alert(msg);
	 return false;
	 }
}
function button_on( buttonname,form )
{
	var mapname = "vt";
	var county = "county";
	document.mlsSearch.county.value = buttonname;
    if (document.images) {
      document[ mapname ].src = eval( mapname + "_"+buttonname+".src" );
    }
}
function button_off ( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + ".src" );
    }
}
function clearMap()
{
	var mapname = "vt";
	document.mlsSearch.county.value = "all";
    if (document.images) {
      document[ mapname ].src = eval( mapname + ".src" );
    }
}
function leftNavOver(element) {
	if (element.className == "whiteBack") {
		element.className = "grayBack";
	} else {
		element.className = "whiteBack";
	}
}
function pageRedirect(url){
	location.href=(url);
}
function pageOpen(url){
	window.open(url);
}
function submitSearch(form){
	 form.submit();
}
function openCalc(url) {
	window.open(url,'Mortgage','toolbar=no,scrollbars=yes,width=400,height=450,resizable=yes');
}
function showPic (whichpic) {
 if (document.getElementById) {
  document.getElementById('placeholder').src = whichpic.href;
  if (whichpic.title) {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
  } else {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}
function showPrint(url){
	window.open(url,'Previews','toolbar=yes,scrollbars=yes,width=810,height=600,resizable=yes');
}
function showEmail(url){
	window.open(url,'Previews','toolbar=no,scrollbars=no,width=350,height=250,resizable=no');
}
function showTour(url){
	window.open(url,'Previews','toolbar=yes,scrollbars=yes,width=450,height=325,resizable=yes');
}