///////////////////////2006-08-02黄仰旦
//时间开始
function tick(id) {
var hours, minutes, seconds, xfile;
var intHours, intMinutes, intSeconds;
var today, theday;
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(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
theday = today.getYear()+"年" + [today.getMonth()+1]+"月" +today.getDate() +" "+ d[today.getDay()+1];
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
if (intHours == 0) {
hours = "12:";
xfile = "午夜";
} else if (intHours < 12) {
hours = intHours+":";
xfile = "上午";
} else if (intHours == 12) {
hours = "12:";
xfile = "正午";
} else {
intHours = intHours - 12
hours = intHours + ":";
xfile = "下午";
}
if (intMinutes < 10) {
minutes = "0"+intMinutes+":";
} else {
minutes = intMinutes+":";
}
if (intSeconds < 10) {
seconds = "0"+intSeconds+" ";
} else {
seconds = intSeconds+" ";
}
//theday+" "+xfile+" "+hours+minutes+seconds;
timeString = theday;
var obj = document.getElementById(id);
					if(obj!=null){
					  obj.innerHTML = timeString;	
}	
//window.setTimeout("tick();", 100);
}

//结束
function initArray()
 {
  for(i=0;i<initArray.arguments.length;i++)
  this[i]=initArray.arguments[i];
 } 
 var isnMonths=new initArray("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月");
 var isnDays=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日");
 today=new Date();
 hrs=today.getHours();
 min=today.getMinutes();
 sec=today.getSeconds();
 clckh=""+((hrs>12)?hrs-12:hrs);
 clckm=((min<10)?"0":"")+min;clcks=((sec<10)?"0":"")+sec;
 clck=(hrs>=12)?"下午":"上午";
 var stnr="";
 var ns="0123456789";
 var a="";
function getFullYear(d)
{
  yr=d.getYear();if(yr<1000)
  yr+=1900;return yr;}  
function www_helpor_net()
{
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()

if(minutes<=9)
minutes="0"+minutes
if(seconds<=9)
seconds="0"+seconds
myclock=""+hours+":"+minutes+":"+seconds+""
if(document.layers){document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}else if(document.all)
liveclock.innerHTML=myclock
setTimeout("www_helpor_net()",1000)
}
////////////////菜单
var alreadyOpenTdId = null;
function closeMenu() {

if (alreadyOpenTdId == null) return;
 alreadyOpenTable = document.all(alreadyOpenTdId);
 alreadyOpenTable.className = "menu";
}
function menuClick(tableSrc,url) {
window.open(url,'mainFrame','');
if (tableSrc.uniqueID != alreadyOpenTdId) closeMenu();
if (tableSrc.className == "menu") {

        tableSrc.className = "menu2"; 
		alreadyOpenTdId = tableSrc.uniqueID;
    } 
}
function fontZoom(size)
   {
    document.getElementById('fontzoom').style.fontSize=size+'px'
   }
   function MM_jumpMenu(targ,selObj,restore){ //v3.0
if(selObj.options[selObj.selectedIndex].value!=0){
  window.open(selObj.options[selObj.selectedIndex].value,'','');
  if (restore) selObj.selectedIndex=0;
  }
}
//自动缩放图片
var w=700;
function onloadpic(){
var imgsrc=document.images;
var imglength=imgsrc.length;
for(jj=0;jj<imglength;jj++){
if(imgsrc[jj].width>w){
imgsrc[jj].width=w;}}
}

function changeShow(page)
	{
		if(page==1)
			document.location.href="/index.html";
		else
			document.location.href="/index"+page+".html";
	}
//导航条xml的开始
	loadXML    = function(xmlFile)
{
    var xmlDoc;
   
    if(window.ActiveXObject)
    {
        xmlDoc    = new ActiveXObject('Microsoft.XMLDOM');
        xmlDoc.async    = false;
        xmlDoc.load(xmlFile);
    }
    else if (document.implementation&&document.implementation.createDocument)
    {
        xmlDoc    = document.implementation.createDocument('', '', null);
        xmlDoc.load(xmlFile);
    }
    else
    {
        return null;
    }
    
    return xmlDoc;
}

checkXMLDocObj    = function(xmlFile)
{
    var xmlDoc    = loadXML(xmlFile);
    if(xmlDoc==null)
    {
        alert('您的浏览器不支持xml文件读取,于是本页面禁止您的操作,推荐使用IE5.0以上可以解决此问题!');
        //window.location.href='/Index.aspx';
    }
    
    return xmlDoc;
}
initializeSelect    = function(oid, xPath)
{
     var source;
	if (window.ActiveXObject) { //ie
	try {
	            source = new ActiveXObject("Msxml2.XMLDOM");
				source.async = false;
	            source.load(oid);   //裝入XML文檔
	        } catch (e) {
	            try {
	                source = new ActiveXObject("Microsoft.XMLDOM");
				    source.async = false;
	                source.load(oid);   //裝入XML文檔
	            } catch (e) {}
	        }
		
	}
	else {// Mozilla, Safari,...
	        var source=document.implementation.createDocument("","",null);
		source.async = false;
		source.load(oid);
	    }
    var n;
    var l;
    var onetible="<table width=\"100%\" height=\"20\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" id=\"menubar\"><tr>";
      n    = source.getElementsByTagName(xPath)[0].childNodes;
      l    = n.length;
      for(var i=0; i<l; i++)
      {    
        //alert(n[i].hasChildNodes()) //是否有子节点
        onetible+="<td align=\"center\">";
        if(i==0)
            onetible+="<a href=\""+n[i].getAttribute('oID')+"\" name=two-tabs|he|all-categories>"+n[i].getAttribute('oName')+"</a>";
        else
        	onetible+="<a href=\""+n[i].getAttribute('oID')+"\" >"+n[i].getAttribute('oName')+"</a>";
        onetible+="</td>";
      }
      onetible+="</tr></table>";
      document.getElementById("div1").innerHTML=onetible;
      
}
//导航条结束
//导航条
function reader(xmlurl){
var source=new ActiveXObject("Msxml2.DOMDocument");
source.async=false;
source.load(xmlurl);
var ItemN = source.getElementsByTagName("one");
var j = ItemN.length;//获取item节点个数
var onetible="<table width=\"100%\" height=\"20\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" id=\"menubar\">";
for(i=0;i<j;i++)   //一级栏目
{
if(i==0)
  onetible=onetible+"<tr align=left>";
//if(i==11)  换行
  //onetible=onetible+"</tr><tr align=left>";
onetitle=ItemN[i].selectSingleNode("title").text;
oneurl=ItemN[i].selectSingleNode("url").text;
onetible=onetible+"<td  align=\"center\"><a href=\""+oneurl+"\">"+onetitle+"</a></td>";
if(i<j-1) //&&i!=10换行
	onetible=onetible+"<td  align=\"center\">|</td>";
	nodes = ItemN[i].childNodes[2];   //二级栏目开始
	if(nodes!=null){
	ItemNT=nodes.getElementsByTagName("two")    
		for(k=0;k<ItemNT.length;k++){
		//alert(ItemNT[k].selectSingleNode("title").text);
		}
	}
}
onetible=onetible+"</tr></table>";
document.all.div1.innerHTML=onetible;
} 

//文字友情链接
function linkword(id,url){
if(url!=null && url.length>0) {
		    var xmlObj = getReq();
			xmlObj.open("GET",url,true);
			xmlObj.onreadystatechange = function(){
		    linkwordvalues(id,xmlObj,url);
		  		}; 
		xmlObj.send(""); /////修改
        }

}

function linkwordvalues(id,xmlObj,url) {
	    if (xmlObj.readyState == 4){
		    if (xmlObj.status == 200){
					var datas =xmlObj.responseText;
					var linkjs=datas.replace(/^\s*|\s*$/g,"");
					var linkones=linkjs.split(";");
					var linkwrite="<select name='"+id+"'  class='width' onchange=jumpMenu(parent,this,0)>";
					for(var i=0;i<linkones.length-1;i++){
					     var linkone=linkones[i].split("|")
						linkwrite=linkwrite+"<option value='"+linkone[1]+"'>"+linkone[0]+"</option>";
					}
					linkwrite=linkwrite+"</select>";
					var obj = document.getElementById(id);
					if(obj!=null){
					  obj.innerHTML = linkwrite;	
				     }		
			}
		}
	}
	//图片友情友情链接
function linkpic(id,url){
if(url!=null && url.length>0) {
		    var xmlObj = getReq();
			xmlObj.open("GET",url,true);
			xmlObj.onreadystatechange = function(){
		    linkpicvalues(id,xmlObj,url);
		  		}; 
		xmlObj.send(""); /////修改
        }

}

function linkpicvalues(id,xmlObj,url) {
	    if (xmlObj.readyState == 4){
		    if (xmlObj.status == 200){
					var datas =xmlObj.responseText;
					var linkjs=datas.replace(/^\s*|\s*$/g,"");
					var linkones=linkjs.split(";");
					var linkwrite="<div>";
					for(var i=0;i<linkones.length-1;i++){
					     var linkone=linkones[i].split("|")
						linkwrite=linkwrite+"<a href='"+linkone[1]+"' target='_blank'> <img src='"+linkone[2]+"' width='138' height='50' border='0' /></a>";
					}
					linkwrite=linkwrite+"</div>";
					var obj = document.getElementById(id);
					if(obj!=null){
					  obj.innerHTML = linkwrite;	
				     }		
			}
		}
	}
function jumpMenu(targ,selObj,restore){ //v3.0
	if(selObj.options[selObj.selectedIndex].value!=0){
  		window.open(selObj.options[selObj.selectedIndex].value,'','');
 	if (restore) selObj.selectedIndex=0;
  }
} 
	//ajx
	
	//读取内容
	function getInnerhtml(id,url,type) {	
					
	    if(url!=null && url.length>0) {
		    var xmlObj = getReq();
			var s ="?";
			if(url.indexOf("?")>-1) {
				s="&";
			}
			xmlObj.open("GET",url,true);
			xmlObj.onreadystatechange = function(){
		    	        handleResponse(id,xmlObj,url,type);
		  		}; 
		xmlObj.send(""); /////修改
        }
	}
		function getReq() {
	    var xmlObj =null;
	    if (window.XMLHttpRequest){
	    xmlObj = new XMLHttpRequest();}
	    else if (window.ActiveXObject){
	    xmlObj = new ActiveXObject("Microsoft.XMLHTTP");
	    }
	    return xmlObj;
	}
	function handleResponse(id,xmlObj,url,type) {
	    if (xmlObj.readyState == 4){
		    if (xmlObj.status == 200){
		    		var datas =xmlObj.responseText;
					var obj = document.getElementById(id);
					if(obj!=null){		
					if(type==0||!type){
					  	obj.innerHTML = datas.replace(/^\s*|\s*$/g,"");
					}
					if(type==1){  //flash 
					//if(url=="ArticleList/12_index.html")
						obj.innerHTML=flash(datas);
					}
					if(type==2){  //单一图片
						obj.innerHTML=onepic(datas);
					}
					if(type==3){  //滚动图片
					
						obj.innerHTML=rollpic(datas);
							var speed=30;
							demo2.innerHTML=demo1.innerHTML
							var MyMar=setInterval(Marquee,speed);;
							demo.onmouseover=function() {clearInterval(MyMar)};
							demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)};
					}
					}
					
			}
		}
	}
