// reset variables
var popLogin = null;
var leftPosition;
var topPosition;
//try {leftPosition = (screen.availWidth) ? (screen.availWidth / 2) : 0; } catch (e) {}
//try {topPosition = (screen.availHeight) ? (screen.availHeight) / 2 : 0; } catch (e) {}
//leftPosition = 0;
//topPosition = 0;

var properties = 'toolbar=0,location=0';

//****************************************************************************//
//  function:	doFilter()
// arguments:	none
//    result:	popup window	
//****************************************************************************//

//Fix to set BaseLocation to the correct location
if (BaseLocation != undefined) {
    BaseLocation = BaseLocation.toLowerCase();
    if (BaseLocation.indexOf("system/includes") > -1) {
        BaseLocation = BaseLocation.substring(0, BaseLocation.indexOf("system/includes")) + "system/forms/";
    }
}

function doFilter(strType, strID, fldObject, fldTarget, trSystem, strDesc, tmpFilter) {
    //strType=Querynaam | strID=ID waar de link mee wordt opgebouwd | fldObject=Veldnaam voor vrije kolom  | fldTarget=Veldnaam voor IDkolom | trSystem=2 for MSSQL | strDesc=SQL kolom voor fldObject | tmpFilter=WHERE etc
    //Runs window.opener.RefreshForm() when an item is selected
    var popWidth = 800;
    var popHeight = 400;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLogin = open(BaseLocation + 'Filter.aspx?TypeID=' + strType + '&fld=' + fldObject + '&fldT=' + fldTarget + '&trgS=' + trSystem + '&ID=' + strID + '&Desc=' + strDesc + '&FLT=' + tmpFilter, 'popLogin', properties);
    FocusPopup(popLogin);
}

function doFilterExt(sQuery, oReturnFields, oFilter) {
    //strType=Querynaam | strID=ID waar de link mee wordt opgebouwd | fldObject=Veldnaam voor vrije kolom  | fldTarget=Veldnaam voor IDkolom | trSystem=2 for MSSQL | strDesc=SQL kolom voor fldObject | tmpFilter=WHERE etc
    //Runs window.opener.ReturnFilter() when an item is selected
    var sQuerystring;
    var i = 0;
    var oProps = {
        returnFunction: "onReturnFilter"
    }

    //oReturnFields = { {"txtOpleidingGroepID", "txtOpleidingGroepID"}, {"txtOpleidingGroep", "Omschrijving"} }
    sQuerystring = "?TypeID=" + sQuery;

    for (sKey in oReturnFields) {
        sQuerystring += "&FLD" + i + "=" + sKey;
        sQuerystring += "&VAL" + i + "=" + oReturnFields[sKey];
        i++;
    }

    if (typeof (oFilter) == "string") sQuerystring += "&FLT=" + oFilter;
    if (typeof (oFilter) == "object" && oFilter != "") {
        for (i = 0; i < oFilter.length; i++) {
            sQuerystring += "&FLT" + i + "=" + oFilter[i];
        }
    }

    if (arguments.length > 3) {
        //Parse properties
        Object.extend(oProps, arguments[3]);
        i = 0;
        for (sKey in oProps) {
            sQuerystring += "&PROPK" + i + "=" + sKey;
            sQuerystring += "&PROPV" + i + "=" + oProps[sKey];
            i++;
        }
    }

    return popup(BaseLocation + "Filter.aspx" + sQuerystring, 800, 400, "popLogin");
}

function ChangeEmail() {
    var popWidth = 440;
    var popHeight = 50;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEmailChange = open(BaseLocation + 'ChangeEmail.aspx', 'popEmailChange', properties);
    FocusPopup(popEmailChange);
}

function doZoekAfspraak(strType, strID, fldObject, fldTarget, trSystem, strDesc) {
    var popWidth;
    var popHeight;

    if (readCookie("pHeight") == null) {
        popWidth = 800;
        popHeight = 400;
    }
    else {
        popWidth = readCookie("zpdWidth");
        popHeight = readCookie("zpdHeight");
    }

    properties += ',scrollbars=1, resizable=1';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLogin = open(BaseLocation + 'Planning/Zoek.aspx?TypeID=' + strType + '&fld=' + fldObject + '&fldT=' + fldTarget + '&trgS=' + trSystem + '&ID=' + strID + '&Desc=' + strDesc, 'popLogin', properties);
    FocusPopup(popLogin);
}

function doRequestPassword() {
    var popWidth = 500;
    var popHeight = 170;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popPassword = open(BaseLocation + '../../RequestPassword.aspx', 'popPassword', properties);
    FocusPopup(popPassword);
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
    }

    return null;
}

function doEditEd(strEdID) {
    var popWidth = 520;
    var popHeight = 460;
    properties += ',srollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEditEd = open(BaseLocation + 'OpleidingBeheer/Opleiding/AddEdit.aspx?OplID=' + strEdID, 'popEditEd', properties);
    FocusPopup(popEditEd);
}

function doEditMailTemplate(strID) {
    var popWidth = 750;
    var popHeight = 560;
    properties += ',srollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popMailTemplate = open(BaseLocation + 'System/MailTemplates/EditMailTemplate.aspx?ID=' + strID, 'popMailTemplate', properties);
    FocusPopup(popMailTemplate);
}

function doAddModule(strEdID) {
    var popWidth = 520;
    var popHeight = 530;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEditEd = open(BaseLocation + 'OpleidingBeheer/Opleiding/AddEditModule.aspx?OplID=' + strEdID, 'popAddModule', properties);
    FocusPopup(popEditEd);
}

function doAddBeoordeling(strModID) {
    var popWidth = 530;
    var popHeight = 280;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEditEd = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditBeoordeling.aspx?ModID=' + strModID, 'popAddBeoordeling', properties);
    FocusPopup(popEditEd);
}

function doAddBeoordelingTraject(strTrajectID) {
    var popWidth = 580;
    var popHeight = 600;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEditEd = open(BaseLocation + 'Planning/Opleidingsprojecten/KoppelAssessment.aspx?OTI=' + strTrajectID, 'popAddBeoordeling', properties);
    FocusPopup(popEditEd);
}

