function switchBG(obj, on)
{
	obj.style.backgroundColor = on;
}	

function ba_start_callback (date, month, year) {
	document.forms['dataform'].elements['date'].value = date + "/" + month + "/" + year;
}

function download1($reg_id) {

 window.open('download.php?reg_id='+$reg_id+'=file','prod','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=yes,width=750,height=550');

}

function download2($reg_id) {

 window.open('download.php?reg_id='+$reg_id+'=pic','prod','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=yes,width=750,height=550');

}

function download3($reg_id) {

 window.open('download.php?reg_id='+$reg_id+'=html','prod','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=yes,width=750,height=550');

}

function download4($eventid) {

 window.open('download4.php?eventid='+$eventid,'prod','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=yes,width=750,height=550');

}

function deleted($reg_id) {

 window.open('delete.php?reg_id='+$reg_id,'prod','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=750,height=550');

}

function selectAll() {
 form = document.forms.dataform;
 state = checkbox.checked;
 count = eval("form." + name + ".length");
 code = "form." + name + "[i].checked = state";
 for (i=0;i<count;i++)
   eval(code);
}

function selectAll() {
	i = 1;
	boxObj = document.getElementById('page_'+i);
	while(boxObj != null){
		boxObj.checked = true;
		i++;
		boxObj = document.getElementById('page_'+i);		
	}	
}

function selectNone() {
	i = 1;
	boxObj = document.getElementById('page_'+i);
	while(boxObj != null){
		boxObj.checked = false;
		i++;
		boxObj = document.getElementById('page_'+i);		
	}	
}