function reset_mhtml(obj,_url) {
    var sInnerhtml = getInnerListhtml(_url);
    var ele=document.getElementById(obj);
	var newObj=document.createElement(ele.tagName);	
	newObj.id=ele.id;
	newObj.className=ele.className;
	newObj.innerHTML = sInnerhtml;
	ele.parentNode.replaceChild(newObj,ele);
}
function getInnerListhtml(url) {
    if(url!=null && url.length>0) {
		var xmlHttp = getReq();
        xmlHttp.open("GET",url,false);
        xmlHttp.send(null);     
        if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
             var back = xmlHttp.responseText;
             return back.replace(/^\s*|\s*$/g,"");
        }
    }
    return "";	
}
	//浏览器识别
var Browser = { 
'isIE' : (navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0),
'isIE6' : (document.all && !window.XMLHttpRequest) ,
'isIE7' : (document.all && window.XMLHttpRequest) ,
'isFirefox' : navigator.userAgent.indexOf('Firefox') >= 0, 
'isOpera' : navigator.userAgent.indexOf('Opera') >= 0 
}

// 专题栏目
function readertopic(id,xml)
{

   var source="";
   	if(Browser.isIE){
		source = new ActiveXObject("Msxml2.DOMDocument");
   		source.async = false;
   		source.load(xml)
	}else if(Browser.isFirefox || Browser.isOpera){
		var oNewDom = oXsltProcessor.transformToDocument(createXML(xml))
	}
   var ItemN = source.getElementsByTagName("one");
   var j = ItemN.length;
   // 获取item节点个数
   var onetible = "<table width=\"100 % \" height=\"20\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" id=\"special\">";
   for(i = 0; i < j; i ++ )   // 一级栏目
   {
      onetitle = ItemN[i].selectSingleNode("title").text;
      oneurl = ItemN[i].selectSingleNode("url").text;
      onetible = onetible + "<tr align=left>";
      onetible = onetible + "<td  align=\"center\"><a href=\""+oneurl+"\">" + onetitle + "</a></td>";
      onetible = onetible + "</tr>";
      nodes = ItemN[i].childNodes[2];
      // 二级栏目开始
   //   if(nodes != null)
   //   {
     //    ItemNT = nodes.getElementsByTagName("two")
       //  for(k = 0; k < ItemNT.length; k ++ )
        // {
            // alert(ItemNT[k].selectSingleNode("title").text);
         //}
      //}
   //}
   }
   onetible = onetible + "</table>";
    var obj = document.getElementById(id);
   obj.innerHTML = onetible;
}
//滚动图片
function rollpic(pic){
	var ret='<div id=demo style=overflow:hidden;height:90;width:800;>';
	ret=ret+'<table align=left cellpadding=0 cellspace=0 border=0>';
	ret=ret+'<tr>';
	ret=ret+'<td id=demo1 valign=top>';
	var pics=pic.split(";");
	for(var i=0;i<pics.length-1;i++){
		var arrs=pics[i].split("|");
		ret=ret+'<table width=128 height=82 border=0 align=left cellpadding=0 cellspacing=0>';
  		ret=ret+'<tr>';
    	ret=ret+"<td align='center'><a href='"+arrs[1]+"' target='_blank'><img src='"+arrs[0]+"' width='120' height='80' border='0'/></a></td>";
  		ret=ret+'</tr>';
		ret=ret+'</table>';
	}
	ret=ret+'</td>';
	ret=ret+'<td id=demo2 valign=top></td>';
	ret=ret+'</tr>';
	ret=ret+'</table>';
	ret=ret+'</div>';
	return ret;
}
function Marquee(){
	if(demo2.offsetWidth-demo.scrollLeft<=0)
		demo.scrollLeft-=demo1.offsetWidth;
	else{
		demo.scrollLeft++;
	}
	}
	//单张图片