function doAddBeoordelingProject(strProjectID) {
    var popWidth = 580;
    var popHeight = 600;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEditEd = open(BaseLocation + 'Planning/Opleidingsprojecten/KoppelAssessment.aspx?OPI=' + strProjectID, 'popAddBeoordeling', properties);
    FocusPopup(popEditEd);
}

function doEditBeoordeling(strBeoID) {
    var popWidth = 530;
    var popHeight = 280;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEditEd = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditBeoordeling.aspx?BeoID=' + strBeoID, 'popEditBeoordeling', properties);
    FocusPopup(popEditEd);
}

function doEditBeoordelingTraject(strBeoID, strTrajectActiviteitID) {
    var popWidth = 530;
    var popHeight = 280;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEditEd = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditBeoordeling.aspx?BeoID=' + strBeoID + '&trajectActiviteitID=' + strTrajectActiviteitID, 'popEditBeoordeling', properties);
    FocusPopup(popEditEd);
}

function doEditBeoordelingProject(strBeoID, strProjectActiviteitID) {
    var popWidth = 530;
    var popHeight = 280;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEditEd = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditBeoordeling.aspx?BeoID=' + strBeoID + '&projectActiviteitID=' + strProjectActiviteitID, 'popEditBeoordeling', properties);
    FocusPopup(popEditEd);
}

function doEditModule(strEdID, strModID) {
    var popWidth = 850;
    var popHeight = 530;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEditEd = open(BaseLocation + 'Opleidingbeheer/Opleiding/AddEditModule.aspx?OplID=' + strEdID + '&ModID=' + strModID, 'popEditModule', properties);
    FocusPopup(popEditEd);
}

function doEditModuleB(strEdID, strModID) {
    var popWidth = 850;
    var popHeight = 530;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEditEd = open(BaseLocation + 'Opleidingbeheer/Opleiding/AddEditModule.aspx?OplID=' + strEdID + '&ModID=' + strModID, 'popEditModule', properties);
    FocusPopup(popEditEd);
}

function doEditScore(strScoID) {
    var popWidth = 390;
    var popHeight = 140;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditPoint.aspx?ScoID=' + strScoID, 'popScoBlok', properties);
    FocusPopup(popLesBlok);
}

function doAddScore(strBeoID) {
    var popWidth = 390;
    var popHeight = 140;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditPoint.aspx?BeoID=' + strBeoID, 'popScoBlok', properties);
    FocusPopup(popLesBlok);
}

function doAddAspect(strBeoID) {
    var popWidth = 520;
    var popHeight = 220;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditAspect.aspx?BeoID=' + strBeoID, 'popAspBlok', properties);
    FocusPopup(popLesBlok);
}

function doEditAspect(strAspID) {
    var popWidth = 520;
    var popHeight = 220;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditAspect.aspx?AspID=' + strAspID, 'popAspBlok', properties);
    FocusPopup(popLesBlok);
}

function doAddItem(strAspID) {
    var popWidth = 520;
    var popHeight = 200;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditItem.aspx?AspID=' + strAspID, 'popItemBlok', properties);
    FocusPopup(popLesBlok);
}

function doEditItem(strItemID) {
    var popWidth = 520;
    var popHeight = 200;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditItem.aspx?ItemID=' + strItemID, 'popItemBlok', properties);
    FocusPopup(popLesBlok);
}

function doAddRapElement(strBeoID) {
    var popWidth = 820;
    var popHeight = 500;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditRapport.aspx?BeoID=' + strBeoID, 'popRapport', properties);
    FocusPopup(popLesBlok);
}

function doAddDossierElement(strType, strDossier) {
    var popWidth = 1024;
    var popHeight = 768;
    properties += ',scrollbars=0';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'System/Dossiers/AddEditDossier.aspx?Type=' + strType + '&POD=' + strDossier, 'popRapport', properties);
    FocusPopup(popLesBlok);
}

function doEditDossier(strID, strType, strDossier) {
    var popWidth = 1024;
    var popHeight = 768;
    properties += ',scrollbars=0';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'System/Dossiers/AddEditDossier.aspx?RapID=' + strID + '&Type=' + strType + '&POD=' + strDossier, 'popRapport', properties);
    FocusPopup(popLesBlok);
}

function doAddTextElement(strRapID) {
    var popWidth = 800;
    var popHeight = 680;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditText.aspx?RapID=' + strRapID, 'popText', properties);
    FocusPopup(popLesBlok);
}

function doEditTextElement(strTextID, strRapID) {
    var popWidth = 800;
    var popHeight = 680;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditText.aspx?TextID=' + strTextID + '&RapID=' + strRapID, 'popText', properties);
    FocusPopup(popLesBlok);
}

function doEditRapport(strRapID) {
    var popWidth = 820;
    var popHeight = 500;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditRapport.aspx?RapID=' + strRapID, 'popRapport', properties);
    FocusPopup(popLesBlok);
}

function doEditCluster(strClusID) {
    var popWidth = 540;
    var popHeight = 130;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Opleiding/AddEditCluster.aspx?ClusID=' + strClusID, 'popCluster', properties);
    FocusPopup(popLesBlok);
}

function doAddCluster() {
    var popWidth = 540;
    var popHeight = 130;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Opleiding/AddEditCluster.aspx', 'popCluster', properties);
    FocusPopup(popLesBlok);
}

function doEditDeelnemer(strDeelID) {
    var popWidth = 900;
    var popHeight = 650;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Deelnemers/AddEditDeelnemer.aspx?DeelID=' + strDeelID, 'popDeel', properties);
    FocusPopup(popLesBlok);
}

function OpenLibraryBlocks(strDeelID) {
    var popWidth = 650;
    var popHeight = 500;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popOpenLibrary = open(BaseLocation + 'Deelnemers/addEditRightsManuals.aspx?deelnemerID=' + strDeelID, 'popOpenLibrary', properties);
    FocusPopup(popOpenLibrary);
}

function doAddFormatie(strDeelID) {
    var popWidth = 550;
    var popHeight = 170;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Deelnemers/AddEditFormatie.aspx?DeelID=' + strDeelID, 'popFormatie', properties);
    FocusPopup(popLesBlok);
}

function doEditFormatie(strForID) {
    var popWidth = 550;
    var popHeight = 170;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Deelnemers/AddEditFormatie.aspx?ForID=' + strForID, 'popFormatie', properties);
    FocusPopup(popLesBlok);
}

