<!--
var flag=false;
function DrawImage(ImgD,vwidth,vheight)
{
	var image=new Image();
	image.src=ImgD.src;
	if(image.width>0 && image.height>0)
	{
		flag=true;
		if(image.width/image.height>= vwidth/vheight)
		{
			 if(image.width>vwidth)
			 {
				 ImgD.width=vwidth;
				 ImgD.height=(image.height*vwidth)/image.width;
			 }
			 else
			 {
				 ImgD.width=image.width;
				 ImgD.height=image.height;
			 }
			 ImgD.alt="图片实际大小:"+image.width+"×"+image.height;
		}
		else
		{
			 if(image.height>vheight)
			 {
				 ImgD.height=vheight;
				 ImgD.width=(image.width*vheight)/image.height;
			 }
			 else
			 {
				 ImgD.width=image.width;
				 ImgD.height=image.height;
			 }
			 ImgD.alt="图片实际大小:"+image.width+"×"+image.height;
		 }
	}
	/*else{
	ImgD.src="";
	ImgD.alt=""
	}*/
}
//控制目录树函数
function opencat(cat,img)
{
	if(cat.style.display=="none"){
	cat.style.display="";
	 img.src="sysImg/class2.gif";
	} else {
	cat.style.display="none"; 
	img.src="sysImg/class1.gif";
	}
}
function opencat(cat,img)
{
	if(cat.style.display=="none"){
	cat.style.display="";
	 img.src="sysImg/class2.gif";
	} else {
	cat.style.display="none"; 
	img.src="sysImg/class1.gif";
	}
}
function opencat1(cat,img)
{
	if(cat.style.display=="none"){
	cat.style.display="";
	 img.src="sysImg/class2.gif";
	} else {
	cat.style.display="none"; 
	img.src="sysImg/class1.gif";
	}
}
function changecolor(vID,vnID)
{
	 eval('document.all.' + vID + '.style.backgroundColor="#000057" ') ;
	 eval('document.all.' + vnID + '.style.backgroundColor="#ffffff" ') ;
}
function rechangecolor(vID,vnID)
{
	 eval('document.all.' + vID + '.style.backgroundColor="#ff6600" ') ;
	 eval('document.all.' + vnID + '.style.backgroundColor="#ffffff" ') ;
}
function changecolor2(vID,vnID)
{
	 eval('document.all.' + vID + '.style.backgroundColor="#ff0000" ') ;
	 eval('document.all.' + vnID + '.style.backgroundColor="#ffffff" ') ;
}
function rechangecolor2(vID,vnID)
{
	 eval('document.all.' + vID + '.style.backgroundColor="#16557E" ') ;
	 eval('document.all.' + vnID + '.style.backgroundColor="#f3f3f3" ') ;
}
function changecolor3(vID,vnID)
{
	 eval('document.all.' + vID + '.style.backgroundColor="#ff6600" ') ;
	 eval('document.all.' + vnID + '.style.backgroundColor="#E3D8C2" ') ;
}
function rechangecolor3(vID,vnID)
{
	 eval('document.all.' + vID + '.style.backgroundColor="#F1EDE1" ') ;
	 eval('document.all.' + vnID + '.style.backgroundColor="#F1EDE1" ') ;
}
function changecolor4(vID,vnID)
{
	 eval('document.all.' + vID + '.style.backgroundColor="#ff6600" ') ;
	 eval('document.all.' + vnID + '.style.backgroundColor="#3F9C9C" ') ;
}
function rechangecolor4(vID,vnID)
{
	 eval('document.all.' + vID + '.style.backgroundColor="#59C1C1" ') ;
	 eval('document.all.' + vnID + '.style.backgroundColor="#59C1C1" ') ;
}
//全选复选框
	function SelectAll(){
		var flag = document.form1.allbox.checked ;
		//alert(flag + "ok");
		for (var i=0;i<document.form1.tags("input").length;i++){
			var e = document.form1.elements[i];
			if (e.type.toLowerCase()=="checkbox"){
				var name = e.id.toLowerCase() ;
				//alert(name + " - " + name.indexOf("checkbox1"));
				if (name.indexOf("checkbox1")>-1){
					e.checked = flag ;
				}
			}
		} 
	}
//-->

