
<!--
function ErrorAction(){
if (bLoaded==false)
		{
			alert("Please allow time for the page to download completely before taking any actions.thank you!")
			document.FrontPage_Form1.tenantname.focus();
			return false;
		}
}
function BeforeSubmit(){
if (bLoaded==false)
		{
			alert("Please allow time for the page to download completely before taking any actions.thank you!")
			
			return false;
		}
with (document.FrontPage_Form1){
  if (MarketArea.selectedIndex < 1){
	alert("Please select your location of country.");
	MarketArea.focus();
	return false;
  }
  if (opOne.selectedIndex < 1){
	alert("Please select your location of city.");
	opOne.focus();
	return false;
  }
  if (opTwo.selectedIndex < 1){
	alert("Please select your location of main area.");
	opTwo.focus();
	return false;
  }
  /*if (tenantname.value == "")
  {
    alert("Please enter a value for the \"Tenant Name\" field.");
    tenantname.focus();
    return (false);
  }*/

  if (tenantfname.value == "")
  {
    alert("Please enter a value for the \"Tenant First Name\" field.");
    tenantfname.focus();
    return (false);
  }

  if (tenantemail.value == "")
  {
    alert("Please enter a value for the \"Tenant Email Address\" field.");
    tenantemail.focus();
    return (false);
  }
  else
  {
    var chkP=tenantemail.value.indexOf('@');
	 if(chkP<1 || chkP==(tenantemail.value.length-1)){
	 	   alert("Email address seems incorrect (check @ )")
	 	   tenantemail.select()
	   return false;
     } 
    var chkD=tenantemail.value.indexOf('.');
	 if(chkD<1 || chkD==(tenantemail.value.length-1)){
	 	   alert("Email address seems incorrect (.'s)")
	 	   tenantemail.select()
	   return false;
	 }
  }

  if (tenantemail.value.length < 6)
  {
    alert("Please enter at least 6 characters in the \"Tenant Email Address\" field.");
    tenantemail.focus();
    return (false);
  }

  if (tenantcompany.value == "")
  {
    alert("Please enter a value for the \"Tenant Company\" field.");
    tenantcompany.focus();
    return (false);
  }

  if (tenantphone.value == "")
  {
    alert("Please enter a value for the \"Tenant Phone\" field.");
    tenantphone.focus();
    return (false);
  }

  if (tenantphone.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Tenant Phone\" field.");
    tenantphone.focus();
    return (false);
  }
  if (sqftmin.value == ""){
	alert("Please enter a value for then \"Space Details\" field.");
	sqftmin.focus();
	return false;
  }
  if (sqftmax.value == ""){
	alert("Please enter a value for then \"Space Details\" field.");
	sqftmax.focus();
	return false;
  }
  if (pricemin.value == ""){
	alert("Please enter a value for then \"Space Details\" field.");
	pricemin.focus();
	return false;
  }
  if (pricemax.value == ""){
	alert("Please enter a value for then \"Space Details\" field.");
	pricemax.focus();
	return false;
  }
  if (typeofbusiness.value == "")
  {
    alert("Please enter a value for the \"Type of business\" field.");
    typeofbusiness.focus();
    return (false);
  }

  if (totalpeople.value == "")
  {
    alert("Please enter a value for the \"Total people\" field.");
    totalpeople.focus();
    return (false);
  }

  if (totalpeople.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Total people\" field.");
    totalpeople.focus();
    return (false);
  }
  if (searchstatus.value == ""){
	alert("Please select one of the \"Stage\" options.");
	searchstatus.focus();
	return false;
  }
  if (movemonth.value == "")
  {
    alert("Please select one of the \"Month\" options.");
    movemonth.focus();
    return (false);
  }

  if (moveyear.value == "")
  {
    alert("Please select one of the \"Year\" options.");
    moveyear.focus();
    return (false);
  }

  ///////////////2008-6-26/////////////////////
  tenantname.value = tenantfname.value  
  if (tenantlname.value != "")
  {
	  tenantname.value = tenantname.value + " " + tenantlname.value
  }
  ///////////////2008-6-26/////////////////////

  return (true);
}}

