// *** JSF Splash
// *** (c) feel by fish 
// *** http://www.imagen.pl
// *** 2000.11.23
// *** GNU GPL distribution

// * based on trick by WebFX http://webfx.eae.net/

// -> obsluga podkladu w zewn. okienkach

var JSFSplashWin = null;
// static :)

// ******************************************************************************************

function JSFSplashShowImage(url, width, height, borderless) {
	ScrWidth = 640; ScrHeight = 480;
	if (window.screen) {ScrWidth = window.screen.width; ScrHeight = window.screen.height}
//	PosX = Math.round((ScrWidth - width)/2);
//	PosY = Math.round((ScrHeight - height)/2);

	PosX = 50;
	PosY = 50;
	if (JSFSplashWin != null && !document.layers) {JSFSplashWin.close();}
	if (borderless && !document.layers) {
		JSFSplashWin = window.open("", "splash", "fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
		JSFSplashWin.resizeTo(width, height);
		JSFSplashWin.moveTo(PosX, PosY);
	}
	else
		JSFSplashWin = window.open("", "splash", "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);

	JSFSplashWin.document.open();
	JSFSplashWin.document.clear();
	JSFSplashWin.document.write("<html><head><title></title><style><!-- body{background: #FFFFFF url(" + url + ") no-repeat;} --></style></head><body scroll='no' oncontextmenu=\"return false\" onselectstart=\"return false\" ondragstart=\"return false\"><script>function closeMe(e){window.close();} document.onclick = closeMe;</script></body></html>");
	JSFSplashWin.document.close();
	JSFSplashWin.focus();	
}

// ********************************************************************************************

function JSFSplashShowImage2(url, width, height, w2, h2, borderless) {
	ScrWidth = 640; ScrHeight = 480;
	if (window.screen) {ScrWidth = window.screen.width; ScrHeight = window.screen.height}
	PosX = 50;
	PosY = 50;
	if (JSFSplashWin != null && !document.layers) {JSFSplashWin.close();}
	if (borderless && !document.layers) {
		JSFSplashWin = window.open("", "splash", "fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1");
		JSFSplashWin.resizeTo(width, height);
		JSFSplashWin.moveTo(PosX, PosY);
	}
	else
		JSFSplashWin = window.open("", "splash", "fullscreen=yes,menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=" + w2 + ",height=" + h2 + ",left=" + PosX + ",top=" + PosY);

	JSFSplashWin.document.open();
	JSFSplashWin.document.clear();
	JSFSplashWin.document.write("<html><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 oncontextmenu=\"return false\" onselectstart=\"return false\" ondragstart=\"return false\"><table width="+width+" height="+height+"><tr><td><img src=\""+url+"\" border=0 width="+width+" height="+height+"></td></tr></table><script>function closeMe(e){window.close();} document.onclick = closeMe;</script></body></html>");
	JSFSplashWin.document.close();
	JSFSplashWin.focus();	
}

// ********************************************************************************************* 

function JSFSplashShowImage3(url, width, height, w2, h2, borderless) {
	ScrWidth = 640; ScrHeight = 480;
	if (window.screen) {ScrWidth = window.screen.width; ScrHeight = window.screen.height}
	PosX = 50;
	PosY = 50;
	if (JSFSplashWin != null && !document.layers) {JSFSplashWin.close();}
	if (borderless && !document.layers) {
		JSFSplashWin = window.open("", "splash", "fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1");
		JSFSplashWin.resizeTo(width, height);
		JSFSplashWin.moveTo(PosX, PosY);
	}
	else
		JSFSplashWin = window.open("", "splash", "fullscreen=no,menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=" + w2 + ",height=" + h2 + ",left=" + PosX + ",top=" + PosY);

	JSFSplashWin.document.open();
	JSFSplashWin.document.clear();
	JSFSplashWin.document.write("<html><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 oncontextmenu=\"return false\" onselectstart=\"return false\" ondragstart=\"return false\"><table width="+width+" height="+height+"><tr><td><img src=\""+url+"\" border=0 width="+width+" height="+height+"></td></tr></table><script>function closeMe(e){window.close();} document.onclick = closeMe;</script></body></html>");
	JSFSplashWin.document.close();
	JSFSplashWin.focus();	
}

// ********************************************************************************************* 

function JSFSplashShow(url, width, height, borderless) {
	ScrWidth = 640; ScrHeight = 480;
	if (window.screen) {ScrWidth = window.screen.width; ScrHeight = window.screen.height}
//	PosX = Math.round((ScrWidth - width)/2);
//	PosY = Math.round((ScrHeight - height)/2);

	PosX = 50;
	PosY = 50;

	if (JSFSplashWin != null && !document.layers) {JSFSplashWin.close();}
	if (borderless && !document.layers) {
		JSFSplashWin = window.open(url, "splash", "fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
		JSFSplashWin.resizeTo(width, height);
		JSFSplashWin.moveTo(PosX, PosY);
	}
	else
	JSFSplashWin = window.open(url, "splash", "fullscreen=1;menubar=0,toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=no");
	JSFSplashWin.focus();	
}