function doEditGebruiker(strAdmID) {
    var popWidth = 600;
    var popHeight = 350;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'System/AddEditGebruiker.aspx?AdmID=' + strAdmID, 'popAdm', properties);
    FocusPopup(popLesBlok);
}

function doAddLesBlok(strIDMod) {
    var popWidth = 880;
    var popHeight = 400;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Lesstof/AddEditLesstof.aspx?ModID=' + strIDMod, 'popLesBlok', properties);
    FocusPopup(popLesBlok);
}

function doEditLesBlok(strModID, strLesID) {
    var popWidth = 880;
    var popHeight = 400;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Lesstof/AddEditLesstof.aspx?ModID=' + strModID + '&LesID=' + strLesID, 'popLesBlok', properties);
    FocusPopup(popLesBlok);
}

function doAddDatum(strDatum, bType) {
    var popWidth = 880;
    var popHeight = 325;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popDatum = open(BaseLocation + 'Planning/AddEditPlanning.aspx?Dat=' + strDatum + '&bT=' + bType, 'popDatum', properties);
    FocusPopup(popDatum);
}

function doEditDatum(strIDPlan) {
    var popWidth = 880;
    var popHeight = 325;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popDatum = open(BaseLocation + 'Planning/AddEditPlanning.aspx?PlanID=' + strIDPlan, 'popDatum', properties);
    FocusPopup(popDatum);
}

function OpenOnderwerp(strIDKoppel) {
    var popWidth = 560;
    var popHeight = 470;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popOnderwerp = open(BaseLocation + 'Planning/Onderwerp.aspx?IDKop=' + strIDKoppel, 'popOnderwerp', properties);
    FocusPopup(popOnderwerp);
}

function AddUitnodiging(KopID, PlanID, LastID) {
    var popWidth = 565;
    var popHeight = 140;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight + 100)) + ',height=' + popHeight;
    popUitnodiging = open(BaseLocation + 'Planning/Uitnodigen.aspx?KopID=' + KopID + '&PlanID=' + PlanID + '&LastID=' + LastID, 'popUitnodiging', properties);
    FocusPopup(popUitnodiging);
}

function doEditUitnodiging(MedID, PlanID) {
    var popWidth = 565;
    var popHeight = 140;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight + 100)) + ',height=' + popHeight;
    popUitnodiging = open(BaseLocation + 'Planning/Uitnodigen.aspx?KopID=' + Form1.txtKoppelID.value + '&TypID=' + Form1.txtTypeID.value + '&PlanID=' + PlanID + '&MedID=' + MedID, 'popUitnodiging', properties);
    FocusPopup(popUitnodiging);
}

function ZoekDeelnemer(KopID) {
    var popWidth = 600;
    var popHeight = 555;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popZoekDeelnemer = open(BaseLocation + 'Planning/ZoekDeelnemer.aspx?KopID=' + KopID, 'popZoekDeeln', properties);
    FocusPopup(popZoekDeelnemer);
}

function SendEmail() {
    var popWidth = 550;
    var popHeight = 570;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEmailSend = open(BaseLocation + 'Email.aspx', 'popEmailSend', properties);
    FocusPopup(popEmailSend);
}

function doAnnuleren(KopID) {
    var popWidth = 490;
    var popHeight = 280;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popAnnuleren = open(BaseLocation + 'Planning/Annuleren.aspx?KopID=' + KopID + '&EM=' + Form1.txtEmail.value, 'popAnnuleren', properties);
    FocusPopup(popAnnuleren);
}

function EditRapport(RapID) {
    var popWidth = 550;
    var popHeight = 430;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popAanvullen = open(BaseLocation + 'Toetsverwerking/EditRapport.aspx?RapID=' + RapID, 'popAanvullen', properties);
    FocusPopup(popAanvullen);
}

function OpenPrintScreen(TypeID) {
    var popWidth = 360;
    var popHeight = 200;
    properties = 'menubar=0, toolbar=0,location=0,scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popPrinten = open(BaseLocation + 'Toetsverwerking/Printen.aspx?PlanID=' + Form1.txtPlanningID.value + '&MedID=' + Form1.txtMedewerkerID.value + '&BeoID=' + Form1.txtBeoordelingID.value + '&TypeID=' + TypeID, 'popPrinten', properties);
    FocusPopup(popPrinten);
}

function PrintScreen(PrintID) {
    var popWidth = 800;
    var popHeight = 600;
    properties = 'menubar=1, toolbar=1,location=0,scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popPrintScreen = open(BaseLocation + 'Toetsverwerking/PrintNow.aspx?PlanID=' + Form1.txtIDPlanning.value + '&MedID=' + Form1.txtMedewerkerID.value + '&BeoID=' + Form1.txtBeoordelingID.value + '&TypeID=' + Form1.txtType.value + '&Print=' + PrintID, 'popPrintScreen', properties);
    FocusPopup(popPrintScreen);
}

function PrintBeoordeling(bType) {
    var popWidth = 800;
    var popHeight = 600;
    properties = 'menubar=1, toolbar=1,location=0,scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popPrintBeoordeling = open(BaseLocation + 'Toetsverwerking/PrintBeoordeling.aspx?PlanID=' + Form1.txtPlanningID.value + '&MedID=' + Form1.txtMedewerkerID.value + '&BeoID=' + Form1.txtBeoordelingID.value + '&Ass=' + Form1.txtAs.value + '&bT=' + bType, 'popPrintBeoordeling', properties);
    FocusPopup(popPrintBeoordeling);
}

function PrintExamResult(bType) {
    var popWidth = 800;
    var popHeight = 600;
    properties = 'menubar=1, toolbar=1,location=0,scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popPrintExam = open(BaseLocation + 'Toetsverwerking/PrintExam.aspx?PlanID=' + Form1.txtPlanningID.value + '&MedID=' + Form1.txtMedewerkerID.value + '&TID=' + Form1.txtToetsID.value + '&bT=' + bType, 'popPrintExam', properties);
    FocusPopup(popPrintExam);
}

