function Insert(sPrompt,i)
{
var sURL = prompt(sPrompt, "");
if (sURL)
{
document.forms[i].picurl.value=sURL
}
return;
}
function DisabledKeyInput()
{
event.returnValue=false;
}
function CheckLogoRadio(i)
{
//var i=0;
if (document.forms[i].RadioW[0].checked)
{
document.forms[i].button1.disabled=false;
document.forms[i].button2.disabled=true;
}
else if (document.forms[i].RadioW[1].checked)
{
document.forms[i].button1.disabled=true;
document.forms[i].button2.disabled=false;
}
}
//zhf
//--------------------------------
var img=null;
function s(n)
{
i=n;
if(img)img.removeNode(true);
img=document.createElement("img");
img.attachEvent("onreadystatechange",orsc);
img.attachEvent("onerror",oe);
img.src=document.forms[i].upfile.value;
}
function oe()
{
alert("上传图片类型为:GIF、JPEG/JPG、BMP");
document.forms[i].button1.disabled=true;
}
function orsc()
{
nLimFileSize=document.forms[i].picsize.value;
nLimWidth=document.forms[i].picwidth.value;
nLimHeight=document.forms[i].picheight.value;
if(img.readyState!="complete")
{
return false;
}
else if(img.width>nLimWidth||img.height>nLimHeight)
{
alert("图片太大,请限制在" + nLimWidth + "X" + nLimHeight + "大小!");
document.forms[i].button1.disabled=true;
}
else
{
document.forms[i].button1.disabled=false;
}
}