// JavaScript Document
function Print(Str){
	return document.write(Str);
}
function Flash(Path,Width,Height){
	var Tmp
	Tmp='<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="FlashH" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+Width+'" height="'+Height+'">'
	Tmp+='<param name="movie" value="../Include/Js/'+Path+'"/>'
	Tmp+='<param name="quality" value="High"/>'
	Tmp+='<param name="scale" value="ExactFit"/>'
	Tmp+=' <param name="wmode" value="transparent"/>';
	Tmp+='<embed wmode="transparent" src="../Include/Js/'+Path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="FlashH" width="'+Width+'" height="'+Height+'" scale="ExactFit"/>'
	Tmp+='</object>'
	Print(Tmp);
}

function PageBox(U,NowPage,PageCount,DataCount,PageSize){
	var i;i=Math.max(1,NowPage-1);
	document.write("<table width='100%'><tr><td width='35%'><div id='pagebox_msg'>页次:"+NowPage+"/"+PageCount+"页 共"+DataCount+"条记录 "+PageSize+"条/每页<\/div><\/td>");
	document.write("<td>");
	document.write("<ul class='pagebox'>");
	document.write("<li class='PageBoxLi'><a href='"+U+"1.html' title='首页'><<<\/a><\/li>");
	document.write("<li class='PageBoxLi'><a href=\""+U+i+".html\" title='上一页(第 "+i+" 页)'><</a><\/li>");
	for(i=Math.max(1,NowPage-5);i<NowPage;i++){
		document.write("<li class='PageBoxLi'><a href='"+U+i+".html' title='第"+i+"页'>"+i+"<\/a><\/li>");
	}
	document.write("<li class='PageBoxLi'><a href='"+U+i+".html' title='第"+i+"页' id='Active'>"+NowPage+"</a><\/li>");
	for(i=NowPage+1;i<=Math.min(PageCount,NowPage+5);i++){
		document.write("<li class='PageBoxLi'><a href='"+U+i+".html' title='第"+i+"页'>"+i+"<\/a></li>");
	}
	i=Math.min(PageCount,NowPage+1);
	document.write("<li class=\"PageBoxLi\"><a href=\"" + U + i + ".html\" title=\"下一页(第 " + i + "页)\">></a><\/li>");
	document.write("<li class='PageBoxLi'><a href='"+U+PageCount+".html' title='尾页'>>><\/a></li>");
	document.write("<\/ul>");
	document.write("<div style='clear:left;'><\/div>");
	document.write("<\/td><\/tr><\/table>");
}
function $$(id){
  return document.getElementById(id);
}

function display(ID){
	if (document.getElementById(ID).style.display == "none"){
		document.getElementById(ID).style.display = "";
	}else{
		document.getElementById(ID).style.display = "none";
	}
}


function ChkSelected(Obj,ChkObj)
{
	if (Obj)
	{
		for (var i=0;i<Obj.length;i++){
			Obj.options[i].selected=true;
		}
	}
}
function CheckBox(inNum)
{
var tmp=inNum;
if(!tmp.length)tmp=[tmp];
for (var i=0;i<tmp.length;i++)
{
tmp[i].checked=!tmp[i].checked;
}
}
function UnCheckBox(inNum)
{
var tmp=inNum;
if(!tmp.length)tmp=[tmp];
for (var i=0;i<tmp.length;i++)
{
tmp[i].checked=!tmp[i];
}
}
function AddUrl(cnt){
	if (cnt!=null&&cnt!="" ){
		for (var i =0; i< cnt;i++){
			var thisurl='地址名称('+(document.myform.URL.length+1)+')|';
			var urll=thisurl + document.getElementById('aaa').value+(document.myform.URL.length+1).toString() + document.getElementById('bbb').value;
			if(urll!=null&&urll!=''){
				document.myform.URL.options[document.myform.URL.length]=new Option(urll,urll);
			}
		}
	}else{
		alert("请输入次数");
	}
}

function AddUrl2(){
	var thisurl='地址名称('+(document.myform.URL.length+1)+')|http://';
	var url=prompt('请输入地址名称和链接，中间用“|”隔开：',thisurl);
	if(url!=null&&url!=''){document.myform.URL.options[document.myform.URL.length]=new Option(url,url);}
}

function ModifyUrl(){
	if(document.myform.URL.length==0) return false;
	var thisurl=document.myform.URL.value;
	if (thisurl=='') {alert('请先选择一个地址，再点修改按钮！');return false;}
	var url=prompt('请输入地址名称和链接，中间用“|”隔开：',thisurl);
	if(url!=thisurl&&url!=null&&url!=''){document.myform.URL.options[document.myform.URL.selectedIndex]=new Option(url,url);}
}

function DelUrl(){
	if(document.myform.URL.length==0) return false;
	var thisurl=document.myform.URL.value;
	if (thisurl=='') {alert('请先选择一个地址，再点删除按钮！');return false;}
	if(document.myform.URL.selectedIndex==0){alert('不能删除第一个地址！');return false;}
	document.myform.URL.options[document.myform.URL.selectedIndex]=null;
}

function AddItem(strFileName){
	document.myform.IncludePic.checked=true;
	document.myform.IndexPicUrl.value=strFileName;
	document.myform.DefaultPicList.options[document.myform.DefaultPicList.length]=new Option(strFileName,strFileName);
	document.myform.DefaultPicList.selectedIndex+=1;
}