/* 
	Splošna knjižnica Javascript rutin

	(C) 2005 Garaža studio, d.o.o. Vse pravice pridržane.

	v0.1.1, 20.05.2005:
		- prva razvojna verzija
	v0.1.2, 24.05.2005:
		- podpora za printable()
	v0.2.1, 25.05.2005:
		- prilagoditev enotnemu frameworku
	v0.3.1, 10.11.2005:
		- podpora za printableShopProd()
	v0.3.2, 23.11.2005:
		- podpora za printableProduct()
	v0.3.3, 25.11.2005:
		- podpora za picProdPopup()
	v0.3.4, 25.11.2005:
		- sprememba picProdPopup()

*/


/* Odpre picture popup */
function picPopup(lang, id, w, h) {
	if (w == 0) wh = 500; else wh = w + 30;
	if (h == 0) hh = 500; else hh = h + 200;
	popWin = window.open('', 'popupwindow', 'toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,width=' + wh + ',height=' + hh);
	if (popWin != null) {
		popWin.location.href = 'applet.php?lang=' + lang + '&module=player&id=' + id;
		popWin.focus();
	}
}


/* Odpre product picture popup */
function picProdPopup(lang, id, w, h, colour_scheme) {
	if (w == 0) wh = 500; else wh = w + 30;
	if (h == 0) hh = 500; else hh = h + 100;
	popWin = window.open('', 'popupwindow', 'toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,width=' + wh + ',height=' + hh);
	if (popWin != null) {
		popWin.location.href = 'applet.php?lang=' + lang + '&module=prodplayer&id=' + id + '&colour_scheme=' + colour_scheme;
		popWin.focus();
	}
}


/* Odpre printable popup */
function printablePage(lang, page_id, subpage_id) {
	popWin = window.open('', 'popupwindow', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,height=500,width=500');
	if (popWin != null) {
		popWin.location.href = 'applet.php?lang=' + lang + '&module=printer&id=' + page_id + ',' + subpage_id;
		popWin.focus();
	}
}


/* Odpre printable popup za izdelke */
function printableShopProd(lang, product_id) {
	popWin = window.open('', 'popupwindow', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,height=500,width=500');
	if (popWin != null) {
		popWin.location.href = 'applet.php?lang=' + lang + '&module=shopprod&id=' + product_id;
		popWin.focus();
	}
}


/* Odpre printable popup za izdelke */
function printableProduct(lang, collection_id) {
	popWin = window.open('', 'popupwindow', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,height=500,width=500');
	if (popWin != null) {
		popWin.location.href = 'applet.php?lang=' + lang + '&module=prodprinter&id=' + collection_id;
		popWin.focus();
	}
}


/* Zapre okno */
function closeMe() {
	window.close();
}


/* Natisne okno (=print dialog) */
function printMe() {
	window.print();
}

