/* 静态页地址获取参数*/
function Request(strName)
{
		var strHref = window.location.href;;
		var intPos = strHref.indexOf("?");
		var strRight = strHref.substr(intPos + 1);

		var arrTmp = strRight.split("&");
		for(var i = 0; i < arrTmp.length; i++)
		{
				var arrTemp = arrTmp[i].split("=");
				if(arrTemp[0].toUpperCase() == strName.toUpperCase())
				{
						var tempstr=arrTmp[i].substr(arrTmp[i].indexOf("=")+1,arrTmp[i].length);
						return tempstr.replace('#','');
				}
		}
		return "";
}
function replaceInput(obj,event){
	//alert(obj.value);
	//if(event.keyCode<48 || event.keyCode>57)
	obj.value=obj.value.replace(/[^\d]/g,'');
}
function onSelectRadio(flag){
		for(i=0;i<17;i++) {
			if(i==flag) {
				document.all("Typeslayer")[i].style.display="";
				document.all("Types")[i].style.display="";
			} else {
				document.all("Typeslayer")[i].style.display="none";
				document.all("Types")[i].style.display="none";
			}
		}
		location="#";
	}
	function checkempty(obj)
{
var msg="密码最好不要为空哦"
if(obj.psw.value.length<1)
{
alert(msg);
return false;}
}

//95001173固定电话充值热线电鹰选择处理
function showsubmenu(act)
{
 if(act=='hidden'){
 eval("submenu1.style.display=\"none\";");
		eval("submenu2.style.display=\"none\";");
		home.type.value='normal';
 
 }else if(act=='show'){
 eval("submenu1.style.display=\"\";");
		eval("submenu2.style.display=\"\";");
		home.type.value='other'
 }
}

//95001173固定电话充值热线表单检测
function homeck(obj){
type=obj.type.value;
cardno=obj.cardno.value;
cardpass=obj.cardpass.value;
dy_id=obj.dy_id.value;
dypass=obj.dypass.value;
if(!isNumber(cardno)){
alert('充值卡号不应包含字母');
obj.all.cardno.value='';
obj.all.cardno.focus();
return false;}
if(cardno.length<4){
	     alert('请输入卡号！');
	     obj.all.cardno.value='';
         obj.all.cardno.focus();
		 return false;
	  }
	  
	  if(cardpass.length<1){
	     alert('请输入卡密码！');
		 return false;
	  }
	  if(type=='other'){
	    if(!isNumber(dy_id)){
            alert('电鹰号不应包含字母');
            obj.all.dy_id.value='';
            obj.all.dy_id.focus();
            return false;
         }
      if(dy_id.length<4){
	     alert('请输入冲值电鹰号！');
	     obj.all.dy_id.value='';
         obj.all.dy_id.focus();
		 return false;
	  }
	  
	  if(dypass.length<3){
	     alert('请输入冲值电鹰密码！');
	     obj.all.dypass.value='';
         obj.all.dypass.focus();
		 return false;
	  }
	  
	  }
	  return true;
	  
}
//充值卡表单检测
function kaform(obj){
	card_no=obj.all.card_no.value;
	if(!isNumber(card_no)){
     alert('冲值卡不应包含字母');
     obj.all.card_no.value='';
     obj.all.card_no.focus();
     return false;}
	if(card_no.length<12){
	     alert('卡号必需是12位数字！');
		 return false;
	  }
	   return true;
}
//声讯电话支付表单检测
function phoneform(obj){
	card_no=obj.all.card_no1.value;
	if(!isNumber(card_no)){
alert('冲值卡不应包含字母');
obj.all.card_no1.value='';
obj.all.card_no1.focus();
return false;}
	if(card_no.length<12){
	     alert('卡号必需是12位数字！');
		 return false;
	  }
	   return true;
}

//小灵通(中国电信)用户表单检测
function checkka(obj){
p_cardno=obj.all.userName.value;
psw=obj.all.passWord.value;
if(!isNumber(p_cardno)){
alert('电鹰号或者手机号不应包含字母');
obj.all.userName.value='';
obj.all.userName.focus();
return false;}
if(p_cardno.length<4){
	     alert('请输入用户名！');
		 return false;
	  }
	  
	  if(psw.length<1){
	     alert('请输入密码！');
		 return false;
	  }
	  
	  return true;
	  
}

