// JScript File
//<!--


//(function mainmenu() {
//    $(" #nav ul ").css({ display: "none" }); // Opera Fix
//    $(" #nav li").click(function () {

//        $(this).find('ul:first').css({ visibility: "visible", display: "none" }).show(400);
//    }, function () {
//        $(this).find('ul:first').css({ visibility: "hidden" });
//    });
//})(jQuery)



function clearText(obj)
{ 
    obj.value = "";
    obj.style.color = "#000";
}
 
//this function is called when date is selected in calendar
var preSelectedDate;

function UpdateTaskListPanel() {
	grid1.refresh();
	//alert('refresh');
}
function movr(obj)
{      
    obj.style.backgroundColor ="#E0E0E0";
}
function mout(obj)
{
    obj.style.backgroundColor ="#FFF";
}
function mclk(i, loc) {
 
  var pos = loc.pathname.indexOf("/",1);
  
  var strAppName = loc.pathname.substring(0,pos);
  
  var url = strAppName + i;
     
  window.location.href=url
}

function mclknew(i, loc) {
 
  var pos = loc.pathname.indexOf("/",1);
  
  var strAppName = loc.pathname.substring(0,pos);
  
  var url = strAppName + i;
       
  window.open(url);
}

function mclknewpage(i, loc) {
        
  window.open(i);
}

function mclkexternal(i, loc) {

    window.location.href = i
}

function showdiv(i) {
    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById(i).style.visibility = 'visible';
        document.getElementById(i).style.display = 'inline';
    }
    else {
        if (document.layers) { // Netscape 4
            document.i.visibility = 'visible';
            document.i.display = 'inline';
        }
        else { // IE 4
            document.all.i.style.visibility = 'visible';
            document.all.i.style.display = 'inline';
        }
    }
} 

function printablePop(moduleID){
	theURL="printable.aspx?mid=" + moduleID;
	wname = "_blank"
	window.open(theURL, wname, 'height=545,width=675,scrollbars=yes,resizable=no,toolbar=no');
}

function ClassPlusPop(){
	theURL="classpluspopup.aspx";
	wname ="popup"
	window.open(theURL, wname, 'height=545,width=675,scrollbars=yes,resizable=no,toolbar=no');}

function studioPrint() {    
    theURL = "depco_studio_print.aspx";
    wname = "popup"
    window.open(theURL, wname, 'height=545,width=675,scrollbars=yes,resizable=no,toolbar=no');    
}

function closeMe() {
    window.close();
}

function resize() {
    var frame = document.getElementById("container");
    frame.style.width = "675px";
}

function fnTrapKD(btn, event) {
       if (document.all) {
            if (event.keyCode == 13) {
                event.returnValue = false;
                event.cancel = true;
                btn.click();
            }
        }
        else if (document.getElementById) {
            if (event.which == 13) {
                event.returnValue = false;
                event.cancel = true;
                btn.click();
            }
        }
        else if (document.layers) {
            if (event.which == 13) {
                event.returnValue = false;
                event.cancel = true;
                btn.click();
            }
        }
    }

    function setFocus(control, event) {
        if (document.all) {
            if (event.keyCode == 13) {
                event.returnValue = false;
                event.cancel = true;
                control.focus();
            }
        }
        else if (document.getElementById) {
            if (event.which == 13) {
                event.returnValue = false;
                event.cancel = true;
                control.focus();
            }
        }
        else if (document.layers) {
            if (event.which == 13) {
                event.returnValue = false;
                event.cancel = true;
                control.focus();
            }
        }
    }
    
    function WebForm_FireDefaultButton(event, target) {

        if (event.keyCode == 13 && !(event.srcElement && (event.srcElement.tagName.toLowerCase() == "textarea"))) {

            var defaultButton;

            if (__nonMSDOMBrowser) {

                defaultButton = document.getElementById(target);

            } else {

                defaultButton = document.all[target];
            }

            /* This is the only addition to this method, the rest is identical to MS version.*/

            if (defaultButton && typeof (defaultButton.click) == "undefined") {

                defaultButton.click = function() {

                    var result = true;

                    if (defaultButton.onclick)

                        result = b.onclick();

                    if (typeof (result) == "undefined" || result)

                        eval(defaultButton.href);
                }
            }

            if (defaultButton && typeof (defaultButton.click) != "undefined") {

                defaultButton.click();

                event.cancelBubble = true;

                if (event.stopPropagation) event.stopPropagation();

                return false;
            }
        }
        return true;
    }


  


// -->
