//Bug fix in IE Mac
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("uncgBlueNavDrop");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
function except(){
	var exp = new RegExp (escape("unsupbrowser") + "=([^;]+)");
	var description=navigator.userAgent.toLowerCase();
	IE6 = ((document.all)&&(description.indexOf("msie 6.")!=-1)) ? true : false;
	IE7 = ((document.all)&&(description.indexOf("msie 7.")!=-1)) ? true : false;
	fari = (description.indexOf("safari")!=-1) ? true : false;
	Ns72=(description.indexOf("netscape/7.2.")!=-1) ? true : false;
	Ns8=(description.indexOf("netscape/8.")!=-1) ? true : false;
	if((Ns8)&&(description.indexOf("netscape/8.0")!=-1))
		Ns8=false;	
	Foxy=(description.indexOf("firefox/1.5.")!=-1) ? true : false;
	Zilla=(description.indexOf("gecko")!=-1) ? true : false;
	mac=(description.indexOf("mac")!=-1) ? true : false;
	if ((Zilla)&&(!Foxy)&&(!Ns8)){
		if(parseInt((description.substring(description.indexOf("gecko")+6,description.indexOf("gecko")+12)))<200509)
			Zilla=false;
	}
	 if(!(exp.test (document.cookie + ";"))){
	 	var expireDte = new Date ();
	 	expireDte.setDate(expireDte.getDate()+15);
		if((!IE6)&&(!IE7)&&(!Foxy)&&(!Ns8)&&(!Zilla)&&(!mac)){
			alert('You are using a browser other the latest Internet Explorer or Mozilla based browsers\nwhich are the only browsers certified for use with e-Spartan.\nIf you choose to use a non-supported browser,\nyou will not be able to receive assistance from UNCG ITS.');
			document.cookie = escape("unsupbrowser") + "=" + escape("true") + "; expires=" + expireDte + "; path=/";
		}
		if((mac)&&((!Ns72)&&(!fari)&&(!Foxy)&&(!Ns8))){
			alert('You are using a browser other than the latest Mozilla based browers or Safari\nwhich are the only browsers certified for use with e-Spartan.\nIf you choose to use a non-supported browser,\nyou will not be able to receive assistance from UNCG ITS.');
			document.cookie = escape("unsupbrowser") + "=" + escape("true") + "; expires=" + expireDte + "; path=/";
		}
	}
}
function checkFrm(frmObj){
    var regex = /^\s*$/i;
      for(var i=0; i<frmObj.elements.length; i++){
        if(regex.test(frmObj.elements[i].value)){
					if(frmObj.elements[i].id=="Username")
						alert("Enter your user name.");
					else if(frmObj.elements[i].id=="Password")
						alert("Enter your password.");
					else
          	alert("Please fill in all the form fields.");
          frmObj.elements[i].focus();
          return false;
       }
    }
  return true;
}

window.onload=	startList;except();