function onepic(pic) {
	var pics=pic.split(";");
	for(var i=0;i<pics.length-1;i++){
		var arrs=pics[i].split("|");
		var ret="<a href='"+arrs[1]+"' target='_blank'><img src='"+arrs[0]+"' width='211' height='255' border='0'/></a>";
	}
	
	return ret;
}	
//flash图片新闻
function flash(pic) {
	var pic_arr=new Array();
	var link_arr=new Array();
	var text_arr=new Array();
	var i = 0;
	var pics=pic.split(";");
	for(var i=0;i<pics.length-1;i++){
		var arrs=pics[i].split("|");
		pic_arr[i] =arrs[0];
		link_arr[i] = arrs[1];
		text_arr[i] = arrs[2];
	}
	var p = pic_arr.join("|");
	var l = link_arr.join("|");
	var t = text_arr.join("|");
	var _width =194;
	var _height =148;
	var text_height =20;
	var flash_height=_height + text_height;
	var f = "/flash/focus.swf";
	var ret='<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ _width +'" height="'+ flash_height +'">';
	ret=ret+'<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+f+'"><param name="quality" value="high"><param name="bgcolor">';
	ret=ret+'<param name="menu" value="false"><param name=wmode value="transparent">';
	ret=ret+'<param name="FlashVars" value="pics='+p+'&links='+l+'&texts='+t+'&borderwidth='+_width+'&borderheight='+_height+'&textheight='+text_height+'">';
	ret=ret+'<embed ID="focus_flash" src="'+f+'" wmode="opaque" FlashVars="pics='+p+'&links='+l+'&texts='+t+'&borderwidth='+_width+'&borderheight='+_height+'&textheight='+text_height+'" menu="false" quality="high" width="'+ _width +'" height="'+ flash_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	ret=ret+'</object>';
	return ret;
	}

