var old_bg="";
function inStyle(obj)
{
    old_bg=obj.style.background;
	if(!old_bg)old_bg=obj.getAttribute("bgcolor");
	obj.style.background="#C9DFFE";
}
function outStyle(obj)
{
    obj.style.background=old_bg;
}
function headInStyle(obj){
	old_bg=obj.style.background;
	if(!old_bg)old_bg=obj.getAttribute("bgcolor");
	obj.style.background="#C9DFFE";
	obj.style.border="1 solid #999999";
}
function headOutStyle(obj)
{
    obj.style.background=old_bg;
	obj.style.border="0";
}

function IconInStyle(obj){
	icon_old_bg=obj.style.background;
	if(!icon_old_bg)icon_old_bg=obj.getAttribute("bgcolor");
	//obj.style.background="#C9DFFE";
	obj.style.border="1 solid #999999";
}
function IconOutStyle(obj)
{
    //obj.style.background=old_bg;
	obj.style.border="0";
}

function selectAll(form,obj,targetName){
  for(i=0;i<form.length;i++){
	   if(form[i].name.indexOf(targetName)!=-1)  {
		   if(obj.checked) form[i].checked=true;
		   else form[i].checked=false;
	   } 
  }
}

function IfNumber(iV) //每次输入都要检查是否合法的数字
{
	var newPar=/^(-|\+)?\d+$/;
	aa=iV+String.fromCharCode(event.keyCode)+'0';
	event.returnValue =newPar.test(aa);
}

function CheckWhois(form){
   if(/^[0-9a-z\-]{2,30}$/.test(form.pre_domain.value)==false){
      alert('请正确输入您想注册的域名');
	  form.pre_domain.focus();
	  return false;
   }
}
