	   var so = new SWFObject("http://www.property-crete.com/flash.swf", "header", "581", "221", "8", "#FFFFFF");
	   so.addVariable ( "path", "http://www.property-crete.com/" );	// pass path to SWF
	   so.write("header");

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);


	   var so = new SWFObject("http://www.property-crete.com/flash.swf", "header", "581", "221", "8", "#FFFFFF");
	   so.addVariable ( "path", "http://www.property-crete.com/" );	// pass path to SWF
	   so.write("header");






function FrontPage_Form1_Validator(theForm)
{

  var checkOK = "0123456789-,.";
  var checkStr = theForm.Price.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ",")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch == "." && decPoints != 0)
    {
      validGroups = false;
      break;
    }
    else if (ch != ".")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Price\" field.");
    theForm.Price.focus();
    return (false);
  }

  if (decPoints > 1 || !validGroups)
  {
    alert("Please enter a valid number in the \"Price\" field.");
    theForm.Price.focus();
    return (false);
  }
  return (true);
}


/*  
  function doIt()
  {
      var cat = document.getElementById("bycategory").value;
      var are = document.getElementById("Area").value;
      var price = document.getElementById("price").value;
	  var areadet = document.getElementById("areadet").value;
	  var N = "priceLimit=" + price + "&categoryid=" + cat + "&areaid=" + are + "&areadet=" + areadet;
	  window.location = 'http://www.property-crete.com/en/results2.asp?' + N; 
  }
*/

function doReset()
  {
      document.getElementById("bycategory").value = 999;
      document.getElementById("Area").value = 0;
      document.getElementById("price").value = 0;
	  document.getElementById("areadet").value = 0;
	  document.getElementById("zone").value = 0;
	  
	 
      	 
  }

function popUp3(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=550,left = 199.5,top = 134');");
}


function print_parent()
{
    window.print();
}

function do_open(the_name,the_window)
{
    var NW = window.open(the_name,the_window,"menubar=0,scrollbars=0");
    NW.resizeTo(400,300);
    NW.moveTo(100,100);
    NW.focus();
}

function do_open_big(the_name,the_window)
{
    var NWb = window.open(the_name,the_window,"menubar=1,scrollbars=1");
    NWb.resizeTo(648,500);
    NWb.moveTo(40,50);
    NWb.focus();
}
if(0==999)
{
	document.getElementById('nbprops').innerHTML = "&nbsp;Latest 605 properties"
}

function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=550,left = 199.5,top = 134');");
}


function Clickheretoprint()
{ 
  var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
      disp_setting+="scrollbars=yes,width=583, height=600, left=100, top=25"; 
  var content_vlue = document.getElementById("print_content").innerHTML; 
  
  var docprint=window.open("","",disp_setting); 
   docprint.document.open(); 
   docprint.document.write('<html><head><title>Inel Power System</title>'); 
   docprint.document.write('<link href="propertycrete.css" rel="stylesheet" type="text/css"></head><body onLoad="self.print()"><center>');          
   docprint.document.write(content_vlue);          
   docprint.document.write('</center></body></html>'); 
   docprint.document.close(); 
   docprint.focus(); 
}


function do_link(map_area)
{
    var price=0;
    var cat=0;
    var are="0";
    var ared=0;
    if (map_area=="LA") {are="Lasithi";ared=186; zone="A zone";}
    if (map_area=="LB") {are="Lasithi";ared=187; zone="B zone";}
    if (map_area=="LC") {are="Lasithi";ared=229; zone="C zone";}
    if (map_area=="HA") {are="Heraklion";ared=112; zone="A zone";}
    if (map_area=="HB") {are="Heraklion";ared=113; zone="B zone";}
    if (map_area=="HC") {are="Heraklion";ared=184; zone="C zone";}
    if (map_area=="HD") {are="Heraklion";ared=185; zone="D zone";}
    if (map_area=="RA") {are="Rethymno";ared=104; zone="A zone";}
    if (map_area=="RB") {are="Rethymno";ared=105; zone="B zone";}
    if (map_area=="RC") {are="Rethymno";ared=106; zone="C zone";}
    if (map_area=="RD") {are="Rethymno";ared=107;zone="D zone";}
    if (map_area=="CA") {are="Chania";ared=108 ;zone="B zone";}
    if (map_area=="CB") {are="Chania";ared=109 ;zone="A zone";}
    if (map_area=="CC") {are="Chania";ared=110 ;zone="C zone";}
    if (map_area=="CD") {are="Chania";ared=111 ;zone="D zone";}
    if (map_area=="ML") {are="ROGreece";ared=230 ;zone="";}
    document.FrontPage_Form1.area.value = are;
	cat = document.FrontPage_Form1.category.value;
    price = document.FrontPage_Form1.price.value;
	 document.FrontPage_Form1.areadet.value = ared;
    document.FrontPage_Form1.zone.value = zone;
}
function do_It2()
{
      var cat = 999;
      var are = 0;
      var price = 0;
      var N = "priceLimit=" + price + "&amp;categoryid=" + cat + "&amp;areaid=" + are;
      window.location = "http://www.property-crete.com/en/results2.asp?" + N; 
}

