
function write_login_div(){
    var content='      <div id="login-title"><img src="/image/top_2/login-title.gif"/></div>\
      <div id="login_main">\
        <ul id="login_tab">\
          <li class="login_tab1" onclick="setLogin(\'ggz\',\'wzz\')" id="ggz"></li>\
          <li class="login_tab2" onclick="setLogin(\'wzz\',\'ggz\')" id="wzz"></li>\
        </ul>\
        <div id="login_e">\
        <form action="https://wapclick.com/pt_new/login.cgi" method="post" id="login_form">\
          <input type="hidden"  name="confirm" value="1" />\
          <div class="username">\
            <label for="nameTbx">用户名:</label>\
            <span>\
            <input class="input1" type="text" id="nameTbx" name="login_name" style="width:70px"/>\
            </span></div>\
          <div class="pw">\
            <label for="pwTbx">密码:</label>\
            <span>\
            <input class="input1" type="password" id="pwTbx" name="login_pass" style="width:70px"/>\
            <input type="image" src="/image/top_2/go_btn.gif" class="go_btn" onclick="javascript:document.getElementById(\'login_form\').submit()"/>\
            </span></div>\
        </form>\
          <div class="log_btns"> <a href="/top2/as_rg.cgi" class="blue_btn regbtn" id="register_href">用户注册</a> <a href="/as/as_forgetpw.html" class="blue_btn" id="forgetpw_href">忘记密码</a> </div>\
        </div>\
      </div>';
    
    document.write(content);
    
}

function write_wallpaper_download(){

    var content='<div id="download-title"><a href="#">WAPclick桌面下载</a></div>\
    <ul class="download-1">\
        <li><span class="numb">1</span><span class="mag_name"><a href="/news/news-picdownload.html">圣诞主题桌面</a></span><a href="/news/news-picdownload.html" class="download-link">下载</a></li>\
        <li><span class="numb">2</span><span class="mag_name"><a href="/news/news-picdownload.html">经典主题桌面</a></span><a href="/news/news-picdownload.html" class="download-link">下载</a></li>\
        <li><span class="numb">3</span><span class="mag_name"><a href="/news/news-picdownload.html">其他主题桌面</a></span><a href="/news/news-picdownload.html" class="download-link">下载</a></li>\
    </ul>\
    <div id="download-more"><img src="/image/top_2/news/news-download-more.gif"/><a href="/news/news-picdownload.html"> 更多桌面下载</a></div>';
    
    document.write(content);
}
function setTab(m,n){
 var tli=document.getElementById("menu"+m).getElementsByTagName("li");
 var mli=document.getElementById("main"+m).getElementsByTagName("ul"); 
 
for(i=0;i<tli.length;i++){
  tli[i].className=i==n?"hover":"";
  mli[i].style.display=i==n?"block":"none";
 }
}

function setLogin(id,nid)
{
	var lid = document.getElementById(id);	
	var notid = document.getElementById(nid);	
	lid.style.backgroundPosition = "top"	;
	notid.style.backgroundPosition = "bottom"	;	
    
    if(id == 'ggz'){
        document.getElementById('login_form').action="https://wapclick.com/mc_new/top.cgi";
        document.getElementById('forgetpw_href').href="/mc/mc_forgetpw.html" ;
        document.getElementById('register_href').href="/top2/mc_rg.cgi" ;
        
    }else{
        document.getElementById('login_form').action="https://wapclick.com/pt_new/login.cgi";
        document.getElementById('forgetpw_href').href="/as/as_forgetpw.html" ;
        document.getElementById('register_href').href="/top2/as_rg.cgi" ;
    }
}

function shadow_in(id)
{	
	var cor = document.getElementById("cor_logo" + id);
	var cor_shadow = cor.getElementsByTagName("div");
	cor_shadow[0].style.display = "block";
	cor_shadow[0].className = "shadow2";
}
function shadow_fade(id)
{	
	var cor = document.getElementById("cor_logo" + id);
	var cor_shadow = cor.getElementsByTagName("div");
	cor_shadow[0].style.display = "none";
}

