function getElement(aID)
{
  return (document.getElementById) ? document.getElementById(aID): document.all[aID];
}
function getParentElement(aID)
{
	var parent=window.dialogArguments;

	return (parent.document.getElementById) ? parent.document.getElementById(aID): parent.document.all[aID];
}
function makeRequest(url)
{
  var http_request=false;
  if(window.XMLHttpRequest){//Mozilla,Safari,...
     http_request=new XMLHttpRequest();
     if(http_request.overrideMimeType){
     http_request.overrideMimeType('text/xml');
   }
 }else if(window.ActiveXObject){//IE
   try{
   http_request=new ActiveXObject("Msxml2.XMLHTTP");
   }catch(e){
   try{
 		http_request=new ActiveXObject("Microsoft.XMLHTTP");
 	}catch(e){}
 	}
 }
 if(!http_request){
 	alert('Giving up:(Cannot create an XMLHTTP instance)');
 	return false;
 }
 return http_request;
}
function doIt() 
{ 
	parent.window.document.all.change.height=document.body.scrollHeight; 
} 

function makcall(contactID,telphone)
{
	var url="call.html?contactid="+contactID+"&called="+telphone+"&temp="+ (new Date().getTime().toString(36));
	var k = window.showModalDialog(url,window,"dialogWidth:510px;status:no;dialogHeight:600px;scroll:no;center:yes");  
	 
}
function CreateXMLCtrl()
{
	var xmlDoc;
	if(window.ActiveXObject)
	{
		xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
		xmlDoc.async = false;
	}
	else if (document.implementation&&document.implementation.createDocument)
	{
		xmlDoc = document.implementation.createDocument('', '', null);

	}
	else
	{
		return null;
	}

	return xmlDoc;
}
function ExitSystem()
{
	var xhttp=makeRequest();
	xhttp.open("POST","Logout.aspxt",false);
	xhttp.setRequestHeader("If-Modified-Since", "0"); 
	xhttp.setRequestHeader("Content-Type", "text/html;charset=GB2312;"); 
	xhttp.send(null);
}
