// JavaScript Document
function dropdown_box ()
{
var a = document.form1.area.selectedIndex;
//alert(document.form1.area.selectedIndex);
window.location = "?area_id="+document.form1.area.selectedIndex;
}

function dropdown_box2 ()
{
var a = document.form3.area2.selectedIndex;
window.location = "?area_id2="+document.form3.area2.selectedIndex;
}

function setDEFAULTHEIGHT(id) {
   var height = window.frames[id].document.body.scrollHeight;
   //document.getElementById(id).style.height = height;
   document.getElementById(id).setAttribute("height", height);
}

function MM_jumpMenuGo(objId,targ,restore){ //v9.0
  var selObj = null;  with (document) { 
  if (getElementById) selObj = getElementById(objId);
  if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0; }
}

function MM_openBrWindow(theURL) { //v2.0
  window.open(theURL,'Map','width=820,height=460');
}

// Random image on header

var theImages = new Array()

theImages[0] = '1'
theImages[1] = '2'
theImages[2] = '3'
theImages[3] = '4'
theImages[4] = '5'
theImages[5] = '6'
theImages[6] = '7'
theImages[7] = '8'

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="images/head-temppic'+theImages[whichImage]+'.jpg" alt="The only comprehensive directory of Phuket\'s real estate opportunities" title="The only comprehensive directory of Phuket\'s real estate opportunities">');
}
function showImage_sub(){
document.write('<img src="../images/head-temppic'+theImages[whichImage]+'.jpg" alt="The only comprehensive directory of Phuket\'s real estate opportunities" title="The only comprehensive directory of Phuket\'s real estate opportunities">');
}



// Right Click : no alert message

{
var msg = "";
function clickIE()
{
   if (document.all)
   {
      (msg);
      return false;
   }
}

function clickNS(e)
{
   if (document.layers ||(document.getElementById && !document.all))
   {
      if (e.which==2 || e.which==3)
      {
         (msg);
         return false;
      }
   }
}

if (document.layers)
{
   document.captureEvents(Event.MOUSEDOWN);
   document.onmousedown=clickNS;
}
else
{
   document.onmouseup = clickNS;
   document.oncontextmenu = clickIE;
}

document.oncontextmenu = new Function("return false")
}

