// -----------------------------------------------
// Background color swapping
// -----------------------------------------------

// Swap the background of the calendar rows
function rowOnHover(row) {
	row.style.background='#f3f3f3';
	row.style.cursor='pointer';
}

function rowOffHover(row) {
	row.style.background='transparent';
}

// Swap the background of the news/event boxes
function boxOnHover(box) {
	box.style.background='#f3f3f3';
	//box.style.cursor='pointer';
	box.style.borderColor='#ccc';
}

function boxOffHover(box) {
	box.style.background='transparent url(images/layout/bg-news-events-box.gif) no-repeat left top';
	box.style.borderColor='#e3e3e3';
}

//========== input masks =================
            function noNumbers(e)
                {
                var keynum
                var keychar
                var numcheck
                if(window.event) // IE
                {
                keynum = e.keyCode
                }
                else if(e.which) // Netscape/Firefox/Opera
                {
                keynum = e.which
                }
                keychar = String.fromCharCode(keynum);
                numcheck = /\d/;
                return !numcheck.test(keychar);
                }


            function numbersOnly(e)
                {
                    var key
					var keychar
					var numcheck
					if (window.event) // IE

    {

        key = e.keyCode

    }

    else if (e.which) // Netscape/Firefox/Opera

    {

        key = e.which

    }

    else

        return true;

 

    keychar = String.fromCharCode(key);

   

    if ((key == null) || (key == 0) || (key == 8) ||

    (key == 9) || (key == 13) || (key == 27))

        return true;

 

    else if ((("0123456789").indexOf(keychar) > -1))

        return true;

 

    else

        return false;
                }
                
                
            function noSpaces(e)
                {
                var keynum
                var keychar
                var numcheck
                if(window.event) // IE
                {
                keynum = e.keyCode
                }
                else if(e.which) // Netscape/Firefox/Opera
                {
                keynum = e.which
                }
                keychar = String.fromCharCode(keynum);
                numcheck = /\ /;
                return !numcheck.test(keychar);
                }


// -----------------------------------------------
// Video Logging
// -----------------------------------------------

			function logUserAction(id,type) {
				var getstate = '/scripts/ajax/loguseraction.aspx?id=' + id + '&type=' + type;
				var oXmlHttp = zXmlHttp.createRequest();
				oXmlHttp.open("get", getstate, true);
				oXmlHttp.onreadystatechange = function () {
				if (oXmlHttp.readyState == 4) {
					if (oXmlHttp.status == 200) {
					} else { 
						alert(oXmlHttp.statusText); }
					}
				};
				oXmlHttp.send(null);
			}