﻿var mbcURL="http://www.asm.org.mo/";
getNode=function(nodeId) {
 var node=document.getElementById(nodeId);
 return node;
}

setNode=function(nodeId,value) {
  var node=document.getElementById(nodeId);
  node.value=value;
}

function GetXmlHttpObject() {
  var XMLHttp=null;
  if (window.XMLHttpRequest) {
	XMLHttp=new XMLHttpRequest()
  } else if (window.ActiveXObject) {
  try {
	XMLHttp=new ActiveXObject("Msxml2.XMLHTTP");
     }catch(e) {
	XMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
     }
  }
 return XMLHttp;
}

function LayerNews_stateChanged() 
{ if (LayerNews_xmlHttp.readyState==4 || LayerNews_xmlHttp.readyState=="complete") { 
document.getElementById("LayerNews").innerHTML=LayerNews_xmlHttp.responseText; 
} 
} 

function LayerNews_load(url) {
 LayerNews_xmlHttp=GetXmlHttpObject();
 url=mbcURL+"/"+url;
 LayerNews_xmlHttp.onreadystatechange=LayerNews_stateChanged; LayerNews_xmlHttp.open("GET",url,true);
 LayerNews_xmlHttp.setRequestHeader("If-Modified-Since","0");
 LayerNews_xmlHttp.send(null);
}

function ContentBody_stateChanged() { 
 if (ContentBody_xmlHttp.readyState==4 || ContentBody_xmlHttp.readyState=="complete") { 
     document.getElementById("ContentBody").innerHTML=ContentBody_xmlHttp.responseText; 
 } 
} 


function ContentBody_load(url) {
 ContentBody_xmlHttp=GetXmlHttpObject();
 url=mbcURL+"/"+url;
 ContentBody_xmlHttp.onreadystatechange=ContentBody_stateChanged; 
 ContentBody_xmlHttp.open("GET",url,true);
 ContentBody_xmlHttp.setRequestHeader("If-Modified-Since","0");
 ContentBody_xmlHttp.send(null);
 document.getElementById("ContentBody").innerHTML="<P style='color:yellow;font-size:40px;text-decoration:blink;'>"
 					+"資料載入中......<br>Data loading.......</P>" ;
} 




