Date.prototype.dateAdd = function(interval,number) 
{ 
var d = this; 
var k={'y':'FullYear', 'q':'Month', 'm':'Month', 'w':'Date', 'd':'Date', 'h':'Hours', 'n':'Minutes', 's':'Seconds', 'ms':'MilliSeconds'}; 
var n={'q':3, 'w':7}; 
eval('d.set'+k[interval]+'(d.get'+k[interval]+'()+'+((n[interval]||1)*number)+')'); 
return d; 
} 
function ShowImg()   
 {   
   x=event.x;   
   y=event.y;   
   document.getElementById('d1').style.display='';   
   document.getElementById('d1').style.top=y+10;   
   document.getElementById('d1').style.left=x+10;     
 }   
 function CloseImg()   
{   
  document.getElementById('d1').style.display='none';   
 } 
function show(o,imgsrc){ 
   var m=document.getElementById('fairs').getElementsByTagName('A'); 
   var mm=document.getElementById('showlogo');
   for(i=0;i<m.length;i++){
        if(o==m[i]){
		   if (typeof(m[i])=='object'&&typeof(m[i])!='undefined')
		   {
		     var nowa=o ;
		     break   ;
		  }
		}
   }
   mm.style.left=getL(nowa)+"px";  
   mm.style.top=(getT(nowa)+20)+"px";
   mm.innerHTML="<img src='pic/"+imgsrc+"' />";
   mm.style.visibility='';  
 }  
 //隐藏  
 function hide(obj){  
   document.getElementById(obj).style.visibility='hidden';  
 }     
 //取得左边的位移  
 function getL(obj){  
   var l=obj.offsetLeft;  
   while(obj=obj.offsetParent){  
    l+=obj.offsetLeft; 
  }  
   return l;  
 }  
 //取得顶部的位移  
 function getT(obj){  
   var t=obj.offsetTop;  
   while(obj=obj.offsetParent){  
     t+=obj.offsetTop;  
   }  
   return t;
 } 
 // JavaScript Document
   hoje = new Date()   ;
   dia = hoje.getDate()  ;
   dias = hoje.getDay() ;
   mes = hoje.getMonth()   ;
   ano = hoje.getFullYear()   ;
   hour = hoje.getHours() ;
   minute = hoje.getMinutes() ;
        if (dia < 10)
                dia = "0" + dia
        if (ano < 2000)
                ano = "19" + ano
function CriaArray (n) {
      this.length = n }
            NomeDia = new CriaArray(7)
            NomeDia[0] = "周日"
			NomeDia[1] = "周一"
			NomeDia[2] = "周二"
			NomeDia[3] = "周三"
			NomeDia[4] = "周四"
			NomeDia[5] = "周五"
			NomeDia[6] = "周六"
         NomeMes = new CriaArray(12)
			NomeMes[0] = "1月"
			NomeMes[1] = "2月"
			NomeMes[2] = "3月"
			NomeMes[3] = "4月"
			NomeMes[4] = "5月"
			NomeMes[5] = "6月"
			NomeMes[6] = "7月"
			NomeMes[7] = "8月"
			NomeMes[8] = "9月"
			NomeMes[9] = "10月"
			NomeMes[10] = "11月"
			NomeMes[11] = "12月"
function escreveData()
{
 if (ano == '19100') ano = '2000';
 document.write (" " + ano　+ "年"+ NomeMes[mes] + dia + "日" + hour +"点"+ "&nbsp;" + NomeDia[dias]);
}
 hoje.dateAdd("h",-11);
 Bdia =hoje.getDate();
 Bdias = hoje.getDay() ;
 Bmes = hoje.getMonth();
 Bano = hoje.getFullYear();
 Bhour = hoje.getHours();
 Bminute = hoje.getMinutes() ;
 if (Bdia < 10)
      Bdia = "0" + Bdia
 if (Bano < 2000)
      Bano = "19" + Bano
function BraData()
{
  if (Bano == '19100') Bano = '2000';
  document.write (" " + Bano　+ "年"+ NomeMes[Bmes] + Bdia + "日" +Bhour+"点"+  "&nbsp;" + NomeDia[Bdias]);
}
