/**
 * Opens a Popup window.
 */
function PopupWin(url) {
	myWin=window.open(url,"displayWindow",
		"width=790,height=500,scrollbars=yes,status=no,toolbar=no,menubar=no,resizable=yes");
}

function popInfo(sUrl, iW, iH) {
	myWin=window.open(sUrl,"displayWindow",
		"width="+iW+",height="+iH+",scrollbars=yes,status=no,toolbar=no,menubar=no,resizable=no");
}

/**
 * Load a page into the given frame.
 */
function load_frame(frm, loc)
{
	parent.frames[frm].location.href=loc;
}

/**
 * Load a page into the parent window.
 */
function load_parent(loc)
{
	parent.location.href=loc;
}

/**
 * Alert A Message.
 */
function msg_box(_msg)
{
	alert(_msg);
}

/**
 * Sets/unsets the pointer in browse mode
 *
 * @param   object   the table row
 * @param   object   the color to use for this row
 *
 * @return  boolean  whether pointer is set or not
 */
function setPointer(theRow, thePointerColor)
{
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }

    return true;
} // end of the 'setPointer()' function

/**
 * Fill In the Login data into the "frmInf" frame.
 */
function set_login(str, lng)
{
	with (parent.frames['frmMenu']) {
		document.open();

			if (lng=='en') {
				document.write("Logged in: ");
			} else {
				document.write("Ingelogd: ");
			}
			document.write(str);
			document.write(" (<a class='login' href='_logout.php?lng=" + lng + "'>");
			if (lng=='en') {
				document.write("Log out</a>)");
			} else {
				document.write("Uitloggen</a>)");
			}

		document.close();
	}
}


function showConfirmation(action){

	if ((action=="") || (action==undefined)) {
		mes = "Weet u dit zeker?";
	} else {
		mes = action
	}

	return confirm(mes);
}
