// JavaScript Document
//屏蔽JS错误
function killErrors()
{ 
return true;
} 
window.onerror=killErrors;


//加入收藏
function SetShcang()
{
javascript:window.external.AddFavorite(window.location.href, document.title);
}


//自动 COPY代码开始
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function JM_cc(ob){
	var obj=MM_findObj(ob); if (obj) { 
	obj.select();js=obj.createTextRange();js.execCommand("Copy");}
	alert("地址复制成功，您现在可以粘贴到QQ/MSN/论坛等任何地方！");
}
function SetCopy(){
document.write('<input name="page_url" value="'+window.location.href+'" size="50" type="hidden">【<a href="#" onClick=JM_cc("page_url"),event.returnValue=false>复制地址</a>】');
}

function Sethuangli(){
	document.write('<scr'+'ipt src="/Action/huangli.asp"></scr'+'ipt>')
	}



//本命佛搜索
function SearchBmf1()
{
var URL="http://www.okbmf.com/main.asp?gourl=SearchBmf.asp?Belong="+document.Formbmf1.Belong.value;
window.open(URL);
}
function SearchBmf2()
{
var URL="http://www.okbmf.com/main.asp?gourl=SearchBmf.asp?BeYear="+document.Formbmf2.BeYear.value;
window.open(URL);
}


//周公解梦
function valid_jmer(){
if(  document.jm.word.value.length==""  )
{window.alert("对不起，请输入梦的关键字！");
document.jm.word.focus();
return false;
} ;
if(  document.jm.word.value.length>20  )
{window.alert("对不起，请将描述控制在20个字以内！");
document.jm.word.focus();
return false;
} ;
}


//手机查询
function isnum()
{ 
if(event.keyCode==13 ) addGame(document.login);
if(event.keyCode<48 || event.keyCode>57)
{
event.keyCode=0;
}
if(event.keyCode==13 ) addGame(document.login);
}
function valid_searchen(){

if (document.login.word.value.length<11 || document.login.word.value.length>12)
{
alert("手机号码不正确！");
document.login.word.focus()
return false;
};
var strBegin=document.login.word.value.substr(0,2);
if(!(strBegin=="13") && !(strBegin=="15")) {
alert("不是正确的手机号码！");
document.login.word.focus()
return false;
};
}


//*星座运程
function astrosubmit(word)
{
document.astroluck.type.value=word;
document.astroluck.submit();	     
}
function Setastropicon(wd){
if(wd=="白羊座"){document.getElementById("astroid").src="/images/astro/a_1.gif";}
if(wd=="金牛座"){document.getElementById("astroid").src="/images/astro/a_2.gif";}
if(wd=="双子座"){document.getElementById("astroid").src="/images/astro/a_3.gif";}
if(wd=="巨蟹座"){document.getElementById("astroid").src="/images/astro/a_4.gif";}
if(wd=="狮子座"){document.getElementById("astroid").src="/images/astro/a_5.gif";}
if(wd=="处女座"){document.getElementById("astroid").src="/images/astro/a_6.gif";}
if(wd=="天秤座"){document.getElementById("astroid").src="/images/astro/a_7.gif";}
if(wd=="天蝎座"){document.getElementById("astroid").src="/images/astro/a_8.gif";}
if(wd=="射手座"){document.getElementById("astroid").src="/images/astro/a_9.gif";}
if(wd=="摩羯座"){document.getElementById("astroid").src="/images/astro/a_10.gif";}
if(wd=="水瓶座"){document.getElementById("astroid").src="/images/astro/a_11.gif";}
if(wd=="双鱼座"){document.getElementById("astroid").src="/images/astro/a_12.gif";}
}

//*情侣速配
function peiduisubmit(no)
{
if (no==1){
document.astro.strand.value=no;
document.astro.submit();
}
if (no==2){
document.genus.strand.value=no;
document.genus.submit();
}
if (no==3){
document.blood.strand.value=no;
document.blood.submit();
}
if (no==4){
document.nannv.strand.value=no;
document.nannv.submit();
}
if (no==5){
document.avsb.strand.value=no;
document.avsb.submit();
}
if(no==6){
document.avsg.strand.value=no;
document.avsg.submit();
}
if(no==7){
document.gvsb.strand.value=no;
document.gvsb.submit();
}
}
function sanheyisubmit(no){
document.sanheyiform.strand.value=no;
document.sanheyiform.submit();
}

//生日密码/生日花/生日书/48星区
function shenrisubmit(word)
	{
	if (word=="psw"){
	document.shenri_psw.strand.value=word;
	document.shenri_psw.submit();
	}
	if (word=="hua"){
	document.shenri_hua.strand.value=word;
	document.shenri_hua.submit();
	}
	if (word=="shu"){
	document.shenri_shu.strand.value=word;
	document.shenri_shu.submit();
	}
	if (word=="xin"){
	document.shenri_xin.strand.value=word;
	document.shenri_xin.submit();
	}
}

//首页字典搜索切换
function Setli(num){
		document.getElementById("zinav").style.backgroundImage ="url(images/bg_575_"+num+".gif)";
	}

//控制导航切换显示内容函数
function SetDiv(div,no){
	SetDiv_1(div,no);
}