//图片友情友情链接
function linkpic(id,url){
if(url!=null && url.length>0) {
		    var xmlObj = getReq();
			xmlObj.open("GET",url,true);
			xmlObj.onreadystatechange = function(){
		    linkpicvalues(id,xmlObj,url);
		  		}; 
			xmlObj.send(""); /////修改
        }
}
function linkpicvalues(id,xmlObj,url) {
	    if (xmlObj.readyState == 4){
		    if (xmlObj.status == 200){
					var datas =xmlObj.responseText;
					var linkjs=datas.replace(/^\s*|\s*$/g,"");
					var linkones=linkjs.split(";");
					var linkwrite="<div>";
					for(var i=0;i<linkones.length-1;i++){
					     var linkone=linkones[i].split("|")
						linkwrite=linkwrite+"<a href='"+linkone[1]+"' target='_blank'> <img src='"+linkone[2]+"' width='161' height='38' border='0' /></a>";
					}
					linkwrite=linkwrite+"</div>";
					var obj = document.getElementById(id);
					if(obj!=null){
					  obj.innerHTML = linkwrite;	
				     }		
			}
		}
	}
	
	//收藏
	  function AddFavorite(sURL,sTitle)
{
   try
   {
       window.external.addFavorite(sURL,sTitle);
   }
   catch (e)
   {
       try
       {
           window.sidebar.addPanel(sTitle,sURL, '');
       }
       catch (e)
       {
           alert('加入收藏失败，请使用Ctrl+D进行添加');
       }
   }
}
function SetHome(ojb,vrl){
       try{
               obj.style.behavior='url(#default#homepage)';
               obj.setHomePage(vrl);
       }
       catch(e){
           alert('浏览器不支持!请自己添加!');
       }
}
	//************通用函数 2008-4-12************//
