
function imgcheck() {
	
	return true;
}
function imgpreview(a,b) {

	window.setTimeout(function(){imgprev(a,b);}, 500);
	}

function imgprev(a1,b) {

		var path = document.getElementById(a1).value;
		var prev = document.getElementById(b);
		
		if(path.length > 0) {			
			prev.src=path;
									
		}
	}

function schange(obj) {
		var db = document.getElementById("div_body");
		var divs = db.getElementsByTagName("div");		
		for(i = 0; i<divs.length; i++) {
			divs[i].style.display = "none";
		}
		divs[obj.selectedIndex].style.display = "inline";
}
function quanxuan(oj){
		if(document.frm1.all.checked==false){
			if(oj.length>1){
				for (var i=0;i<oj.length;i++ )
	            {
	              oj[i].checked=false; 	
	            }
			}else{
				oj.checked=false;
			}
		
			
		}
		if(document.frm1.all.checked==true){
			if(oj.length>1){
				for (var i=0;i<oj.length;i++ )
           		 {
             	 oj[i].checked=true;
           		 }
			}else{
				oj.checked=true;
			}
			
		}
		
	}
	
	//图片缩放onload="tupiansf(this,'100','70')"   这种调用方法
function tupiansf(imgmc,ywidth,yheight){
var imgheight=imgmc.height;
var imgwidth=imgmc.width;
var bl=yheight/imgheight;
var tempwitdth=imgwidth*bl;
if(tempwitdth<=ywidth){
	imgmc.height=yheight;
	imgmc.width=imgwidth*bl;
}else{
bl=ywidth/imgwidth;
imgmc.height=imgheight*bl;
imgmc.width=ywidth;
}
}
