var pic_cr = "no";
 function upload_big(big_obj,small_obj,pwidth,pweight,path,f,tw,th)
  {
   if(f==1){
   big_obj.focus();
   }else{
   small_obj.focus();
   }
  var arr = showModalDialog("upfile.asp?f="+f+"&path="+path+"&w="+tw+"&h="+th, "", "dialogWidth:400px; dialogHeight:120px; status:0;help:0");
  if (arr != null){
  var ss;
  ss=arr.split("*")
  if(f==1){
  big_obj.value=ss[0];
  small_obj.value=ss[1];
  pwidth.value=ss[2];
  pweight.value=ss[3];
  }else{
  small_obj.value=ss[0];
  pwidth.value=ss[2];
  pweight.value=ss[3];
  }
 }
}

 //控制上传文件域js
	var i=0;//全局计数变量
	function Set1()
	{var iCount,str;
	iCount=window.form2.upcount.value
	str='<td></td>';
	if((!iCount)||(iCount==0))
		{iCount=1;
		window.form2.upcount.value=1;
		}
	if (iCount>100)
		{
		window.form2.upcount.value=i-1;
		alert("每次最大允许上传100个文件");
		}
	else
		{window.form2.upcount1.value=0
		for(i=1;i<=iCount;i++)
			{
			str+='<div align="left">图片'+i+':<input type="text" name="pic'+i+'" style="width:280"> <iframe frameborder=0 width=290 height=25 scrolling=no src="upload.asp?action=pic&ztpic=pic'+i+'"></iframe></div>';
			}
			window.upid.innerHTML=str+'<td></td>';
		}
		return false;
	}

   function Set2()
   {var iCount,iV;
	iV=parseInt(window.form2.upcount1.value)
	iCount=parseInt(window.form2.upcount.value)
	if(iCount!=i-1)
		{iCount=i-1;}		
	if (i>100)
		{
		window.form2.upcount.value=100;
		alert("每次最大允许上传100个文件");
		}
	else
		{
			if(i==1){i=2}
			if(iV==1){iCount=1;window.form2.upcount1.value=0;}
			{
			window.form2.upcount.value=iCount+1;
			window.upid.insertAdjacentHTML('BeforeEnd','<div align="left">图片'+i+':<input type="text" name="pic'+i+'" style="width:280"> <iframe frameborder=0 width=290 height=25 scrolling=no src="upload.asp?action=pic&ztpic=pic'+i+'"></iframe><br></div>');
			}
		}
	i++;
	return false;
	}
	
	function Set3()
		{var iCount,str;
			iCount=window.form2.upcount.value	
			str='<td></td>';
			str+='<div align="left">&nbsp;不添加组图请不要设定.<br></div>';
			window.upid.innerHTML=str+'<td></td>';
			i=2;
			window.form2.upcount.value=1;
		}
