/* * Description * -- Contains function needed to open a various type of new windows. * Author * SNT Lotus Notes Development Team, 2003 * Version * Version 1.2 */ function openNewWindow( mypage, myname, width, height, settings ){ myname = (myname=="") ? "newWindow" : myname; width = (width=="") ? (screen.width-200) : width; height = (height=="") ? (screen.height-200) : height; LeftPosition = (screen.width) ? (screen.width - width)/2 : 0; TopPosition = (screen.height) ? (screen.height - height-25)/2 : 0; if (settings==""){ settings = 'height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition; settings += ',scrollbars=1,resizable=0,status=1,menubar=0'; }else{ settings += ',height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition; } win = window.open(mypage,myname,settings); win.focus() return win; } function openNewWindowNoReturn( mypage, myname, width, height, settings ){ myname = (myname=="") ? "newWindow" : myname; width = (width=="") ? (screen.width-200) : width; height = (height=="") ? (screen.height-200) : height; LeftPosition = (screen.width) ? (screen.width - width)/2 : 0; TopPosition = (screen.height) ? (screen.height - height-25)/2 : 0; if (settings==""){ settings = 'height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition; settings += ',scrollbars=1,resizable=0,status=1,menubar=0'; }else{ settings += ',height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition; } win = window.open(mypage,myname,settings); win.focus() //return win; } function showmenu(url, menu){ var win = null; var settings =""; var w = (screen.width-200); var h = (screen.height-200); win = openNewWindow( url, menu, w, h, settings ) if(win.window.focus){ win.window.focus(); } } function openAboutBox(){ var settings ="scrollbars=0,resizable=0,status=0,menubar=0"; if ( document.forms[0].DBPath_Sumber.value!="" ){ var vURL="/" + document.forms[0].DBPath_Tambahan.value + "/SystemAbout?OpenForm&ssLogin"; win = openNewWindow( vURL, "SystemAbout", "400", "250", settings ) win.window.focus(); } } function showCaseLogPopup( pPageNumber ){ var f = document.forms[0]; var vKesLogPath = f.DBPath_Kes_Log.value; var vDocLinkID = f.DocLinkID.value; vURL = "/" + vKesLogPath + "/ShowHistoryPopup/" + vDocLinkID + pPageNumber + "?OpenDocument&ssLogin"; win = openNewWindow( vURL, "History", "700", "400", "" ) win.focus() } function showCaseLogPopupForChildDoc( pPageNumber ){ var f = document.forms[0]; var vKesLogPath = f.DBPath_Kes_Log.value; var vDocLinkID = f.DocLinkIDCurrent.value; vURL = "/" + vKesLogPath + "/ShowHistoryPopup/" + vDocLinkID + pPageNumber + "?OpenDocument&sLogin"; win = openNewWindow( vURL, "History", "700", "400", "" ) win.focus() } function showCaseLog( pPageNumber ){ var f = document.forms[0]; var vKesLogPath = f.DBPath_Kes_Log.value; var vDocLinkID = f.DocLinkID.value; vURL = "/" + vKesLogPath + "/ShowHistoryPopup/" + vDocLinkID + pPageNumber + "?OpenDocument&sLogin"; window.location = vURL; } function gotoCaseLogPage( pPageNumber ){ var f = document.forms[0]; var vKesLogPath = f.DBPath_Kes_Log.value; var vDocLinkID = f.DocLinkID.value; var vViewName = f.Log_View_Name.value; vURL = "/" + vKesLogPath + "/" + vViewName + "/" + vDocLinkID + pPageNumber + "?OpenDocument&sLogin"; window.location = vURL; } function showHelpContent( code ){ if ( code=="" ){ return void(0); }else{ var helpDBpath = document.forms[0].DBPath_Bantuan.value; var mypage = "/" + helpDBpath + "/viewTopic?OpenForm&" + code; var w = (screen.width-200); var h = (screen.height-200); var LeftPos = (screen.width) ? (screen.width - w)/2 : 0; var TopPos = (screen.height) ? (screen.height - h-25)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPos+',left='+LeftPos+',scrollbars=1,resizable=1,status=1,menubar=0'; win = window.open(mypage,"WinHelp",settings); win.focus() } } function putdate(timeurl, timemenu, timepop){ LeftPosition = (screen.width) ? (screen.width-300)/2 : 0; TopPosition = (screen.height) ? (screen.height-260)/2 : 0; settings = 'height=260,width=300,top='+TopPosition+',left='+LeftPosition+',scrollbars=1,resizable=0' wintime = window.open(timeurl, timemenu, settings, timepop) if(wintime.window.focus){wintime.window.focus();} } function getAllCalendar( pFieldName ){ mm = document.forms[0].PassMM.value; yy = document.forms[0].PassYY.value; dis = "&" + mm + "&" + yy +"&" + pFieldName + "&sLogin"; putdate('/' + document.forms[0].DBPath_Cuti.value + '/calnoholiday?OpenForm'+dis ,'datetime') } function getPHCalendar( pFieldName ){ mm = document.forms[0].PassMM.value; yy = document.forms[0].PassYY.value; dis = "&" + mm + "&" + yy +"&" + pFieldName + "&sLogin"; putdate('/' + document.forms[0].DBPath_Cuti.value + '/calholiday?OpenForm'+dis ,'datetime') } function getTime( pFieldName ){ dis = "sLogin&"+pFieldName; putdate('/' + document.forms[0].DBPath_Cuti.value + '/displaytime?OpenForm&'+dis,'datetime') } function getFileCaseNo(fFormtype, fFieldName){ dis = fFormtype + '?openform&' + fFieldName + '&sLogin'; window.open('/'+document.forms[0].DBPath_Data.value + '/' + dis) } function printKes( pCaseType, pDocLinkID ){ var f=document.forms[0]; var vViewName=""; if ( pCaseType=="JENAYAH" ){ vViewName="PrintKesJenayah"; }else if ( pCaseType=="MAL" ){ vViewName="PrintKesMal"; }else if ( pCaseType=="FARAID" ){ vViewName="PrintKesFaraid"; } vURL="/" + f.DBPath_Data.value + "/" + vViewName + "/" + pDocLinkID + "?OpenDocument&sLogin" var settings ="scrollbars=1,resizable=1,status=1,menubar=1"; var w = (screen.width-200); var h = (screen.height-250); win = openNewWindow( vURL, "PrintKesWindow", w, h, settings ) if(win.window.focus){ win.window.focus(); } } function EBookmark( vName ){ f= document.forms[0]; vURL= "/" + f.DBPath_Pengguna.value + "/BookmarkMenu?OpenForm&sLogin&name=" + vName + "&sLogin" var settings ="scrollbars=1,resizable=0,status=1,menubar=0"; var w = (300); var h = (400); win = openNewWindow( vURL, "BookmarkWindow", w, h, settings ) if(win.window.focus){ win.window.focus(); } } function GetWindowHeight( FormType ){ if( FormType == "Sebutan" || FormType == "JSebutan" || FormType == "MLSebutan" || FormType == "FSebutan" ){ return "450"; }else if( FormType == "Resit" ){ return "450"; }else if( FormType == "Surat" ){ return (screen.height) - 250; }else if( FormType == "Penghantaran" ){ return (screen.height-200); }else if( FormType == "Permulaan" || FormType == "MLPermulaan" || FormType == "FPermulaan" ){ return "500"; }else if( FormType == "Item" ){ return "300"; }else if( FormType == "Pengkomitan" ){ return "350"; }else if( FormType == "Ekhibits" ){ return "500"; }else if( FormType == "Rayuan" ){ return (screen.height-200); }else if( FormType == "MultiDaftarForm" ){ return (screen.height-200); }else if( FormType == "HakimEmail" ){ return "150"; }else if( FormType == "ChangeCaseNo" ){ return "400"; } } function GetWindowWidth( FormType ){ if( FormType == "Sebutan" || FormType == "JSebutan" || FormType == "MLSebutan" || FormType == "FSebutan" ){ return "600"; }else if( FormType == "Resit" ){ return "650"; }else if( FormType == "Surat" ){ return (screen.width) - 250; }else if( FormType == "Penghantaran" ){ return (screen.width-200); }else if( FormType == "Permulaan" || FormType == "MLPermulaan" || FormType == "FPermulaan" ){ return "500"; }else if( FormType == "Item" ){ return "500"; }else if( FormType == "Pengkomitan" ){ return "500"; }else if( FormType == "Ekhibits" ){ return "500"; }else if( FormType == "Rayuan" ){ return (screen.width-200); }else if( FormType == "MultiDaftarForm" ){ return (screen.width-200); }else if( FormType == "HakimEmail" ){ return "300"; }else if( FormType == "ChangeCaseNo" ){ return "400"; } } function PenghakimanTidakSetuju( vJenayahMalFaraid, vDocLinkID, var1, var2, var3 ){ f = document.forms[0]; today = new Date(); thistime = today.getTime(); hakimdbpath = f.DBPath_Rekod_Penghakiman.value; vURL = "/" + hakimdbpath + "/PenghakimanTidakSetuju?OpenForm&sLogin&kestype=" + vJenayahMalFaraid; vURL += "&doclinkid="+ vDocLinkID + "&" + "&" + thistime; settings = "" var w = GetWindowWidth( "HakimEmail" ); var h = GetWindowHeight( "HakimEmail" ); win = openNewWindow( vURL, "PenghakimanTidakSetuju", w, h, settings ) if(win.window.focus){ win.window.focus(); } }