	document.cookie="SID=" + (new Date()).getTime()

	window.onerror = handleError;

	function handleError() { return true; }

	if (top.location != self.location) { top.location.replace(self.location); }
					
	function ShowDialog(name,height,width) {
		var retval="";
		var props = "width=" + width + ",height=" + height + ",resizable=no"
		retval=window.open(name,"",props);
		document.forms[0].txtUser.focus();
		if(retval!="" && retval!=null) {
			if (retval!="true") {
				var txt = document.getElementById("txtUserName");
				if (txt!=null) { txt.focus(); txt.select(); }
			} else {
				document.location.replace('VU/vu.aspx');
			}
		}
	}
	
	function setFU() {
		var t=setTimeout("FocusUN()",500);
	}
	function FocusUN() {
		var txt = document.getElementById("txtUserName");
		if (txt!=null) { txt.focus(); txt.select(); }
	}
	
	function showAlert(msg) {
		if (msg!=null || msg!="") {
			alert(msg);
		}
	}

    function capsDetect(e){
        //if the browser did not pass event information to the handler,
        //check in window.event
        if( !e ) { e = window.event; } if( !e ) { return; }
        //what (case sensitive in good browsers) key was pressed
        //this uses all three techniques for checking, just in case
        var theKey = 0;
        if( e.which ) { theKey = e.which; } //Netscape 4+, etc.
        else if( e.keyCode ) { theKey = e.keyCode; } //Internet Explorer, etc.
        else if( e.charCode ) { theKey = e.charCode } //Gecko - probably not needed
        //was the shift key was pressed
        var theShift = false;
        if( e.shiftKey ) { theShift = e.shiftKey; } //Internet Explorer, etc.
        else if( e.modifiers ) { //Netscape 4
        //check the third bit of the modifiers value (says if SHIFT is pressed)
        if( e.modifiers & 4 ) { //bitwise AND
        theShift = true;
        }
        }
        //alert(theKey + ", " + theShift);
        document.getElementById('divMayus').style.visibility = 'hidden';
        //if upper case, check if shift is not pressed
        if( theKey > 64 && theKey < 91 && !theShift ) {
        document.getElementById('divMayus').style.visibility = 'visible';
        }
        //if lower case, check if shift is pressed
        else if( theKey > 96 && theKey < 123 && theShift ) {
        document.getElementById('divMayus').style.visibility = 'visible';
        }                  
    }
