var formular = new Array(); function decode_locationsearch() { var url = window.location.search; if (url != "") { url = url.substring(1,url.length); liste = url.split(";"); if(liste.length == 0) { liste = url.split("&"); } for(i = 0; i <= liste.length-1; i++) { temp = liste[i].split("="); temp[0] = temp[0].replace(/\+/g, " "); temp[1] = temp[1].replace(/\+/g, " "); temp[0] = unescape(temp[0]); temp[1] = unescape(temp[1]); formular[temp[0]] = temp[1]; } } } var attachwnd = 0; function get_url() { var urlproto = window.location.protocol; var urlbase = window.location.hostname; var urlport = window.location.port; var urlpath = window.location.pathname; var url = urlproto + "//" + urlbase + (urlport ? ":" + urlport : "") + urlpath; return url; } function attach_open(cuid) { decode_locationsearch(); var sid = formular["sid"]; // var cuid = formular["cuid"]; var fullurl = get_url() + "?action=mail_compose_attachments;sid=" + sid + ";cuid=" + cuid; attachwnd = window.open(fullurl, "ModalChild", "dependent=yes,width=640px,height=480px") attachwnd.focus(); } function attach_keepopen() { if(attachwnd && !attachwnd.closed) { attachwnd.focus(); } } function attach_close() { window.close(); }