var xmlHttp

function GetValue( elmId )
	{
		var obj = document.getElementById( elmId );
	   if ( obj != null )
			return obj.value;
	else
	 return null;
	}

function SetValue( objId,deger )
	{
		 if ( deger != null )
			document.getElementById(objId).value=deger;
		else
			document.getElementById(objId).value='';
	}


function ShowBox(obj,blnMode)
	{
	   var sprogress = document.getElementById( obj );
	   sprogress.style.display = blnMode ? 'inline' : 'none';
	}

function ShowProgress(blnMode)
	{
	   var progress = document.getElementById('progressDiv');
	   progress.style.display = blnMode ? 'inline' : 'none';
	}


function showUrunler(url)
	{
	
	   ShowProgress(true);             
	   xmlHttp=GetXmlHttpObject(stateChanged)
	   xmlHttp.open("GET", url+"&rndid=" + Math.random() , true)
	   xmlHttp.send(null)
	} 
function showUrun(url)
	{
	
	   ShowProgress(true);             
	   xmlHttp=GetXmlHttpObject(stateChanged)
	   xmlHttp.open("GET", url+"&rndid=" + Math.random() , true)
	   xmlHttp.send(null)
	} 	
	function stateChanged() 
			{ 
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			   { 
			   ShowProgress(false);
			   document.getElementById("placeUrun").innerHTML=xmlHttp.responseText 
			   } 
			} 
			


function showSozluk(url)
	{
	
	   ShowProgress(true);             
	   xmlHttp=GetXmlHttpObject(stateSOZChanged)
	   xmlHttp.open("GET", url+"&rndid=" + Math.random() , true)
	   xmlHttp.send(null)
	} 	
	function stateSOZChanged() 
			{ 
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			   { 
			   ShowProgress(false);
			   document.getElementById("txtSozluk").innerHTML=xmlHttp.responseText 
			   } 
			} 
			
			
function showTumUrunler(url)
	{
	
	   ShowProgress(true);             
	   xmlHttp=GetXmlHttpObject(stateTChanged)
	   xmlHttp.open("GET", url+"&rndid=" + Math.random() , true)
	   xmlHttp.send(null)
	} 
		function stateTChanged() 
			{ 
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			   { 
			   ShowProgress(false);
			   document.getElementById("txtKategoriList").innerHTML=xmlHttp.responseText 
			   } 
			} 
			
			
			
function showKategori(url)
	{
	
	   ShowProgress(true);             
	   xmlHttp=GetXmlHttpObject(stateKChanged)
	   xmlHttp.open("GET", url+"&rndid=" + Math.random() , true)
	   xmlHttp.send(null)
	} 
	
		
			function stateKChanged() 
			{ 
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			   { 
			   ShowProgress(false);
			   document.getElementById("txtKategori").innerHTML=xmlHttp.responseText 
			   } 
			} 
			

function showResim(url)
	{
	
	   ShowProgress(true);             
	   xmlHttp=GetXmlHttpObject(stateResChanged)
	   xmlHttp.open("GET", url+"&rndid=" + Math.random() , true)
	   xmlHttp.send(null)
	} 
	
		
			function stateResChanged() 
			{ 
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			   { 
			   ShowProgress(false);
			   document.getElementById("resimUrun").innerHTML=xmlHttp.responseText 
			   } 
			} 
			
			
			
		
function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null
if (navigator.userAgent.indexOf("Opera")>=0)
   {
    alert("This example doesn't work in Opera") 
    return  
   }
if (navigator.userAgent.indexOf("MSIE")>=0)
   { 
   var strName="Msxml2.XMLHTTP"
   if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
      {
      strName="Microsoft.XMLHTTP"
      } 
   try
      { 
      objXmlHttp=new ActiveXObject(strName)
      objXmlHttp.onreadystatechange=handler 
      return objXmlHttp
      } 
   catch(e)
      { 
      alert("Error. Scripting for ActiveX might be disabled") 
      return 
      } 
    } 
if (navigator.userAgent.indexOf("Mozilla")>=0)
   {
   objXmlHttp=new XMLHttpRequest()
   objXmlHttp.onload=handler
   objXmlHttp.onerror=handler 
   return objXmlHttp
   }
} 

function silEvrak(id,seri,sira)
	{
	if (confirm("Bu Evrağı SİLMEK istediğinize eminmisiniz ? Bu evrağı silerseniz tüm bağlı kayıtlar da silinecektir..."))
	document.location="evraksil.asp?id="+id;
	}