function AddCategorie(strOpleiding) {
    var popWidth = 500;
    var popHeight = 150;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popOpenCategorie = open(BaseLocation + 'Vragenbank/AddEditCategorie.aspx?OID=' + strOpleiding, 'popOpenCategorie', properties);
    FocusPopup(popOpenCategorie);
}

function EditCategorie(strCategorie) {
    var popWidth = 500;
    var popHeight = 150;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popOpenCategorie = open(BaseLocation + 'Vragenbank/AddEditCategorie.aspx?CID=' + strCategorie, 'popOpenCategorie', properties);
    FocusPopup(popOpenCategorie);
}

function AddAntwoord(strID, VID) {
    var popWidth = 800;
    var popHeight = 600;

    properties += ',scrollbars=0,width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popOpenAntwoord = open(BaseLocation + 'Vragenbank/AddEditAntwoord.aspx?MID=' + strID + '&VID=' + VID, 'popOpenAntwoord', properties);
    FocusPopup(popOpenAntwoord);
}

function EditAntwoord(strID) {
    var popWidth = 800;
    var popHeight = 600;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popOpenAntwoord = open(BaseLocation + 'Vragenbank/AddEditAntwoord.aspx?AID=' + strID, 'popOpenAntwoord', properties);
    FocusPopup(popOpenAntwoord);
}

function OpenFeedback(strID, MID) {
    var popWidth = 800;
    var popHeight = 670;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popFeedback = open(BaseLocation + 'Vragenbank/Feedback.aspx?AID=' + strID + '&MID=' + MID, 'popFeedback', properties);
    FocusPopup(popFeedback);
}

function OpenVraag(strID, strBT) {
    var popWidth = 700;
    var popHeight = 700;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    if (typeof (strBT) == "undefined") {
        popEditVraag = open(BaseLocation + 'Vragenbank/EditVraag.aspx?RowID=' + strID + '&bT=on', 'popEditVraag', properties);
    } else {
        popEditVraag = open(BaseLocation + 'Vragenbank/EditVraag.aspx?RowID=' + strID + '&bT=' + strBT, 'popEditVraag', properties);
    }
    FocusPopup(popEditVraag);
}

function AddToets(strID) {
    var popWidth = 500;
    var popHeight = 680;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popToets = open(BaseLocation + 'Opleidingbeheer/Toetsen/AddEditToets.aspx?KID=' + strID, 'popToets', properties);
    FocusPopup(popToets);
}

function doEditToets(strID, strTrajectActiviteitID, strProjectActiviteitID) {
    var popWidth = 500;
    var popHeight = 700;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    var url = BaseLocation + 'Opleidingbeheer/Toetsen/AddEditToets.aspx?RowID=' + strID
    if (typeof (strTrajectActiviteitID) != "undefined" && strTrajectActiviteitID != "") { url += "&TrajectActiviteitID=" + strTrajectActiviteitID; }
    if (typeof (strProjectActiviteitID) != "undefined" && strProjectActiviteitID != "") { url += "&ProjectActiviteitID=" + strProjectActiviteitID; }
    popToets = open(url, 'popToets', properties);
    FocusPopup(popToets);
}

function AddEditActivityProject(strPID, strKopID) {
    var popWidth = 650;
    var popHeight = 600;
    properties += ',scrollbars=0';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    if (typeof (strKopID) == "undefined") {
        popAddActiviteit = open(BaseLocation + 'Planning/Opleidingsprojecten/AddEditProjectActiviteit.aspx?PID=' + strPID, 'popAddActiviteit', properties);
    } else {
        popAddActiviteit = open(BaseLocation + 'Planning/Opleidingsprojecten/AddEditProjectActiviteit.aspx?PID=' + strPID + '&KopID=' + strKopID, 'popAddActiviteit', properties);
    }
    FocusPopup(popAddActiviteit);
}

function AddEditActivityTraject(strTID, strKopID) {
    var popWidth = 650;
    var popHeight = 600;
    properties += ',scrollbars=0';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    if (typeof (strKopID) == "undefined") {
        popAddActiviteit = open(BaseLocation + 'Planning/Opleidingsprojecten/AddEditProjectActiviteit.aspx?TID=' + strTID, 'popAddActiviteit', properties);
    } else {
        popAddActiviteit = open(BaseLocation + 'Planning/Opleidingsprojecten/AddEditProjectActiviteit.aspx?TID=' + strTID + '&OTI=' + strKopID, 'popAddActiviteit', properties);
    }
    FocusPopup(popAddActiviteit);
}

function AddVraagKoppel(TID, strID) {
    var popWidth = 380;
    var popHeight = 280;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popKoppelVragen = open(BaseLocation + 'Opleidingbeheer/Toetsen/AddEditVraagKoppel.aspx?TID=' + TID + '&bType=' + strID, 'popKoppelVragen', properties);
    FocusPopup(popKoppelVragen);
}

function EditVraagKoppel(KID, strID, TID) {
    var popWidth = 380;
    var popHeight = 280;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popKoppelVragen = open(BaseLocation + 'Opleidingbeheer/Toetsen/AddEditVraagKoppel.aspx?KID=' + KID + '&bType=' + strID + '&TID=' + TID, 'popKoppelVragen', properties);
    FocusPopup(popKoppelVragen);
}

function AdviesToets(strID, MID, TID) {
    var popWidth = 800;
    var popHeight = 700;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popAdviesToets = open(BaseLocation + 'Opleidingbeheer/Toetsen/AddEditAdvies.aspx?KID=' + strID + '&MID=' + MID + '&TID=' + TID, 'popAdviesToets', properties);
    FocusPopup(popAdviesToets);
}

function OpenExam(strID, MID, PID, KID) {
    //KID is optional and is used for selecting item in ShowEducation
    var popWidth = 830;
    var popHeight = 600;

    properties += ',scrollbars=1';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popExam = open(BaseLocation + 'Toetsverwerking/SetExam.aspx?TID=' + strID + '&MID=' + MID + '&PID=' + PID + '&KID=' + (KID || ''), 'popExam', properties);
    FocusPopup(popExam);
}

function FindQuestion(BID) {
    var popWidth = 450;
    var popHeight = 350;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popFindQuestion = open(BaseLocation + 'Toetsverwerking/NavQuestion.aspx?BID=' + BID, 'popFindQuestion', properties);
    FocusPopup(popFindQuestion);
}

