function unlockPass() {
	var confirmed= confirm('Changing the password for this school will also update the password for this schools Challenge site,\n are you sure you want to proceed?'); 
	if (confirmed) { 
		document.getElementById('password').disabled = false;
		document.getElementById('unlock').style.display = 'none';
	}		
}
function fnLoadPngs() {
	
}
function fnLoadPngs() {
	
}
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function authoriseit(msg,theform) {
   
    var confirmed= confirm(msg); 
	if (confirmed== true) { 
		document[theform].submit();
	} 

}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,
  j=0,x,a=MM_swapImage.arguments;
  document.MM_sr = new Array; 
  for(i=0;i<(a.length-2);i+=3)
     if ((x=MM_findObj(a[i]))!=null){
		 document.MM_sr[j++]=x; 
		 if(!x.oSrc) 
		 x.oSrc=x.src; 
		 x.src=a[i+2];
	}
}
//-->
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
var timeoutID;
var isMac = (navigator.appVersion.indexOf("Mac")!=-1)?true:false;
var isIE = (navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)?true:false;

function open_menu(id){
	clearTimeout(timeoutID);
	for(var i=1;i<=2;i++){
		if(i==id)continue;
		document.getElementById("menu"+i).style.display = "none";
		}
	document.getElementById("menu"+id).style.display = "block";
	}

function set_menu_timeout(id){
	timeoutID = setTimeout("close_menu("+id+")",500);
	}
	
function close_menu(id){
	clearTimeout(timeoutID);
	document.getElementById("menu"+id).style.display = "none";
	}

function add_menu_highlight(obj){
	obj.parentNode.style.backgroundColor = "#ff9900";
	obj.style.color = "#fff";
	}

function remove_menu_highlight(obj){
	obj.parentNode.style.backgroundColor = "";
	if(obj.parentNode.className == "divider"){
		obj.style.color = "#00acd5";
		}
	}

function hide_flash(){
	document.getElementById("animation").style.display = "none";
	}

function add_highlight(id){
	document.getElementById(id).src = "../images/arrow_"+id+"_2.gif";
	}
	
function rem_highlight(id){
	document.getElementById(id).src = "../images/arrow_"+id+"_1.gif";
	}

function preload_images(){
	var imgs = [];
	for(var i=0;i<arguments.length;i++){
		imgs[i] = new Image();
		imgs[i].src = arguments[i];
		}
	}
