function  DrawImage1(ImgD){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0&&image.height>0){  
       flag=true;  
       if(image.width/image.height>=500/500){  
         if(image.width>500){
         ImgD.width=500;  
         ImgD.height=(image.height*500)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       else{  
         if(image.height>500){      
         ImgD.height=500;  
         ImgD.width=(image.width*500)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       }  
}  

function  DrawImage2(ImgD){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0&&image.height>0){  
       flag=true;  
       if(image.width/image.height>=200/200){  
         if(image.width>200){
         ImgD.width=200;  
         ImgD.height=(image.height*200)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt="";  
         }  
       else{  
         if(image.height>200){      
         ImgD.height=200;  
         ImgD.width=(image.width*200)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt="";  
         }  
       }  
}  

function  DrawImage3(ImgD){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0&&image.height>0){  
       flag=true;  
       if(image.width/image.height>=115/115){  
         if(image.width>115){
         ImgD.width=115;  
         ImgD.height=(image.height*115)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       else{  
         if(image.height>115){      
         ImgD.height=115;  
         ImgD.width=(image.width*115)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       }  
}  

function  DrawImage4(ImgD){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0&&image.height>0){  
       flag=true;  
       if(image.width/image.height>=100/100){  
         if(image.width>100){
         ImgD.width=100;  
         ImgD.height=(image.height*100)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       else{  
         if(image.height>100){      
         ImgD.height=100;  
         ImgD.width=(image.width*100)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       }  
} 

function  DrawImage5(ImgD){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0&&image.height>0){  
       flag=true;  
       if(image.width/image.height>=90/90){  
         if(image.width>90){
         ImgD.width=90;  
         ImgD.height=(image.height*90)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       else{  
         if(image.height>90){      
         ImgD.height=90;  
         ImgD.width=(image.width*90)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       }  
} 

function opencat(cat)
{
 	 	if(cat.style.display=="none"){
     	cat.style.display="";
    	   		} else {
     	cat.style.display="none"; 
     	  		}
}

// JavaScript Document
function SlideBox(container, frequency, direction) {
	if (typeof(container) == 'string') {
		container = document.getElementById(container);
	}
	this.container = container;
	this.frequency = frequency;
	this.direction = direction;
	this.films = [];
	var divs = this.container.getElementsByTagName('div');
	for (var i = 0; i < divs.length; i++) {
		if (divs[i].className == 'slideFilm') {
			divs[i].onmouseover = function(self){return function(){self._mouseover()};}(this);
			divs[i].onmouseout = function(self){return function(){self._mouseout()};}(this);
			this.films[this.films.length] = divs[i];
		}
	}
	this._playTimeoutId = null;
	this._slideTimeoutId = null;
	this._slidable = true;

	this._loop();
}

SlideBox.prototype = {
	_loop : function() {
		var sb = this;
		this._playTimeoutId = setTimeout(function(){sb._slide()}, this.frequency);
	},

	_slide : function() {
		var sb = this;
		var _slide = function() {
			if (!sb._slidable) return;
			var c = sb.container;
			if (sb.direction == 'top') {
				if (c.scrollTop < c.offsetHeight-2) {
					c.scrollTop += 2;
				} else {
					clearInterval(sb._slideTimeoutId);
					sb._loop();
					var ul = c.getElementsByTagName('ul')[0];
					ul.appendChild(c.getElementsByTagName('li')[0]);
					c.scrollTop = 0;
				}
			} else if (sb.direction == 'left') {
				if (c.scrollLeft < c.offsetWidth-2) {
					c.scrollLeft += 2;
				} else {
					clearInterval(sb._slideTimeoutId);
					sb._loop();
					var ul = c.getElementsByTagName('ul')[0];
					ul.appendChild(c.getElementsByTagName('li')[0]);
					c.scrollLeft = 0;
				}
			}
		}
		this._slideTimeoutId = setInterval(_slide, 10);
	},

	_mouseover : function() {
		this._slidable = false;
	},

	_mouseout : function() {
		this._slidable = true;
	}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&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<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


var url=location.search;
var Request = new Object();
if(url.indexOf("?")!=-1)
{
    var str = url.substr(1)  //去掉?号
    strs = str.split("&");
    for(var i=0;i<strs.length;i++)
    {
        Request[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
    }
}
var aduser=Request["aduser"]
var bannerAD=new Array();
var bannerADlink=new Array();
var bannerADtitle=new Array();
var adNum=0;

 var preloadedimages=new Array();
  for (i=1;i<bannerAD.length;i++){
     preloadedimages[i]=new Image();
     preloadedimages[i].src=bannerAD[i];
  }

function setTransition(){
  if (document.all){
     bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
     bannerADrotator.filters.revealTrans.apply();
  }
}

function playTransition(){
  if (document.all)
     bannerADrotator.filters.revealTrans.play()
}

function nextAd(){
  if(adNum<bannerAD.length-1)adNum++ ;
     else adNum=0;
  setTransition();
  document.images.bannerADrotator.src=bannerAD[adNum];
  document.images.bannerADrotator.alt=bannerADtitle[adNum];
  playTransition();
  theTimer=setTimeout("nextAd()", 5000);
}

function jump2url(){
  jumpUrl=bannerADlink[adNum];
  
  jumpTarget='_blank';
  if (jumpUrl != ''){
     if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
     else location.href=jumpUrl;
  }
}

function displayStatusMsg() { 
  status=bannerADlink[adNum];
  document.returnvalue = true;
}

function showdate() {
   var enable=0; today=new Date();  
   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("今天是："+date+day); 
}