// JavaScript Document
function clientSideInclude(id, url) {
  var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
 if (!element) {
  alert("Bad id " + id + 
   "passed to clientSideInclude." +
   "You need a div or span element " +
   "with this id in your page.");
  return;
 }
  if (req) {
    // Synchronous request, wait till we have it all
    req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } else {
    element.innerHTML =
   "Sorry, your browser does not support " +
      "XMLHTTPRequest objects. This page requires " +
      "Internet Explorer 5 or better for Windows, " +
      "or Firefox for any system, or Safari. Other " +
      "compatible browsers may also exist.";
  }
}

function changeArea(destination) {
	if (destination == 19) { 
		option0 = new Option("全部",'');
		option1 = new Option("香港島",6);
		option2 = new Option("九龍",5);
		option3 = new Option("新界",102);
		document.search_hotel.location_id.length = 4;
		document.search_hotel.location_id.options[0] = option0;
		document.search_hotel.location_id.options[1] = option1;
		document.search_hotel.location_id.options[2] = option2;
		document.search_hotel.location_id.options[3] = option3;
		return;
	} else if (destination == 2) { 
		option0 = new Option("全部",'');
		option1 = new Option("氹仔區",1);
		option2 = new Option("路環區",2);
		option3 = new Option("路氹區",3);
		option4 = new Option("澳門市區",23);
		document.search_hotel.location_id.length = 5;
		document.search_hotel.location_id.options[0] = option0;
		document.search_hotel.location_id.options[1] = option1;
		document.search_hotel.location_id.options[2] = option2;
		document.search_hotel.location_id.options[3] = option3;
		document.search_hotel.location_id.options[4] = option4;
	} else if (destination == 60) { 
		option0 = new Option("全部",'');
		option1 = new Option("白雲區",145);
		option2 = new Option("花都區",135);
		option3 = new Option("海珠區",121);
		option4 = new Option("荔灣區",119);
		option5 = new Option("南沙區",146);
		option6 = new Option("番禺區",123);
		option7 = new Option("天河區",120);
		option8 = new Option("越秀區",122);
		option9 = new Option("增城區",126);
		document.search_hotel.location_id.length = 10;
		document.search_hotel.location_id.options[0] = option0;
		document.search_hotel.location_id.options[1] = option1;
		document.search_hotel.location_id.options[2] = option2;
		document.search_hotel.location_id.options[3] = option3;
		document.search_hotel.location_id.options[4] = option4;
		document.search_hotel.location_id.options[5] = option5;
		document.search_hotel.location_id.options[6] = option6;
		document.search_hotel.location_id.options[7] = option7;
		document.search_hotel.location_id.options[8] = option8;
		document.search_hotel.location_id.options[9] = option9;
	} else if (destination == 63) { 
		option0 = new Option("全部",'');
		option1 = new Option("寶安區",142);
		option2 = new Option("福田區",130);
		option3 = new Option("羅湖區",129);
		option4 = new Option("龍崗區",143);
		option5 = new Option("南山區",131);
		option6 = new Option("鹽田區",141);
		document.search_hotel.location_id.length = 7;
		document.search_hotel.location_id.options[0] = option0;
		document.search_hotel.location_id.options[1] = option1;
		document.search_hotel.location_id.options[2] = option2;
		document.search_hotel.location_id.options[3] = option3;
		document.search_hotel.location_id.options[4] = option4;
		document.search_hotel.location_id.options[5] = option5;
		document.search_hotel.location_id.options[6] = option6;
	} else if (destination == 65) { 
		option0 = new Option("全部",'');
		option1 = new Option("香州區",134);
		document.search_hotel.location_id.length = 2;
		document.search_hotel.location_id.options[0] = option0;
		document.search_hotel.location_id.options[1] = option1;
	}
}

function mc_setCookie(NameOfCookie, value, expiredays, path, domain) { //SET A COOKIE
	var ExpireDate = new Date();
	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
	document.cookie = NameOfCookie + "=" + escape(value) +
	((expiredays == null) ? "" : ";expires=" + ExpireDate.toGMTString()) +
	((path == null) ? "" : ";path=" + path) +
	((domain == null) ? "" : ";domain=" + domain);
}

mc_setCookie('jfcookie[lang]','t_chinese',365,'/','.macau.com');