function OF(RTI) {
    var popWidth = 700;
    var popHeight = 500;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popFeedback = open(BaseLocation + 'Toetsverwerking/Feedback.aspx?RTI=' + RTI, 'popFeedback', properties);
    FocusPopup(popFeedback);
}

function OpenAV(IDAV, bType) {
    var popWidth = 800;
    var popHeight = 620;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popAanvraag = open(BaseLocation + 'Opleidingbeheer/Aanvragen/Details.aspx?IDAV=' + IDAV + '&bT=' + bType, 'popAanvraag', properties);
    FocusPopup(popAanvraag);
}

function OpenPortfolio(POID, bType) {
    var popWidth = 820;
    var popHeight = 600;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popPortfolio = open(BaseLocation + 'Deelnemers/Portfolio/OpenPortfolio.aspx?POID=' + POID + '&bT=' + bType, 'popPortfolio', properties);
    FocusPopup(popPortfolio);
}

function EditPortfolio(POID) {
    var popWidth = 800;
    var popHeight = 600;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popPortfolio = open(BaseLocation + 'Deelnemers/Portfolio/EditPortfolio.aspx?POID=' + POID, 'popPortfolio', properties);
    FocusPopup(popPortfolio);
}

function EditMPortfolio(POID) {
    var popWidth = 800;
    var popHeight = 620;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popPortfolio = open(BaseLocation + 'Deelnemers/Portfolio/AddPortfolio.aspx?POID=' + POID, 'popPortfolio', properties);
    FocusPopup(popPortfolio);
}

function AddProfile(MID, bT) {
    var popWidth = 540;
    var popHeight = 570;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popProfile = open(BaseLocation + 'Deelnemers/AddProfile.aspx?MID=' + MID + '&bT=' + bT, 'popProfile', properties);
    FocusPopup(popProfile);
}

function AddPortfolio(MID, bT) {
    var popWidth = 800;
    var popHeight = 620;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popPortfolio = open(BaseLocation + 'Deelnemers/Portfolio/AddPortfolio.aspx?MID=' + MID + '&bT=' + bT, 'popPortfolio', properties);
    FocusPopup(popPortfolio);
}

function AddCompetentie() {
    var popWidth = 820;
    var popHeight = 620;
    properties += ',scrollbars=0, resizable=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popCompetentie = open(BaseLocation + 'Opleidingbeheer/Competentie/AddEditCompetentie.aspx', 'popCompetentie', properties);
    FocusPopup(popCompetentie);
}

function EditCompetentie(CID) {
    var popWidth = 820;
    var popHeight = 620;
    properties += ',scrollbars=0, resizable=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popCompetentie = open(BaseLocation + 'Opleidingbeheer/Competentie/AddEditCompetentie.aspx?CID=' + CID, 'popCompetentie', properties);
    FocusPopup(popCompetentie);
}

function KoppelModule(CID) {
    var popWidth = 530;
    var popHeight = 630;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popModule = open('KoppelModule.aspx?CID=' + CID, 'popModule', properties);
    FocusPopup(popModule);
}

function KoppelRelatie(CID) {
    var popWidth = 750;
    var popHeight = 200;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popAfdeling = open(BaseLocation + 'OpleidingBeheer/Competentie/KoppelRelatie.aspx?CID=' + CID, 'popRelatie', properties);
    FocusPopup(popAfdeling);
}

function KoppelCompetentie(KID) {
    var popWidth = 530;
    var popHeight = 500;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popCompetentie = open(BaseLocation + 'OpleidingBeheer/Competentie/KoppelCompetentie.aspx?KID=' + KID, 'popCompetentie', properties);
    FocusPopup(popCompetentie);
}

function AddOpdracht(KID, LID, MID) {
    var popWidth = 800;
    var popHeight = 660;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popOpdracht = open(BaseLocation + 'Opleidingbeheer/Lesstof/AddEditOpdracht.aspx?KID=' + KID + '&LID=' + LID + '&MID=' + MID, 'popOpdracht', properties);
    FocusPopup(popOpdracht);
}

function EditOpdracht(OID, MID) {
    var popWidth = 800;
    var popHeight = 660;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popOpdracht = open(BaseLocation + 'Opleidingbeheer/Lesstof/AddEditOpdracht.aspx?OID=' + OID + '&MID=' + MID, 'popOpdracht', properties);
    FocusPopup(popOpdracht);
}

function AddLesstof(LID, MID) {
    var popWidth = 770;
    var popHeight = 650;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLes = open(BaseLocation + 'Opleidingbeheer/Lesstof/AddEditLiteratuur.aspx?LID=' + LID + '&MID=' + MID, 'popLes', properties);
    FocusPopup(popLes);
}

function EditLesstof(LIT, MID) {
    var popWidth = 770;
    var popHeight = 680;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLes = open(BaseLocation + 'Opleidingbeheer/Lesstof/AddEditLiteratuur.aspx?LIT=' + LIT + '&MID=' + MID, 'popLes', properties);
    FocusPopup(popLes);
}

function AddRegio(LID) {
    var popWidth = 490;
    var popHeight = 150;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popRegio = open(BaseLocation + 'Deelnemers/Ministam/Afdelingen/AddEditRegio.aspx?LID=' + LID, 'popRegio', properties);
    FocusPopup(popRegio);
}

function EditRegio(RID) {
    var popWidth = 490;
    var popHeight = 150;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popRegio = open(BaseLocation + 'Deelnemers/Ministam/Afdelingen/AddEditRegio.aspx?RID=' + RID, 'popRegio', properties);
    FocusPopup(popRegio);
}

function AddTraject(MID) {
    var popWidth = 900;
    var popHeight = 660;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popTraject = open(BaseLocation + 'Deelnemers/Opleidingstraject/AddEditTraject.aspx?MID=' + MID, 'popTraject', properties);
    FocusPopup(popTraject);
}

function EditTraject(OTI) {
    var popWidth = 900;
    var popHeight = 660;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popTraject = open(BaseLocation + 'Deelnemers/Opleidingstraject/AddEditTraject.aspx?OTI=' + OTI, 'popTraject', properties);
    FocusPopup(popTraject);
}

