function insert_pic(fieldname,picclass,upid,ifmanage){
	var arr = showModalDialog("/uploadfiletool/insert_single_pic.asp?filetype=0&ifmanage="+ifmanage+"&fileclass="+picclass+"&upid="+upid+"&todelfilename="+fieldname.value, "", "dialogWidth:36em; dialogHeight:35em; help:0; scroll:0; status:0");
	if ((arr != null) && (arr !=='http://')){
		fieldname.value=arr;
//		eval(fieldname+".value=arr;");
	}
}
function previewdel_pic(fieldname){
	if (fieldname.value !==''){
		var arr = showModalDialog("/uploadfiletool/previewanddel_pic.asp?picname="+fieldname.value, "", "dialogWidth=700px;dialogHeight=500px;center=1;help=0;directories=0;status=0;scrollbars=0;resizable=0;menubar=0");
		if (arr == 'del'){
			arr = showModalDialog("/uploadfiletool/previewanddel_pic.asp?picname="+fieldname.value+"&ifdel=shi", "", "dialogWidth=50px;dialogHeight=50px;center=1;help=0;directories=0;status=0;scrollbars=0;resizable=0;menubar=0");
			if (arr == 'delsuccess'){
				fieldname.value='';
			}
		}
	}
}

function ton(object) {
object.style.background="#F6F6F1";
}
function tout1(object) {
object.style.background="#F9F9F9";
}

function tonb(object) {
object.style.background="#EFF1F0";
}
function toutb1(object) {
object.style.background="#ffffff";
}

function showlist(order,p,c,n)
{
	if (order==1)
	{
		document.getElementById(c).style.display='block';
		document.getElementById(p).innerHTML='<span style = "float:left;"><a href = "javascript:void(0)" onclick = showlist(0,"'+p+'","'+c+'","'+n+'");>'+n+'</a></span><span style = "float:right;padding-right:7px;"><a href = "javascript:void(0)" onclick = showlist(0,"'+p+'","'+c+'","'+n+'");>+</a></span>';

	}
	else if(order==0)
	{
		document.getElementById(c).style.display='none';
		document.getElementById(p).innerHTML='<span style = "float:left;"><a href = "javascript:void(0)" onclick = showlist(1,"'+p+'","'+c+'","'+n+'");>'+n+'</a></span><span style = "float:right;padding-right:7px;"><a href = "javascript:void(0)" onclick = showlist(1,"'+p+'","'+c+'","'+n+'");>-</a></span>';
	}
}

function insertFlash(Path,Width,Height,Transparent){
	 var Temp,T=""
	 Temp='<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+'">'
	 Temp+='<param name="movie" value="'+Path+'"/>'
	 Temp+='<param name="quality" value="High"/>'
	 Temp+='<param name="scale" value="ExactFit"/>'
	 if (Transparent) {Temp+=' <param name="wmode" value="transparent"/>';T='wmode="transparent"'}
	 Temp+='<embed src="'+Path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="FlashH" width="'+Width+'" height="'+Height+'" quality="High"'+T+' scale="ExactFit"/>'
	 Temp+='</object>'
	 document.write(Temp);
}
