
function ajaxRequest(process,divname,arg1,arg2,arg3){ 

	if(process == 'NewsOldCommentPagenation'){		

		var newsID	= arg1;

		var minLimit = document.getElementById('hidMinLimit').value;

		minLimit = parseInt(minLimit)+5;

		qstr 	= 'p=' + escape(process) + '&nID=' + escape(newsID) + '&minLimit=' + escape(minLimit);  
		
		//xmlhttpPost('http://192.168.1.124:8080/newsprod/includes/common_ajax.php',divname,qstr);
		xmlhttpPost('http://news.franchiseindia.com/includes/common_ajax.php',divname,qstr);
	}else 

	if(process == 'NewsNewCommentPagenation'){			

		var newsID	= arg1;

		var minLimit = document.getElementById('hidMinLimit').value;
		
		minLimit = parseInt(minLimit)-5;

		qstr 	= 'p=' + escape(process) + '&nID=' + escape(newsID) + '&minLimit=' + escape(minLimit);  
		
		//xmlhttpPost('http://192.168.1.124:8080/newsprod/includes/common_ajax.php',divname,qstr);
		xmlhttpPost('http://news.franchiseindia.com/includes/common_ajax.php',divname,qstr);
	}	

}


function xmlhttpPost(strURL,divname,qstr)
 {	

   var xmlHttpReq = false;
    var self = this;
    
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
	
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
		  updatePage(self.xmlHttpReq.responseText,divname);
       	   }
    }
    self.xmlHttpReq.send(qstr);	 
}



function updatePage(txtvalue,divname)
{ 

	if(divname){
		document.getElementById(divname).innerHTML="";
		document.getElementById(divname).innerHTML=txtvalue;
	}
}

