﻿// (c) 2003 www.webrster.com
// Otwieranie obrazka w nowym oknie
//
function OpenNewWindow(Picture,Breit,Hoch,lang)
{
	xsize = Breit+40;// Dodatek na margines po prawej i lewej stronie
	ysize = Hoch+120; //Zusatz f?r Rand oben und unten - damit Button angezeit werden kann 
    
	ScreenWidth = screen.width;
	ScreenHeight = screen.height;
	
	xpos = (ScreenWidth/2)-(xsize/2);
	ypos = (ScreenHeight/2)-(ysize/2);
	
	NewWindow=window.open("","Picture","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
	NewWindow.focus();
	NewWindow.document.open();
	NewWindow.document.write("<html><head>");
	
	if (lang == 'pl') {
		NewWindow.document.write("<title>Zbliżenie</title>");
	} else if (lang == 'en') {
		NewWindow.document.write("<title>Details</title>");
	} else if (lang == 'de') {
		NewWindow.document.write("<title>Detailansicht</title>");
	} else if (lang == 'it') {
		NewWindow.document.write("<title>Details</title>");
	}
	
	NewWindow.document.write("<meta http-equiv='Content-Type' content='text/html;charset=utf-8' />");
	NewWindow.document.write("<style type='text/css'>");
//	NewWindow.document.write("#thephoto {visibility:hidden;}");
	NewWindow.document.write("#photoholder { width:");
	NewWindow.document.write(Breit);
	NewWindow.document.write("px; height:");
	NewWindow.document.write(Hoch);
	NewWindow.document.write("px; border: solid 2px #6177ba; background:black url('Grafika/Tlo/ladowanie.gif') 50% 50% no-repeat; }");
	NewWindow.document.write("#thephoto { width:");
	NewWindow.document.write(Breit);
	NewWindow.document.write("px; height:");
	NewWindow.document.write(Hoch);
	NewWindow.document.write("px; }");
	NewWindow.document.write("</style>");
	NewWindow.document.write("</head>");
		
//  NewWindow.document.write("<body background='Grafika/Tlo/tlo_con.gif' bgcolor='black' onload='focus();initImage()'>");
	NewWindow.document.write("<body background='Grafika/Ramki/tlo_pod_produkty.gif' bgcolor='#232630' onload='focus();'>");
	NewWindow.document.write("<table align='center' border='0' cellpadding='0' cellspacing='1' width='");
	NewWindow.document.write(Breit);
	NewWindow.document.write("'><tr height='");
	NewWindow.document.write(Hoch);
	NewWindow.document.write("'><td height='");
	NewWindow.document.write(Hoch);
	NewWindow.document.write("'><p id='photoholder'><img id='thephoto' src=");
	NewWindow.document.write(Picture);
	if (lang == 'pl') {
		NewWindow.document.write(" alt='Zbliżenie' GALLERYIMG='no' oncontextmenu=' ");
	} else if (lang == 'en') {
		NewWindow.document.write(" alt='Details' GALLERYIMG='no' oncontextmenu=' ");
	} else if (lang == 'de') {
		NewWindow.document.write(" alt='Detailansicht' GALLERYIMG='no' oncontextmenu=' ");
	} else if (lang == 'it') {
		NewWindow.document.write(" alt='Details' GALLERYIMG='no' oncontextmenu=' ");
	}
	NewWindow.document.write('alert("Copyright by www.webraster.com");return false');
	NewWindow.document.write(" ' /></p></td></tr>");
	NewWindow.document.write("<tr><td><br></td></tr>");
	NewWindow.document.write("<tr><td align='center' valign='bottom'>");
	if (lang == 'pl') {
		NewWindow.document.write("<form><input type='button' value='Zamknij Okno' style='font-family: Arial, Verdana; font-size: 10px' onClick='self.close()'>");
	} else  if (lang == 'en') {
		NewWindow.document.write("<form><input type='button' value='Close Window' style='font-family: Arial, Verdana; font-size: 10px' onClick='self.close()'>");
	} else  if (lang == 'de') {
		NewWindow.document.write("<form><input type='button' value='Schließen' style='font-family: Arial, Verdana; font-size: 10px' onClick='self.close()'>");
	} else  if (lang == 'it') {
		NewWindow.document.write("<form><input type='button' value='Close Window' style='font-family: Arial, Verdana; font-size: 10px' onClick='self.close()'>");
	}
	NewWindow.document.write("</form></td></tr></table>"); 
	NewWindow.document.write("</body></html>");
	NewWindow.document.close();
    NewWindow.resizeTo(xsize,ysize); 
}
