//gotoLink
function gotoLink(urlStr,target){
	var str=urlStr;
	var open_mode=target;
	var targetPage=window.open(str,open_mode);
	return targetPage;
}

//custom_q
function custom_q(){
var question = document.getElementById("question_c");
if(question.options[8].selected){
document.getElementById("free_q").style.display="block";
}
else{
document.getElementById("free_q").style.display="none";
}
}

//showadv
function ShowAdva(){
	document.getElementById("show_more").style.display="none";
	document.getElementById("hide_more").style.display="block";
	for (var i=1;i<=2;i++){
		document.getElementById("adv_info" + i).style.display="block";
		}
}

function HideAdva(){
	document.getElementById("show_more").style.display="block";
    document.getElementById("hide_more").style.display="none";
	for (var i=1;i<=2;i++){
		document.getElementById("adv_info" + i).style.display="none";
		}
}

//active_link
function a_link(name,active_id,totle){
	for(i=1;i<=totle;i++){
		var ac_link=document.getElementById(name+"_"+i);
		//var con=document.getElementById("con_"+name+"_"+i);
		ac_link.className=i==active_id?"active_link":"";
		//con.style.display=i==active_id?"block":"none";
	}
	//if(active_id==8){
		//alert("yes")
		//document.getElementById("ticai_8").className="sfcai";
		//document.getElementById("ticai_8").style.border="1px solid #ec9232";
		//document.getElementById("ticai_8").innerHTML="";
	//}
	//else{
		//document.getElementById("ticai_8").className="";
		//document.getElementById("ticai_8").style.border="1px solid #c0c0c0";
		//document.getElementById("ticai_8").innerHTML="胜负彩";
	//}
}

//account_o
function m_left_op(name,active_id,totle){
	for(i=1;i<=totle;i++){
		var ac_op=document.getElementById(name+"_"+i);
		//var con=document.getElementById("con_"+name+"_"+i);
		ac_op.className=i==active_id?"active_o":"";
		//con.style.display=i==active_id?"block":"none";
	}
}

function lotnytab(id,active_id,totle){
	for(i=1;i<=totle;i++){
		var ac_op=document.getElementById(id+i);
		var con=document.getElementById(id+"s"+i);
		ac_op.className=i==active_id?"act":"";
		con.style.display=i==active_id?"block":"none";
	}
}

function l_right(urlStr){
	var targetIf=document.getElementById("targetif");
	targetIf.src="/"+urlStr+"?t="+Math.random();
}

function zj_right(urlStr){
	var targetIf=document.getElementById("targetif");
	targetIf.src="/"+urlStr;
}

function m_right(urlStr,type){
	var targetT=document.getElementById("rtitle");
	targetT.innerHTML=type;
	var targetIf=document.getElementById("targetif");
	targetIf.src="include/"+urlStr+"?t="+Math.random();
}

//bank_o
function select_op(method,active_id,totle){
	for(i=1;i<=totle;i++){
		var con=document.getElementById(method+"_"+i);
		con.style.display=i==active_id?"block":"none";
	}
}
function BASEisNotInt(theInt)
{
//判断是否为整数
alert(1);
    theInt=BASEtrim(theInt);
    if ((theInt.length>1 && theInt.substring(0,1)=="0") || BASEisNotNum(theInt)){
        return true;
    }
    return false;
}

//找回密码
function chkIsUser(frmName) {
    var msg = "";
    var rightword=/^([a-z0-9A-Z_]|[\u4e00-\u9fa5])+$/;                           
    if(frmName.uid.value==null || frmName.uid.value=='')                   
	{
		msg = "用户名不能为空！";
		alert(msg);
		frmName.uid.focus();
		return false;
	} 
	if(!rightword.test(frmName.uid.value)){                             
		msg = "用户名输入非法！";
		alert(msg);
		frmName.uid.focus();
		return false;
	}
	document.frmPassword.submit();
}
function chkIsUser2(frmName) {
    var msg = "";
	if(frmName.answer.value==null || frmName.answer.value == ""){
		msg = "答案不能为空！";
		alert(msg);
		frmName.answer.focus();
		return false;
	} 
	if(frmName.validateNum.value==null || frmName.validateNum.value == ""){
		msg = "验证码不能为空！";
		alert(msg);
		frmName.validateNum.focus();
		return false;
	}
	document.frmPassword2.submit();
}

//show pupo
function shPupo(tarID,UserID,LotteryType){
	var pupo = document.getElementById(tarID);
	var pupoiframe=document.getElementById("dispiframe");
	pupoiframe.src="../inner_pages/show_hmdata.jsp?userid="+UserID+"&lotterytype="+LotteryType;
	pupo.style.display="block";
}


