<script  type="text/javascript" >
function ajaxload(a)
{
//alert(a);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
 document.getElementById("mainpart").innerHTML=httpxml.responseText;
}
}
var url="getajax.php";
url=url+"?selpage="+a;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}

/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxload1(a,b)
{
//alert(b);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{

 document.getElementById("mainpart").innerHTML=httpxml.responseText;
 //alert('تمديد با موفقيت انجام شد');

}
}
var url="getajax.php";
url=url+"?selpage1="+a+"&p="+b;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxload2(a,b,c,d)
{
//alert(b);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
 document.getElementById("mainpart").innerHTML=httpxml.responseText;
}
}
if(c==',,')
 alert(d)
else
{
var url="getajax.php";
url=url+"?selpage2="+a+"&p="+b+"&v="+c;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
}
/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxload3(a,b,c)
{
//alert(b);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
 document.getElementById("mainpart").innerHTML=httpxml.responseText;
}
}
var url="getajax.php";
url=url+"?selpage3="+a+"&p="+b+"&v="+c;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);

}
/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxloadalert(a,b,c)
{
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
 alert(c);
}
}
var url=a;
url=url+"?p="+b;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxloads(a,b)
{
//alert(b);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
 document.getElementById("mainpart").innerHTML=httpxml.responseText;
}
}
c=document.getElementById("search").value;
var url="getajax.php";
url=url+"?serpage="+a+"&fiel="+b+"&txt="+c;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxloadp(a,b,c)
{
//alert(a);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
document.getElementById('main').innerHTML=httpxml.responseText;
}
}

var url="getajax.php";
url=url+"?printpage="+a+"&p="+b+"&prtback="+c;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxloadp1(a,b,e,d)
{
//alert(b);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
document.getElementById('main').innerHTML=httpxml.responseText;
}
}

var url="getajax.php";
url=url+"?printpage="+a+"&p="+b+"&prtback="+e+"&c="+d;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxloadp2(a,e,b,d,f,k)
{
//alert(b);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
document.getElementById('main').innerHTML=httpxml.responseText;
}
}

var url="getajax.php";
url=url+"?printpage="+a+"&prtback="+e+"&p="+b+"&s_f="+d+"&s="+f+"&c="+k;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxloado(a,b,c)
{
//alert(b);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
document.getElementById('mainpart').innerHTML=httpxml.responseText;
window.location='cd.xls';
}
}

var url="output.php";
url=url+"?out="+a+"&p="+b+"&prtback="+c;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxloado1(a,b,e,d)
{
//alert(b);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
document.getElementById('mainpart').innerHTML=httpxml.responseText;
}
}

var url="getajax.php";
url=url+"?out="+a+"&p="+b+"&prtback="+e+"&c="+d;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
function ajaxloado2(a,e,b,d,f,k)
{
//alert(b);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
document.getElementById('mainpart').innerHTML=httpxml.responseText;
}
}

var url="getajax.php";
url=url+"?out="+a+"&prtback="+e+"&p="+b+"&s_f="+d+"&c="+k;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
function page(a,b,c)
{
//alert(c);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged4()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
document.getElementById('mainpart').innerHTML=httpxml.responseText;

}
}
var url=a;
url=url+"?paging1="+b+"&so1="+c+"&o=1";
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged4;
httpxml.open("GET",url,true);
httpxml.send(null);
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
function back(a)
{
//alert(a)
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged4()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
 document.getElementById('main').innerHTML=httpxml.responseText;


}
}

var url=a;
url=url+"?back=1";
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged4;
httpxml.open("GET",url,true);
httpxml.send(null);
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
function search1(a)
{
//alert(a)
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged4()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
 document.getElementById('mainpart').innerHTML=httpxml.responseText;


}
}
sel=document.getElementById('select').value
txt=document.getElementById('fieldtext').value
fs=document.getElementById('fieldselect').value
var url=a;
url=url+"?serch="+sel+"&txt="+txt+"&fs="+fs;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged4;
httpxml.open("GET",url,true);
httpxml.send(null);
}

///////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
function rep(a,b,c)
{
//alert(a);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
 document.getElementById(c).innerHTML=httpxml.responseText;
}
}
d=document.getElementById(a).value
var url=b;
url=url+"?id="+d+"&val="+a;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
function sort(a,b,c,d,e)
{
//alert(d);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged4()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
document.getElementById('mainpart').innerHTML=httpxml.responseText;

}
}
var url=a;
url=url+"?sorting="+b+"&order="+c+"&lbl="+d+"&so="+e;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged4;
httpxml.open("GET",url,true);
httpxml.send(null);
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
function serpage(a)
{
//alert(a);
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged4()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
document.getElementById('mainpart').innerHTML=httpxml.responseText;

}
}
b=document.getElementById('txtpage').value
var url=a;
url=url+"?serpaging="+b;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged4;
httpxml.open("GET",url,true);
httpxml.send(null);
}

