function See(hh,ff)
		{
        hh.src=ff.value;
		imgexpend(ff);
		}

function imgexpend(ff)
	{
		var mylowcase=ff.value.toLowerCase();
		if ((mylowcase.indexOf(".jpg")<0)&&(mylowcase.indexOf(".gif")<0)&&(mylowcase.indexOf(".bmp")<0)&&(mylowcase.indexOf(".png")<0))
			{ alert("不是可接受的图片格式！\n请上传.jpg,.gif,.bmp,.png\n格式的图片，且不是CMYK\n模式。");
				document.formimg.picture.focus();
			}
	}

  function SeeBig(filepath)
		{
        window.open("SeeBig.asp?FFF="+filepath,"","");
		}

	function allsubmit()
		{
		document.formimg.submit();
			setTimeout("window.upimgwin.close();",5000);
		document.formtext.submit();
		}
function redownme()
 {
	if (document.layers)
		{
		var picview = eval('document.images["picview"]');
		}
	else
	 {
		if (document.getElementById)
			{
			var picview= eval("document.getElementById('picview')");
			}
		else
			{
			if (document.all)
				{
				var picview = eval(document.all.picview);
				}
			}
	  }

	var picwidth = picview.width;
	var picheight = picview.height;
var vcheck=true;
	if (picwidth>150)
		{	vcheck=false;
			alert("图片宽度太大(不能大于150像素)");
			document.formimg.picture.focus();
			return vcheck;
		}
	else
		{ if (picheight>150)
		  	 	{	vcheck=false;
					alert("图片高度太大(不能大于150像素)");
					document.formimg.picture.focus();
					return vcheck;
		   		}
		}
}

function redownmea()
 {
	if (document.layers)
		{
		var picview = eval('document.images["picview"]');
		}
	else
	 {
		if (document.getElementById)
			{
			var picview= eval("document.getElementById('picview')");
			}
		else
			{
			if (document.all)
				{
				var picview = eval(document.all.picview);
				}
			}
	  }

	var picwidth = picview.width;
	var picheight = picview.height;
if (vcheck==true)
  {
	if (picwidth>150)
		{	vcheck=false;
			alert("如果出现此警告框，表示有如下可能：\n1.图片宽度太大(不能大于150像素)\n2.未点击“预览”按钮！\n\n注意点击“预览”按钮以\n确认您需要上传的图片及大小。");
			document.formimg.preview.click();
			document.formimg.picture.focus();
			return vcheck;
		}
	else
		{ if (picheight>150)
		   {vcheck=false;
			alert("如果出现此警告框，表示：\n图片高度太大(不能大于150像素)");
			document.formimg.picture.focus();
			return vcheck;
		   }
		}
  }
	imgexpend(document.formimg.picture); //判断图片格式
}

var ns4=(document.layers)?1:0
var ie4=(document.all)?1:0

function extendme(myid,mydis)
{
if (ie4){
  if (mydis==""){
	if(myid.style.display != "")
		myid.style.display = "";
	else
	    myid.style.display = "none";
	}
  else
  {
	if(myid.style.display != "")
		myid.style.display = "";
	else

	    myid.style.display = mydis;
   }

  }
}

function checkme(me,str){
	vcheck=true;
	if (me.value==""){
		vcheck=false;
		alert("“"+str+"”不能为空");
			me.focus();
		return vcheck;
		}
}

function checkstart()
	{	vcheck=true;
		var f=document.formtext;
		checkme(f.product,"产品名称");

	if (vcheck==true)
		{
			if	(f.product.value.length>20)
				{ vcheck=false;	alert("产品名称栏不要超过20字！");f.product.focus();return vcheck;	}
		}

if (vcheck==true){		checkme(f.price,"参考价格");		}
	}

function checkstarta()
	{
		var f=document.formtext;
if (vcheck==true){		checkme(f.product,"产品名称");		}

	if (vcheck==true)
		{
			if	(f.product.value.length>20)
				{ vcheck=false;	alert("产品名称栏不要超过20字！");f.product.focus();return vcheck;	}
		}

if (vcheck==true){		checkme(f.price,"参考价格");		}
	}

function checksize()
	{
		var f=document.formtext;
if (vcheck==true){		checkme(f.size,"规格/尺寸");		}
	}

function checkmark()
	{
		var f=document.formtext;
if (vcheck==true){		checkme(f.mark,"品牌");		}
	}

function checkpack()
	{
		var f=document.formtext;
if (vcheck==true){		checkme(f.pack,"包装");		}
	}

function checkgrade()
	{
		var f=document.formtext;
if (vcheck==true){		checkme(f.grade,"等级");		}
	}

function checkgm()
	{
		var f=document.formtext;
if (vcheck==true){		checkme(f.gm,"克重");		}
	}

function checkimgstart()
	{
		var fimg=document.formimg;
checkme(fimg.picture,"图片");
	}