function $(fctId){
	return document.getElementById(fctId);
}

//取得某对象，若提供ID下的对象不存在则自动创建
function c$(fctId,fctClassName){
	var varTempDivObj=$(fctId);
	if(!varTempDivObj){
		GetPyzyIframe("ifm"+fctId);
		varTempDivObj=document.createElement("div");
		varTempDivObj.id=fctId;
		if(fctClassName && fctClassName!="")varTempDivObj.className=fctClassName;
		document.body.appendChild(varTempDivObj);
	}
	return varTempDivObj;
}

//取得某ID的iframe对象，若不存在该ID的对象则自动创建
function GetPyzyIframe(fctIfmId,fctVisibility,fctTop,fctLeft,fctWidth,fctHeight){
	var varTempIfmObj=$(fctIfmId);
	if(!varTempIfmObj){
		varTempIfmObj=document.createElement("iframe");
		varTempIfmObj.id=fctIfmId;
		varTempIfmObj.style.position="absolute";
		varTempIfmObj.style.zIndex="1";
		varTempIfmObj.style.visibility="hidden";
		document.body.appendChild(varTempIfmObj);
	}
	if(fctTop)varTempIfmObj.style.top=fctTop+"px";
	if(fctLeft)varTempIfmObj.style.left=fctLeft+"px";
	if(fctWidth)varTempIfmObj.style.width=fctWidth+"px";
	if(fctHeight)varTempIfmObj.style.height=fctHeight+"px";
	if(fctVisibility)varTempIfmObj.style.visibility=(document.all?fctVisibility:"hidden	");
	return varTempIfmObj;
}

