﻿
        function appStart()
        {
                    
  
        }
        
        function addLoadEvent(func) 
        {
            var oldonload = window.onload;
            if (typeof window.onload != 'function') 
            {
                window.onload = func;
            } 
            else 
            {
                window.onload = function() 
                {
                    if (oldonload) 
                    {
                        oldonload();
                    }
                    
                    func();
                }
            }
        }
                
        function findTop(element) 
        {
            var top = 0;
            
            while (element) 
            {
                top += element.offsetTop;
                element = element.offsetParent;
            }
            return top;
        }
   
        function popUps(URL, h, w)
        {
           newWindow = window.open(URL, "popup", "height="+h+"px, width="+w+"px, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=no, directories=yes, status=yes");
           newWindow.focus();
        }
        
          
        function popupNoResize(URL, h, w)
        {
            newWindow = window.open(URL, "popup", "height="+h+"px, width="+w+"px, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, links=no, directories=no, status=no");
            newWindow.focus();
        }
        
        function popUp(URL) 
        {
            popUps(URL, "popup", 'height=600px, width=600px, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=yes')
        }
        
		function calendarPicker(strField, disableDir, disableDte)
		{
		    var dte;
		    var disableStr;
		    
		    dte = document.getElementById(strField).value;
		    
		    disableStr = "";
		    
		    if (disableDir == 1) 
		        disableStr = "&before=" + disableDte;
		        
		    if (disableDir == 2)
		        disableStr = "&after=" + disableDte;
		     
		    window.open('/helperpages/DatePicker.aspx?field=' + strField + disableStr + "&selDate=" + dte,'calendarPopup','width=280,height=250,resizable=yes');
		}

        function noenter() 
        {
            return !(window.event && window.event.keyCode == 13); 
        }
