//分页
function GoToPage(PageUrl,page){location.href=PageUrl+"page="+page;}
function showpage(page,RecordCount,PageSize,PageCount,PageUrl)
{
	var Tmpstr='共 <b>'+RecordCount+'</b> 个记录  ';
	if(page<2){if(PageCount<2){Tmpstr+='首页'}else{Tmpstr+='<span style="color:#f00">首页</span>'}Tmpstr+=' 上一页 '}
	else{Tmpstr+='<a href="'+PageUrl+'page=1">首页</a>';Tmpstr+=' <a href="'+PageUrl+'page='+(page-1)+'">上一页</a> ';}
	
	if(page>=PageCount){Tmpstr+='下一页 ';if(PageCount<2){Tmpstr+='尾页'}else{Tmpstr+='<span style="color:#f00">尾页</span>'}}
	else{Tmpstr+='<a href="'+PageUrl+'page='+(page+1)+'">下一页</a> ';Tmpstr+='<a href="'+PageUrl+'page='+PageCount+'">尾页</a>'}
	Tmpstr+='  页次：<b><font color="#ff0000">'+page+'</font>/'+PageCount+'</b>页 ';
	Tmpstr+=' <b>'+PageSize+'</b>个/页  '
	Tmpstr+='转到第<select onchange=GoToPage("'+PageUrl+'",this.options[this.selectedIndex].value)>'
	for(i=1;i<=PageCount;i++)
	{
		if(i==page){Tmpstr+='<option value="'+i+'" selected>'+i+'</option>'}
		else{Tmpstr+='<option value="'+i+'">'+i+'</option>'}
	}
	Tmpstr+='</select>页'
	document.write(Tmpstr);
}
function GetObj(id){return document.getElementById(id);}//获取对象
function showLayer(id){GetObj(id).style.visibility="visible";}//显示层
function hiddenLayer(id){GetObj(id).style.visibility="hidden";}//隐藏层
function showDiv(id){GetObj(id).style.display="block";}//显示块
function hiddenDiv(id){GetObj(id).style.display="none";}//显示块
function GoUrl(url,bid){if(url!=""){if(bid==0){location.href=url;}else if(bid=1){window.open(url);}}}//页面转向

//打开新窗口
function OpenWin(url){
	x=450;y=400;
	l=(screen.width/2)-(x/2);
	t=(screen.height/2)-(y/2);
	s="scrollbars=yes,toolbar=no,location=no,status=no,menubar=no,resizable=no";
	s+=" width=" + x + ", height=" + y + ", left=" + l + ", top=" + t;
	window.open(url,"",s);
}
//js输出flash
function showflash(flashURL,flashWIDTH,flashHEIGHT,flashMode){
    if(flashMode==1){flashMode="transparent";}else{flashMode="opaque";}
document.writeln ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+'>');
document.writeln ('<PARAM NAME=movie VALUE="'+flashURL+'">');
document.writeln ('<PARAM NAME=wmode VALUE="'+flashMode+'">');
document.writeln ('<PARAM NAME=loop VALUE=true>');//这个也没有
document.writeln ('<PARAM NAME=quality VALUE=high>');//这个没有
document.writeln ('<EMBED src="'+flashURL+'" loop=true wmode="'+flashMode+'" quality=high swLiveConnect=FALSE WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
document.writeln ('</OBJECT>');
}

function doZoom(size){GetObj('zoom').style.fontSize=size+'px'} //动态改变文字大小

//flv播放器
function flvplayer(files,w,h){
	var swf_width=w;
	var swf_height=h;
	var texts="  PanKu.com";
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
	document.write('<param name="movie" value="inc/flvplayer.swf">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="menu" value="true">');
	document.write('<param name="allowFullScreen" value="true" />');
	document.write('<param name="FlashVars" value="vcastr_file='+files+'&LogoText='+texts+'">');
	document.write('<embed src="inc/flvplayer.swf" allowFullScreen="true" FlashVars="vcastr_file='+files+'&LogoText='+texts+'" menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>'); 
}
