//改变图片大小
function resizepic(thispic) 
{ 
if(thispic.width>640) thispic.width=640;thispic.height=480; 
} 
/*双击鼠标滚动屏幕*/
var currentpos,timer; 

function initialize() 
{ 
timer=setInterval("scrollwindow()",2);
} 
function sc(){
clearInterval(timer); 
}
function scrollwindow() 
{ 
currentpos=document.body.scrollTop; 
window.scroll(0,++currentpos); 
if (currentpos != document.body.scrollTop) 
sc();
} 
document.onmousedown=sc
document.ondblclick=initialize

/*字体大小*/
function MM_reloadPage(init) { //reloads the window if Nav4 resized  
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {  
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}  
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();  
}  
MM_reloadPage(true);  
 
var fsize=12;  
var dx;  
var n;  
 
function changesize(c) {  
if (c==1) {  
if (fsize>0) {fsize--;}  
else {}  
}  
else {fsize++;}  
fonts.innerHTML = fsize + 'px';  
content.style.fontSize=fsize;  
}  
 
function dragslide() {  
if (n==1) {  
var x=document.body.scrollLeft+event.clientX;  
if ((x-dx)<102&&(x-dx)>0)  
{  
handle.style.left=x-dx;  
fsize=x-dx+11;  
}  
else if ((x-dx)>101) {  
handle.style.left=101;  
fsize=112;  
}  
else if ((x-dx)<1) {  
handle.style.left=1;  
fsize=12;  
}  
fonts.innerHTML = fsize + 'px';  
content.style.fontSize=fsize;  
}  
}  
 
function dragstart() {  
n=1;  
dx=document.body.scrollLeft+event.clientX-handle.offsetLeft;  
handle.setCapture();  
}  
 
function dragend() {  
n=0;  
handle.releaseCapture();  
}  
/*文字滚动脚本*/
var version = "other"
browserName = navigator.appName;   
browserVer = parseInt(navigator.appVersion);

if (browserName == "Netscape" && browserVer >= 3) version = "n3";
else if (browserName == "Netscape" && browserVer < 3) version = "n2";
else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "e4";
else if (browserName == "Microsoft Internet Explorer" && browserVer < 4) version = "e3";
function marquee5()
{
	if (version == "e4")
	{
		document.write("<marquee style='BOTTOM: 0px; FONT-WEIGHT: 100px; HEIGHT:120px;  TEXT-ALIGN: left; TOP: 0px' id='news' scrollamount='1' scrolldelay='1' behavior='loop' direction='up' border='0' onmouseover='this.stop()' onmouseout='this.start()'>")
	}
}

function marquee6()
{
	if (version == "e4")
	{
		document.write("</marquee>")
	}
}
/*渐隐图片效果*/

function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=20
}



function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}
/*时间日期显示*/
  function get_time()
  {
    var date=new Date();
    var year="",month="",day="",week="",hour="",minute="",second="";
    year=date.getYear();
    month=add_zero(date.getMonth()+1);
    day=add_zero(date.getDate());
    week=date.getDay();
    switch (date.getDay()) {
    case 0:val="星期天";break
    case 1:val="星期一";break
    case 2:val="星期二";break
    case 3:val="星期三";break
    case 4:val="星期四";break
    case 5:val="星期五";break
    case 6:val="星期六";break
      }
    hour=add_zero(date.getHours());
    minute=add_zero(date.getMinutes());
    second=add_zero(date.getSeconds());
    timetable.innerText="现在是："+year+"年"+month+"月"+day+"日 "+hour+":"+minute+":"+second+"PM";
  }

  function add_zero(temp)
  {
    if(temp<10) return "0"+temp;
    else return temp;
  }
setInterval("get_time()",1000);