//移动用户表单检测
function checkMobiletelno(obj){
	      
	  Mobiletelno =obj.Mobiletelno.value;
	  HeadMobile = Mobiletelno.substr(0,3);
	 if(!isNumber(Mobiletelno)){
         alert('手机号没有字母');
          return false;}
	  if(Mobiletelno.length<11){
	     alert('手机号不对');
		 return false;
	  }
	  
	  if(HeadMobile<130||(HeadMobile<150&&HeadMobile>139)||HeadMobile>159){
	    alert('手机号不对');
		    return false;
		 }
		  if(Mobiletelno.substr(2,1)<4){
		    onSelectRadio(1);
		    return false;
			}
			alert('请立刻编辑免费短信XLL到9119索取电鹰会员密码,资费15元/月,3天免费使用！最新海内外大片、日韩情感片、成人性趣、重大纪实探案等各类影视,等着您观看，一切精彩尽在电鹰影视网');
			return true;


	}

	//联通用户表单检测
function checkMobiletelno1(obj){
	      
	  Mobiletelno =obj.Mobiletelno.value;
	  HeadMobile = Mobiletelno.substr(0,3);
	 if(!isNumber(Mobiletelno)){
        alert('手机号没有字母');
        return false;}
	  if(Mobiletelno.length<11){
	     alert('手机号不对');
		 return false;
	  }
	  
	  if(HeadMobile<134||HeadMobile>139){
	     if(HeadMobile>134){
		    onSelectRadio(0);
		    return false;
		 }}
		 else{
	        alert('手机号不对');
		    return false;
			}
	}
	function onChoose(amount,month) {
		QuckForm.amount.value = amount;
		QuckForm.month.value = month;
		QuckForm.all.total.innerText = amount+"元";
		
	}
	function onszxChoose(amount,month) {
		szxForm.amount.value = amount;
		szxForm.month.value = month;
		szxForm.all.total.innerText = amount+"元";
		
	}
	function onbjszxChoose(amount,month) {
		bjszxForm.amount.value = amount;
		bjszxForm.month.value = month;
		bjszxForm.all.total.innerText = amount+"元";
		
	}
	function onBankChargeChoose(amount,month) {
		thisForm.amount.value = amount;
		thisForm.month.value = month;
		thisForm.all.total.innerText = amount+"元";
		thisForm.succPage.value = "https://www.ips.com.cn/ipay/ipayment.asp?mer_code="+thisForm.mer_code.value+
			"&amount="+thisForm.amount.value+"&date="+thisForm.date.value+
			"&currency=01&merchanturl=http://www.d1778.com/service/bankCheckDone.jsp";
	}

	function onShenDaChoose(amount,month) {
		shenDaForm.all.amount.value = amount;
		shenDaForm.all.month.value = month;
		shenDaForm.all.total.innerText = amount+"元";
		/* ????????????????????????????????form????????hidden value ??
		??????????????????  */
		shenDaForm.all.succPage.value = "http://www.d1778.com/service/shanda_to.jsp?"+
			"&amount="+shenDaForm.all.amount.value;
	}
	function toShenDaSubmit() {
		shenDaForm.all.succPage.value = "http://www.d1778.com/service/shanda_to.jsp?"+
			"&amount="+shenDaForm.all.amount.value;
			shenDaForm.submit();
	}

	function onTencentChoose(amount,month) {
		tencentForm.all.amount.value = amount;
		tencentForm.all.month.value = month;
		tencentForm.all.total.innerText = amount+"元";
		/* ????????????????????????????????form????????hidden value ??
		??????????????????  */
		tencentForm.all.succPage.value = "http://www.d1778.com/service/tencent_to.jsp?"+
			"&amount="+tencentForm.all.amount.value;
				}
	function toTencentSubmit() {
				tencentForm.all.succPage.value = "http://www.d1778.com/service/tencent_to.jsp?"+
			"&amount="+tencentForm.all.amount.value;
			tencentForm.submit();
	}

	function onMobileChoose(amount,month) {
		mobileForm.all.amount.value = amount;
		mobileForm.all.month.value = month;
		mobileForm.all.total.innerText = amount+"元";
		/* ????????????????????????????????form????????hidden value ??
		??????????????????  */
		mobileForm.all.succPage.value = "http://www.d1778.com/service/nationm_to.jsp?"+
			"amount="+mobileForm.all.amount.value;
				}
	function toMobileSubmit() {
				mobileForm.all.succPage.value = "http://www.d1778.com/service/nationm_to.jsp?"+
			"amount="+mobileForm.all.amount.value;
			mobileForm.submit();
	}

	function onAlipayChoose(amount,month) {
		alipayForm.all.amount.value = amount;
		alipayForm.all.month.value = month;
		alipayForm.all.total.innerText = amount+"元";
		/* ????????????????????????????????form????????hidden value ??
		??????????????????  */
		alipayForm.all.succPage.value = "http://211.155.231.121/alipay_to.php?"+
			"&amount="+alipayForm.all.amount.value;
				}
	function toAlipaySubmit() {
		alipayForm.all.succPage.value = "http://211.155.231.121/alipay_to.php?"
			"amount="+alipayForm.all.amount.value;
			alipayForm.submit();
	}
	function oncncardChoose(amount,month) {
		cncardForm.all.amount.value = amount;
		cncardForm.all.month.value = month;
		cncardForm.all.total.innerText = amount+"元";
		/* ????????????????????????????????form????????hidden value ??
		??????????????????  */
	}
	function onYeepayChoose(amount,month) {
		yeepayForm.all.amount.value = amount;
		yeepayForm.all.month.value = month;
		yeepayForm.all.total.innerText = amount+"元";
		/* ????????????????????????????????form????????hidden value ??
		??????????????????  */
		yeepayForm.all.succPage.value = "http://www.d1778.com/service/yeepay_req.jsp?"+
			"amount="+yeepayForm.all.amount.value+
			"&month="+yeepayForm.all.month.value;
	}
	function onadslChoose(amount,month) {
		adslForm.all.amount.value = amount;
		adslForm.all.month.value = month;
		adslForm.all.total.innerText = amount+"元";
		/* ????????????????????????????????form????????hidden value ??
		??????????????????  */
		adslForm.all.succPage.value = "http://www.d1778.com/service/adsl_req.jsp?"+
		"amount="+yeepayForm.all.amount.value+
			"&month="+adslForm.all.month.value;
	}
	function toYeepaySubmit(){
		yeepayForm.all.succPage.value = "http://www.d1778.com/service/yeepay_req.jsp?"+
			"amount="+yeepayForm.all.amount.value+
			"&month="+yeepayForm.all.month.value;
			yeepayForm.submit();
	}
	scores = new Array(20);
