//////Ajax functions

var xmlHttp;
function createXMLHttpRequest() {
	if (window.ActiveXObject) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if (window.XMLHttpRequest) {
		xmlHttp = new XMLHttpRequest();
	}
	
}



function startRequest(strUrl, strDivName, strObj) {
	createXMLHttpRequest();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	if (strDivName == "BodyContent"){
	window.scrollTo(0,0);
	};
	if (strObj!=null && strObj!="")
		strUrl = strUrl + document.getElementById(strObj).value;
	xmlHttp.onreadystatechange = function(){
		if(xmlHttp.readyState == 4) {
			if(xmlHttp.status == 200) {
				document.getElementById(strDivName).innerHTML = xmlHttp.responseText;
			}
		}
		else
			document.getElementById(strDivName).innerHTML = "<br><p align=\"center\"> <br> <br> <font  color='#FF0000' style='font-size:24px' > &#272;ang t&#7843;i v&#7873;...</font> <br><img border=\"0\" src=\"/images/loading.gif\"></p><br>";
	};
	xmlHttp.open("GET",strUrl, true);
	xmlHttp.send(null);
}


function CreateControlFlash(UrlObjectID, WIDTH, HEIGHT)
{
  document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"); 
  document.write("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='" + WIDTH + "' height='" + HEIGHT + "'>" );
  document.write("<param name='movie' value='" + UrlObjectID + "' />");
  document.write("<param name='quality' value='high' />");
  document.write("<PARAM NAME='WMode' VALUE='Transparent'/>");
  document.write("<embed src='" + UrlObjectID + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + WIDTH + "' height='" + HEIGHT + "' ></embed></object> " );
 
}
