function getClock()
{
 var XmlHttp = new ActiveXObject("Msxml2.XMLHTTP")
 XmlHttp.Open( "POST","/include/clock.php", false );
 XmlHttp.Send();
   if (XmlHttp.status == 200) document.getElementById('testclock').innerHTML = XmlHttp.responseText;
  window.setTimeout("getClock()","1000")
}

function GetDate()
{
	var date_str="";
	today=new Date();
	function initArray(){
	this.length=initArray.arguments.length
	for(var i=0;i<this.length;i++)
	this[i+1]=initArray.arguments[i]  }
	var d=new initArray(
	" 星期日",
	" 星期一",
	" 星期二",
	" 星期三",
	" 星期四",
	" 星期五",
	" 星期六");
	document.write(
	today.getYear(),"年",
	today.getMonth()+1,"月",
	today.getDate(),"日",
	d[today.getDay()+1]
	); 
}

function fontZoom(size)
{
<!--
 document.getElementById('temp_content').style.fontSize=size+'px'
//-->
}

function addhits(ID)
{
	var XmlHttp = new ActiveXObject("Msxml2.XMLHTTP")
	 XmlHttp.Open( "POST","/include/addhits.php?ID=" + ID, false );
	 XmlHttp.Send();
	 if (XmlHttp.status == 200)
	 {
	 	document.getElementById('hits').innerHTML=XmlHttp.responseText;
	 }
}

function rebuild_all()
{
	var XmlHttp = new ActiveXObject("Msxml2.XMLHTTP")
	 XmlHttp.Open( "POST","rebuild_all.php", false );
	 XmlHttp.Send();
	 if (XmlHttp.status == 200)
	 {
	 	document.getElementById('finished').innerHTML=XmlHttp.responseText;
	 }
}

function SelectDate(DivID)
{
     var fullPath="share/PopDate.Htm";
     var strDate;	//Chinese date formate
     var intDate;	//Integer date formate
     var objEffectDate=eval("thisForm." + DivID);
     intDate=showModalDialog(fullPath,window,"dialogWidth=360px;dialogHeight=260px;center=yes;border=this;help=no");
     if (intDate!=null)
     {
         objEffectDate.value=intDate.substr(0,4)+"-"+intDate.substr(5,2)+"-"+intDate.substr(8,2);
         if (objEffectDate.value!="undefined")
         {
             strDate=intDate.substr(0,4)+"-"+intDate.substr(5,2)+"-"+intDate.substr(8,2);
             objEffectDate.value=strDate;
         }
         else
         {
             objEffectDate.value="";
         }
     }
     event.returnValue =false;
}

function myconfirm(str,url){
if(confirm(str))
window.location.href(url)
}

function mysubmit(str){
if(confirm(str))
document.all.thisForm.submit()
}


function adimg(htmlpic,htmllink,htmltext,imgtext,width,height){
		
		

var focus_width=width
var focus_height=height
var text_height=20
var swf_height = focus_height+text_height

var pics=htmlpic
var links=htmllink
var texts=htmltext
	
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
	document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">');
	document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
	document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
	document.write('<embed src="images/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');

	}