var numTotal=0;
NS4 = (document.layers) ? 1 : 0;IE4 = (document.all) ? 1 : 0;ver4 = (NS4 || IE4) ? 1 : 0;
if (ver4) {    with (document) {        write("<STYLE TYPE='text/css'>");        
if (NS4) {            write(".parent {position:absolute; visibility:visible}");            
write(".child {position:absolute; visibility:visible}");           
 write(".regular {position:absolute; visibility:visible}")        }        else {            write(".child {display:}")        }        write("</STYLE>");    
 }}
 function getIndex(el) {    ind = null;    for (i=0; i<document.layers.length; i++) {        
 whichEl = document.layers[i];        if (whichEl.id == el) {            ind = i;            break;        }    }    
 return ind;
 }
 function arrange() {    
 nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height;    
 for (i=firstInd+1; i<document.layers.length; i++) {        whichEl = document.layers[i];        
 if (whichEl.visibility != "hide") {            whichEl.pageY = nextY;            nextY += whichEl.document.height;       
  }    }}
 //载入页面处理
  function initIt(){ 
     if (!ver4) return;    if (NS4) {        for (i=0; i<document.layers.length; i++) {            whichEl = document.layers[i]; 
                if (whichEl.id.indexOf("Child") != -1) {whichEl.visibility = "visible";   document.bannerADrotator.src="jian.gif";}     }        arrange();    
                }    else {        divColl = document.all.tags("DIV");        for (i=0; i<divColl.length; i++) {           
                 whichEl = divColl(i);            if (whichEl.className == "child")  whichEl.visibility = "show";    document.bannerADrotator.src="jian.gif";        }    
                 }}
function expandIt(el) {
	if (!ver4) return;    
	if (IE4) {        whichEl1 = eval(el + "Child");		
             	for(i=1;i<=numTotal;i++){			
             								whichEl = eval(scores[i] + "Child");			
             							if(whichEl!=whichEl1) {				whichEl.style.display = "none";			}		
             							}        
             	whichEl1 = eval(el + "Child");        
             if (whichEl1.style.display == "none") {            whichEl1.style.display = "block"; document.bannerADrotator.src="jian.gif";       }        
			else {            whichEl1.style.display = "none"; document.bannerADrotator.src="add.gif";       }    }    
	else {        whichEl = eval("document." + el + "Child");		
			for(i=1;i<=numTotal;i++){			whichEl = eval("document." + scores[i] + "Child");			if(whichEl!=whichEl1) {				
			whichEl.visibility = "hide";	document.bannerADrotator.src="add.gif"; 		}		}        
			if (whichEl.visibility == "hide") {            whichEl.visibility = "show";    document.bannerADrotator.src="jian.gif";    }        
			else {            whichEl.visibility = "hide";  document.bannerADrotator.src="add.gif";      }        arrange();    
			}
}
			onload = initIt;
			numTotal=1;scores[1]='KB1';