﻿// JScript File

function menuOff(e)
{
  e.className="menuOff";
}

function menuOn(e)
{
  e.className="menuOn";
}

function buttonOff(e)
{
  e.className="buttonOff";
}

function buttonOn(e)
{
  e.className="buttonOn";
}

function buttonTitleOff(e)
{
  e.className="buttonTitleOff";
}

function buttonTitleOn(e)
{
  e.className="buttonTitleOn";
}

function testit()
{
  alert('Test It');
}

function GoToURL(url)
{
  window.location.href = url;
}

function OpenModalWindow(QueryString, PopupName, myWidth, myHeight, myScrollbar)
{
   if(myWidth == null)
   {
      myWidth = 790;
   }

   if(myHeight == null)
   {
      myHeight = 500;
   }
   
   if(myScrollbar == null)
   {
      myScrollbar = 'yes';
   }

   if(PopupName == null)
   {
      PopupName = 'ModalPopup';
   }
  //window.open(QueryString);
  //return;
   try {
       window.showModalDialog(QueryString + '&dialogHeight=' + myHeight + '&dialogWidth=' + myWidth, window, 'dialogHeight: ' + myHeight + 'px; dialogWidth: ' + myWidth + 'px; edge: Raised; center: Yes; help: No; resizable: Yes; status: No; ScrollBars: ' + myScrollbar + ';');
   }
   catch (e)
   {
     try
     {
       window.open(QueryString + '&Height=' + myHeight + '&Width=' + myWidth, '_blank', 'height=' + myHeight +'px, width=' + myWidth +'px, resizable=yes, status=no, scrollBars=yes, location=yes, toolbar=yes');
     }
     catch (e)
     {
       alert('unable to open window');
     }
   }

}

function OpenReportWindow(QueryString, myWidth, myHeight)
{
   if(myWidth == null)
   {
      myWidth = 790;
   }

   if(myHeight == null)
   {
      myHeight = 500;
   }
   
   window.open(QueryString, '_blank', 'height=' + myHeight +'px, width=' + myWidth +'px, resizable=yes, status=no, scrollBars=yes, location=no, toolbar=yes, menubar=yes');
}

function OpenHelpWindow(QueryString) {
    window.open(QueryString, '_blank', 'height=650px, width=750px, resizable=no, status=no, scrollBars=no, location=no, toolbar=no, menubar=no');
}


function SubmitEnter()
{
  if (window.event.keyCode == 13) 
  { 
    window.event.returnValue=false; 
    Form1.submit();
  }
}