function menustruct(sectionID) {
  for (x=1; x < 8; x++) {
   myEl = document.getElementById('section'+x+'navigation');
   if (myEl) {
	   if (x == sectionID) {
			document["section"+sectionID].src = "/awards/images/" + sectionID + "_selected.gif";
			myEl.style.display = 'block';
		 } else {
			// document.getElementById('section'+x+'status').style.display = 'none';
			myEl.style.display = 'none';
		}
	}
  }
}
function toggleSection(sectionID) {

   myNavigationDiv = document.getElementById('section'+sectionID+'navigation');
   
   if (myNavigationDiv.style.display == 'none') {
        document["section"+sectionID].src = "/awards/images/" + sectionID + "_selected.gif";
		myNavigationDiv.style.display = 'block';
		
   } else {
        document["section"+sectionID].src = "/awards/images/" + sectionID + "_off.gif";
		myNavigationDiv.style.display = 'none';
		
   }
   for (x=1; x<8; x++) {
      myNavigationDiv = document.getElementById('section'+x+'navigation');
      if (x != sectionID) {
	     if (myNavigationDiv != null) { 
		    if (myNavigationDiv.style.display == 'block') {
		       document["section"+x].src = "/awards/images/" + x + "_off.gif";
		       myNavigationDiv.style.display = 'none';
			}
         } 
	  }
   }
}
function validateContactUs(theform) {
	err = '';
	err += check(theform.name,'name');
	err += check(theform.email,'email address');
	err += check(theform.message,'message');

	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}function check(el,fieldname) {
	if (el.value=='') {
		return 'You must enter a value for the ' + fieldname + ' field.\n';
	} else {
		return '';
	}
}
function checkEmail(el) {
	if (/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/.test([el.value])) {
		return '';
	} else {
		return 'You must enter a valid email address.';
	}
}
function validateAskGnome(theform) {
	err = '';
	err += check(theform.subject,'subject');
	err += check(theform.message,'message');

	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function clearForm() {
	document.getElementById('name').value = "";
	document.getElementById('email').value = "";
	document.getElementById('message').value = "";
}
mac_ie_menu_width_hack = function(){
	/*
	To fix the auto width div bug in IE5 Mac
	*/
	if(isIE&&isMac){
		root = document.getElementById("container");
		for (var i=0;i<root.childNodes.length;i++){
			node = root.childNodes[i];
			if(node.className == "menu"){
				node.style.width = "126px";
			}
		}
	}
}
function validateRegistration(theform) {
	err = '';
	err += check(theform.password,'Password');
	//err += check(theform.classpassword,'ClassPassword');
	if (theform.password.value!=theform.confpassword.value) err += 'Password and confirmation password must match.\n';err += check(theform.name,'Name');
	err += checkEmail(theform.email,'Email');
	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateContactUs(theform) {
	err = '';
	err += check(theform.name,'name');
	err += check(theform.email,'email address');
	err += check(theform.message,'message');

	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateFeedback(theform) {
	err = '';
	err += check(theform.name,'name');
	err += check(theform.username,'school username');
	err += check(theform.email,'email');
	err += check(theform.browser,'browser');
	err += check(theform.os,'operating system');
	err += check(theform.problem,'problem');

	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateAskGnome(theform) {
	err = '';
	err += check(theform.subject,'subject');
	err += check(theform.message,'message');

	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateEvent(theform) {
	err = '';
	err += check(theform.eventname,'Event Name');
	err += check(theform.eventloc,'Event Location');
	if ((!theform.raisingmoney.checked)&&(!theform.givingtime.checked)&&(!theform.givingvoice.checked)) {
		err += 'You must tick either raising money, giving time or giving voice.\n';
	}	
	
	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateCalendar(theform) {
	err = '';
	err += check(theform.eventname,'Event Name');
	err += check(theform.eventinfo,'Event Information');
	err += check(theform.eventloc,'Event Location');
	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateActivists(theform) {
	err = '';
	err += check(theform.activistname,'Activist Name');
	err += check(theform.activistform,'Form');
	err += check(theform.role,'role');
	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateCharityInfo(theform) {
	err = '';
	err += check(theform.decide,'charities you support');
	err += check(theform.groups,'names of charities');
	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateEndOfYear(theform) {
	err = '';
	err += check(theform.title,'Title');
	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateGweek(theform) {
	err = '';
	err += check(theform.title,'Title');
	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateNextYear(theform) {
	err = '';
	err += check(theform.title,'Title');
	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateSearch(theform) {
	err = '';
	err += check(theform.schoolname,'school name');
	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}
function validateSchool(theform) {
	err = '';
	err += check(theform.aboutschool,'About Your School');
	err += check(theform.areaschool,'About Your School\'s Area');
	if (err=='') {
		return true;
	} else {
		alert('You have not completed the form:\n\n'+err);
		return false;
	}
}

function check(el,fieldname) {
	if (el.value=='') {
		return 'You must enter a value for the ' + fieldname + ' field.\n';
	} else {
		return '';
	}
}
function checkEmail(el) {
	if (/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/.test([el.value])) {
		return '';
	} else {
		return 'You must enter a valid email address.';
	}
}
function clearForm() {
	document.getElementById('name').value = "";
	document.getElementById('email').value = "";
	document.getElementById('message').value = "";
}
function checkArchive(theform) {
   str = '';
   fOK = true;
   
   if (theform.archiveid.value == "#") {
      str = 'Please select archive';
	  fOK = false;
   }
   
   if (!fOK) {
      alert(str);   
   }
   return fOK;
}
function limitDateOnMonth(dayFieldID,monthFieldID,yearFieldID) {
	  yearEl = document.getElementById(yearFieldID);
	  monthEl = document.getElementById(monthFieldID);
	  dayEl = document.getElementById(dayFieldID);
      year = parseInt(yearEl.options[yearEl.selectedIndex].value);
      month = monthEl.selectedIndex;
      day = dayEl.selectedIndex;
      dayEl.options.length = 0;
      var days = new Array(31, ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0 ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
      for(i = 0; i < days[month]; i++)
      {
        dayEl.options.length = dayEl.options.length + 1;
        dayEl.options[i].value = i + 1;
        dayEl.options[i].text = i + 1;
      }
      dayEl.selectedIndex = (day < dayEl.options.length) ? day : dayEl.options.length - 1;
}	
window.onload = mac_ie_menu_width_hack;preload_images('../images/arrow_fwd_2.gif','../images/arrow_back_2.gif','../images/r1.gif','../images/r2.gif','../images/r3.gif','../images/r4.gif','../images/r5.gif','../images/r6.gif','../images/r7.gif','../images/r8.gif');
