﻿function selectAllCheckBoxes(field) 
{
    for (i = 0; i < field.length; i++) 
    {
        field[i].checked = true;
    }
    return;
}


function clearAllCheckBoxes(field) 
{
    for (i = 0; i < field.length; i++) 
    {
        field[i].checked = false;
    }
    return;
}

function showSpan(spanTagID) 
{
    spanTagID.style.display = "";
}

function hideSpan(spanTagID) 
{
    spanTagID.style.display = "none";
}

function toggleDisplay(spanTagID) {
  if (spanTagID.style.display == "none") 
  {
     showSpan(spanTagID);
  } else 
  {
     hideSpan(spanTagID);
  }
}


function deComma (inStr) 
{
    pos = inStr.indexOf(",");
    while (pos != -1) 
    {
        inStr = inStr.substring(0, pos) + inStr.substring(pos+1,9999);
        pos = inStr.indexOf(",");
    }
    return inStr;
}

function appGoBack () 
{
    history.back(-1);
    return;
}

function getHelp (helpTopicID,helpTopicContext) 
{
    window.name = helpTopicContext;var url = "/staffschedule/pages/help.aspx?HELPTOPICID=" + helpTopicID + "&HELPCONTEXT=" + helpTopicContext;var newWin = window.open(url, "Help", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,dependent=1,width=400,height=400,screenX=400,screenY=0,top=0,left=400');
}

function popUpMsg() 
{
    var newWin = window.open("/staffschedule/pages/popup_message.aspx", "PopUpMsg", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=320,height=320');
}

var isNetscapeBrowser = (navigator.appName.indexOf('Netscape') != -1);

function submitButtonDown () 
{
    if (!isNetscapeBrowser) 
    {
        event.srcElement.style.marginLeft='3';
        event.srcElement.style.marginTop='3';
    }
}

function submitButtonUp () 
{
    if (!isNetscapeBrowser) 
    {
        event.srcElement.style.marginLeft='0';
        event.srcElement.style.marginTop='0';
    }
}

function submitTabDown () 
{
    if (!isNetscapeBrowser) 
    {
        var w = parseInt(event.srcElement.width) - 8;
        event.srcElement.width = w+'';
    }
}
function submitTabUp () 
{
    if (!isNetscapeBrowser) 
    {
        var w = parseInt(event.srcElement.width) + 8;
        event.srcElement.width = w+'';
    }
}


