    function checkForm(form){
        if(form.btnSubmit.value=="login") {
            if(form.txtLogin.value==""){form.txtLogin.focus();alert("enter your username");return false;}
            if(form.txtPassword.value==""){form.txtPassword.focus();alert("enter your password");return false;}
        }
    }
	function hideShow() {
		var bLogout;
		if (document.all)
		{
			bLogout = document.getElementById('loginText').innerText.indexOf("Logout");
		}
		else
		{
			bLogout = document.getElementById("loginText").textContent.indexOf("Logout");
		}

		if (bLogout != -1) {
			document.registrationForm.action = "LoginForm.aspx?logout=logout"
			document.registrationForm.submit();
		}
		
		LoginBox = document.getElementById("divLogin");
		if (LoginBox.style.display=="none") {
			LoginBox.style.display = "block";
			//document.getElementById("txtLogin").focus();
		}
		else {
			LoginBox.style.display = "none";
		}
	}
	
	function HL(E){
		while (E.tagName!="TR")
			{E=E.parentElement;}
		E.className = "anchorMenuOver";
	}

	function DL(E){
		while (E.tagName!="TR")
			{E=E.parentElement;}
		E.className = "";
	}				

	function openw(url,nom,dimx,dimy) {
		var loggedIn = '<%#Session["sLogin"]%>';

		if (cl != null) { 
			if (cl.name != 'annexe') {
				cl.close();
				cl=null
				} 
			else {
			var cl=null
			}
		}
		
		var sReal = url.indexOf('REAL'); //not logged in
		if (loggedIn=='' && sReal>0) {
			alert('In order to sit a qualifying quiz you must first log in.');
			return;	
		}

		featur = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,alwaysRaised=yes,system=no,resizable=no,width="+ dimx + ",height=" + dimy;
		cl = window.open(url,nom,featur);
		cl.focus()
	}
	
	function highlightLogin() {
		document.registrationForm.txtLogin.style.backgroundColor = "#B5FDB3";
		document.registrationForm.txtPassword.style.backgroundColor = "#B5FDB3";
		document.registrationForm.txtLogin.focus();
	}
	
	function openXLS(url,nom,dimx,dimy) {
		featur = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,alwaysRaised=yes,system=no,resizable=no,width="+ dimx + ",height=" + dimy;
		cl = window.open(url,nom,featur);
		cl.focus()
	}

	function openForgotten(){
		var sHref = 'IForget.aspx';
		window.location.href = sHref;
	}		
	
    var aTags = new Array('div','td','tr');
    var aSizes = new Array('9px','10px','11px','12px','13px','14px','15px','16px','17px');
    var sStartSize = 2;

    function ChangeText(trgt, inc) {
	    if (!document.getElementById) return
    		
	    var d = document,cEl = null,sz = sStartSize,i,j,cTags;
    		
	    sz += inc;
	    if ( sz < 0 ) sz = 0;
	    if ( sz > 6 ) sz = 6;
	    sStartSize = sz;

	    if (!(cEl = d.getElementById(trgt))) cEl = d.getElementsByTagName(trgt)[0];
    	
	    cEl.style.fontSize = aSizes[sz];
    	
	    for (i=0; i<aTags.length; i++)
	    {
	        cTags = cEl.getElementsByTagName(aTags[i]);
	        for (j=0; j<cTags.length; j++) cTags[j].style.fontSize = aSizes[sz];
	    }
    } 
