function DrawImage(ImgD,FitWidth,FitHeight){
       var image=new Image();     
	   image.src=ImgD.src;     
	   if(image.width>0 && image.height>0){         
	   if(image.width/image.height>= FitWidth/FitHeight){             
	   if(image.width>FitWidth){                 
	   ImgD.width=FitWidth;                 
	   ImgD.height=(image.height*FitWidth)/image.width;             
	   }else{                 
	   ImgD.width=image.width;
	   ImgD.height=image.height;             
	   }         } else{             if(image.height>FitHeight){                 ImgD.height=FitHeight;                 ImgD.width=(image.width*FitHeight)/image.height;             }else{                 ImgD.width=image.width;                 ImgD.height=image.height;             }         }     } }


if (top.location !== self.location) {
top.location=self.location;
}

function nTabs(tabObj,obj){
        var tabList = document.getElementById(tabObj).getElementsByTagName("li");
        for(i=0; i <tabList.length; i++)
        {
                if (tabList[i].id == obj.id)
                {
                        document.getElementById(tabObj+"_Title"+i).className = "active"; 
                    document.getElementById(tabObj+"_Content"+i).style.display = "block";
                }else{
                        document.getElementById(tabObj+"_Title"+i).className = "normal"; 
                        document.getElementById(tabObj+"_Content"+i).style.display = "none";
                }
        } 
}

function nTabss(tabObj,obj){
        var tabList = document.getElementById(tabObj).getElementsByTagName("area");
        for(i=0; i <tabList.length; i++)
        {
                if (tabList[i].id == obj.id)
                {
                        document.getElementById(tabObj+"_Title"+i).className = "active"; 
                    document.getElementById(tabObj+"_Content"+i).style.display = "block";
                }else{
                        document.getElementById(tabObj+"_Title"+i).className = "normal"; 
                        document.getElementById(tabObj+"_Content"+i).style.display = "none";
                }
        } 
}


// JavaScript Document
function playswf(sFile,sWidth,sHeight){
 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+ sWidth +'" height="'+ sHeight +'">  ');
 document.write(' <param name="movie" value="'+ sFile +'" />  ');
 document.write(' <param name="quality" value="high" />  ');
 document.write(' <param name="wmode" value="transparent" />  ');
 document.write(' <param name="wmode" value="opaque" />  ');
 document.write(' <embed src="'+ sFile +'" width="'+ sWidth +'" height="'+ sHeight +'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="opaque"></embed>  ');
 document.write('</object> ');
}

function SameH(leftDiv,rightDiv)
{
var a=document.getElementById(leftDiv);
var b=document.getElementById(rightDiv); 
if (a.scrollHeight < b.scrollHeight)
{
a.style.height= (b.scrollHeight)+"px";
}
else
{
b.style.height= (a.scrollHeight)+"px";
}
}

function CheckIfEnglish( String )
{ 
    var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-";
     var i;
     var c;
      if(String.charAt( 0 )=='-')
	return false;
      if( String.charAt( String.length - 1 ) == '-' )
          return false;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) < 0)
	     return false;
     }
     return true;
}
function submitchecken() {

if (!(document.frmsearchInt.govcn.checked |document.frmsearchInt.cc.checked | document.frmsearchInt.comcn.checked | document.frmsearchInt.netcn.checked
 | document.frmsearchInt.tv.checked | document.frmsearchInt.info.checked | document.frmsearchInt.biz.checked
 | document.frmsearchInt.orgcn.checked | document.frmsearchInt.com.checked | document.frmsearchInt.net.checked | document.frmsearchInt.org.checked |document.frmsearchInt.cn.checked ) )
    {
	  alert("请选择你所要注册的域名类型。")
	  document.frmsearchInt.Domain.focus();
	  return false;
	 } 

if (document.frmsearchInt.Domain.value == "") {
		alert("请输入您要查询的英文域名。");
		document.frmsearchInt.Domain.focus();
		return false;
	}

if (!CheckIfEnglish(document.frmsearchInt.Domain.value )) {
		alert("\t注意：在查询英文域名时应输入英文不能输入中文及非法字符！\n域名由不分大小写的英文字母和数字组成，除了开头和结尾以外，中间也可以含有“-”（即连字符或称减号）最大长度为26个字符；");
		document.frmsearchInt.Domain.focus();
		return false;
	}
return true;
}

function FontZoom(fsize){
 var ctext = document.getElementById("bluehu_content");
 ctext.style.fontSize = fsize +"pt";
 }
 
function shantxt(thediv){
	var o = document.getElementById(thediv);
	var i=0;
	function change(){
		i=i+5;
		o.style.filter = "Alpha(Opacity=" + i + ")"; //for IE	
		o.style.opacity = i/100; //for FF
		if(i>100) i=0;
	}
	window.setInterval(change,10);
}
