function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
return myWidth;
}
//--------------------------
myWidth=alertSize();
var docStyle0='<style>\nbody{font-size:55%} body, select, table, input {font-family: arial, sans-serif;}\n#sbar_right{width:9em}\n#activepanel{width:23%}\n#sbar_menu{background:black url(\'../graphics/small_menu.png\') no-repeat center;height:26.8em;}#search, #weekly_ads, #willing, #traineeship, #seeking, #inform, #survey,#appform{background:rgb(237,110,0) url(\'../graphics/small_corner.gif\') no-repeat top left}\n<\/style>\n';
if(myWidth<900){document.write(docStyle0);}
//--------------------------

function Doco(winheight,winwidth) {
	var winl = (screen.width - winwidth) / 2;
	var wint = (screen.height - winheight) / 2;

	windowprops = 'top='+(wint-20)+',left='+winl+', width='+winwidth+',height='+winheight+',scrollbars=no';
	window.open('',"preview", windowprops);
	}

function expand(thistag,text1,text2,textTag) {
   	styleObj = document.getElementById(thistag).style;
   	if(styleObj.display == 'none'){

   	        if(text2>''){document.getElementById(textTag).innerHTML=text2;}
   		styleObj.display = '';
		   }
	else{
		styleObj.display = 'none';
   	        if(text1>''){document.getElementById(textTag).innerHTML=text1;}
   	}
   }

function newPage(destinationPage){
	var thisString = '<form name="valerie" action="" method="POST">\n'
	+ '<input type="hidden" name="page" value="'+ destinationPage + '">\n'
	+ '<form>\n';
	document.open();
	document.write(thisString);
	document.close();
	document.valerie.submit();
	}
	
function popUp(pageCheck){
	if (pageCheck==1)
 		{ testwindow=open ('urgent.php','_blank','status=1, height=150, width=450');
		testwindow.moveTo(200,200);
		}
 	}
 	
function isEmailAddr(email)
{
  var result = false;
  var theStr = new String(email);
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function validEmail(formField,fieldLabel,required)
{
	var result = true;

	if (required && !validRequired(formField,fieldLabel))
		result = false;

	if (result && ((formField.value.length < 3) || !isEmailAddr(formField.value)) )
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		formField.focus();
		result = false;
	}

  return result;

}

function radio_validate(formObj) {
var isOK = false;
for (i=0;i<formObj.elements.length;i++) {
currElem = formObj.elements[i]
if (currElem.type == "radio" && currElem.checked) {
isOK=true;
break;
}
}
if (!isOK) alert("You need to select an option to respond to the survey!");

return isOK;
}


function Newsletter_Validator(theForm,checkMax,checkMin)
{
        checkMax++;
        var result=false;
 	for (var i=checkMin; i<checkMax; i++){
      		var doc='nl'+i+'';
      		if(document.getElementById(doc).checked){
        		var result=true;
			}
		}
	if(!result){
		alert('You need to specify at least one newsletter you would like.');
		return false;
		}
	if (!validEmail(theForm.email,"Email Address",true))
		return false;

        return true;
	}
/*
Script made by Martial Boissonneault © 2001-03 http://getElementById.com/
This script may be used and changed freely as long as this msg is intact
Visit http://getElementById.com/ for more free scripts and tutorials.
*/
var d_o='rgb(237,110,0)';
var l_o='rgb(247,163,10)';
var mw='#FFFFFF';
var mb='#000000';

var ie5= (document.getElementById && document.all);
var ns6= (document.getElementById && !document.all);

var MenuTop = 19.4;    // menu top position
var MenuLeft = 26;  // how much your menu slide in and out

var timerID1 = null;
var timerID2 = null;

function statik(){
	if(ie5){
    		document.getElementById('menu').style.top = document.body.scrollTop + (MenuTop*10);
    	}
    	if(ns6){
    		document.getElementById('menu').style.top = window.pageYOffset + MenuTop;
    	}
}

function cBG(obj, bgColor, fgColor) {
   	if(ie5 || ns6){
	    	obj.style.backgroundColor = bgColor;
	    	obj.style.color = fgColor;
	}
}

function slideIn(){
	if(ie5 || ns6){
		if(parseInt(document.getElementById('menu').style.left) < 0){
			clearTimeout(timerID2);
			document.getElementById('menu').style.left = parseInt(document.getElementById('menu').style.left) + .5 + "em";
			timerID1=setTimeout("slideIn()", 30);
		}
	}
}

function slideOut(){
	if(ie5 || ns6){
		if(parseInt(document.getElementById('menu').style.left) > -MenuLeft){
			clearTimeout(timerID1);
			document.getElementById('menu').style.left = parseInt(document.getElementById('menu').style.left)-1.5 + "em";
			timerID2=setTimeout("slideOut()", 30);
  		}
	}
}

function reDo(){
	if(ie5 || ns6){
		window.location.reload();
	}
}

function slideMenuInit(){
    	if(ie5 || ns6){
		document.getElementById('menu').style.visibility = "visible";
		document.getElementById('menu').style.left = -MenuLeft + "em";
		document.getElementById('menu').style.top = MenuTop + "em";
	}
}