function AddModuleKoppel(OTI, MID) {
    var popWidth = 530;
    var popHeight = 630;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popModuleKoppel = open('KoppelModule.aspx?OTI=' + OTI + '&MID=' + MID, 'popModuleKoppel', properties);
    FocusPopup(popModuleKoppel);
}

function Vrijstelling(KMI, OPL) {
    var popWidth = 490;
    var popHeight = 300;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popVrijstelling = open(BaseLocation + 'Deelnemers/Opleidingstraject/Vrijstelling.aspx?KMI=' + KMI + '&OPL=' + OPL, 'popVrijstelling', properties);
    FocusPopup(popVrijstelling);
}

function KoppelAuteur(AID) {
    var popWidth = 530;
    var popHeight = 530;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popKoppelAuteur = open(BaseLocation + 'Intern/KoppelAuteur.aspx?AID=' + AID, 'popKoppelAuteur', properties);
    FocusPopup(popKoppelAuteur);
}
function KoppelManual(MID) {
    var popWidth = 530;
    var popHeight = 130;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popKoppelAuteur = open(BaseLocation + 'Content/Manuals/FetchAuteur.aspx?MID=' + MID, 'popKoppelAuteur', properties);
    FocusPopup(popKoppelAuteur);
}

function EditOplProject(OPI) {
    var popWidth = 750;
    var popHeight = 365;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popOpleidingsproject = open(BaseLocation + 'Planning/OpleidingsProjecten/AddEditProject.aspx?OPI=' + OPI, 'popOpleidingsproject', properties);
    FocusPopup(popOpleidingsproject);
}

function ArchiveOplProject(OPI) {
    var popWidth = 750;
    var popHeight = 310;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popOpleidingsproject = open(BaseLocation + 'Planning/OpleidingsProjecten/ArchiveProject.aspx?OPI=' + OPI, 'popArchiveOpleidingsproject', properties);
    FocusPopup(popOpleidingsproject);
}

function AddProjectModule(OPI) {
    var popWidth = 530;
    var popHeight = 630;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popModuleKoppel = open('KoppelModule.aspx?OPI=' + OPI, 'popModuleKoppel', properties);
    FocusPopup(popModuleKoppel);
}

function AddTrajectActiviteit(OTI) {
    var popWidth = 530;
    var popHeight = 630;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popModuleKoppel = open('KoppelModule.aspx?OTI=' + OTI, 'popModuleKoppel', properties);
    FocusPopup(popModuleKoppel);
}

function AddProjectDeelnemers(OPI) {
    var popWidth = 530;
    var popHeight = 650;
    properties += ',scrollbars=0,resizable=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popSelectDeelnr = open(BaseLocation + 'Planning/OpleidingsProjecten/AddProjectDeelnemer.aspx?OPI=' + OPI, 'popSelectDeelnr', properties);
    FocusPopup(popSelectDeelnr);
}

function AddEditCouncilorParticipants(CID) {
    var popWidth = 530;
    var popHeight = 650;
    properties += ',scrollbars=0,resizable=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popSelectDeelnr = open(BaseLocation + 'System/Councilor/AddEditCouncilorParticipants.aspx?CID=' + CID, 'popSelectDeelnr', properties);
    FocusPopup(popSelectDeelnr);
}

function KoppelManager(MID) {
    var popWidth = 400;
    var popHeight = 220;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popKoppelManager = open(BaseLocation + 'Deelnemers/Ministam/Managers/ManKoppel.aspx?MID=' + MID, 'popKoppelManager', properties);
    FocusPopup(popKoppelManager);
}

function doEditText(strID) {
    var popWidth = 780;
    var popHeight = 610;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popTekst = open(BaseLocation + 'System/AddEditText.aspx?strID=' + strID, 'popText', properties);
    FocusPopup(popTekst);
}

function doAddText() {
    var popWidth = 780;
    var popHeight = 610;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popTekst = open(BaseLocation + 'System/AddEditText.aspx', 'popText', properties);
    FocusPopup(popTekst);
}

function OpenNews(strID) {
    var popWidth = 700;
    var popHeight = 600;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popNews = open(BaseLocation + 'Portaal/OpenNews.aspx?TID=' + strID, 'popNews', properties);
    FocusPopup(popNews);
}

function AddQuestion(strMOD, strMED) {
    var popWidth = 590;
    var popHeight = 260;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popReac = open(BaseLocation + 'Portaal/AddEditForum.aspx?bT=Q&MOD=' + strMOD + '&MID=' + strMED, 'popReac', properties);
    FocusPopup(popReac);
}

function OpenQuestion(strVID, strMED, strType) {
    var popWidth = 850;
    var popHeight = 550;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popQuestion = open(BaseLocation + 'Portaal/ViewForum.aspx?bT=' + strType + '&MID=' + strMED + '&VID=' + strVID, 'popQuestion', properties);
    FocusPopup(popQuestion);
}

function AddReaction(strVID, strMED, strType) {
    var popWidth = 830;
    var popHeight = 600;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popReac = open(BaseLocation + 'Portaal/AddEditForum.aspx?bT=' + strType + '&VID=' + strVID + '&MID=' + strMED, 'popReac', properties);
    FocusPopup(popReac);
}

function OpenTSK(bT, strLIT, Type, KID, tmpWidth, tmpHeight) {
    var popWidth = tmpWidth;
    var popHeight = tmpHeight;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popDetails = open(BaseLocation + 'Portaal/OpenDetail.aspx?bT=' + bT + '&LIT=' + strLIT + '&Type=' + Type + '&KID=' + KID, 'popDetails', properties);
    FocusPopup(popDetails);
}

function PreviewLesstof(MID) {
    var popWidth = 1000;
    var popHeight = 580;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popQuestions = open(BaseLocation + 'Portaal/ShowModule.aspx?KID=' + MID, 'popQuestions', properties);
    FocusPopup(popQuestions);
}

function AddResultaatCoach(KID) {
    var popWidth = 550;
    var popHeight = 560;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popCoach = open(BaseLocation + 'Portaal/AddEditBeoordelingCoach.aspx?KID=' + KID, 'popCoach', properties);
    FocusPopup(popCoach);
}

