﻿// JScript File

//client side js
function clickButton(e, buttonid){ 
      var bt = document.getElementById(buttonid); 
      if (bt){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                  if (e.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                  if (event.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
      } 
} 

// POPUP
function popUp(URL, dWidth, dHeight, dLeftPos, dTopPos)
{
  var theWin = window.open(URL, 'theWin', 'width='+dWidth +', height='+ dHeight+', left='+dLeftPos+', top='+dTopPos+', titlebar=no, menubar=no, toolbar=no, location=no, resizable=no, status=no, scrollbars=yes');
  theWin.focus();
}

// Just a function that does nothing
function doNothing()
{
  return false;
}

// DISABLE FORM ELEMENTS
function DisableFormElements() {
           
    if (document.all || document.getElementById) {
        for (i = 0; i < document.forms[0].length; i++) {
            var formElement = document.forms[0].elements;
            if (formElement!=null || formElement!="") {
                formElement.onclick = doNothing;
                //formElement.disabled = true;
             }
        }
    } 
    
   return false;
          
}
