function scaleImage(objImage) {

imgwidth=objImage.width;
imgheight=objImage.height;

if(imgheight>imgwidth) {
	percent=80/imgheight;
	imgwidth=Math.round(percent*imgwidth);
	objImage.height = 80;
	objImage.width = imgwidth;
	} else {
		percent=80/imgwidth;
		imgheight=Math.round(percent*imgheight);
		objImage.width = 80;
		objImage.height = imgheight;
	
	}
}

function checkall (str,itm) {
	if (isNaN(document.forms[str].checkbox1.length)) {
		if (!document.getElementById(itm).checked){
			document.forms[str].checkbox1.checked=false;
		} else {
			document.forms[str].checkbox1.checked=true;
		}
	} else {		
		for (var i=0;i<document.forms[str].checkbox1.length;i++) {
			if (!document.getElementById(itm).checked){
				document.forms[str].checkbox1[i].checked=false;
			} else {
				document.forms[str].checkbox1[i].checked=true;
			}
		}	
	}
}

function getvalues (str) {

	var retString="";
	var tmpInt=0;

	if (document.forms[str].checkbox1.length>1) {
		for (var i=0;i<document.forms[str].checkbox1.length;i++) {
			if (document.forms[str].checkbox1[i].checked){
				retString+=document.forms[str].checkbox1[i].value+";";
			}	
		}
	} else {
		retString+=document.forms[str].checkbox1.value;
	}	
	document.forms[str].ToDo.value=retString;
	//alert(retString);
	//alert(document.forms[str].ToDo.value);
	
}	

function sel() {
	document.form1.Action.value=0;
	document.form1.submit();
}

function ShowLoading() {
	var iFrameBody = document.getElementById("iframe").contentWindow.document.body;
	iFrameBody.innerHTML = '<div style="float:left; background: url(/images/layout/loading.gif) 50% 50% no-repeat;border: 0px solid black;display:block;width:600px; height:200px"></div>';	
}
