var ajaxBol = false;
var likedata =0;

function dataService(url,strID){
document.getElementById('ajaxLoader').style.display = 'block';
if (window.XMLHttpRequest){
  xmlhttp=new XMLHttpRequest();
}else{
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function(){
  if (xmlhttp.readyState==4 && xmlhttp.status==200){
    document.getElementById(strID).innerHTML=xmlhttp.responseText;
	document.getElementById('ajaxLoader').style.display = 'none';
    }
}
xmlhttp.open("POST",url,true);
xmlhttp.send();
}

function dataloader(url,strID){

if (window.XMLHttpRequest){
  xmlhttp=new XMLHttpRequest();
}else{
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function(){
  if (xmlhttp.readyState==4 && xmlhttp.status==200){
    document.getElementById(strID).innerHTML=xmlhttp.responseText;
	document.getElementById(strID).style.display = 'block';
    }
}
xmlhttp.open("POST",url,true);
xmlhttp.send();
}

function getData(url){
if (window.XMLHttpRequest){
  xmlhttpData=new XMLHttpRequest();
}else{
  xmlhttpData=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttpData.onreadystatechange=function(){

 if (xmlhttpData.readyState==4 && xmlhttpData.status==200){
	  ajaxBol = true;
     likedata =  xmlhttpData.responseText;
 }
}
xmlhttpData.open("POST",url,true);
xmlhttpData.send();
}

function getAjaxData(url,DivID){
document.getElementById('ajaxLoader').style.display = 'block';
if (window.XMLHttpRequest){
  xmlhttpData=new XMLHttpRequest();
}else{
  xmlhttpData=new ActiveXObject("Microsoft.XMLHTTP");
}

xmlhttpData.onreadystatechange=function(){
  if (xmlhttpData.readyState==4 && xmlhttpData.status==200){
	  ajaxBol = true;
     document.getElementById(DivID).innerHTML =  xmlhttpData.responseText;
	 document.getElementById('ajaxLoader').style.display = 'none';
    }
}

xmlhttpData.open("POST",url,true);
xmlhttpData.send();
}

function ajax_Services(url,param,contentID,callBackFun){
	document.getElementById('ajaxLoader').style.display = 'block';
	if (window.XMLHttpRequest){
	  	xmlhttp=new XMLHttpRequest();
		if(xmlhttp.overrideMimeType){
			 xmlhttp.overrideMimeType('text/html');
		}
	}else if(window.ActiveXObject){
		try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			   try{
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			   }catch(e){}
	   }  
	}
	xmlhttp.onreadystatechange=function(){
	  if (xmlhttp.readyState==4 && xmlhttp.status==200){
		document.getElementById(contentID).innerHTML=xmlhttp.responseText;
		document.getElementById('ajaxLoader').style.display = 'none';
		if(callBackFun !== undefined) callBackFun();
		}
	}

	xmlhttp.open("POST",url,true);
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlhttp.setRequestHeader("Content-length", param.length);
	xmlhttp.setRequestHeader("Connection", "close");
	xmlhttp.send(param);
}
