
function load_team(team)
{
	if (team=='D') {
		document.getElementById('competitie').src="http://www.npb.nl/Competitie.asp?KlasSelect=2&ViewMode=U&PouleSelect=F&SelectOption=No";
	} else if (team=='C') {
		document.getElementById('competitie').src="http://www.npb.nl/Competitie.asp?KlasSelect=2&ViewMode=U&PouleSelect=C&SelectOption=No";
	} else if (team=='B') {
		document.getElementById('competitie').src="http://www.npb.nl/Competitie.asp?KlasSelect=1&ViewMode=U&PouleSelect=A&SelectOption=No";
	} else {
		document.getElementById('competitie').src="http://www.npb.nl/Competitie.asp?KlasSelect=1&ViewMode=U&PouleSelect=B&SelectOption=No";
	}
}

/*
 *	Gastenboek
 */
function addSmilie(code){
	document.subform.p_message.value += code;
}

/**
 * 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);
}
