var contentObj;   // refer  the  content of  <div>
function getAjaxFile(urlPage) {
	xmlHttp=CreateHttpObject()
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request")
		return
	} 
	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("GET",urlPage,true)
	xmlHttp.send(null)
}
function stateChanged(CatId) { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
	    contentObj.innerHTML=xmlHttp.responseText;
		importDate=document.getElementById('FlashDate').value;
		if (flag==1){
				PassDate(importDate);
		}
		else{
				hPassDate(importDate);
				wrotingDates() ;
				//alert('roger')
		}
	 } 
} 
function getAjaxFile1(urlPage) {
	xmlHttp=CreateHttpObject()
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request")
		return
	} 
	xmlHttp.onreadystatechange=stateChanged1
	xmlHttp.open("GET",urlPage,true)
	xmlHttp.send(null)
}
function stateChanged1(CatId) { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
	    contentObj.innerHTML=xmlHttp.responseText;
		PassFlashTo();
	 } 
} 

function CreateHttpObject() { 
	var objXMLHttp=null
	try {
		objXMLHttp = new ActiveXObject("Msxml2.XMLHTTP");
    } 
	catch (e) {
			try {
				objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch (err) {
				objXMLHttp = null;
			}
    }
	if(!objXMLHttp && typeof XMLHttpRequest != "undefined")
		objXMLHttp = new XMLHttpRequest();
return objXMLHttp
}

function postAjaxFile(urlPage,parameters) {
	xmlHttpPost=CreateHttpObject()
	if (xmlHttpPost==null) {
		alert ("Browser does not support HTTP Request")
		return
	} 
	xmlHttpPost.onreadystatechange=stateChangedPost
	xmlHttpPost.open("POST",urlPage,true);
	xmlHttpPost.setRequestHeader("Content-type", "application/x-www-form-urlencoded");   
	//alert(parameters)
	xmlHttpPost.setRequestHeader("Content-length", parameters .length);   
	xmlHttpPost.setRequestHeader("Connection", "close"); 
	xmlHttpPost.send(parameters)
	
}

function stateChangedPost() { 
	if (xmlHttpPost.readyState==4 || xmlHttpPost.readyState=="complete") { 
	    contentObj.innerHTML=xmlHttpPost.responseText;
		Refreshyoursay();
	 } 
} 
