var confirmMsg  = 'Wilt u echt :';

function confirmLink(theLink, question)
{
    if (confirmMsg == '') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + '\n' + question);
    if (is_confirmed) {
        theLink.href += '&confirmed=1';
    }

    return is_confirmed;
}

function onlyNumbers(obj) {
	var checked = "", replace = false;
	for (i = 0; i < obj.value.length; i++)
	if (isNumber(obj.value.substr(i, 1))) checked += obj.value.substr(i, 1);
		else replace = true;
	if (replace) obj.value = checked;
}

function isNumber(c){
	if (c==0||c==1||c==2||c==3||c==4||c==5||c==6||c==7||c==8||c==9||c=='X'|c=='x') return true;
		else return false;
}

function onlyCaps(obj) {
	var checked = "", replace = false;
	for (i = 0; i < obj.value.length; i++)
	if (obj.value.substr(i, 1) == obj.value.substr(i, 1).toUpperCase()) checked += obj.value.substr(i, 1);
	else {
		replace = true;
		checked += obj.value.substr(i, 1).toUpperCase();
	}
	if (replace) obj.value = checked;
}

var popupCount = 0;
function fly(fileID, width, height) {
  width += 10;
 	height += 10;
 	popupCount++;
  window.open(fileID , "fly"+popupCount, "menubar=0,scrollbars=1,toolbar=0,location=0,directories=0,status=0,resizable=1,width=" + width + ",height=" + height);
}

function openPopup(fileID, width, height) {
    window.open(fileID , 'fly', "menubar=0,scrollbars=1,toolbar=0,location=0,directories=0,status=0,resizable=0,width=" + width + ",height=" + height);
}
