var xmlHttp
function pictureUpdate(val)
{ 
//alert(val);
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
 
var url="picturecount.jsp?id="+val;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
//alert(url);
xmlHttp.send(null);
}

function stateChanged() 
{
	//document.getElementById("loader").style.display = "block";	
	try{
	if (xmlHttp.readyState == 4)
	{
		//document.getElementById("txtHint").innerHTML = xmlHttp.responseText;
	 /* if(xmlHttp.status==200 || window.location.href.indexOf("http")!=-1)
	  {
		
		//document.getElementById("loader").style.display = "none";
	  }*/
	}
	}
catch (e){ 
	alert("Error"); 
	}
	/*
	if (xmlHttp.readyState==4)
	{// alert(xmlHttp.responseText);
	document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
	//alert(document.getElementById("txtHint").innerHTML);
	document.getElementById("loader").style.display = "none";
	}
	*/
}

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;
}

