/* Javascript */

var firstHeight = 0;

window.onload = function() {
//		set_height();
}


function set_height(){
		if($('page_content')){
			var bodyh = document.body.clientHeight - 110;
			if($('page_content').clientHeight < bodyh){
				$('page_content').style.height = bodyh;
				firstHeight = bodyh;
			} else {
				firstHeight = $('page_content').clientHeight;
			}
		}
}

function highlight_label(labelId){
	if($(labelId).checked){
		$('label_'+labelId).style.backgroundColor = 'yellow';
	} else {
		$('label_'+labelId).style.backgroundColor = 'white';
	}
}

function highlight_checked_labels(){
	$$('.ap_checkbox').each(function(d){
       if(d.checked){
          d.next('label').style.backgroundColor = 'yellow';
       } else {
          d.next('label').style.backgroundColor = 'white';
       }
    });

    $$('.report_checkbox').each(function(d){
        if(d.checked){
          d.next('label').style.backgroundColor = 'yellow';
        } else {
          d.next('label').style.backgroundColor = 'white';
        }
    })

//    for(var i=0;i<300;i++){
//		if($('ap_'+i)){
//			if($('ap_'+i).checked){
//				$('label_ap_'+i).style.backgroundColor = 'yellow';
//			} else {
//				$('label_ap_'+i).style.backgroundColor = 'white';
//			}
//		}
//		if($('report_'+i)){
//			if($('report_'+i).checked){
//				$('label_report_'+i).style.backgroundColor = 'yellow';
//			} else {
//				$('label_report_'+i).style.backgroundColor = 'white';
//			}
//		}
//	}
}
