﻿function nWindow(url, w, h, center) {
    var left = 10;
    var top = 10;
    if (center == 1) {
        left = (screen.width / 2) - (w / 2);
        top = (screen.height / 2) - (h / 2);
    }
    if (center == 2) {
        left = (screen.width / 2) - (w / 2);
        top = (screen.height / 2) - (h / 2);
        top += ",fullscreen=1"
    }
    var popUpWin = window.open(url, 'popUpWin', 'width=' + w + ',height=' + h + ',status=1,resizable=1,scrollbars=1,toolbars=0,left=' + left + ' ,top=' + top)
    popUpWin.focus()
}

function n2Window(url, w, h, center) {
    var left = 10;
    var top = 10;
    if (center == 1) {
        left = (screen.width / 2) - (w / 2);
        top = (screen.height / 2) - (h / 2);
    }
    if (center == 2) {
        left = (screen.width / 2) - (w / 2);
        top = (screen.height / 2) - (h / 2);
        top += ",fullscreen=1"
    }
    var popUpWin = window.open(url, 'popUpWindow', 'height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
    popUpWin.focus()
}


function ClearSearch(txt) {
    if (txt.value == 'Startnr, Navn, Klub/Hold/Firma') {
        txt.value = '';
    }
}

function ValidateSearch(txt) {
    if (txt.value == '') {
        txt.value = 'Startnr, Navn, Klub/Hold/Firma';
    }
}