//取得某对象的坐标位置、宽、高
function getPosition(obj){
	var top=0;
	var left=0;
	var width=obj.offsetWidth;
	var height=obj.offsetHeight;
	while(obj.offsetParent){
		top+=obj.offsetTop;
		left+=obj.offsetLeft;
		obj=obj.offsetParent;
	}
	return{"top":top,"left":left,"width":width,"height":height};
}

//取得编码存储框对象
function GetValueToInputObj(fctThisObj){
	if(!fctThisObj)return null;
	var varThisObjAutoInput=(fctThisObj.getAttributeNode("value_to_input")?fctThisObj.getAttributeNode("value_to_input").value:"");
	if(varThisObjAutoInput=="")return null;
	return $(varThisObjAutoInput);
}

//自动触发下一个对象的Act事件
function AutoNextInputAct(fctThisObj,fctAct){
	var varNextInput=fctThisObj.getAttributeNode("nextinput");
	if(varNextInput && varNextInput!=""){
		if(document.all){
			eval("$('"+varNextInput.value+"')."+fctAct+"()");
		}else{
			var evt = document.createEvent("MouseEvents");
			evt.initEvent(fctAct,true,true);
			$(varNextInput.value).dispatchEvent(evt);
		}
		$(varNextInput.value).focus();
	}
}

//给某对象的某事件增加处理函数AddFunToObj(document,"onclick","alert('1');")
function AddFunToObj(fctObj,fctAct,fctFunction){
	if(fctObj.addEventListener){ //!IE
		fctObj.addEventListener(fctAct.replace("on",""),function(e){
			e.cancelBubble=!eval(fctFunction);
		},false);
	}else if(fctObj.attachEvent){ //IE
		fctObj.attachEvent(fctAct,function(){
			return eval(fctFunction);
		});
	}
}
//************通用函数 End  2008-4-12************//

/**********日历选择功能 End  2008-4-14*************/
//输出日历样式表 huzj 2008-4-12
document.write('\
	<style type="text/css">\
		.DateListBox{float:left;border:solid #FC7A7D 1px;width:147px !important;width:142px;height:168px !important;height:176px;font-size:12px;text-align:center;}\
		.DateListBox h1{width:100%;background-color:#FFF4F4;color:#B42929;font-size:12px;height:20px;font-weight:bold;line-height:20px;vertical-align:middle;margin:0px;}\
		.DateListBox div{float:left;border:solid #EB696C 1px;background-color:#EB696C;color:#FFFFFF;width:19px !important;width:20px;height:20px;font-size:12px;font-weight:bold;line-height:20px;vertical-align:middle;}\
		.DateListBox a{float:left;color:#990000;border:solid #ffffff 1px;background-color:#ffffff;width:19px !important;width:20px;height:19px !important;height:22px;font-size:12px;line-height:20px;vertical-align:middle;}\
		.DateListBox a:hover{border:solid #F2C2BD 1px;background-color:#FBEDEC;}\
		.DateListBox .aSelect{cursor:pointer;border:solid #DEB4B4 1px;background-color:#FAE0CF;color:#FF0000;}\
		.PyzyDateBox{position:absolute;z-index:1;visibility:hidden;background-color:#FFFFFF;border:solid #EBcccC 1px;height:170px;width:298px !important;width:286px;}\
	</style>\
');

