var o_active;
function alm_toggle(that){
	document.getElementById("alm_btn_submit").disabled=false;
	var o=document.getElementById("alm_result_"+that.value.substring(that.value.length-1));
	if(o!=o_active){if(o_active!=null){o_active.style.display="none"};o_active=o}
	if(o){
		o.style.display="block";
	}
}
function printnow(){
	if(navigator.userAgent.indexOf("Firefox")!=-1){beforeprint()}
	window.print();
}
window.onbeforeprint = beforeprint;
function beforeprint(){
	document.getElementById("alm_print").innerHTML = "";
	var divs = document.getElementsByTagName("DIV");
	if(divs!=null){
		for(i=0;i<divs.length;i++){
			if(divs[i].className.indexOf("print")!=-1){
				document.getElementById("alm_print").innerHTML=document.getElementById("alm_print").innerHTML+divs[i].innerHTML;
			}
		}
	}
	
}
window.onafterprint = afterprint;
function afterprint(){
	document.getElementById("alm_print").innerHTML="";
}