function SetDiv_1(div,no){
	switch(no){
		case 1:
		document.getElementById(div+"1").style.display="block";
		document.getElementById(div+"2").style.display="none";
		document.getElementById(div+"3").style.display="none";
		document.getElementById(div+"4").style.display="none";
		document.getElementById(div+"5").style.display="none";
		document.getElementById(div+"6").style.display="none";
		document.getElementById(div+"7").style.display="none";
		document.getElementById(div+"8").style.display="none";
		break;
		case 2:
		document.getElementById(div+"1").style.display="none";
		document.getElementById(div+"2").style.display="block";
		document.getElementById(div+"3").style.display="none";
		document.getElementById(div+"4").style.display="none";
		document.getElementById(div+"5").style.display="none";
		document.getElementById(div+"6").style.display="none";
		document.getElementById(div+"7").style.display="none";
		document.getElementById(div+"8").style.display="none";
		break;
		case 3:
		document.getElementById(div+"1").style.display="none";
		document.getElementById(div+"2").style.display="none";
		document.getElementById(div+"3").style.display="block";
		document.getElementById(div+"4").style.display="none";
		document.getElementById(div+"5").style.display="none";
		document.getElementById(div+"6").style.display="none";
		document.getElementById(div+"7").style.display="none";
		document.getElementById(div+"8").style.display="none";
		break;
		case 4:
		document.getElementById(div+"1").style.display="none";
		document.getElementById(div+"2").style.display="none";
		document.getElementById(div+"3").style.display="none";
		document.getElementById(div+"4").style.display="block";
		document.getElementById(div+"5").style.display="none";
		document.getElementById(div+"6").style.display="none";
		document.getElementById(div+"7").style.display="none";
		document.getElementById(div+"8").style.display="none";
		break;
		case 5:
		document.getElementById(div+"1").style.display="none";
		document.getElementById(div+"2").style.display="none";
		document.getElementById(div+"3").style.display="none";
		document.getElementById(div+"4").style.display="none";
		document.getElementById(div+"5").style.display="block";
		document.getElementById(div+"6").style.display="none";
		document.getElementById(div+"7").style.display="none";
		document.getElementById(div+"8").style.display="none";
		break;
		case 6:
		document.getElementById(div+"1").style.display="none";
		document.getElementById(div+"2").style.display="none";
		document.getElementById(div+"3").style.display="none";
		document.getElementById(div+"4").style.display="none";
		document.getElementById(div+"5").style.display="none";
		document.getElementById(div+"6").style.display="block";
		document.getElementById(div+"7").style.display="none";
		document.getElementById(div+"8").style.display="none";
		break;
		case 7:
		document.getElementById(div+"1").style.display="none";
		document.getElementById(div+"2").style.display="none";
		document.getElementById(div+"3").style.display="none";
		document.getElementById(div+"4").style.display="none";
		document.getElementById(div+"5").style.display="none";
		document.getElementById(div+"6").style.display="none";
		document.getElementById(div+"7").style.display="block";
		document.getElementById(div+"8").style.display="none";
		break;
		case 8:
		document.getElementById(div+"1").style.display="none";
		document.getElementById(div+"2").style.display="none";
		document.getElementById(div+"3").style.display="none";
		document.getElementById(div+"4").style.display="none";
		document.getElementById(div+"5").style.display="none";
		document.getElementById(div+"6").style.display="none";
		document.getElementById(div+"7").style.display="none";
		document.getElementById(div+"8").style.display="block";
		break;
	}
}

//网站头部
function Settop(){
	document.write('<iframe src="/js/top.html" width="100%" height="103px" frameborder="0" scrolling="no"></iframe>');
	}

//网站底部
function Setdown(){
	wd='';
	wd='<div class="bottom_nav"><a href="http://www.httpcn.com/corp/" target="_blank">网站简介</a>　-　<a href="http://www.httpcn.com/corp/contact.shtml" target="_blank">联系方法</a>　-　<a href="http://www.httpcn.com/corp/item.shtml" target="_blank">服务条款</a>　-　<a href="http://www.httpcn.com/corp/copyright.shtml" target="_blank">知识产权</a>　-　<a href="http://www.httpcn.com/corp/cooperation.shtml" target="_blank">合作机会</a></div>';
	wd=wd+'<div class="bottom">';
	wd=wd+'<img src="/Images/logo_s.gif">';
	wd=wd+'</div>';
	document.write(wd);
	}

function valid_searchjx(){
{
if (document.jx.word.value.length<2 || document.jx.word.value.length>20)
{
alert("分析的号码必须在2-20位之间！");
document.jx.word.focus();
return false;
}	
ii=0;
bString="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
while (ii<document.jx.word.value.length)
{
if (bString.indexOf(document.jx.word.value.substring(ii,ii+1))==-1)
{
alert("对不起，分析的号码只能包含数字和字母。");
document.jx.word.focus();
return false;
}
ii=ii+1;
}
return true;
}
}



function CheckS()
{
if (document.Look_Ip.word.value.length=="")
{
alert("对不起，请输入您要查询的IP或域名！");
document.Look_Ip.word.focus();
return false;
}	
ii=0;
bString="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.";
while (ii<document.Look_Ip.word.value.length)
{
if (bString.indexOf(document.Look_Ip.word.value.substring(ii,ii+1))==-1)
{
alert("对不起，只能输入数字、字母和.号！");
document.Look_Ip.word.focus();
return false;
}
ii=ii+1;
}
return true;
}