// Wintours - Popups für Bildlupen bei Reisedetails, Stand 2011-11-14

// Top-Level declaration of the vector of popup window handles and the function
// to be called on (frameset / body) unload to close all the open popups
mypops = new Array;

function openPop(winam, datei, titel) {
// escape() encodes ISO directly, whereas encodeURIComponent() encodes first to utf8, then %xx
// so if you use encodeURIComponent() then PHP must do utf8_decode(rawurldecode($_REQUEST['xx']))
var url = window.g_pathPrefix + 'lupe.php?datei=' + datei + '&titel=' + encodeURIComponent(titel);
var par = 'width=944,height=644,scrollbars=yes,resizable=yes,location=no,toolbar=no,menubar=no,status=no';
var win = window.open(url, winam, par);
if (win) {	// Compensates an IE8 Bug
	mypops[mypops.length] = win;
	win.focus();
}
return;
}

function openRlPop(rlid, rlname) {
// escape() encodes ISO directly, whereas encodeURIComponent() encodes first to utf8, then %xx
// so if you use encodeURIComponent() then PHP must do utf8_decode(rawurldecode($_REQUEST['xx']))
// var mw  = rlname.search(/Frau/) == -1 ? 'Reiseleiter ' : 'Reiseleiterin ';
var url = window.g_pathPrefix + 'rlpop.php?id=' + rlid +
								'&titel=' + encodeURIComponent(rlname) +
								'&target=' + encodeURIComponent(window.name);
// 18 padding body + 493 Tabelle + 20 Scroller = 531
var par = 'width=531,height=644,scrollbars=yes,resizable=yes,location=no,toolbar=no,menubar=no,status=no';
var win = window.open(url, 'rl'+rlid, par);
if (win) {	// Compensates an IE8 Bug
	mypops[mypops.length] = win;
	win.focus();
}
return;
}

function closePops()
{
window.g_loading = true;
for (i=0; i<mypops.length; i++)
{
	if (mypops[i] && mypops[i].closed == false)
		 mypops[i].close();
}
return;
}

