// JavaScript Document

function showlayer_a(n,m){
	for(i=1;i<=m;i++){
  		document.getElementById("li_a_"+i).className="off";
  		document.getElementById("cont_a_" + i).style.display="none";
 	}
  		document.getElementById("li_a_"+n).className="on";
  		document.getElementById("cont_a_" + n).style.display="";
}


function showlayer_b(n,m){
	var value= document.all("li_b_"+n).className;
	for(i=1;i<=m;i++){
		document.getElementById("li_b_"+i).className="on";
		document.getElementById("cont_b_" + i).style.display="none";
	}
	if(value=='on'){
		document.getElementById("li_b_"+n).className="off";
		document.getElementById("cont_b_" + n).style.display="";
	}
	if(value=='off'){
		document.getElementById("li_b_"+n).className="on";
		document.getElementById("cont_b_" + n).style.display="none";
	}

}


function showlayer_c(n,m){

		for(i=1;i<=m;i++){
  		eval("li_c_"+i+".className=\"off\";");
  		eval("cont_c_" + i).style.display="none";
 		}
		eval("li_c_"+n+".className=\"on\";");
  		eval("cont_c_" + n).style.display="";

}

function showlayer_d(n,m){
	for(i=1;i<=m;i++){
  		eval("li_a_"+i+".className=\"off\";");
  		eval("cont_a_" + i).style.display="none";
 	}
  		eval("li_a_"+n+".className=\"on\";");
  		eval("cont_a_" + n).style.display="";

  if(n==1 || n==null) {
	if(iframe_sfc != null) {
		iframe_sfc.location="club_zhongjiang.jsp?lotteryType=1";
	}
  }
  else if(n==2) {
	if(iframe_6cb != null) { 
		iframe_6cb.location="club_zhongjiang.jsp?lotteryType=2";
	}
  }
  else if(n==3) {
	if(iframe_4cjq != null) {
		iframe_4cjq.location="club_zhongjiang.jsp?lotteryType=51";
	}
  }
  else if(n==4) {
	if(iframe_dlt != null) {
		iframe_dlt.location="club_zhongjiang.jsp?lotteryType=23";
	}
  }
  else if(n==5)  {
	if(iframe_22x5 != null) {
		iframe_22x5.location="club_zhongjiang.jsp?lotteryType=15";
	}
  }
 /* else if(n==6) {
	 if(iframe_36x7 != null) {
		iframe_36x7.location="club_zhongjiang.jsp?lotteryType=16";
	 }
  }*/
  else if(n==6) {
	if(iframe_7xc != null) {
		iframe_7xc.location="club_zhongjiang.jsp?lotteryType=4";
	}
  }
  else if(n==7) {
	if(iframe_redblue != null) {
		iframe_redblue.location="club_zhongjiang.jsp?lotteryType=3";
	}
  }
  else if(n==8) {
	if(iframe_fc3d != null) {
		   iframe_fc3d.location="club_zhongjiang.jsp?lotteryType=12";
	}
  }else if(n==9){
	   if(iframe_p3!=null) {
		  iframe_p3.location="club_zhongjiang.jsp?lotteryType=13";
		  }
	  }
}

function showlayer_hemai(btn,lottoType){
	iframe_hemai.location = "queryOrderResultByclub.do?lottotype="+lottoType+"&&PageType=cluballorder";
	var idname = new String(btn.id);
	var s = idname.indexOf("_");
	var e = idname.lastIndexOf("_")+1;
	var tabName = idname.substr(0, s);
	var id = parseInt(idname.substr(e, idname.length));
	var tabNumber = btn.parentNode.childNodes.length;
	for(i=0;i<tabNumber;i++){
	  
		document.getElementById(tabName+"_li_"+i).className = "off";
	}
	    document.getElementById(tabName+"_li_"+id).className = "on";
	
}


function autoSetIframeSize()
	{
	//根据内容自动调整iframe的大小
	//注意：必须为iframe设置name属性，设置什么都行
	    try
		{
			var obj=self.parent.parent.document.all[self.name];
		}
		catch(e)
		{
			var obj=self.parent.document.all[self.name];
		}
		if(obj!=null)
		{
			obj.style.pixelHeight=self.document.body.scrollHeight+5;
			//var HeightValue = obj.document.body.scrollHeight
			if(obj.style.pixelHeight < 100)
			{
				obj.style.pixelHeight = obj.height;
			}
		}
	}
	function copyToClipBoard(){ 
		
		var clipBoardContent=document.location; 
		
		clipBoardContent+='\r\n'; 
		
		window.clipboardData.setData("Text",clipBoardContent); 
		
		alert("本方案链接地址复制成功，可直接粘贴在相应位置."); 
	
	} 
