﻿// Jscript

//$(document).ready(function(){});
var dotnetprefix = "ctl00_ContentPlaceHolder1_";

function toggleLOGINBOXES() {
    //alert($("#tdLOGINANIMATE").height());
    var trh = $("#tdLOGINANIMATE").height();
    trh = Math.abs(trh);
    //alert(trh);
    if (trh == 1 || trh == 0) {
        $("#trLOGINBOX").show();
        $("#tdLOGINANIMATE").animate({ height: 300 }, 500);
        setTimeout("$('#tdLOGINCONTENT').fadeIn();", 650);
    } else {
        //alert('firing fadeout');
        $("#tdLOGINCONTENT").fadeOut();
        setTimeout("$('#tdLOGINANIMATE').animate({ height: 0 }, 500);", 500);
        setTimeout("$('#trLOGINBOX').hide();", 800);
    }
}

function RemoveBackground() { $("#overlayBackground").remove(); }
function AppendBackground() {
    var background = $('<div/>');
    $(background).attr("id", "overlayBackground").animate({ "opacity": '.8' }, 1000).css({ "width": $(document).width(), "height": $(document).height() });
    $("body").append(background);
    $("body").append('</div>');
}

function toggleFade(objid) {
    var sty = $("#" + objid).attr("style");

    if (sty.indexOf('none') > 0) {
        $("#" + objid).fadeIn();
    } else {
        $("#" + objid).fadeOut();
    }
    //alert($("#"+objid).attr("style"));
}

function Highlight(obj) {$(obj).attr("style", "cursor:hand;background:#cccccc;");}
function UnHighlight(obj, color) {$(obj).attr("style", "background:" + color);}
