var whichIt=null; self.onError=null; var currentY=lastScrollY=0; var W3C=(document.getElementById)?true:false; var agt=navigator.userAgent.toLowerCase(); var IE=((agt.indexOf('msie')!=-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('omniweb')==-1)); var IE5=(W3C&&IE)?true:false; var NS6=(W3C&&(navigator.appName=='Netscape'))?true:false; var FF2=(W3C&&(agt.indexOf('mozilla')!=-1))?true:false; var OP8=(W3C&&(agt.indexOf('opera')!=-1))?true:false; var today=new Date(); var d=new initArray('星期日','星期一','星期二','星期三','星期四','星期五','星期六'); var showExtMenu=0; function $(o){ var o=document.getElementById(o)?document.getElementById(o):o; return o; }; document.getElementsByClassName=function(className,oBox){ this.d=oBox||document; var children=this.d.getElementsByTagName('*')||document.all; var elements=new Array(); for(var i=0;i'); return; }; var cnCustomStatus='customstatus'; var cnCustomList='customlist'; function jsSetCookie(sName,sValue){ if(CookieEnable()){ var expdate=new Date(); expdate.setTime(expdate.getTime()+(24*60*60*1000*30)); SetCookie(sName,sValue,expdate,'/',null,false); } } function jsCloseCustomStatus(){ jsSetCookie(cnCustomStatus,''); return; } function jsOpenCustomStatus(){ jsSetCookie(cnCustomStatus,'1'); return; } function jsSetCustomList(){ var psValue=''; var psSplit=','; var pset=document.getElementsByName(cnCustomList); for(var i=0;i=0){ pset[i].checked=true; } else{ pset[i].checked=false; } } return; } function jsp_fontzoom(ps_name,ps_size){ var otext=$(ps_name); if(typeof otext!='string'){ otext.style.fontSize=ps_size; } }; function jsp_pagechange(po_main){ var itab=0; var btab=false; var po_objs=document.getElementsByName(po_main.id); for(var i=0;i0&&parent.frames.length){ d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);} if(!(x=d[n])&&d.all){x=d.all[n];}for(i=0;!x&&i(oy+oh))||(oy>(objTop+obj.offsetHeight))){ obj.style.visibility=''; } else{ obj.style.visibility='hidden'; } } }; function togglemenu(ps_name,pi_pos){ var obj=$('CS_extMenu'); if(obj.style.visibility=='visible'){ obj.style.visibility='hidden'; showExtMenu=0; } else{ obj.style.visibility='visible'; showExtMenu=1; var itab=pi_pos; var itemp=0; var pset=document.getElementsByName(ps_name); for(var i=0;i12){dn='PM';hours=hours-12;} if(hours==0){hours=12;} if(hours<=9){hours='0'+hours;} if(minutes<=9){minutes='0'+minutes;} if(seconds<=9){seconds='0'+seconds;} (myclock=hours+':'+minutes+':'+seconds); $('liveclock').innerHTML=myclock; window.setTimeout('showtime()',1200000); }; function showdate(){ document.write(today.getFullYear(),'年',today.getMonth()+1,'月',today.getDate(),'日 ',d[today.getDay()+1]); } function showdateToId(ps_id){ var odt=$(ps_id); if(odt){ odt.innerHTML=today.getFullYear()+'年'+(today.getMonth()+1)+'月'+today.getDate()+'日 '+(d[today.getDay()+1]); } } function AddFav(sUrl,sTitle){ if(!sUrl){sUrl='http:/'+'/www.foshan.gov.cn';} if(!sTitle){sTitle='佛山市政府网';} if((window.sidebar)&&('object'==typeof(window.sidebar))&&('function'==typeof(window.sidebar.addPanel))){ window.sidebar.addPanel(sTitle,sUrl,''); } else{ if(window.opera&&window.print){ var elem=document.createElement('a'); elem.setAttribute('href',sUrl); elem.setAttribute('title',sTitle); elem.setAttribute('rel','sidebar'); elem.click(); return true; } else{ if(document.all){ window.external.AddFavorite(sUrl,sTitle); } } } }; function SetHome(sUrl){ if(!sUrl){sUrl='http:/'+'/www.foshan.gov.cn';} if(IE){ homepage.style.behavior='url(#default#homepage)'; homepage.setHomePage(sUrl); } else{ if(NS6){ netscape.security.PrivilegeManager.enablePrivilege('UniversalPreferencesWrite'); navigator.preference('browser.startup.homepage',sUrl); } } }; function CookieEnable(){ var result=false; if(navigator.cookiesEnabled){ return true; } document.cookie='testcookie=yes;'; var cookieSet=document.cookie; if(cookieSet.indexOf('testcookie=yes')>-1){ result=true; } document.cookie=''; return result; }; function setHit(allSite){ var arrSites=''; for(var i=0;i2048)?sOldSite=sOldSite.substring(0,2048):''); if(sOldSite.indexOf(sNewSite)!=-1){ sOldSite=sOldSite.replace(sNewSite,''); } sNewSite+=sOldSite; var expdate=new Date(); expdate.setTime(expdate.getTime()+(24*60*60*1000*30)); SetCookie('MyHits',sNewSite,expdate,'/',null,false); GetList('MyHits'); }; function SavMyFav(title){ var MyFavStatus=GetCookie('MyFavsStatus'); if(MyFavStatus=='close'){return;} var sNewSite=title+'||'+location.href+'!!'; var sOldSite=GetCookie('MyFavs'); sOldSite.length>2048?sOldSite=sOldSite.substring(0,2048):''; if(sOldSite.indexOf(sNewSite)!=-1){ sOldSite=sOldSite.replace(sNewSite,''); } sNewSite+=sOldSite; var expdate=new Date(); expdate.setTime(expdate.getTime()+(24*60*60*1000*30)); SetCookie('MyFavs',sNewSite,expdate,'/',null,false); GetList('MyFavs'); }; function GetList(obj,n){ this.maxlength=n||5; var sOldSite=GetCookie(obj); sOldSite=sOldSite.split('!!'); var nMaxNum=sOldSite.length>this.maxlength?this.maxlength+1:sOldSite.length; var sHtml='\n
[清除记录] "; var ListStatus=GetCookie(obj+'Status'); if(ListStatus=='open'||ListStatus==''){ sHtml+="[停用]
"; } else{ sHtml+="[启用]"; } $(obj+'List').innerHTML=sHtml; }; function clearList(obj){ var expdate=new Date(); expdate.setTime(expdate.getTime()+(24*60*60*1000*30)); SetCookie(obj,'',expdate,'/',null,false); GetList(obj); }; function chgListStatus(obj,stat){ var expdate=new Date(); expdate.setTime(expdate.getTime()+(24*60*60*1000*30)); SetCookie(obj+'Status',stat,expdate,'/',null,false); GetList(obj); }; function GetCookie(Name){ var search=Name+'='; var returnvalue=''; if(document.cookie.length>0){ offset=document.cookie.lastIndexOf(search); if(offset!=-1){ offset+=search.length; end=document.cookie.indexOf(';',offset); if(end==-1){ end=document.cookie.length; } returnvalue=unescape(document.cookie.substring(offset,end)); } } return returnvalue; }; function SetCookie(name,value){ var argv=SetCookie.arguments; var argc=SetCookie.arguments.length; var expires=(2=0){psUrl=psUrl.substr(psUrl.indexOf('?',0)+1);} if(psUrl.indexOf('#',0)>=0){psUrl=psUrl.substr(0,psUrl.indexOf('#',0));} var psValue=getDictValue(psUrl,psKeyName,'&','='); if(psValue==null||psValue==''){psValue='';} return psValue; }; function getDictValue(psStr,psField,psGsplit,psKVsplit){ var paFields=psStr.split(psGsplit); psStr=''; for(var i=0;i=0){ psStr=paFields[i].substr((psField+psKVsplit).length); break; } } return psStr; }; function jsp_pageresume(ps_mainid,pi_page){ var po_objs=document.getElementsByName(ps_mainid); for(var i=0;i0&&image.height>0){ flag=true; if(image.width>iwidth){ ImgD.width=iwidth; ImgD.height=(image.height*iwidth)/image.width; } else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+'×'+image.height; } }; function jspOpenCHS(){ window.open('http:/'+'/www.foshan.gov.cn','_top'); return; } function jspOpenCHT(){ window.open('http:/'+'/202.105.12.252:82/gate/big5/www.foshan.gov.cn/fsgovout/Default.aspx','_top'); return; } function jspOpenENG(){ window.open('http:/'+'/www.foshan.gov.cn/english/','_top'); return; }