﻿// JScript File
 function OpenWin(PageName) 
        {                          
                    
            var height = 380;
            var width = 650;
            var win;
            var WindowName = PageName ;
            var left = (screen.availWidth - width - 20) * .5;
            var top = (screen.availHeight - height - 30) * .5;
                      
            {   
                if (WindowName == "Spam")
                {
                     win = window.open('ediservices_spamwin.aspx', 'search', 'height=' + height + ',width=' + width + ',left=' + left + ',top=' + top + ',resizable=0,status=0,menubar=0,scrollbars=1,fullscreen=0,location=0');
                     win.focus();
                     return false;
                }
               else
                {
                    win = window.open('ediservices_Changewin.aspx', 'search', 'height=' + height + ',width=' + width + ',left=' + left + ',top=' + top + ',resizable=0,status=0,menubar=0,scrollbars=1,fullscreen=0,location=0');
                    win.focus();
                    return false;
                }
               
           
            }
          
                   
      }
      
      // submitter number
      function jsSubNbrLeave()
			{
				var text1 = document.Form1.txtSubmitterNumber.value;
				
				if(text1 == "new")
				{
				}
				else
				{
					document.Form1.txtSubmitterNumber.value = text1.toUpperCase();
				}
			
			}
			//not to allow numerics
			
		function formatFirstName(e,target)
            {
	        var whichCode = (navigator.appName == "Netscape") ? e.which : window.event.keyCode;
	
	
	        if (whichCode!=8)
	        {
		    if ((whichCode >= 97 && whichCode <= 122) || 
			(whichCode >= 65 && whichCode <= 91) ||
			(whichCode == 45) ||
			(whichCode == 32))
		    { 
			whichCode;
		    }
		    else
		    {
			if (navigator.appName == "Netscape") 
				return false;
			else
				window.event.keyCode = 0;
		    }
		
		    if (whichCode == 35)
		    {
			if (navigator.appName == "Netscape") 
				return false;
			else
				window.event.keyCode = 0;
		    }		
	        }
        }
        //checkbox validation
        
        function checkList(sender,args)
        {
         if ((document.Form1.ChkInstitutional.checked==false) && (document.Form1.ChkProfessional.checked==false))
         {
         args.IsValid = false;
        
         }
        }
