			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 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 preloadImages()
			{
			MM_preloadImages('gfx/centralcoastyouthdesk.gif','gfx/nav-dot.gif','gfx/nav-dot-over.gif', 'gfx/news.gif','gfx/news-over.gif', 'gfx/links.gif', 'gfx/links-over.gif', 'gfx/home.gif', 'gfx/home-over.gif', 'gfx/directory.gif', 'gfx/directory-over.gif', 'gfx/calendar.gif','gfx/calendar-over.gif','careers-advice-australia.gif', 'department-of-education-and-training.gif','gfx/bg-login.gif','gfx/log-in.gif','gfx/btn-go.gif', 'gfx/btn-go-over.gif');
			}
			

	


			function toggledisplay(nr)
			{	
				if (document.layers)
				{
					current = (document.layers[nr].display == 'none') ? 'block' : 'none';
					document.layers[nr].display = current;
				}
				else if (document.getElementById)
				{
					vista = (document.getElementById(nr).style.display == 'none') ? 'block' : 'none';
					document.getElementById(nr).style.display = vista;
				}
				else if (document.all)
				{
					current = (document.all[nr].style.display == 'none') ? 'block' : 'none';
					document.all[nr].style.display = current;
				}
			}
			function setdisplay(nr,display)
			{	
				if (document.layers)
				{
					document.layers[nr].display = display;
				}
				else if (document.getElementById)
				{
					document.getElementById(nr).style.display = display;
				}
				else if (document.all)
				{
					document.all[nr].style.display = display;
				}
			}
			function openpopup(href)
			{
				window.open(href,'mywindow','width=400,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no');
			}
			

			function checkAllCalendar(field)
			{
			for (i = 0; i < field.length; i++)
				{
					field[i].checked = true ;
				}
				reloadCalendarItems();
			}
			
			function uncheckAllCalendar(field)
			{
			for (i = 0; i < field.length; i++)
				{
					field[i].checked = false ;
				}
				reloadCalendarItems();
			}
			
			function checkAllNews(field)
			{
			for (i = 0; i < field.length; i++)
				{
					field[i].checked = true ;
				}
				reloadNewsItems();
			}
			
			function uncheckAllNews(field)
			{
			for (i = 0; i < field.length; i++)
				{
					field[i].checked = false ;
				}
				reloadNewsItems();
			}

			
			function checkAll(formname, fieldname, numCheckboxes)
			{
			for (i = 1; i <= numCheckboxes; i++)
				{
					var currField=fieldname + "[" + i + "]" ;
					//alert (formname + ' ' + currField);
					document.forms[formname].elements[currField].checked = true;
				}
			}

			function uncheckAll(formname, fieldname, numCheckboxes)
			{
			for (i = 1; i <= numCheckboxes; i++)
				{
					var currField=fieldname + "[" + i + "]" ;
					//alert (formname + ' ' + currField);
					document.forms[formname].elements[currField].checked = false;
				}
			}
			
			
			function submitForm(givenForm)
			{
				givenForm.submit();				
			}
			
			
			function wordCounter(field, countfield, maxlimit) {
				 var text = field.value;
				 text = text.replace(/^\s*|\s*$/g,''); //removes whitespace from front and end
				 var count_array = text.split("\n");
				 var wordcounter=0;
				 for(var i = 0; i<count_array.length; i++){
					//alert(count_array[i]);
					count2_text = count_array[i].replace(/^\s*|\s*$/g,'');
					if(count2_text!=""){
						count_array2 = count2_text.split(" ");
						for(var i2 = 0; i2<count_array2.length; i2++){
							//alert(count_array2[i2]);
							if(count_array2[i2].length!=" " || count_array2[i2].length!="\n\r")
								wordcounter++;
						}
					}
				 }
				 countfield.value = wordcounter;
	
				if ( wordcounter > maxlimit ){	
					countfield.style.color = "red";	
				} else {	
					countfield.style.color = "";	
				}
			
			}

			function textCounter(field, countfield, maxlimit) {
				
				countfield.value = field.value.length;
				
				if ( field.value.length > maxlimit ){	
					countfield.style.color = "red";	
				} else {	
					countfield.style.color = "";	
				}
				
			  if (field.value.length > maxlimit)
			      {field.value = field.value.substring(0, maxlimit);}
			      else
			      {countfield.value = maxlimit - field.value.length;}
			  }
//  End -->
			
	/*		
///////////////////////////////////////////////////////////////////////
//     This fade library was designed by Erik Arvidsson for WebFX    //
//                                                                   //
//     For more info and examples see: http://webfx.eae.net          //
//     or contact Erik at http://webfx.eae.net/contact.html#erik     //
//                                                                   //
//     Feel free to use this code as long as this disclaimer is      //
//     intact.                                                       //
//                                                                   //
//     Last updated: 2000-11-22                                      //
///////////////////////////////////////////////////////////////////////

window.status = "Loading fade package...";

var fadeSteps = 4;				// Number of steps to loop
var fademsec = 25;				// The time between each step (note that most computer have problem
								// handling to small values due to hardware limitations)


var fadeArray = new Array();	// Needed to keep track of wich elements are animating

//////////////////  fade  ////////////////////////////////////////////////////////////
//                                                                                  //
//   parameter: fadeIn                                                              //
// description: A boolean value. If true the element fades in, otherwise fades out  //
//              The steps and msec are optional. If not provided the default        //
//              values are used                                                     //
//                                                                                  //
//////////////////////////////////////////////////////////////////////////////////////

function fade(el, fadeIn, steps, msec) {

	if (steps == null) steps = fadeSteps;
	if (msec == null) msec = fademsec;
	
	if (el.fadeIndex == null)
		el.fadeIndex = fadeArray.length;
	fadeArray[el.fadeIndex] = el;
	
	if (el.fadeStepNumber == null) {
		if (el.style.visibility == "hidden")
			el.fadeStepNumber = 0;
		else
			el.fadeStepNumber = steps;
		if (fadeIn) {
			el.style.filter = "Alpha(Opacity=0)";
			el.style.MozOpacity = 0;
		}
		else {
			el.style.filter = "Alpha(Opacity=100)";
			el.style.MozOpacity = 1;
		}
	}
			
	window.setTimeout("repeatFade(" + fadeIn + "," + el.fadeIndex + "," + steps + "," + msec + ")", msec);
}

//////////////////////////////////////////////////////////////////////////////////////
//  Used to iterate the fading

function repeatFade(fadeIn, index, steps, msec) {	
	el = fadeArray[index];
	
	c = el.fadeStepNumber;
	if (el.fadeTimer != null)
		window.clearTimeout(el.fadeTimer);
	if ((c == 0) && (!fadeIn)) {			//Done fading out!
		el.style.visibility = "hidden";		// If the platform doesn't support filter it will hide anyway
//		el.style.filter = "";
		return;
	}
	else if ((c==steps) && (fadeIn)) {	//Done fading in!
		el.style.filter = "";
		el.style.MozOpacity = 1;
		el.style.visibility = "visible";
		return;
	}
	else {
		(fadeIn) ? 	c++ : c--;
		el.style.visibility = "visible";
		el.style.filter = "Alpha(Opacity=" + 100*c/steps + ")";
		el.style.MozOpacity = c / steps;

		el.fadeStepNumber = c;
		el.fadeTimer = window.setTimeout("repeatFade(" + fadeIn + "," + index + "," + steps + "," + msec + ")", msec);
	}
}

window.status = "";
*/