function AddResultaatCouncilor(ID_OpleidingsprojectI, ID_Medewerker, ID_Module, ID_Vrijeactiviteit) {
    var popWidth = 550;
    var popHeight = 560;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popCoach = open(BaseLocation + 'System/Councilor/AddEditBeoordelingCouncilor.aspx?OPI=' + ID_OpleidingsprojectI + '&MED=' + ID_Medewerker + '&MID=' + ID_Module + '&AID=' + ID_Vrijeactiviteit, 'popCoach', properties);
    FocusPopup(popCoach);
}


function EditResCoach(RID) {
    var popWidth = 550;
    var popHeight = 560;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popCoach = open(BaseLocation + 'Portaal/AddEditBeoordelingCoach.aspx?RID=' + RID, 'popCoach', properties);
    FocusPopup(popCoach);
}

function CloseModule(KID) {
    var popWidth = 530;
    var popHeight = 300;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popModule = open(BaseLocation + 'Portaal/CloseModule.aspx?KID=' + KID, 'popModule', properties);
    FocusPopup(popModule);
}

function OpenResults(KID) {
    var popWidth = 760;
    var popHeight = 550;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popResults = open(BaseLocation + 'Portaal/MyResultaat.aspx?KID=' + KID, 'popResults', properties);
    FocusPopup(popResults);
}

function OpenTraject(TID, bType) {
    var popWidth = 700;
    var popHeight = 550;
    properties += ',scrollbars=1';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popTraject = open(BaseLocation + 'Toetsverwerking/Overzicht.aspx?KID=' + TID + '&bT=' + bType, 'popTraject', properties);
    FocusPopup(popTraject);
}

function OpenProfile(MID, strBT) {
    var popWidth = 1000;
    var popHeight = 650;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popPortfolioAll = open(BaseLocation + 'Deelnemers/Deelnemer.aspx?RowID=' + MID + '&bT=' + strBT, 'popPortfolioAll', properties);

    FocusPopup(popPortfolioAll);
}

function EditRapportage(RID) {
    var popWidth = 530;
    var popHeight = 440;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popRapport = open(BaseLocation + 'Opleidingbeheer/Beoordelen/AddEditRapport.aspx?RowID=' + RID, 'popRapport', properties);
    FocusPopup(popRapport);
}

function doEditEvaluatie(strID) {
    var popWidth = 520;
    var popHeight = 200;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEvaluatie = open(BaseLocation + 'Opleidingbeheer/Evaluaties/AddEditEvaluatie.aspx?EVID=' + strID, 'popEvaluatie', properties);
    FocusPopup(popEvaluatie);
}

function doAddEvalScore(strID) {
    var popWidth = 380;
    var popHeight = 140;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popScore = open(BaseLocation + 'Opleidingbeheer/Evaluaties/AddEditEvalPunt.aspx?EVID=' + strID, 'popScore', properties);
    FocusPopup(popScore);
}

function doEditEVScore(strID) {
    var popWidth = 380;
    var popHeight = 140;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popScore = open(BaseLocation + 'Opleidingbeheer/Evaluaties/AddEditEvalPunt.aspx?ScoID=' + strID, 'popScore', properties);
    FocusPopup(popScore);
}

function doAddEvalOnderwerp(strID) {
    var popWidth = 520;
    var popHeight = 190;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEvalOnderwerp = open(BaseLocation + 'Opleidingbeheer/Evaluaties/AddEditEvalOnderwerp.aspx?EVID=' + strID, 'popEvalOnderwerp', properties);
    FocusPopup(popEvalOnderwerp);
}

function doEditEvalOnderwerp(strID) {
    var popWidth = 520;
    var popHeight = 190;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popEvalOnderwerp = open(BaseLocation + 'Opleidingbeheer/Evaluaties/AddEditEvalOnderwerp.aspx?OID=' + strID, 'popEvalOnderwerp', properties);
    FocusPopup(popEvalOnderwerp);
}

function doAddEVALVraag(strID) {
    var popWidth = 520;
    var popHeight = 160;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Evaluaties/AddEditEvalVraag.aspx?OID=' + strID, 'popItemBlok', properties);
    FocusPopup(popLesBlok);
}

function doEditEVALVraag(strID) {
    var popWidth = 520;
    var popHeight = 160;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popLesBlok = open(BaseLocation + 'Opleidingbeheer/Evaluaties/AddEditEvalVraag.aspx?VID=' + strID, 'popItemBlok', properties);
    FocusPopup(popLesBlok);
}

function AddEvalOVraag(strID) {
    var popWidth = 500;
    var popHeight = 190;
    properties += ',scrollbars=0';

    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popItemOVraag = open(BaseLocation + 'Opleidingbeheer/Evaluaties/AddEditEvalOVraag.aspx?EVID=' + strID, 'popItemOVraag', properties);
    FocusPopup(popItemOVraag);
}

function EditEvalOVraag(strID) {
    var popWidth = 500;
    var popHeight = 190;
    properties += ',scrollbars=0';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;

    popItemOVraag = open(BaseLocation + 'Opleidingbeheer/Evaluaties/AddEditEvalOVraag.aspx?VID=' + strID, 'popItemOVraag', properties);
    FocusPopup(popItemOVraag);
}

function OpenEval(PID, MID, strBT) {
    var popWidth = 700;
    var popHeight = 600;
    properties += ',scrollbars=1';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;

    if (typeof (strBT) == "undefined") {
        popEvaluation = open(BaseLocation + 'Portaal/ShowEvaluation.aspx?PID=' + PID + '&MID=' + MID + '&bT=ProjectModule', 'popEvaluation', properties);
    } else {
        popEvaluation = open(BaseLocation + 'Portaal/ShowEvaluation.aspx?PID=' + PID + '&MID=' + MID + '&bT=' + strBT, 'popEvaluation', properties);
    }
    FocusPopup(popEvaluation);
}

function doAddRapportveld() {
    var popWidth = 510;
    var popHeight = 180;
    properties += ',scrollbars=0';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;

    popRapportVeld = open(BaseLocation + 'System/AddEditRapportVeld.aspx', 'popRapportVeld', properties);
    FocusPopup(popRapportVeld);
}

function doEditRapportVeld(RVID) {
    var popWidth = 510;
    var popHeight = 180;
    properties += ',scrollbars=0';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;

    popRapportVeld = open(BaseLocation + 'System/AddEditRapportVeld.aspx?RVID=' + RVID, 'popRapportVeld', properties);
    FocusPopup(popRapportVeld);
}

