// JavaScript Document

function test(){
		alert('test');
}

function checkboxchangeall(numberOfBoxes){ //this function ticks and unticks all checkboxes called 'checkbox' on the page
	numberOfBoxes = numberOfBoxes * 10;
	if(document.checkcontrol.checkbox.checked==true){
		for ( i=0 ; i < numberOfBoxes ; i++ ){
			if(document.forms[i]){
				if(document.forms[i].checkbox){
					document.forms[i].checkbox.checked=true;
				}
			}
		}
	} else {
		for ( i=0 ; i < numberOfBoxes ; i++ ){
			if(document.forms[i]){
				if(document.forms[i].checkbox){
					document.forms[i].checkbox.checked=false;
				}
			}
		}
	}
}

/**
* Toggles the check state of a group of boxes
*
* Checkboxes must have an id attribute in the form cb0, cb1...
* @param The number of box to 'check'
* @param An alternative field name
*/
function checkAll( n, fldName, formName, toggleBoxName ) {
	var f = document.forms[formName];
	var c = eval('f.' + toggleBoxName + '.checked');
	var n2 = 0;
	for (i=0; i < n; i++) {
		if(document.getElementById(fldName + '' + i) != null){
			
			cb = eval( 'f.' + fldName + '' + i );
			
			if (cb) {
				cb.checked = c;
				n2++;
			}
		}
		delete exists;
	}
}

function logOutAlert(){
	setTimeout("alert('You have been automatically logged out. If you wish to preserve the information that you have entered on this page then open a new browser window or browser tab, log in, and then come back to this window and continue normally.')",1200000);
	//setTimeout("alert('TEST - please ignore')",1200);
	
}