function image_open(image_loc,img,name)
{

var HTML = '<html><style>body{margin:20px 20px 20px 20px; background:#EEF4FF;}</style><head><title>'+name+'</title></head><body onClick="top.close()" ><table width="100%"  border="0" cellspacing="0" cellpadding="0"><tr><tdalign="center" valign="middle"><img src="'+ image_loc +'"  alt=""  ></td></tr></table></body></html>';



var  temp_image= new Image();
temp_image.src = image_loc;

temp_image.onload=function draw(){var x=temp_image.width;var y=temp_image.height;var ok_x = x+40;var ok_y = y+40;popupImage = window.open('','_blank','toolbar=no,scrollbars=no,status=no, resizable=no ,width='+ok_x+', height='+ok_y);popupImage.document.write(HTML);};
}



function Check(){
document.frm.udok_testem.disabled = !(document.frm.znajomosc_ang[4].checked);
}

function CheckForm(){
/*
   if ( !((document.frm.rodzaj_zapytania[0].checked) || (document.frm.rodzaj_zapytania[1].checked) || (document.frm.rodzaj_zapytania[2].checked) || (document.frm.rodzaj_zapytania[3].checked))) {
              window.alert('Proszę zaznaczyć - Temat wysyłanego formularza') ;
              document.frm.rodzaj_zapytania[0].focus();
              return false; 
              }
*/
    if ( document.frm.imie_nazwisko.value == '' ) {
        window.alert('Please enter - Full Name');
        document.frm.imie_nazwisko.focus();
        return false;
        }
    else if ( document.frm.data_urodzenia.value == '' ) {
        window.alert('Please enter - Date of birth');
        document.frm.data_urodzenia.focus();
        return false;
        }
    else if ( document.frm.adres_domowy.value == '' ) {
        window.alert('Please enter - Home address (street, zip code, city)');
        document.frm.adres_domowy.focus();
        return false;
        }
    else if ( (document.frm.telefon_domowy.value == '') && (document.frm.telefon_komorkowy.value == '') ) {
        window.alert('Fill one of the fields - Home phone, Mobile phone');
        document.frm.telefon_domowy.focus();
        return false;
        }
    else if ( (document.frm.znajomosc_ang[4].checked) && (document.frm.udok_testem.value == '') ) {
        window.alert('Please enter - English Level: Tests or Certificates');
        document.frm.udok_testem.disabled = false;
        document.frm.udok_testem.focus();
        return false;
        }
    else if ( document.frm.nazwa_uczeszczanej_szkoly.value == '' ) {
        window.alert('Please enter - High School Name');
        document.frm.nazwa_uczeszczanej_szkoly.focus();
        return false;
        }
    else if ( document.frm.data_ukonczenia_szkoly.value == '' ) {
        window.alert('Please enter - Date of Graduation (present/future)');
        document.frm.data_ukonczenia_szkoly.focus();
        return false;
        }
    else if ( document.frm.pozycja.value == '' ) {
        window.alert('Please enter - Position');
        document.frm.pozycja.focus();
        return false;
        }
    else if ( document.frm.wzrost.value == '' ) {
        window.alert('Please enter - Height');
        document.frm.wzrost.focus();
        return false;
        }
    else if ( document.frm.waga.value == '' ) {
        window.alert('Please enter - Weight');
        document.frm.waga.focus();
        return false;
        }
    else if ( document.frm.mocne_strony_twojej_gry.value == '' ) {
        window.alert('Please enter - Your strenghts');
        document.frm.mocne_strony_twojej_gry.focus();
        return false;
        }
    else if ( document.frm.slabe_strony_twojej_gry.value == '' ) {
        window.alert('Please enter - Your weaknesses');
        document.frm.slabe_strony_twojej_gry.focus();
        return false;
        }
    else {
        document.frm.submit();
        }
       }