//取得日历列表，该函数输出的内容需要根据需求放置到特定的容器中，如浮动层、固定DIV…
function GetMonthHTML(fctStaDate,fctDate){
	if(!fctDate)fctDate=new Date(); //默认为当前日期
	var varYear=fctDate.getFullYear();
	var varMonth=fctDate.getMonth();
	var varNextMonth=new Date(varYear,varMonth+1,1);
	var varThisMonthButDay = new Date(varNextMonth-86400000); //本月最后一天

	var varThisDate,varThisWeekDay,varThisMonthHTML="";
	varThisMonthHTML+="<h1>"+varYear+"年"+(varMonth+1)+"月</h1>"
	varThisMonthHTML+="<div>日</div><div>一</div><div>二</div><div>三</div><div>四</div><div>五</div><div>六</div>"
	for(var DayI=1;DayI<=varThisMonthButDay.getDate();DayI++){
		varThisDate=new Date(varYear,varMonth,DayI);
		varThisWeekDay=varThisDate.getDay();
		if(DayI==1){
			for(var spcI=0;spcI<varThisWeekDay;spcI++){
				varThisMonthHTML+="<a></a>"
			}
		}
		varThisMonthHTML+="<a "+((fctStaDate && fctStaDate!="")?(varThisDate<fctStaDate?"old":""):"")+" href=javascript:; onclick='SelectDate(this)' title='"+varYear+"-"+(varMonth+1)+"-"+DayI+"'>"+DayI+"</a>";
	}
	return '<div class="DateListBox">'+varThisMonthHTML+'</div>';
}
//选择日期
function SelectDate(fctAObj){
	if(fctAObj.href||fctAObj.className=="aSelect"){
		var varValueObj=$("divPyzyDateBox").Obj;
		var varValueToObj=GetValueToInputObj(varValueObj);
		if(varValueToObj)varValueObj=varValueToObj;
		if(varValueObj.value==fctAObj.title){
			varValueObj.value="";
		}else{
			varValueObj.value=fctAObj.title;
		}
		$("divPyzyDateBox").style.visibility="hidden";
		$("divPyzyDateBox").bodyclick="";
		GetPyzyIframe("ifmdivPyzyDateBox","hidden");
		AutoNextInputAct($("divPyzyDateBox").Obj,"click");
	}
}
//隐藏日历
function HiddenDateBox(){
	if($("divPyzyDateBox")){
		if($("divPyzyDateBox").style.visibility!="hidden" && $("divPyzyDateBox").bodyclick=="1"){
			$("divPyzyDateBox").style.visibility="hidden";
			$("divPyzyDateBox").bodyclick="";
			GetPyzyIframe("ifmdivPyzyDateBox","hidden");
		}else{
			$("divPyzyDateBox").bodyclick="1";
		}
	}
}
//显示日历
function ShowTwoMonthList(fctThisObj,fctJNum,fctStaDate){
	if(!fctJNum)fctJNum=0;
	if(!fctThisObj)fctThisObj="";
	var varStaDate=null,varTheDate=new Date();
	if(fctStaDate||fctStaDate==""){
		varStaDate=new Date(new Date()-86400000); //如果没有定义具体可使用的开始时间则自定义为今天
		var varStaDateSplit=fctStaDate.split("-");
		if(varStaDateSplit.length==3){
			varStaDate=new Date(varStaDateSplit[0],parseInt(varStaDateSplit[1],10)-1,varStaDateSplit[2]);//fctStaDate=new Date();
		}
		varTheDate=varStaDate;
		if(fctStaDate=="")fctStaDate=varStaDate.getFullYear()+"-"+(varStaDate.getMonth()+1)+"-"+varStaDate.getDate();
	}	
	var varShowTwoMonthHTML="";
	for(var i=0+fctJNum;i<2+fctJNum;i++){
		varShowTwoMonthHTML+=GetMonthHTML((varStaDate?varStaDate:""),new Date(varTheDate.getFullYear(),varTheDate.getMonth()+i,1));
	}
	if(varStaDate)varShowTwoMonthHTML=varShowTwoMonthHTML.replace(/old href/g,"style=color:#999 old");
	if(fctThisObj.value!=""){ //对已选日期样式进行改变
		if(/^((\d{4})|(\d{2}))-(\d{1,2})-(\d{1,2})$/g.test(fctThisObj.value))varShowTwoMonthHTML=varShowTwoMonthHTML.replace(fctThisObj.value,fctThisObj.value+"' class='aSelect");
	}
	var varDateBoxObj = c$("divPyzyDateBox","PyzyDateBox");
	varDateBoxObj.bodyclick="";	
	if(fctThisObj!=""){ //调整坐标到合适位置
		var varThisObjPosition=getPosition(fctThisObj);
		varDateBoxObj.style.top=(varThisObjPosition.top+varThisObjPosition.height)+"px";
		varDateBoxObj.style.left=varThisObjPosition.left+"px";
		varDateBoxObj.style.visibility="visible"; //hidden
		varDateBoxObj.Obj=fctThisObj;
	}
	varDateBoxObj.innerHTML=varShowTwoMonthHTML+'<div style="margin-top:'+(document.all?'-177':'-1')+'px;color:#B42929;font-size:12px;font-weight:bold;line-height:24px;vertical-align:bottom;">&nbsp;<span style="padding-right:'+(document.all?'220':'232')+'px;cursor:pointer;" onclick="ShowTwoMonthList(null,'+(fctJNum-1)+(fctStaDate?',\''+fctStaDate+'\'':'')+')" title="上月"><--</span><span style="cursor:pointer;" onclick="ShowTwoMonthList(null,'+(fctJNum+1)+(fctStaDate?',\''+fctStaDate+'\'':'')+')" title="下月">--></span></div>';
	GetPyzyIframe("ifmdivPyzyDateBox","visible",(varThisObjPosition.top+varThisObjPosition.height),varThisObjPosition.left,varDateBoxObj.offsetWidth,varDateBoxObj.offsetHeight); //取Iframe
}
/**********日历选择功能 End  2008-4-14*************/
/*浮动js*/

