// JavaScript Document
	var offsetxpoint=-60 
	var offsetypoint=20
	var ie=document.all
	var ns6=document.getElementById  &&  !document.all
	var enabletip=false
	if (ie||ns6)
	var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
	function ietruebody(){
	return (document.compatMode  &&  document.compatMode!="BackCompat")? document.documentElement : document.body
	}
	function ddrivetip(thetext, thecolor, thewidth){
	if (ns6||ie){
	if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
	if (typeof thecolor!="undefined"  &&  thecolor!="") tipobj.style.backgroundColor=thecolor
	tipobj.innerHTML=thetext
	enabletip=true
	return false
	}
	}
	function positiontip(e){
	if (enabletip){
	var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
	var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
	var rightedge=ie && !window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
	var bottomedge=ie && !window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20
	var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000
	if (rightedge<tipobj.offsetWidth)
	tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
	else if (curX<leftedge)
	tipobj.style.left="5px"
	else
	tipobj.style.left=curX+offsetxpoint+"px"
	if (bottomedge<tipobj.offsetHeight)
	tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
	else
	tipobj.style.top=curY+offsetypoint+"px"
	tipobj.style.visibility="visible"
	tipobj.style.filter= "progid:DXImageTransform.Microsoft.Shadow(color=#999999,direction=135,strength=3)";
	tipobj.style.filter+="Alpha(opacity=90)";
	}
	}
	function hideddrivetip(){
	if (ns6||ie){
	enabletip=false
	tipobj.style.visibility="hidden"
	tipobj.style.left="-1000px"
	tipobj.style.backgroundColor=''
	tipobj.style.width=''
	tipobj.style.filter= "progid:DXImageTransform.Microsoft.Shadow(color=#999999,direction=135,strength=3)";
	tipobj.style.filter+="Alpha(opacity=90)";

	}
	}
	document.onmousemove=positiontip
	
function Check()
{
	    if($F("Num").substring(0,4)!="4006")
		{
			alert("输入错误！ 请认真填写您要查询的号码!");
			$("Num").focus();
		}
		else
		{
			if(len($F("Num"))!=10)
			{
				alert("输入错误！ 请认真填写您要查询的号码!");
				$("Num").focus();
			}
			else
			{
				var url = "/search";        
				var myAjax = new Ajax.Request( 
					 url,
					{ 
						method: 'post', 
						parameters: 
						{ 
							Num: $F("searchnub")
						},
						onComplete: showResponse 
					});
			}
		}
 } 
 var showResponse=function(Request) 
{ 
    if(Request.responseText=="no")
	{
		loadwindow("no",400,244);
		$("dPic").innerHTML='<img src="Images/36.gif" width="69" height="48" />'
		$("dText").innerHTML='号码'+$F("Num")+'不存在，继续搜索其它号码！';
		$("dbutton").innerHTML='<a href="/Index.asp"><img src="images/butBlack.jpg" width="140" height="25" /></a>';
	}
	else
	{
		//alert("ffffffffffff");
		loadwindow("yes",400,244);
		var result = Request.responseText;
		var array=result.split('|');
		$("dPic").innerHTML='<img src="Images/11.gif" width="58" height="50" />';
		$("dText").innerHTML='恭喜您！号码'+array[0]+'可以注册，是否立刻注册申请？<br />每月最低消费：'+array[1]+'元,每分钟：'+array[2]+'元/分';
		$("dbutton").innerHTML='<a href="/choosenumber.asp?Num='+array[0]+'"><img src="images/butRegister.jpg" width="175" height="25" /></a>&nbsp;&nbsp;<a href="/Index.asp"><img src="images/butBlack.jpg" width="119" height="25" /></a>';
	}
} 

var dragapproved=false
var minrestore=0  //该变量表示窗口目前的状态，0表示初始化状态，1表示最大化状态
var initialwidth,initialheight
//若Client浏览器为IE5.0以上版本的
var ie5=document.all&&document.getElementById
//若Client浏览器为NetsCape6。0版本以上的
var ns6=document.getElementById&&!document.all
function loadwindow(showtype,width,height)
{
	if (!ie5&&!ns6)  //若不为IE或Netscpae浏览器，则使用一般的Window.open进行弹出窗口处理	
	{
	 window.open(url,"","width=width,height=height,scrollbars=1")
	}
	else
	{
		document.getElementById("dwindow").style.display='';
		document.getElementById("dwindow").style.width=initialwidth=width+"px";
		document.getElementById("dwindow").style.height=initialheight=height+"px";
		document.getElementById("dwindow").style.left="300px";
		//document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px";
	}
}
function initializedrag(e){
offsetx=ie5? event.clientX : e.clientX
offsety=ie5? event.clientY : e.clientY
document.getElementById("dwindowcontent").style.display="none" //此句代码可不要
tempx=parseInt(document.getElementById("dwindow").style.left)
tempy=parseInt(document.getElementById("dwindow").style.top)

dragapproved=true
document.getElementById("dwindow").onmousemove=drag_drop
}
function closeit(){
document.getElementById("dwindow").style.display="none"

}
function stopdrag(){
dragapproved=false;
document.getElementById("dwindow").onmousemove=null;
document.getElementById("dwindowcontent").style.display="" //extra
}
function drag_drop(e){
if (ie5&&dragapproved&&event.button==1){
document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
}
}
function len(s) { 
var l = 0; 
var a = s.split(""); 
for (var i=0;i<a.length;i++) { 
if (a[i].charCodeAt(0)<299) { 
l++; 
} else { 
l+=2; 
} 
} 
return l; 
} 
