function checkAll(){
	for (var i=0;i<document.forms[0].elements.length;i++)
	{
		var e=document.forms[0].elements[i];
		if ((e.name != 'allbox') && (e.type=='checkbox'))
		{
			e.checked=document.forms[0].allbox.checked;
		}
	}
}

function popupwindow(strWindowName,strURL){
	if (strWindowName == "window2"){
		var params  = 'width='+(screen.width-500);
		params += ', height='+(screen.height-250);
		params += ', top=0, left=0'
		params += ', fullscreen=no';
		params += ', directories=no';
		params += ', location=no';
		params += ', menubar=no';
		params += ', resizable=no';
		params += ', scrollbars=no';
		params += ', status=no';
		params += ', toolbar=no';	
	}else{
		var params  = 'width='+(screen.width-100);
		params += ', height='+(screen.height-200);
		params += ', top=0, left=0'
		params += ', fullscreen=no';
		params += ', directories=yes';
		params += ', location=yes';
		params += ', menubar=yes';
		params += ', resizable=yes';
		params += ', scrollbars=yes';
		params += ', status=yes';
		params += ', toolbar=yes';	
	}
 	newwin=window.open(strURL,strWindowName, params);
 	if (window.focus){
		newwin.focus()
	}
 	return false;
}

function checkIt_amountfield(evt) {
    evt = (evt) ? evt : window.event;
    var charCode = (evt.which) ? evt.which : evt.keyCode;
	if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        if (charCode != 46){
			return false;
		}else{
			//alert(str);
			//var pos=str.IndexOf(".");
			//if (pos>=0)
				//return false;
			//}
		}
    }
    status = "";
    return true;
}

function checkIt_nospaces(evt) {
   evt = (evt) ? evt : window.event;
    var charCode = (evt.which) ? evt.which : evt.keyCode;
	if (charCode =32) {
		return false;
    }
    status = "";
    return true;
}