var xmlHttp

function showCustomer(str,reff)
{ 
var position = str;
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="";
url=url+reff;
 {
	   //xmlHttp.onreadystatechange=checkData;
	   xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
		document.getElementById(str).innerHTML=xmlHttp.responseText;
  		document.getElementById('loadin').innerHTML="";

        }
        else
        {
        document.getElementById(str).innerHTML="loading"
        }
      }

	   xmlHttp.open("GET",url,true);
	   xmlHttp.send(null);

}
}

function closer(pos,date) 
{
document.getElementById(pos).innerHTML=date;
}


function newser(){
  var time = new Date()
  var second = time.getSeconds()
  var temp = second
  temp =  second
  if (second < 25)
  {
  document.getElementById('center').innerHTML="salam"
  }
  id = setTimeout("newser()",1000)
  }

function ajaxFunction(fname,idname)
{
var x=document.getElementById(fname).value;
document.getElementById(idname).innerHTML=x;
}


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;
}



function alertId()
  {
  var txt="Id: " + document.getElementById("myButton").id
  txt=txt + ", type: " + document.getElementById("myButton").type
  txt=txt + ", value: " + document.getElementById("myButton").value
  alert(txt)
  document.getElementById("myButton").disabled=true
  }