function openWindow(url, w, h) {
	var Options = "width=" + w + ",height=" + h + ",";
	Options += "resizable=no, scrollbars=no, status=no,";
	Options += "menubar=no, toolbar=no, top=250, left=250, location=no, directories=no";
	var newWin = window.open(url, 'newWin', Options);
	newWin.focus();
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  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) { //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 P7_getWD(tDim){ //v2.4 by PVII
 var sh=0,sw=0,rt=0;if(window.innerWidth){sh=window.innerHeight;sw=window.innerWidth;
 }else if(document.body){sh=document.body.clientHeight;sw=document.body.clientWidth;
 if(document.body.offsetHeight==sh&&document.documentElement&&document.documentElement.clientHeight){
  sh=document.documentElement.clientHeight;}
 if(document.body.offsetWidth==sw&&document.documentElement&&document.documentElement.clientWidth) {
 sw=document.documentElement.clientWidth;}}rt=(tDim=="width")?sw:sh;return rt;
}

function P7_getLDims(el) { //v2.4 by PVII
 var x,ll=0,tl=0,hh=0,ww=0,wx,g,gg;
 if((g=MM_findObj(el))!=null){gg=(document.layers)?g:g.style;ll=parseInt(gg.left);tt=parseInt(gg.top);
 if(isNaN(ll)){if(g.currentStyle){ll=parseInt(g.currentStyle.left);}else if(document.defaultView){
 ll=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("left"));}if(isNaN(ll)){ll=0;}}
 if(isNaN(tt)){if(g.currentStyle){tt=parseInt(g.currentStyle.top);}else if(document.defaultView){
 tt=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("top"));}if(isNaN(ll)){tt=0;}}
 if(document.all||document.getElementById){ww=parseInt(g.offsetWidth);hh=parseInt(g.offsetHeight);
 if(!ww){ww=parseInt(g.style.pixelWidth);if(!ww){ww=parseInt(g.style.width);}}if(!hh){
 hh=parseInt(g.style.pixelHeight);}if(g.hasChildNodes){for(x=0;x<g.childNodes.length;x++){
 wx=parseInt(g.childNodes[x].offsetWidth);if(wx>ww){ww=wx;}}}}else if(document.layers){
 ww=parseInt(g.clip.width);hh=parseInt(g.clip.height);}}var aR=[ll,tt,hh,ww];return aR;
}

function P7_alignRR() { //v2.4 by PVII
 var i;if(!document.p7alignRR) {return;}if(document.layers){
 if(innerWidth!=document.p7RRiw || innerHeight!=document.p7RRih){location.reload();}
 }else{document.p7RR=1;for(i=0;i<p7aRR.length;i++){eval(p7aRR[i]);}document.p7RR=0;}
}

function P7_alignWD2() { //v2.4 by PVII
 var g,gg,lp=0,tp=0,aL,lh,lw,ww,wh,pa='px',args=P7_alignWD2.arguments;if(document.layers||window.opera){pa='';}
 for(var i=0;i<args.length;i+=4){if((g=MM_findObj(args[i]))!=null){gg=(document.layers)?g:g.style;
 mm=parseInt(args[i+1]);mr=parseInt(args[i+2]);ml=parseInt(args[i+3]);ww=parseInt(P7_getWD('width'));
 wh=parseInt(P7_getWD('height'));aL=P7_getLDims(args[i]);lh=aL[2];lw=aL[3];tp=aL[1];lp=aL[0];
 if(mm==1){lp=mr;}if(mm==2){lp=parseInt((ww-lw-mr)/2);if(lp<0){lp=0;}}if(mm==3){lp=ww-lw-mr;if(lp<ml){lp=ml;}}
 if(mm==4){tp=parseInt((wh-lh-mr)/2);if(tp<0){tp=0;}}if(mm==5){tp=parseInt((wh-lh)/2);lp=parseInt((ww-lw)/2);
 if((lp-mr)<=0){lp=mr;}if((tp-ml)<=0){tp=ml;}}if(mm==6){tp=wh-lh-mr;}gg.top=tp+pa;gg.left=lp+pa;
 if(!document.p7alignRR){p7aRR=new Array();document.p7alignRR=true;document.p7RR=0;
 if(document.layers){document.p7RRiw=innerWidth;document.p7RRih=innerHeight;}onresize=P7_alignRR;}
 if(document.p7RR==0){p7aRR[p7aRR.length]="P7_alignWD2('"+args[i]+"',"+mm+","+mr+","+ml+")";}}}
}

//-->




