﻿
function LinkBtnMouseOver(e) {

    if (e.className != 'buttonDisabled')
        e.className='buttonHover';
}

function LinkBtnMouseUp(e)
{
    //e.className = 'buttonDisabled';
}

function LinkBtnMouseDown(e) {

    if (e.className != 'buttonDisabled') {
        e.onmouseover = null;
        e.className = 'buttonClicked';
    }
}

function LinkBtnMouseOut(e) {

    if (e.className != 'buttonDisabled')
        e.className = 'buttonNormal';
   
}

function Validate() {
    Page_ClientValidate('PortalValidation');
    if (!Page_IsValid)
        $find('dlgError_mpe').show();
}

function ValidateGroup(validationGroup, dlgBehaviorId) {
    Page_ClientValidate(validationGroup);
    if (!Page_IsValid)
        $find(dlgBehaviorId).show();
}
function isIE() {
    var browser = navigator.appName;
    var b_version = navigator.appVersion;
    var version = parseFloat(b_version);
    if ((browser == "Microsoft Internet Explorer") && (version >= 4)) {
        return true;
    }
    return false;
}

//this only works in firebug
var log = function(item) {
    if (window.console)
        if (window.console.firebug)
        console.info(item);
}

//this only works in firebug
var fbalert = function(item) {
    if (window.console)
        if (window.console.firebug)
        console.info("alert: " + item.toString());
}

function addfav() {
    if (document.all) {
        window.external.AddFavorite(window.location.href, 'Learning Environment Portal');
    }
}
function sethome() {
    document.body.style.behavior = 'url(#default#homepage)';
    document.body.setHomePage(window.location.href);
}

function disablelatetimer() {
    var timer = $find('tmrLate');
    if (timer)
        timer._stopTimer();
}

function hidethermometer() {
    var therm = document.getElementById("thermometer");
    if (therm)
        therm.visible = false;
}

function showthermometer() {
    var therm = document.getElementById("thermometer");
    if (therm)
        therm.visible = true;
}