function sprawdz_img(img){
   if((foto.width!=0)&&(foto.height!=0)){
     wyswietl_img(img);
   }
}

function img(img){
   foto= new Image();
   foto.src=(img);
   sprawdz_img(img);
}

function wyswietl_img(img){
   tekst="width="+foto.width+",height="+foto.height+",left=100,top=100";
   okno=window.open('', '',tekst);
   okno.document.open();
   
   okno.document.write(
   "<html><head><style type='text/css'><!-- body {background-image: url(gfx/loading2.gif);} -->"+
   "</style><\head><body style='margin:0px' bgcolor='#FFFFFF'>"+
   "<div style='position:absolute; cursor:pointer; left:0px; top:0px;"+
   "font-size:0px'><img src='"+img+"' border=0 onmousedown='return false' oncontextmenu='return false' "+
   "onselectstart='return false' onselect='return false' oncopy='return false' ondragstart='return false' ondrag='return false' onclick='self.close();'>"+
   "</body></html>");
   okno.document.close();
}

function hideLoadingPage()
{
	if (document.getElementById) {
		 document.getElementById('hidepage').style.visibility = 'hidden';
	}
	else {
		if (document.layers) {
			document.hidepage.visibility = 'hidden';
		} else {
			document.all.hidepage.style.visibility = 'hidden';
		}
	}
}