/////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
function seloprtion(event)
{
alert(event.keyCode)
//if (event.keyCode >= 48) && (event.keyCode <= 57)
     //alert('fgfg')
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged4()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{

}
}

var url="getajax.php";
url=url+"?ajxs=1";
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged4;
httpxml.open("GET",url,true);
httpxml.send(null);


 //alert(event.keyCode)

 }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ajaxselct(id,dv)
{
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
var str1 = document.getElementById(id);
var ss = document.getElementById(dv);
 var str1 = document.getElementById(id);
 var curLeft=0;
 if (str1.offsetParent)
 {
	while (str1.offsetParent)
	{
	  curLeft += str1.offsetLeft;
	  str1 = str1.offsetParent;
	}
 }
 var str2 = document.getElementById(id);
 var curTop=20;
 if (str2.offsetParent)
 {
	while (str2.offsetParent)
	{
	  curTop += str2.offsetTop;
	  str2 = str2.offsetParent;
	}
 }


	var str =httpxml.responseText.split("\n");
	if(str.length==1)
		document.getElementById(dv).style.visibility = "hidden";
	else
		ss.setAttribute('style','position:absolute;top:'+curTop+';left:'+curLeft+';width:150;z-index:1;padding:5px;border: 1px solid #000000; overflow:auto; height:105; background-color:#F5F5FF;');
	 ss.innerHTML = '';
	 for(i=0; i < str.length - 1; i++)
	 {

		var suggest = '<div onmouseover="javascript:suggestOver(this);" ';
		suggest += 'onmouseout="javascript:suggestOut(this);" ';
		suggest += 'onclick="setSearch(this.innerHTML);" ';
		suggest += 'class="small">' + str[i] + '</div>';
		ss.innerHTML += suggest;
	 }

}
}

val=document.getElementById(id).value
var url="getajax.php";
url=url+"?sel="+val;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);


}
function setSearch(value)
{
   document.getElementById('tid_ozv').value = value;
   document.getElementById('tid_ozv').focus()
   document.getElementById('dvozv').innerHTML = '';
   document.getElementById('dvozv').style.visibility = "hidden";
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
function ajxshow(a,id,tbl)
{
val = document.getElementById(id).value;
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged4()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{
ss =httpxml.responseText.split("~");
document.getElementById(a).value=ss[0];
document.getElementById('sp'+a).style.display='inline';
document.getElementById('sp'+a).innerHTML=ss[1];
}
}

var url="getajax.php";
url=url+"?ajxshow="+val+"&tbl="+tbl;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged4;
httpxml.open("GET",url,true);
httpxml.send(null);
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ajaxselct1(id,dv)
{
var httpxml;
try
{
httpxml=new XMLHttpRequest();
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateChanged1()
{
if(httpxml.readyState==4 || httpxml.readyState=="complete")
{

var ss = document.getElementById(dv);
 var str1 = document.getElementById(id);
 var curLeft=0;
 if (str1.offsetParent)
 {
	while (str1.offsetParent)
	{
	  curLeft += str1.offsetLeft;
	  str1 = str1.offsetParent;
	}
 }
 var str2 = document.getElementById(id);
 var curTop=20;
 if (str2.offsetParent)
 {
	while (str2.offsetParent)
	{
	  curTop += str2.offsetTop;
	  str2 = str2.offsetParent;
	}
 }


	var str =httpxml.responseText.split("\n");
	if(str.length==1)
		document.getElementById(dv).style.visibility = "hidden";
	else
		ss.setAttribute('style','position:absolute;top:'+curTop+';left:'+curLeft+';width:150;z-index:1;padding:5px;border: 1px solid #000000; overflow:auto; height:105; background-color:#F5F5FF;');
	 ss.innerHTML = '';
	 for(i=0; i < str.length - 1; i++)
	 {

		var suggest = '<div onmouseover="javascript:suggestOver(this);" ';
		suggest += 'onmouseout="javascript:suggestOut(this);" ';
		suggest += 'onclick="setSearch1(this.innerHTML);" ';
		suggest += 'class="small">' + str[i] + '</div>';
		ss.innerHTML += suggest;
	 }

}
}

val=document.getElementById(id).value
var url="getajax.php";
url=url+"?sel1="+val;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateChanged1;
httpxml.open("GET",url,true);
httpxml.send(null);


}
function setSearch1(value)
{
   document.getElementById('tbooko').value = value;
   document.getElementById('tbooko').focus()
   document.getElementById('dvbooko').innerHTML = '';
   document.getElementById('dvbooko').style.visibility = "hidden";
}

</script>