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