var DLG_GET_COMPANY = 1; var DLG_GET_PROJECT = 2; var DLG_GET_KANS = 4; var DLG_GET_CONTACT = 5; var DLG_GET_MULTIPLE_CONTACTS = 6; var DLG_GET_ONDERHOUDSCONTRACT = 7; var DLG_GET_COURSE = 8; var DLG_GET_PROJECTRUBRIEK = 9; var DLG_GET_HOOFDPROJECT = 10; var DLG_GET_FOLDER = 11; var getdlgs = []; function getdlg( get_type ) { // assigning methods this.popup = cal_popup1; this.setText = cal_settext; this.setValue = cal_setvalue; // validate input parameters this.DialogType = get_type; this.JsFunctie = ""; this.QueryString = ""; this.Params = ""; // register in global collections this.id = getdlgs.length; getdlgs[this.id] = this; } function cal_setvalue (str_value) { //alert('Deze functie is nog niet geimplementeerd (cal_setvalue)'); } function cal_settext (str_text) { //alert('Deze functie is nog niet geimplementeerd (cal_settext)'); } function cal_popup1 () { var type = this.DialogType var theURL; var WindowName; var WindowWidth = 600; var WindowHeight = 400; var WindowLeft = 250; var WindowTop = 250; switch(type){ case DLG_GET_COMPANY: WindowName = "getcompany"; theURL = "http://www.zeldzaam.net/dialogs/get_company.asp?id=" + this.id + "&JsFunctieNaam=" + this.JsFunctie; break; case DLG_GET_PROJECT: WindowName = "getstage"; theURL = "http://www.zeldzaam.net/dialogs/get_project.asp?id=" + this.id + "&JsFunctieNaam=" + this.JsFunctie; break; case DLG_GET_PROJECTRUBRIEK: WindowName = "getstagerubriek"; theURL = "http://www.zeldzaam.net/dialogs/get_projectrubriek.asp?id=" + this.id + "&JsFunctieNaam=" + this.JsFunctie; break; case DLG_GET_HOOFDPROJECT: WindowName = "getstage"; theURL = "http://www.zeldzaam.net/dialogs/get_hoofdproject.asp?id=" + this.id + "&JsFunctieNaam=" + this.JsFunctie; break; case DLG_GET_KANS: WindowName = "getkans"; theURL = "http://www.zeldzaam.net/dialogs/get_kans.asp?id=" + this.id + "&JsFunctieNaam=" + this.JsFunctie; break; case DLG_GET_CONTACT: WindowName = "getcompany"; theURL = "http://www.zeldzaam.net/dialogs/get_contact.asp?id=" + this.id + "&JsFunctieNaam=" + this.JsFunctie; break; case DLG_GET_MULTIPLE_CONTACTS: WindowWidth = 860; WindowHeight = 600; WindowLeft = 100; WindowTop = 100; WindowName = "getcontacts"; theURL = "http://www.zeldzaam.net/dialogs/get_contacts.asp?id=" + this.id + "&JsFunctieNaam=" + this.JsFunctie; break; case DLG_GET_COURSE: WindowName = "getcourse"; theURL = "http://www.zeldzaam.net/dialogs/get_course_simple.asp?id=" + this.id + "&JsFunctieNaam=" + this.JsFunctie; break; case DLG_GET_ONDERHOUDSCONTRACT: WindowName = "getonderhoudscontract"; theURL = "http://www.zeldzaam.net/dialogs/get_onderhoudscontract.asp?id=" + this.id + "&JsFunctieNaam=" + this.JsFunctie; break; case DLG_GET_FOLDER: WindowName = "getfolder"; theURL = "http://www.zeldzaam.net/dialogs/get_folder.asp?id=" + this.id + "&JsFunctieNaam=" + this.JsFunctie; break; default: cal_error("Dit is een onbekend dialoog type."); return false; } var WinProperties = "' left=" + WindowLeft + ",top=" + WindowTop + ",toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + WindowWidth + ",height=" + WindowHeight + ",dependent=yes,alwaysRaised=yes '"; var obj_calwindow = window.open(theURL + '&' + this.QueryString + '&' + this.Params,WindowName, WinProperties); obj_calwindow.opener = window; obj_calwindow.focus(); } function cal_error (str_message) { alert (str_message); return null; } function setResult(n_val, n_text) { var re_id = new RegExp('id=(\\d+)'); var num_id = (re_id.exec(String(window.location)) ? new Number(RegExp.$1) : -1); var obj_opener = (window.opener ? window.opener : null); var obj_caller = (obj_opener.getdlgs ? obj_opener.getdlgs[num_id] : null); //var obj_caller = (window.opener ? window.opener.getdlgs[num_id] : null); if (!obj_caller) return false; obj_caller.setValue( n_val ); obj_caller.setText( n_text ); return false; }