function buttonClick(obj,URL){
/* 
	This code needs to be changed so that once any button of this type
	has been pressed and the form submitted, no other button can be 
	pressed (i.e. a queue started). This could either be done using a
	hidden field or some unused property on the form tag itself.
	
*/
	// Default Page Action to current Page
	if(URL=='')
		URL = thisPage;
	// Only allow button to clicked if not already clicked.
	if(document.forms[0].action=='Done') 
		alert('Your next page has already been requested\nPlease wait for it to be displayed.');
	else {
//		if(obj.class=='button')
//			if(obj.style.borderStyle!='inset') 
//				obj.style.borderStyle='inset';
		if(URL.length > 0) 
			document.forms[0].action=URL;
		document.forms[0].submit();
		document.forms[0].action='Done';
	}
} 
function buttonClick(obj,URL){
/* 
	This code needs to be changed so that once any button of this type
	has been pressed and the form submitted, no other button can be 
	pressed (i.e. a queue started). This could either be done using a
	hidden field or some unused property on the form tag itself.
	
*/
	// Default Page Action to current Page
	if(URL=='')
		URL = thisPage;
	// Only allow button to clicked if not already clicked.
	if(document.forms[0].action=='Done')
		alert('Your next page has already been requested\nPlease wait for it to be displayed.');
	else
		if(obj.style.borderStyle!='inset') {
			obj.style.borderStyle='inset';
			if(URL.length > 0) 
				document.forms[0].action=URL;
			document.forms[0].submit();
			document.forms[0].action='Done';
	}
}
function setButton(obj,field,value){
	if(obj.className == 'button_in') {
		obj.className = 'button_out'; 
	} else {
		obj.className = 'submit_in';
		field.value = value;
	}
}
function submitButton(obj,field,value){
	if(pageform.action == '')
		pageform.action = thisPage;
	if(pageform.action == 'Done')
		alert('Your next page has already been requested\nPlease wait for it to be displayed.');
	else {
		if(obj.className == 'submit_in') {
			obj.className = 'submit_out'; 
			field.value = '';
			pageform.submit();
			pageform.action = 'Done';
		} else  {
			obj.className = 'submit_go';
			field.value = value;
			pageform.submit();
			pageform.action = 'Done';
		}
	}
}

function classClick(obj){
	cn = obj.className;
	if(cn.substring(cn.length-2) == '0')
		obj.className = cn.substring(0,cn.length-2) + '1';
	else
		if(cn.substring(cn.length-1) == '1')
			obj.className = cn.substring(0,cn.length-1) + '0';
	if(cn.substring(cn.length-4) == '_in')
		obj.className = cn.substring(0,cn.length-3) + '_out';
	else
		if(cn.substring(cn.length-5) == '_out')
			obj.className = cn.substring(0,cn.length-4) + '_in';
}
function classSubmit(obj,form){
	if(form.action == '')
		form.action = thisPage;
	if(form.action == 'Done')
		alert('Your next page has already been requested\nPlease wait for it to be displayed.');
	else {
		cn = obj.className;
		if(cn.substring(cn.length-1) == '0'){
			obj.className = cn.substring(0,cn.length-1) + '2';
			form.submit();
			form.action = 'Done';
		} else {
			if(cn.substring(cn.length-1) == '1') {
				obj.className = cn.substring(0,cn.length-1) + '0';
				//form.submit();
			}
		}
		if(cn.substring(cn.length-4) == '_out'){
			obj.className = cn.substring(0,cn.length-4) + '_go';
			form.submit();
			form.action = 'Done';
		} else {
			if(cn.substring(cn.length-3) == '_in') {
				obj.className = cn.substring(0,cn.length-3) + '_out';
				//	form.submit();
			}
		}
	}
}
 
 