/*
PicSwfPlayer【图片Flash轮换效果】
fwidth：图片的宽度【数字】
fheight：图片的高度【数字】
ftextheight：文本标题高度【数字】
fpic：图片地址【多个以‘|’隔开】
flink：图片链接地址【多个以‘|’隔开】
ftext：图片标题说明文本【多个以‘|’隔开】
swfurl：Flash地址
*/
function PicSwfPlayer(fwidth,fheight,ftextheight,fpic,flink,ftext,swfurl)
{
	if (fwidth=="") fwidth=240;
	if (fheight=="") fheight=180;
	if (ftextheight=="") ftextheight=0;
	var swf_height =fheight+ftextheight;
	
	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="'+ fwidth +'" height="'+ swf_height +'">');
	document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+swfurl+'"><param name=wmode value=transparent><param name="quality" value="high">');
	document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
	document.write('<param name="FlashVars" value="pics='+fpic+'&links='+flink+'&texts='+ftext+'&borderwidth='+fwidth+'&borderheight='+fheight+'&textheight='+ftextheight+'">');
	document.write('<embed src="'+swfurl+'" wmode="opaque" FlashVars="pics='+fpic+'&links='+flink+'&texts='+ftext+'&borderwidth='+fwidth+'&borderheight='+fheight+'&textheight='+ftextheight+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ fwidth +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');  
	document.write('</object>');
}
/*
openWinDocument【打开新窗口】
url：新网页地址
sname：新窗口标题名称
sheight：窗口的高度
swidth：窗口的宽度
shtop：窗口离最顶部的距离
sleft：窗口离最左边的距离
*/
function openWinDocument(url,sname,sheight,swidth,shtop,sleft)
{
  window.open (url, sname, "height="+sheight+", width="+swidth+", top="+shtop+", left="+sleft+", toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no") ;
}

/*
openModalDialog【打开模式窗口】
url：窗口地址
pram：往新窗口传递的参数
swidth：窗口的宽度
sheight：窗口的高度
*/
//打开模式窗口
function openModalDialog(url,pram,swidth,sheight){
	if (swidth=="") swidth = "280";
	if (sheight=="") sheight = "180";
	var sValue = showModalDialog(url,pram,"dialogWidth:" + swidth + "px;status:no;dialogHeight:" + sheight+"px");
	return sValue;
}
//生成缩略图函数
var flag=false;
function DrawImage(ImgD,FitWidth,FitHeight)
{
	var image=new Image();
	image.src=ImgD.src;
	if(image.width>0 && image.height>0)
	{
		flag=true;
		if(image.width/image.height>= FitWidth/FitHeight)
		{
			if(image.width>FitWidth){
				ImgD.width=FitWidth;
				ImgD.height=(image.height*FitWidth)/image.width;
			}
			else{
				ImgD.width=image.width;
				ImgD.height=image.height;
			}
			ImgD.alt="原图片大小("+image.width+"×"+image.height+")";
		}
		else{
			if(image.height>FitHeight){
				ImgD.height=FitHeight;
				ImgD.width=(image.width*FitHeight)/image.height;
			}else{
				ImgD.width=image.width;
				ImgD.height=image.height;
			}
			ImgD.alt="原图片大小("+image.width+"×"+image.height+")";
		}
	}
}

function GetNowDate(isWeek)
{
	today=new Date(); 
	var week; 
	var date; 
	if(today.getDay()==0) week="星期日" 
	if(today.getDay()==1) week="星期一" 
	if(today.getDay()==2) week="星期二" 
	if(today.getDay()==3) week="星期三" 
	if(today.getDay()==4) week="星期四" 
	if(today.getDay()==5) week="星期五" 
	if(today.getDay()==6) week="星期六" 
	
	date=(today.getYear())+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日"+" "
	if(isWeek)
	{
		document.write("今天是"+date+week); 
	}
	else
	{
		document.write("今天是"+date);
	}
}

function check()
{
   if (isNaN(go2to.page.value))
		alert("请正确填写转到页数！");
   else if (go2to.page.value=="") 
	     {
		alert("请输入转到页数！");
		 }
   else
		go2to.submit();
}