function ProfileDetailMain(strID, strBT) {
    if (typeof (strBT) == "undefined") {
        window.location = BaseLocation + "Planning/Profielmanagement/OrganisatieDetail.aspx?ID=" + strID + "&bT=DN";
    } else {
    window.location = BaseLocation + "Planning/Profielmanagement/OrganisatieDetail.aspx?ID=" + strID + "&bT=" + strBT;
    }
}

function ProfileDetail(strID) {
    window.location = BaseLocation + "Planning/Profielmanagement/OrganisatieDetail.aspx?ID=" + strID + "&bT=" + Form1.txtType.value;
}

function addWordNoteMsg(sPageID, sWord, sManualID) {
    addEditWordNoteMsg = popup(BaseLocation + "Content/Manuals/addEditWordNotes.aspx?pageID=" + sPageID + "&noteWord=" + sWord + "&ManualID=" + sManualID, 800, 600, "addEditWordNoteMsg");
}

function editWordNoteMsg(sID, sManualID) {
    addEditWordNoteMsg = popup(BaseLocation + "Content/Manuals/addEditWordNotes.aspx?noteID=" + sID + "&ManualID=" + sManualID, 800, 600, "addEditWordNoteMsg");
}

function editTrainingproject(sKoppelID, sGridID) {
    if (typeof (sGridID) == "undefined") {
        return popup(BaseLocation + "Planning/Opleidingsprojecten/Project.aspx?GridID=fltGrid&RowID=" + sKoppelID + "#" + sKoppelID, 1000, 600, "editTrainingproject");
    } else {
        return popup(BaseLocation + "Planning/Opleidingsprojecten/Project.aspx?GridID=" + sGridID + "&RowID=" + sKoppelID + "#" + sKoppelID, 1000, 600, "editTrainingproject");
    }
}

function editPlanDatum(sPlanID) {
    return popup(BaseLocation + "Planning/Planbord/PlanDatum.aspx?sPlanID=" + sPlanID, 1000, 600, "editPlanDatum");
}

function doEditActivityCurriculum(sCurID) {
    return popup(BaseLocation + "Planning/Opleidingsprojecten/editProjectActivity.aspx?OTI=" + sCurID, 450, 270, "doEditActivityCurriculum");
}

function doEditActivityProject(sProjectID) {
    return popup(BaseLocation + "Planning/Opleidingsprojecten/editProjectActivity.aspx?OPI=" + sProjectID, 450, 270, "doEditActivityProject");
}

function doAddTestToCurriculum(sTrajectID) {
    return popup(BaseLocation + "Planning/Opleidingsprojecten/KoppelTest.aspx?OTI=" + sTrajectID, 565, 630, "popAddTestToCurriculum");
}

function doAddTestToProject(sProjectID) {
    return popup(BaseLocation + "Planning/Opleidingsprojecten/KoppelTest.aspx?OPI=" + sProjectID, 565, 630, "popAddTestToCurriculum");
}

function Left(str, n) {
    if (n != 0)
        return "";
    else if (n > String(str).length)
        return str;
    else
        return String(str).substring(0, n);
}

function Right(str, n) {
    if (n != 0)
        return "";
    else if (n > String(str).length)
        return str;
    else {
        var iLen = String(str).length;
        return String(str).substring(iLen, iLen - n);
    }
}

function OpenManualPreview(strParam) {
    var popWidth;
    var popHeight;
    if (readCookie("pHeight") == null) {
        popWidth = 1000;
        popHeight = 700;
    }
    else {
        popWidth = readCookie("pWidth");
        popHeight = readCookie("pHeight");
    }

    return popup(BaseLocation + "Content/Manuals/Preview.aspx?" + strParam, popWidth, popHeight, "popPreview", { resizable: "yes" });
}

function OpenChangeStylesheet(strManualID) {
    var popWidth = 400;
    var popHeight = 220;

    properties += ',scrollbars=0';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popChangeStyleSheet = open(BaseLocation + 'Content/Manuals/ChangeStyleSheet.aspx?MID=' + strManualID, 'popChangeStyleSheet', properties);

    FocusPopup(popChangeStyleSheet);
}

function OpenAttachmentScreen() {
    var popWidth = 400;
    var popHeight = 220;

    properties += ',scrollbars=0';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popChangeStyleSheet = open(BaseLocation + 'EmailAttachments.aspx', 'strAttachments', properties);

    FocusPopup(popChangeStyleSheet);
}

function ShowParticipantsWithoutEmail() {
    var popWidth = 300;
    var popHeight = 400;

    return popup(BaseLocation + 'Planning/ParticipantsWithoutEmail.aspx', popWidth, popHeight, "strParticpantsWithoutEmail", {
        resizable: "yes",
        scrollbars: "yes"
    });
}

function EditDossierProperties(strDossierID) {
    var popWidth = 800;
    var popHeight = 100;

    properties += ',scrollbars=0';
    properties += ',width=' + popWidth + ',left=' + (leftPosition - (popWidth / 2)) + ',top=' + (topPosition - (popHeight / 2)) + ',height=' + popHeight;
    popChangeStyleSheet = open(BaseLocation + 'System/Dossiers/AddDossier.aspx?DID=' + strDossierID, 'popEditDossierPropperties', properties);
    FocusPopup(popChangeStyleSheet);
}

function ShowMyProfileDetails(strProfileID, strParticipantID) {
    var popWidth = 800;
    var popHeight = 200;

    return popup(BaseLocation + "Portaal/MyProfileDetails.aspx?PRID=" + strProfileID + "&PAID=" + strParticipantID, popWidth, popHeight, "popChangeStyleSheet", {
        resizable: "yes",
        scrollbars: "yes"
    });
}

function OpenAddEditFeedbackVrijeOpdracht(strParam) {
    var popWidth = 800;
    var popHeight = 650;
    
    return popup(BaseLocation + "Portaal/AddEditFeedbackVrijeOpdracht.aspx?" + strParam, popWidth, popHeight, "popVrijeOpdracht", { resizable: "yes", scrollbars: "1" });
}

function FocusPopup(popup) {
    popup.focus();
}


