﻿// (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();
	if (lang == 'pl') {
	NewWindow.document.write("<html><head><title>Zblizenie</title></head>");
	NewWindow.document.write("");
	} else {
		NewWindow.document.write("<html><head><title>Details</title></head>");
	}
    NewWindow.document.write("<body bgcolor='#DDEEEE' 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("'><img 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(" ' ></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("</td></tr></table></form>");
	NewWindow.document.write("</body></html>");
	NewWindow.document.close();
    NewWindow.resizeTo(xsize,ysize); 
}

function MenuWindow(theurl,winWidth,winHeight) {
// OK - okno nie powinno byc wieksze niz rozmiar ekranu
	if(winWidth > window.screen.width) winWidth = window.screen.width;
	if(winHeight > window.screen.height) winHeight = window.screen.height;
//
	var size = "width="+winWidth+",height="+winHeight;	
	var rie = (is_ie) ? ",resizable=0" : ",resizable=1"
	var windowX = (window.screen.width  - winWidth)/2; 
	var windowY = (window.screen.height - winHeight)/2;
//-------- Otworz okno i wysrodkuj na ekranie	
	splashWin = window.open("#", "AQUARIUS", 'fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,'+size+rie);
	splashWin.blur();
	splashWin.resizeTo(Math.ceil(winWidth),Math.ceil(winHeight));
	splashWin.moveTo(Math.ceil(windowX),Math.ceil(windowY));
//-------- Zaladuj strone "theurl" 
	splashWin.document.open();
	splashWin.document.write("<style type='text/css'>\n");
	splashWin.document.write("body { overflow: hidden; border-style: none; border-width: 0px; margin: 0;}\n");
/*	splashWin.document.write("#lineLDiv 		{ position: absolute; left:       0px;   top:         0px; width:     1px; height: "+winHeight+"px; z-index: 2; background-color: #000000; layer-background-color:#000000; clip:rect(0,1,"+winHeight+",0);}");
	splashWin.document.write("#lineRDiv		{ position: absolute; left: "+(winWidth-1)+"px; top:         0px; width:     1px; height: "+winHeight+"px; z-index: 2; background-color: #000000; layer-background-color:#000000; clip:rect(0,1,"+winHeight+",0);}");
	splashWin.document.write("#lineBDiv 		{ position: absolute; left:       0px;   top: "+(winHeight-1)+"px; width: "+winWidth+"px; height:     1px; z-index: 2; background-color: #000000; layer-background-color:#000000; clip:rect(0,"+winWidth+",1,0);}");
	splashWin.document.write("#lineTDiv 		{ position: absolute; left:       0px;   top:         0px; width: "+winWidth+"px; height:     1px; z-index: 2; background-color: #000000; layer-background-color:#000000; clip:rect(0,"+winWidth+",1,0);}");
	splashWin.document.write("#stillloadingDiv 	{ position: absolute; left:   0px; top: "+Math.ceil(winHeight/2)+"px; width: "+winWidth+"px; height: "+winHeight+"px; z-index: 1; background-color: #C0C0C0; layer-background-color:#C0C0C0; clip:rect(0,"+winWidth+",19,0);}");*/
	splashWin.document.write("</style>\n"); 
	splashWin.document.write("<body onload=\"self.document.location.href='"+theurl+"'\">");
/*	splashWin.document.write("<div id='lineLDiv'></div>");
	splashWin.document.write("<div id='lineRDiv'></div>");
	splashWin.document.write("<div id='lineBDiv'></div>");
	splashWin.document.write("<div id='lineTDiv'></div>"); */
	splashWin.document.write("<body>");
	splashWin.document.close(); 
//------------------------------------------------
	splashWin.focus();
}


function SylwesetrWindow(theurl,winWidth,winHeight) {
// OK - okno nie powinno byc wieksze niz rozmiar ekranu
	if(winWidth > window.screen.width) winWidth = window.screen.width;
	if(winHeight > window.screen.height) winHeight = window.screen.height;
//
	var size = "width="+winWidth+",height="+winHeight;	
	var rie = (is_ie) ? ",resizable=0" : ",resizable=1"
	var windowX = (window.screen.width  - winWidth)/2; 
	var windowY = (window.screen.height - winHeight)/2;
//-------- Otworz okno i wysrodkuj na ekranie	
	splashWin = window.open("#", "AQUARIUS", 'fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,'+size+rie);
	splashWin.blur();
	splashWin.resizeTo(Math.ceil(winWidth),Math.ceil(winHeight));
	splashWin.moveTo(Math.ceil(windowX),Math.ceil(windowY));
//-------- Zaladuj strone "theurl" 
	splashWin.document.open();
	splashWin.document.write("<style type='text/css'>\n");
	splashWin.document.write("body {border-style: none; border-width: 0px; margin: 0;}\n");
	splashWin.document.write("</style>\n"); 
	splashWin.document.write("<body onload=\"self.document.location.href='"+theurl+"'\">");
	splashWin.document.write("<body>");
	splashWin.document.close(); 
//------------------------------------------------
	splashWin.focus();
}
