/* 		B.2.0.0 / 10.11.2006

		###############################
		##  KNJIŽNICA BRIDGEPORT.JS  ##
		###############################

		(C) 2006 Garaža studio, d.o.o.
		Vse pravice pridržane

		Verzije:
		========

		* [B.0.0.1 / 13.02.2006]
			Razvojna verzija
		# [B.1.0.0 / 01.05.2006]
			PRVA VERZIJA
		* [B.1.0.1 / 08.07.2006]
			Popravek printablePage()
			Prenos picPopup() iz splošne knjižnice
		* [B.1.0.2 / 24.08.2006]
			Popravek printablePage()
		* [B.1.0.3 / 10.11.2006]
			Dopolnitev picPopup(), podpira parameter MODE
		# [B.2.0.0 / 10.11.2006]
			DRUGA VERZIJA

*/


/* Odpre printable popup */
function printablePage(lang, page_id) {
	var x, y, w, h;
	w = (screen.width)  ? (screen.width  - 300) : 300;		if (w < 300) w = 300;
	h = (screen.height) ? (screen.height - 300) : 300;		if (h < 300) h = 300;
	x = (screen.width)  ? (screen.width  - w)/2 : 0;		if (x < 0) x = 0;
	y = (screen.height) ? (screen.height - h)/2 : 0;		if (y < 0) y = 0;
	popWin = window.open('', 'popupwindow', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,width='+w+',height='+h+',top='+y+',left='+x);
	if (popWin != null) {
		popWin.location.href = 'applet.php?lang=' + lang + '&module=printer&id=' + page_id;
		popWin.focus();
	}
}


/* Odpre picture popup */
function picPopup(lang, pic_id, w, h, mode) {
	var x, y;
	if (w < 1) w = 400; else w = w + 30;
	if (h < 1) h = 300; else h = h + 200;
	x = (screen.width)  ? (screen.width  - w)/2 : 100;		if (x < 0) x = 0;
	y = (screen.height) ? (screen.height - h)/2 : 100;		if (y < 0) y = 0;
	popWin = window.open('', 'popupwindow', 'toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,width='+w+',height='+h+',top='+y+',left='+x);
	if (popWin != null) {
		popWin.location.href = 'applet.php?lang=' + lang + '&module=player&id=' + pic_id + "&mode=" + mode;
		popWin.focus();
	}
}


