﻿
/*子菜单效果*/
function menu_list_block(num){document.getElementById(num).style.display=''}
function menu_list_none(num){document.getElementById(num).style.display='none'}

String.prototype.trim = function() 
{ 
	return this.replace(/(^\s*)|(\s*$)/g, ""); 
} 
function onSearch()
{
    var obj = document.getElementById("txtJsSearch");
    if(obj.value == "")
    {
        alert("请输入搜索关键字");
        obj.focus();
        return false;
    }
   var patrn = /[~`!@#$%^&*()\-+={}\[\]:;\'<>,./?\\|\"\"]+/g;
   var key = obj.value;
   if(key.match(patrn))
   {
        alert("关键字含有非法字符");
        obj.focus();
        return false;
   }
   var url = "result.aspx?keyword=" + escape(key);
		
   window.open(url,"_blank");
   //window.location.href = url; 
    
}

function GetDate(obj)
{   
    
       var enable=0; today=new Date();                                                    
       var day; var date;                                                  
       var time_start = new Date();
       var clock_start = time_start.getTime();                           
       if(today.getDay()==0)  day="星期日"
       if(today.getDay()==1)  day="星期一"
       if(today.getDay()==2)  day="星期二"
       if(today.getDay()==3)  day="星期三"
       if(today.getDay()==4)  day="星期四"                                                       
       if(today.getDay()==5)  day="星期五"                                                
       if(today.getDay()==6)  day="星期六"                                                       
        yr = today.getYear();                                                                             
        if (yr < 1000)
        yr+=1900;  
        date=yr+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日";
        //document.write("<span  style='color:#000000;padding-right:10px;'>现在是："+date);
        //document.write("  " +day+"</span>");  
        document.getElementById(obj).innerHTML =  "现在是："+ date + " " + day ;                                                    

}

//flash

function WriteHeadFlash(divId,Path,Width,Height,Transparent){
     var Temp,T=""
     Temp='<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="FlashH" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+Width+'" height="'+Height+'">'
     Temp+='<param name="movie" value="'+Path+'"/>'
     Temp+='<param name="quality" value="High"/>'
     Temp+='<param name="scale" value="ExactFit"/>'
     if (Transparent) 
     {
     	Temp+=' <param name="wmode" value="transparent"/>';
     	T='wmode="transparent"'
     }
     Temp+='<embed src="'+Path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="FlashH" width="'+Width+'" height="'+Height+'" quality="High"'+T+' scale="ExactFit"/>'
     Temp+='</object>'
     document.getElementById(divId).innerHTML=Temp
}

function LoadFlash(url,wmode,width,Height)
{ 
	document.write('<embed src="' + url + '" wmode=' + wmode +' quality="high" pluginspage=http://www.macromedia.com/go/getflashplayer type="application/x-shockwave-flash" width="' + width + '" height="' + Height + '"></embed>'); 
}

function WriteFlash(divId,Id,Path,Width,Height,Transparent){
     var Temp,T=""
     Temp='<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="FlashH" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+Width+'" height="'+Height+'" id="' + Id + '">'
     Temp+='<param name="movie" value="'+Path+'"/>'
     Temp+='<param name="quality" value="High"/>'
     Temp+='<param name="scale" value="ExactFit"/>'
     if (Transparent) 
     {
     	Temp+=' <param name="wmode" value="transparent"/>';
     	T='wmode="transparent"'
     }
     Temp+='<embed src="'+Path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="'+ Id +'" width="'+Width+'" height="'+Height+'" quality="High"'+T+' scale="ExactFit" swLiveConnect="true"/>'
     Temp+='</object>'
     document.getElementById(divId).innerHTML=Temp
}



