var xmlHttp;
function new_gallery_load_images(frmProcess, URL, page, totalNumberOfPage, tid, current_page)
{
	document.getElementById('new_gallery_show_paging').innerHTML = '<b>Loading...</b>';
		xmlHttp=GetXmlHttpObject()
       	if (xmlHttp==null)
		{
		alert ("Browser does not support HTTP Request")
		return
		}
		var url;
		url = URL+'/new_image_gallery.php?frmProcess='+frmProcess+'&page='+page+'&totalNumberOfPage='+totalNumberOfPage+'&tid='+tid+'&current_page='+current_page;
		xmlHttp.onreadystatechange=stateChanged
		xmlHttp.open("POST",url,true)
		xmlHttp.send(null)
	
}


function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
	var response = xmlHttp.responseText;
	document.getElementById('PlaceHolder').innerHTML = response;
}
else
{
	document.getElementById('new_gallery_show_paging').innerHTML = '<b>Loading...</b>';
}
 

}



    function GetXmlHttpObject(){
        var xmlHttp=null;
        try{
             // Firefox, Opera 8.0+, Safari
             xmlHttp=new XMLHttpRequest();
         }
        catch (e){
                 //Internet Explorer
             try{
                  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
              }
             catch (e){
                  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
         }
        return xmlHttp;
    }
