﻿ function change(id)
 {
   for(var i=1;i<=5;i++)
   {
     if(document.getElementById("layer"+i)==document.getElementById("layer"+id))
	 {
	   document.getElementById("layer"+id).style.display="block";
	 }
	 else
	 {
	   document.getElementById("layer"+i).style.display="none";
	 }
   }
 }
function isIe(flashId,flash,_width,_height) 
{
document.writeln("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + _width + "\" height=\"" + _height + "\" id=\""+ flashId  + "\">");
document.writeln("   <param name=\"movie\" value=\"" + flash + "\" />");
document.writeln("   <param name=\"allowScriptAccess\" value=\"sameDomain\" />");
document.writeln("   <param name=\"quality\" value=\"high\" />");
document.writeln("   <param name=\"menu\" value=\"false\" />");
document.writeln("   <param name=\"wmode\" value=\"transparent\" />");
document.writeln("   <embed src=\"" + flash + "\" quality=\"high\"  allowScriptAccess=\"sameDomain\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + _width + "\" height=\"" + _height + "\" wmode=\"transparent\"></embed>");
document.writeln("</object>");
}

 function isFF(flashId,flash,_width,_height) 
{
document.writeln("<EMBED src=\""+flash+"\"  width=\"" + _width + "\"  height=\"" + _height + "\"  allowScriptAccess=\"sameDomain\" quality=high TYPE=\"application/x-shockwave-flash\" id=\"" +flashId+ "\" scale=\"exactfit\" wmode=\"transparent\">");
document.writeln("</EMBED>");
} 


function turnPage(page,currtPage)
{        

  if(page.indexOf("#") != -1)  
    //表示存在,便有多个过来
  {
     for(j=0;j<page.split("#").length;j++)
      {  //alert($("layer"+page.split("#")[0]));
        var url = "bxPage.aspx?pageNo="+currtPage+"&n_type="+page.split("#")[j];
        var myAjax = new Ajax.Request(url,{method:'post',asynchronous:false,onSuccess:function(originalRequest){var result = originalRequest.responseText;
       
		 $("layer"+page.split("#")[j]).innerHTML=result.split("###")[1];
		 $("fenye"+page.split("#")[j]).innerHTML=result.split("###")[2];
		 // alert($("layer"+page.split("#")[0]).innerHTML);
        }});
      } 
       self.scroll(0,370);  
  }
  else
  {
          var url = "bxPage.aspx?pageNo="+currtPage+"&n_type="+page;
        var myAjax = new Ajax.Request(url,{method:'get',onSuccess:function(originalRequest){var result = originalRequest.responseText;
		 $("layer"+page).innerHTML=result.split("###")[1];
		 $("fenye"+page).innerHTML=result.split("###")[2];
		// alert( $("layer"+page).innerHTML);
		  self.scroll(0,370);
        }});

  
  }
}

function chKuser(username)
{
   var url = "chkUser.aspx?username="+escape(username);
        var myAjax = new Ajax.Request(url,{method:'get',onSuccess:function(originalRequest){var result = originalRequest.responseText;
		 if(result.split("###")[1]=="1")
		 {
		   $("chkUser").innerHTML="*此用户已被注册,请更换用户名";
		 }
		// alert( $("layer"+page).innerHTML);
		  self.scroll(0,370);
        }});
}

function netLogin() //本站登录
 {     
         var username=document.getElementById("t_user").value;
         var password=document.getElementById("t_password").value;
         if(username==""||password==""){
           alert("用户名或密码不能为空");
           return;
         }
         var url = "userLogin.aspx?username="+escape(username)+"&password="+escape(password);
     	 var myAjax = new Ajax.Request(url,{method:'get',onSuccess:function(originalRequest){var result = originalRequest.responseText;
		  //alert(result.split("#")[0]);
		  if(result.split("###")[1]=="1"){
		 //sscLogin(escape(username),escape(password));
		// bbsLogin(escape(username),escape(password));
		 alert("登录成功！");
		    window.location.reload();
		}
		else{
		 alert("用户名或密码错误，请重新登录!");
		 history.go(-1);
		}

}});

 }
//document.writeln("<script language='javascript' event=fscommand() for='piao'>");
//document.writeln("document.getElementById('piao').style.display='none';");
//document.writeln("</script>");
 
 
//document.write("<div id=\"piao\" style=\"padding:0px; position:absolute;filter: alpha(opacity=100); z-index:9999\">");
//document.write("<EMBED src=\"flash/hui.swf\"  width=\"196\"  height=\"170\"  allowScriptAccess=\"sameDomain\" quality=high TYPE=\"application/x-shockwave-flash\" id=\"piao\" scale=\"exactfit\"  wmode=\"transparent\"></EMBED>");
//document.write("</div>");
function closepiao(){
       document.getElementById("piao").style.display="none";
}
//document.getElementById("piao").style.left=((document.documentElement.clientWidth-157)-document.getElementById("piao").offsetWidth/2)+"px";
//document.documentElement.onscroll=function(){
      // el=document.getElementById("piao");
       //el.style.top=(document.documentElement.scrollTop+80)+"px";
       //el.style.left=((document.documentElement.clientWidth-157)-el.offsetWidth/2)+"px";
//}


function closeDiv()
{
$("member_Nin").style.display="none";
$("member_footer_2").style.display="none";
$("member_footer_3").style.display="none";
}

function sscSearch()
{
  var keywords = $("keywords").value;
  if(keywords==""||keywords=="...")
  {
    alert("请输入关键词再进行搜索!");
   return ;
  }
  else
  {
   window.location="searchList.aspx?keywords="+escape(keywords);
  }
}