<!--
//Rollover functions and preload imgs
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_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_findObj(n, d) { //v4.0
  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 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];}
}
MM_preloadImages('http://www.mecaproperties.com/corpweb/support_imgs/mmnav1_off.jpg','http://www.mecaproperties.com/corpweb/support_imgs/mmnav1_on.jpg','http://www.mecaproperties.com/corpweb/support_imgs/mmnav2_off.jpg','http://www.mecaproperties.com/corpweb/support_imgs/mmnav2_on.jpg','http://www.mecaproperties.com/corpweb/support_imgs/mmnav3_off.jpg','http://www.mecaproperties.com/corpweb/support_imgs/mmnav3_on.jpg','http://www.mecaproperties.com/corpweb/support_imgs/mmnav4_off.jpg','http://www.mecaproperties.com/corpweb/support_imgs/mmnav4_on.jpg','http://www.mecaproperties.com/corpweb/support_imgs/mmnav5_off.jpg','http://www.mecaproperties.com/corpweb/support_imgs/mmnav5_on.jpg');

function writeCopyright(){
// Compliments of W3Schools (www.w3schools.com)
var d=new Date()
document.write(d.getFullYear())
}
function CkFrm1(){
  if(document.frm1.pricecat.value.length <= 0){
  alert('Please select a PRICE CATEGORY.');
  document.frm1.pricecat.focus();
  return false;
  }
  if(document.frm1.areaval.value.length <= 0){
  alert('Please select an AREA.');
  document.frm1.areaval.focus();
  return false;
  }  
}
//****************************************** Check Form 2
function CkFrm2(){
  if(document.frm2.name.value.length <= 0){
  alert('Please enter your NAME.');
  document.frm2.name.focus();
  return false;
  }
  if(document.frm2.addr1.value.length <= 0){
  alert('Please enter your ADDRESS.');
  document.frm2.addr1.focus();
  return false;
  } 
  if(document.frm2.city.value.length <= 0){
  alert('Please enter your CITY.');
  document.frm2.city.focus();
  return false;
  } 
  if(document.frm2.state.value.length <= 0){
  alert('Please select your STATE.');
  document.frm2.state.focus();
  return false;
  }
  if(document.frm2.zip.value.length <= 0){
  alert('Please enter your ZIP CODE.');
  document.frm2.zip.focus();
  return false;
  }
  var is1Checked = false;
  for (var i=0; i < document.frm2.q1.length; i++){
  if(document.frm2.q1[i].checked){
  is1Checked = true;
  break;
		}
	}
  if (!is1Checked){
  alert('Please provide a response for which type of residence you\'re most interested.');
  return(false);
  }   
}
//****************************************** Check Form 3
function CkFrm3(){
  if(document.frm3.name.value.length <= 0){
  alert('Please enter your NAME.');
  document.frm3.name.focus();
  return false;
  }
  if(document.frm3.addr1.value.length <= 0){
  alert('Please enter your ADDRESS.');
  document.frm3.addr1.focus();
  return false;
  } 
  if(document.frm3.contactp.value.length <= 0){
  alert('Please enter your PHONE NUMBER.');
  document.frm3.contactp.focus();
  return false;
  } 
  if(document.frm3.urgency.value.length <= 0){
  alert('Please indicate the URGENCY LEVEL of this problem.');
  document.frm3.urgency.focus();
  return false;
  }
  if(document.frm3.comments.value.length <= 0){
  alert('Please enter the DETAILS surrounding your problem.');
  document.frm3.comments.focus();
  return false;
  }
}
// EXTERNAL CONTROLS FOR HH SERVER
// Search sales properties link
var saleNav = "&#155;&nbsp;<a href=\"http://mecapropertiesbrs.com\">Search For Homes (Sale)</a>"
// End


function openAreaWindow(theURL) { //v2.0
  window.open('http://www.mecaproperties.com/corpweb/area_map.htm','','width=400,height=400,scrollbars=no,resize=no');
}
// RANDOM IMAGES
var highNum=12;  //1 + highest number of images (if 5 returns 0-4)
aRandomNum = Math.round(Math.random() * highNum-1);
if (aRandomNum < 0){
  aRandomNum = 0;
  }
var strImg = "<img src=\"http://www.mecaproperties.com/corpweb/support_imgs/stock" + aRandomNum + ".jpg\" width=\"199\" height=\"165\" />"



function GetQuote(){
var highNum=3;  //1 + highest number of images (if 5 returns 0-4)
i = Math.round(Math.random() * highNum-1);
if (i < 0){
  i = 0;
  }
sQuote = new Array(3)
sQuote[0] = "\"MECA brings professionalism, industry knowledge and a level of service that you don\'t find in the average property manager\"<p><strong>Past Board President and longtime resident of Factory South</strong></p>";
sQuote[1] = "\"Part of our good fortune has come from relying on the expertise and knowledge contained within MECA Properties.  They are a pleasure to work with, and they have been an integral part of creating a property that is running smoothly and very profitably.\"<p><strong>Owner, Atherton Mill</strong></p>";
sQuote[2] = "\"I would recommend MECA Properties Commercial Property Management without reservation for any mixed-use or resdintial project\"<p><strong>Past Board President, and former owner at Factory South</strong></p>";

document.write(sQuote[i]);
}
//-->
