

function popupas(img, w, h, alt)
{
	scr_width = screen.width;
   	scr_height = screen.Height;

   	sx = Math.round((scr_width - w) / 2);
   	sy = Math.round((scr_height - h) / 2) - 50; // Taip dizaineriai liepe
   	features = "width=" + w + ", height=" + h + ", screenx=" + sx + ", screeny=" + sy + 
   	           ", left=" + sx + ", top= " + sy; 

	langas = window.open("", "pop", features);

	textas = "<html>\n" + 
                 "<head>\n" +
                 "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8;\">\n" +
                 "<title>Žemaičių vyskupystės muziejus</title>\n" +
                 "<link rel=\"stylesheet\" href=\"styles/stilius.css\">\n" + 
                 "</head>\n" +
                 "<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" " +
                 "onBlur=\"window.close()\" bgcolor=\"#FFCC99\" " +
                 "background=\"images/fonas.gif\" text=\"#000000\" link=\"#000000\" " +
                 "vlink=\"#000000\" alink=\"#000000\">\n" +
                 "<img src=\"" + img + "\" width=\"" + w + "\" height=\"" + h + 
                 "\" alt=\"" + alt + "\">\n" + 
                 "</body>\n" + 
                 "</html>\n";
  	langas.document.write(textas);
	langas.document.close();
	langas.focus();
}

function popFile(file,w,h)
{
	if (w==undefined) w=500;
	if (h==undefined) h=200;
	scr_width = screen.width;
   	scr_height = screen.Height;
	sx = Math.round((scr_width - w) / 2);
   	sy = Math.round((scr_height - h) / 2) - 50; // Taip dizaineriai liepe
	langas2=window.open(file,'Note','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes, copyhistory=no,width='+w+',height='+h+',screenx='+sx+',screeny='+sy+',left='+sx+',top='+sy);
	langas2.focus();
}

function infoRuosiama()
{
	scr_width = screen.width;
   	scr_height = screen.Height;
	w = 200; h = 50;
	praneshimas = '<div align="center"><br><p style=\"font-family: Verdana, Arial; font-size: 11px; font-weight: bold; padding-top:10px\">Information is being prepared...</p></div>';
   	sx = Math.round((scr_width - w) / 2);
   	sy = Math.round((scr_height - h) / 2) - 200;
   	features = "width=" + w + ", height=" + h + ", screenx=" + sx + ", screeny=" + sy +
   	           ", left=" + sx + ", top= " + sy;

	langas = window.open("", "pop2", features);

	textas = "<html>\n" +
                 "<head>\n" +
                 "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8;\">\n" +
                 "<title>Žemaičių vyskupystės muziejus</title>\n" +
                 "<link rel=\"stylesheet\" href=\"css/style.css\">\n" +
                 "</head>\n" +
                 "<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" " +
                 "onBlur=\"window.close()\" bgcolor=\"#FFCC99\" background=\"images/fonas.gif\">\n" +
                 praneshimas +
                 "</body>\n" +
                 "</html>\n";
  	langas.document.write(textas);
  	langas.document.close();
	langas.focus();
}

function mailing(url)
{
/*
	javascript:showModalDialog('modal.php?".$urlStr->getURL(true,false)."', window, 'resizable: no; help: no; status: no; scroll: no; dialogWidth: 305px; dialogHeight: 350px;'
*/
	scr_width = screen.width;
   	scr_height = screen.Height;
	w = 301; h = 340;
   	sx = Math.round((scr_width - w) / 2);
   	sy = Math.round((scr_height - h) / 2) - 50;
   	features = "width=" + w + ", height=" + h + ", screenx=" + sx + ", screeny=" + sy +
   	           ", left=" + sx + ", top= " + sy;

	mail_wind = window.open("modal.php?"+url, "mail_pop", features);
	mail_wind.focus();
}