///////////////////////////////////////////////////////////////////////////////////
// Javascript for E-Evolve Repository
// 11:54 04/09/2006
// Paul Berry (pberry2@uclan.ac.uk)
// Version 1.0
// This code is subject to copyright.
///////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////
// Function to confirm deletions in the admin section
function confirm_me(url){
var answer = confirm("Are you Sure!? - Please click on OK to continue with the deletion, or CANCEL to be directed to the main admin page.")
if (!answer){
	window.location="http://employability.org.uk/admin.php";
}else{
	window.location=url;
}
}

///////////////////////////////////////////////////////////////////////////////////
// Function to grey out certain form elements based on given criteria
function checkfields(){
if (document.objectform.aggregation_level.value == "packaged object") {
	document.objectform.learning_resource_type.disabled=true;
return (true);
}else{
	document.objectform.learning_resource_type.disabled=false;
}
} 

///////////////////////////////////////////////////////////////////////////////////
// navigation function
function navi(by) {
var number = by.selectedIndex;
top.location.href = by.options[number].value; 

return true;
}

///////////////////////////////////////////////////////////////////////////////////
// Function to expand selected div elements and change style
function updateinsti(s) {
  	xt = document.getElementById(s).style;
  	if (xt.display=='none') {
		xt.display = '';
	}else{
		xt.display = 'none';
	}
}



function openRequestedPopup(id)
{
 
window.open('http://employability.org.uk/ow.php?id=' + id', 'Lyndsey Overwrite Files', 'width=420,height=230,resizable,scrollbars=yes,status=1');
}

// EOF

