// JavaScript Document
function $(x){return document.getElementById(x)}
function $$(x){return document.getElementsByName(x)}
function pic_width_height(id,w,h){
	 var t_w=$(id).width
	 var t_h=$(id).height
   if(t_w>w){
	   $(id).width=t_w*(w/t_w)
	   $(id).height=t_h*(w/t_w)
	}
   else{
      if(t_h>h){
		  $(id).width=t_w*(h/t_h)
	   $(id).height=t_h*(h/t_h)
    };
   }
  }
function beforeSubmit(form){
if(form.keyword.value==''){
alert('内容不能为空！');
form.keyword.focus();
return false;
}
}
function show(i)
{
	$("snav"+i).style.display="block";
	if(i>1)
	{
		if(i==6)
		{
	       $("bnav"+i).className="llink2"
		}
		else
		{
			$("bnav"+i).className="slink2"
		}
       $("bnav"+i).childNodes[0].style.color="#fff"
	}
}
function hide(i)
{
	$("snav"+i).style.display="none";
	if(i>1)
	{
	    if(i==6)
		{
	       $("bnav"+i).className="llink"
		}
		else
		{
			$("bnav"+i).className="slink"
		}
	$("bnav"+i).childNodes[0].style.color="#3C3C3C"
	}
}
function hide_sub(i)
{
  $("sub"+i).style.display="none"
}
function show_sub(i)
{
  $("sub"+i).style.display="block"
}
function move()
{
var div2=document.getElementById("right_bt");
if(div2)
{
div2.style.marginTop=document.documentElement.scrollTop+500+"px"
}
}
setInterval(move,5000)
function writeDateInfo()
{
        var day="";
        var month="";
        var ampm="";
        var ampmhour="";
        var myweekday="";
        var year="";
        mydate=new Date();
        myweekday=mydate.getDay();
        mymonth=mydate.getMonth()+1;
        myday= mydate.getDate();
        myyear= mydate.getYear();
        year=(myyear > 200) ? myyear : 1900 + myyear;
        if(myweekday == 0)
        weekday=" 星期日";
        else if(myweekday == 1)
        weekday=" 星期一";
        else if(myweekday == 2)
        weekday=" 星期二";
        else if(myweekday == 3)
        weekday=" 星期三";
        else if(myweekday == 4)
        weekday=" 星期四";
        else if(myweekday == 5)
        weekday=" 星期五";
        else if(myweekday == 6)
        weekday=" 星期六";
        document.write(year+"年"+mymonth+"月"+myday+"日"+weekday);
}

