function MM_swapImage() { 
   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
 }
 function MM_swapImgRestore() { 
   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
 }
 function MM_findObj(n, d) { //v4.0
   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
   if(!x && document.getElementById) x=document.getElementById(n); return x;
 }
 function MM_preloadImages() {
   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
 
 browserversion = parseInt(navigator.appVersion);
 }
 MM_preloadImages('public/images/pl_on_light.gif','public/images/en_on_light.gif','public/images/de_on_light.gif');
 function bookmark(url, description){
     if (url == null) { // if description is not passed then default to page title
         url = window.location.href;
     }
     if (description == null) { // if description is not passed then default to page title
         description = document.title;
     }
     if (document.all){ // Test If: Internet Explorer
     window.external.AddFavorite(url, description); // AddFavorite is IE specific
     }
     else if (window.sidebar){ // Test If: Mozilla, Netscape, or FireFox
     window.sidebar.addPanel(description, url, ""); // sidebar.addPanel is Mozilla specific
     }
     else { // If all others
     window.alert("Press CTRL+T to bookmark this page"); // CTRL + T typically for Opera and other browsers
     }
     
 }
 function show(what,where) {
 oBj = document.getElementById(where);
 oBj.src = what;
 oBjW = document.getElementById('Warszawa');
 oBjR = document.getElementById('Rzeszow');
 if (what == 'public/images/mapka_rzeszow.jpg') {
 	oBjR.style.fontWeight = "bold"; 
 	oBjW.style.fontWeight = "normal"; 
 	}
 else {
 	oBjR.style.fontWeight = "normal"; 
 	oBjW.style.fontWeight = "bold"; 
 	}
 }
 function chkEmail(email) {
 var regEmail = /^([a-zA-Z0-9._-]{1,})@([a-zA-Z0-9._-]{1,})\.([a-zA-Z]{1,4})$/;
 if (!regEmail.test(email)) return false ;
 else return true;    
 }
 function chkForm(Obj) {
 var bError = false;
 var tReport = 'Wystąpił błąd, proszę uzupełnić:' + "\n\n";
 if (Obj.imienazwisko.value == ''&& Obj.firma.value == '') 
 	{
 	bError = true; 
 	tReport += '- imię i nazwisko lub nazwę firmy' + "\n";
 	}
 if (Obj.adres.value == '') {bError = true; tReport += '- adres' + "\n";}
 if (Obj.telefon.value == '' && Obj.fax.value == '' && Obj.email.value == '') {
 	bError = true; tReport += '- telefon, fax lub email' + "\n";
 	}
 if (Obj.tresc.value=='')  {bError = true; tReport += '- treść pytania' + "\n";}
 if (Obj.email.value!='' && !chkEmail(Obj.adresemail.value)) {bError = true;  tReport += '- podany adres email jest niepoprawny' + "\n";}
 if (bError == true) {
 	alert(tReport);
 	return false;
 	}
 else return true;
 }
 function rollOutFlash(myToggle,Nazwa)
 {
 objIn = document.getElementById(Nazwa);
 objIn.SetVariable ("_root.myToggle"," " + myToggle);
 }
 function chkFormAplikuj(Obj) {
 var bError = false;
 var tReport = 'Wystąpił błąd, proszę uzupełnić:' + "\n\n";
 if (Obj.imie.value == ''&& Obj.nazwisko.value == '') {
 	bError = true; 
 	tReport += '- imię i nazwisko lub nazwę firmy' + "\n";
 	}
 if (Obj.email.value=='' && !chkEmail(Obj.email.value)) {
 	bError = true;  tReport += '- podany adres email jest niepoprawny' + "\n";
 	}
 if (Obj.cv.value=='' && Obj.cvfile.value=='') {
 	bError = true;  tReport += '- należy podać CV w formie online bądź załącznika' + "\n";
 	}
 if (Obj.lm.value=='' && Obj.lmfile.value=='') {
 	bError = true;  tReport += '- należy podać LM w formie online bądź załącznika' + "\n";
 	}
 if (Obj.accept.checked==false) {
 	bError = true;  tReport += '- proszę o uzupełnienie zgody na przetwarzanie danych osobowych' + "\n";
 	}
 if (bError == true) {
 	alert(tReport);
 	return false;
 	}
 else return true;
 }
 function chkFormZapytanie(Obj) {
 var bError = false;
 var tReport = 'Wystąpił błąd, proszę uzupełnić:' + "\n\n";
 if (Obj.imienazwisko.value == ''&& Obj.firma.value == '') 
 	{
 	bError = true; 
 	tReport += '- imię i nazwisko lub nazwę firmy' + "\n";
 	}
 if (Obj.adres.value == '') {bError = true; tReport += '- adres' + "\n";}
 if (Obj.telefon.value == '' && Obj.fax.value == '' && Obj.adresemail.value == '') {
 	bError = true; tReport += '- telefon, fax lub email' + "\n";
 	}
 if (Obj.tresc.value=='')  {bError = true; tReport += '- treść pytania' + "\n";}
 if (Obj.adresemail.value!='' && !chkEmail(Obj.adresemail.value)) {bError = true;  tReport += '- podany adres email jest niepoprawny' + "\n";}
 if (bError == true) {
 	alert(tReport);
 	return false;
 	}
 else return true;
 }
