﻿function getViewportHeight() {
 if (window.innerHeight!=window.undefined) return window.innerHeight;
 if (document.compatMode=='CSS1Compat') return document.documentElement.clientHeight;
 if (document.body) return document.body.clientHeight;
 return window.undefined;
}
function getViewportWidth() {
 if (window.innerWidth!=window.undefined) return window.innerWidth;
 if (document.compatMode=='CSS1Compat') return document.documentElement.clientWidth;
 if (document.body) return document.body.clientWidth;
 return window.undefined;
}

function DisableButton() {
    //document.forms[0].submit();
    window.setTimeout("disableButton('" + 
       window.event.srcElement.id + "')", 0);
}

function disableButton(buttonID) {
    document.getElementById(buttonID).disabled=true;
}

	  function clickButton(e, buttonid){ 
          var evt = e ? e : window.event;
          var bt = document.getElementById(buttonid);
          if (bt){ 
              if (evt.keyCode == 13){ 
                    __doPostBack(bt, ''); 
                    return false; 
              } 
          } 
    }
