function setautotime(){   
var time                   
calendar = new Date();  
today = new Date();
day = calendar.getDay();                       
month = calendar.getMonth()+1;                       
date = calendar.getDate();                       
year = calendar.getYear();                       
if (year< 2000) year = 1900 + year;                                            
var dayname = new Array ("星期日","星期一","星期二","星期三","星期四","星期五","星期六" );
time=dayname[day]+" "+year+"."+month+"."+date
return(time)
}

function Lg_st(){
  if(document.getElementById("username").value == ""){
     alert("请输入用户名！");
     return false ;}
  else if(document.getElementById("password").value == ""){
     alert("请输入密码！");
     return false ;}
  else 
     return true;
}

function Sh_st(){
  if(document.getElementById("Srhtx").value == ""){
     alert("请输入关键字！");
     return false ;}
  else 
     return true;
}

function correctPNG()
{
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])
    if ((version >= 5.5) && (document.body.filters)) 
    {
       for(var j=0; j<document.images.length; j++)
       {
          var img = document.images[j]
          var imgName = img.src.toUpperCase()
          if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
          {
             var imgID = (img.id) ? "id='" + img.id + "' " : ""
             var imgClass = (img.className) ? "class='" + img.className + "' " : ""
             var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
             var imgStyle = "display:inline-block;" + img.style.cssText 
             if (img.align == "left") imgStyle = "float:left;" + imgStyle
             if (img.align == "right") imgStyle = "float:right;" + imgStyle
             if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
             var strNewHTML = "<span " + imgID + imgClass + imgTitle
             + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
             + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
             + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
             img.outerHTML = strNewHTML
             j = j-1
          }
       }
    }    
}
window.attachEvent("onload",correctPNG);

function MM_jumpMenu(selObj,restore){
  if(selObj.options[selObj.selectedIndex].value!="国家部委网站")
     {window.open(selObj.options[selObj.selectedIndex].value);
	 selObj.options[0].selected = "selected"}
  if (restore) selObj.selectedIndex=0;
}

function startmarquee(lh,speed,delay){
var p=false;
var t;
var o=document.getElementById("marqueebox");
o.innerHTML+=o.innerHTML;
o.style.marginTop=0;
o.onmouseover=function(){p=true;}
o.onmouseout=function(){p=false;}
function start(){
t=setInterval(scrolling,speed);
if(!p) o.style.marginTop=parseInt(o.style.marginTop)-1+"px";
}
function scrolling(){
if(parseInt(o.style.marginTop)%lh!=0){
o.style.marginTop=parseInt(o.style.marginTop)-1+"px";
if(Math.abs(parseInt(o.style.marginTop))>=o.scrollHeight/2) o.style.marginTop=0;
}else{
clearInterval(t);
setTimeout(start,delay);
}
}
setTimeout(start,delay);
}