var xPos = 0;
var yPos = 0; 
var step = 1;
var delay = 30;
var height = 0; 
var Hoffset = 0;
var Woffset = 0; 
var yon = 0;
var xon = 0; 
var xon = 0; 
var interval;
function changePos(){
    width = document.body.clientWidth;
    height = document.body.clientHeight;
    Hoffset = img.offsetHeight;
    Woffset = img.offsetWidth;
    img.style.left = xPos + document.body.scrollLeft;
    img.style.top = yPos + document.body.scrollTop;
    if (yon) {
        yPos = yPos + step;
    }else {
        yPos = yPos - step;
    }
    if (yPos < 0) {
        yon = 1;
        yPos = 0;
    }
    if (yPos >= (height - Hoffset)) {
        yon = 0;
        yPos = (height - Hoffset);
    }
    if (xon) {
        xPos = xPos + step;
    }
    else {
        xPos = xPos - step;
    }
    if (xPos < 0) {
        xon = 1;
        xPos = 0;
    }
    if (xPos >= (width - Woffset)) {
        xon = 0;
        xPos = (width - Woffset);
    }
}
function startmovepic() {
    img.visibility = 'visible';
    interval = setInterval('changePos()', delay);
}
function mystop()
{
    clearInterval(interval)
}
/*评论*/
function clearText(inputObj,message){
	inputObj.value = "";
}
function showText(inputObj,message){
	if(inputObj.value == "")
		inputObj.value = message;

}
function CheckForm(){
  if(document.form1.ccontent.value==""){    
      alert('请填写评论内容！');
      return false;
  }  
    return true;
}


