
         function isEmpty(str) {
            for (var intLoop = 0; intLoop < str.length; intLoop++)
               if (" " != str.charAt(intLoop))
                  return false;
            return true;
         }

         function checkRequired(f) {
            var strError = "";
            for (var intLoop = 0; intLoop<f.elements.length; intLoop++)
               if (null!=f.elements[intLoop].getAttribute("required")) 
                  if (isEmpty(f.elements[intLoop].value))
                     strError += "  " + f.elements[intLoop].name + "\n";
            if ("" != strError) {
               alert("Trzeba wtpełnić te pozycje:\n" + strError);
               return false;
            }
         }

		 


var testresults
function checkemail(){
var str=document.validation.emailcheck.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
testresults=true
else{
alert("Proszę wpisać istniejący adres mailowy!")
testresults=false
}
return (testresults)
}

function checkbae(){
if (document.layers||document.getElementById||document.all)
return checkemail()
else
return true
}

  function check_value(fieldvalue)
    {    
        switch(fieldvalue)
        {
         
		 
            
		    case 1:
             
                document.getElementById("imagedest").innerHTML = "<img src='test.gif' height='24' width='0' border='0'>";
                    break;
            
            case 2:
            
                document.getElementById("imagedest").innerHTML = "<img hspace='1' src='../p_default/pl/klic.gif' width='28' height='12' border='0' alt='' />&nbsp;<input type='password' size='20' class='text_normal' name='prist_klic' value=''>"; 
                    break;
		
            case 3:
             
                document.getElementById("imagedest").innerHTML = "<input type='cus' size='20' class='text_normal' value='cus'>";
                    break;
            
          
        }
    }
    