gUserId="public"; gSessionId=79976014; publicQueryString="s=79976014&u=public&t=mlist";gAppCode="prd";publicQueryStringRa="s=79976014&u=public&t=mdata"; var gAutosuggestOptions={timeOut:10000,firstText:true}; var gAutosuggestOptionsAllText={timeOut:10000,firstText:false}; function CallMobile(PhoneNumber) { if (RuleName=="") { setLog("Telefonszám:"+PhoneNumber+" --- "); document.getElementById("download_target").src="emigtel:"+PhoneNumber.replace(" ","").replace(" ","").replace(" ","").replace(" ","") debugText("Telefonszám:
"+PhoneNumber.replace(" ","").replace(" ","").replace(" ","").replace(" ","")); dhtmlxAjax.get("http://localhost:9500/?"+encodeURIComponent(""+PhoneNumber),function(loader) { null}); } else { setLog("Telefonszám:"+PhoneNumber+" hangrögzítő!!"); document.getElementById("download_target").src="emigtel:"+PhoneNumber.replace(" ","").replace(" ","").replace(" ","").replace(" ","") debugText("Telefonszám:
"+PhoneNumber.replace(" ","").replace(" ","").replace(" ","").replace(" ","")); dhtmlxAjax.get("http://localhost:9500/?"+encodeURIComponent("17137,"+PhoneNumber),function(loader) { null}); } } var gDHTMLXVersion="2.5"; var qLoginCount=0; function replaceAll(txt, replace, with_this) {return txt.replace(new RegExp(replace, 'g'),with_this);} function emigWorking() { if (dhxWins.isWindow("Working")== false) { var winAWorking = dhxWins.createWindow("Working", 160,60, 440, 100); winAWorking.setModal(true); winAWorking.hideHeader(); winAWorking.centerOnScreen(); var alertHtml=""; winAWorking.attachHTMLString('
Dolgozom ....
'); } } function emigWorkingClose() { if (dhxWins.isWindow("Working")== true) { dhxWins.window("Working").close(); } } // EMIG INIT eljárásai. // Globális változók var gAppCode="PROD"; var imagePath="/dhtmlx36/imgs/" var iconPath="/images/icons/" var menuIconPath="/images/menu_icons/" var gDHTMLXVersion="3.5" var gColumnColor="#d8e7f6" var popCurrPop=null; // A keret megjelenítése var dhxWins = null; dhtmlx.image_path = "/dhtmlx36/imgs/"; var gAutosuggestOptions={timeOut:5000,firstText:true,bgColorEv:"#e3e3e3",bgColorOdd:"#ffffff",bgColorButton:"#ecf5f6",BorderColor:"#b4d5ff",hColor:"#b4d5ff"}; var gAutosuggestOptionsAllText={timeOut:5000,firstText:false,bgColorEv:"#e3e3e3",bgColorOdd:"#ffffff",bgColorButton:"#ecf5f6",BorderColor:"#b4d5ff",hColor:"#b4d5ff"}; //var gAutosuggestOptions={timeOut:5000,firstText:true}; //var gAutosuggestOptionsAllText={timeOut:5000,firstText:false}; //var gAutosuggestOptions={timeOut:10000,firstText:true,bgColorEv:"#CCCCCC",bgColorOdd:"#C0C0C0",bgColorButton:"#C6C3B5",BorderColor:"#B0B0B0",hColor:"#EEE9E9"}; //var gAutosuggestOptionsAllText={timeOut:10000,firstText:true,bgColorEv:"#CCCCCC",bgColorOdd:"#C0C0C0",bgColorButton:"#C6C3B5",BorderColor:"#B0B0B0",hColor:"#EEE9E9"}; var gActiveWindow=null; var statusBar=null; var dhxMenu=null; var LoginName="Nincs bejelentkezve!" var RuleName="" var MousePosX = 0; var MousePosY = 0; // IE böngésző vizsgálata var IE = document.all?true:false var WindowXML=null; var ActiveBody=""; var NoBody=""; var gDebugMode = "N"; var gDebugModeCode = 0; var gAlertSound ="Nincs beállítva"; var gAlertWindow="Nincs beállítva"; var gAlertNotificationPermission="Ismeretlen"; var wLoginUserId=""; var gAdditionalInfo=""; var gSqlId="" // INIT function initEmig(){ // amchart localization AmCharts.dayNames=['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütürtök', 'Péntek', 'Szombat']; AmCharts.shortDayNames=['Va', 'Hé', 'Ke', 'Sze', 'Csü', 'Pé', 'Szo']; AmCharts.monthNames=['Január', 'Február', 'Marius', 'Április', 'Május', 'Június', 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December']; AmCharts.shortMonthNames=['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec']; dhxWins = new dhtmlXWindows(); dhxWins.setImagePath(imagePath); dhxWins.attachEvent("onMoveFinish", function(win){ var pos = win.getPosition(); var stick=win.isSticked(); setCookie(win.getId(),pos[0]+"|"+pos[1]+"|"+stick,100); }); dhxWins.attachEvent("onFocus", function(win){ gActiveWindow=win.getId(); setLog("Window focused:"+win.getId()); }); // státuszbár hozzáadása statusBar = dhxLayout.cells("b").attachStatusBar(); var tmp='' tmp+=' ' tmp+=' ' tmp+=' ' tmp+=' ' tmp+=' ' tmp+=' ' tmp+=' ' tmp+=' ' tmp+=' ' tmp+='
TextDownload text
' statusBar.setText(tmp); setLog(""); // menü dhxMenu = dhxLayout.cells("b").attachMenu(); dhxMenu.attachEvent("onClick", function(id) { eval(dhxMenu.getUserData(id, "Function")); }); dhxMenu.setIconsPath(menuIconPath); dhxMenu.loadXML("/menuPublic.xml?etc=" + new Date().getTime()); dhxMenu.setTopText('
'); setLogDownload(LoginName); hideDownload(); document.onmousemove = getMouseXY; var QueryString="s="+gSessionId+"&u="+encodeURIComponent(gUserId); dhtmlxAjax.post("/emig5/emig.aspx",QueryString+"&t=crb&key=BODY-NONE",function(loader) { if (IE){ NoBody =loader.xmlDoc.responseXML.getElementsByTagName("html")[0].text; var WinScript =loader.xmlDoc.responseXML.getElementsByTagName("script")[0].text; } else { NoBody =loader.xmlDoc.responseXML.getElementsByTagName("html")[0].textContent; var WinScript =loader.xmlDoc.responseXML.getElementsByTagName("script")[0].textContent; } var WinScriptMode =loader.xmlDoc.responseXML.getElementsByTagName("script")[0].getAttribute("id"); if (WinScriptMode=="EVAL") { eval(WinScript); } else { try{ var wScript=getElementById(WinScriptMode); wScript.text=WinScript; } catch(e) { if (document.getElementById(WinScriptMode)!=null) { document.getElementsByTagName("head")[0].removeChild(document.getElementById(WinScriptMode)); } var wScript=document.createElement("script"); wScript.setAttribute("type","text/javascript"); wScript.setAttribute("id",WinScriptMode); document.getElementsByTagName("head")[0].appendChild(wScript); wScript.text=WinScript; } } if (ActiveBody=="") { document.getElementById("ebody").innerHTML=NoBody; } // Ha már volt login akkor annak megnyitása if (getCookie("loginapp")=="Igen"){ login(); } else { CreateBody('MAP_PUBLIC'); } }); document.onkeyup = function keyPress(e) { var wkey = 0; try{ wkey = e.which?e.which:window.event.keyCode; } catch(hiba) { wkey = window.event.keyCode; } if (wkey== 16 && gDebugModeCode == 0){ gDebugModeCode=wkey; } if (wkey== 17 && gDebugModeCode == 16){ gDebugModeCode=wkey; } if (wkey== 68 && gDebugModeCode == 17){ gDebugModeCode=wkey; } if (wkey== 78 && gDebugModeCode == 68){ gDebugMode="I"; dhtmlx.message({text:"Debug mode on",type:"error"}); } if (wkey== 79 && gDebugModeCode == 68){ gDebugMode="N"; dhtmlx.message({text:"Debug mode off",type:"error"}); } if (wkey== 73 && gDebugModeCode == 68){ var wText="Gép azonosító:
"+getCookie("MachineId","NEW")+"
"; wText+="SessionId:"+gSessionId+"
" wText+="UserId:"+gUserId+"
" wText+="Bejelentkezéskor megadott id:"+wLoginUserId+"
" wText+="Felhasználó neve:"+LoginName+"
" wText+="Szerepkör:"+RuleName+"
" wText+="Alkalmazás kód:"+gAppCode+"
" wText+="Alert hangjelzés:"+gAlertSound+"
" wText+="Alert ablakban:"+gAlertWindow+"
" wText+="Alert értesítés engedélyezve:"+gAlertNotificationPermission+"
" if (gSqlId!="undefined"){wText+="Lekérdezés azonosító:"+ActiveBody+"-"+gSqlId+"
"} wText+=gAdditionalInfo+"
"; dhtmlx.alert({title:"EMIG Információk",type:"alert-error",text:wText}) } if (wkey== 83 && gDebugModeCode == 68){ dhtmlx.message({text:"SQL lekérése",type:"error"}); CreateWindowKey("SQLCommand",gSqlId); } if (wkey!= gDebugModeCode){ gDebugModeCode=0; }; if (gActiveWindow=="ALERT"){ if (wkey==39){ if (alertArray.length>alertToolSlider.getValue()) { alertToolSlider.setValue(alertToolSlider.getValue()+1); showAlerts(alertToolSlider.getValue()-1,"ALERT") } } if (wkey==37){ if (alertToolSlider.getValue()>1) { alertToolSlider.setValue(alertToolSlider.getValue()-1); showAlerts(alertToolSlider.getValue()-1,"ALERT") } } } if (gActiveWindow=="INFO"){ if (wkey==39){ if (infoArray.length>infoToolSlider.getValue()) { infoToolSlider.setValue(infoToolSlider.getValue()+1); showAlerts(infoToolSlider.getValue()-1,"INFO") } } if (wkey==37){ if (infoToolSlider.getValue()>1) { infoToolSlider.setValue(infoToolSlider.getValue()-1); showAlerts(infoToolSlider.getValue()-1,"INFO") } } } if (gActiveWindow=="FIND"){ debugText(popCurrPop); if ((wkey==115 || wkey==13) && popCurrPop==null){ if (toolbarFind.isVisible("Lekérdez")==true) { try{ wActiveField.ac.remove(); } catch(e){ null} runQuery("s"); } if (toolbarFind.isVisible("LekérdezNoRun")==true) { try{ wActiveField.ac.remove(); } catch(e){ null} runQuery("q"); }; } if(wkey==13 && popCurrPop!=null) { HidePopup(popCurrPop); } if (wkey==119){ if (toolbarFind.isVisible("Lekérdez")==true) { runQuery("x"); } } } if ( gActiveWindow == 'SZETO_20_UJ' ) { F4_mentes(wkey); } } } // end INIT // Fejléc bezárása function collapseHeader(){ dhxLayout.cells("a").showHeader(); dhxLayout.cells("a").collapse(); document.getElementById("Becsuk").style.visibility="hidden"; } // letöltés mutató function hideDownload(){ dhxLayout.cells("a").progressOff(); document.getElementById("loading").style.visibility = "hidden"; //document.getElementById("sbDownloadText").innerHTML="Letöltés kész"; } function showDownload(){ dhxLayout.cells("a").progressOn(); //document.getElementById("loading").style.visibility = "visible"; //document.getElementById("sbDownloadText").innerHTML="Letöltés"; } // log megjelenítés function setLog(msg){ document.getElementById("sbText").innerHTML=msg; } // 2. log megjelenítés function setLogDownload(msg){ //if ( msg != null) { // document.getElementById("sbDownloadText").innerHTML=msg; //} else { if (RuleName=="") { document.getElementById("sbDownloadText").innerHTML=LoginName; } else { document.getElementById("sbDownloadText").innerHTML=LoginName + " - " + RuleName; } //} } // emig elhagyása function exitEmig(){ dhtmlxAjax.post("/emig5/emig.aspx","u="+gUserId+"&s="+gSessionId+"&t=rpls&si=logoff&par=null",function(loader){ document.location="index.html" }); } function logoff(){ dhtmlxAjax.post("/emig5/emig.aspx","u="+gUserId+"&s="+gSessionId+"&t=rpls&si=logoff&par=null",function(loader){ //setCookie("loginuser", "", 1); setCookie("loginpwd", "", 1); document.location="index.html" }); } // Ablak méretének meghatározása function getInnerHeight(){ var myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { myHeight = document.body.clientHeight; } return myHeight; } function getInnerWidth(){ var myWidth = 0; if( typeof( window.innerWidth ) == 'number' ) { myWidth = window.innerWidth; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { myWidth = document.documentElement.clientWidth; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { myWidth = document.body.clientWidth; } return myWidth; } // egér pozíció meghatározása function getMouseXY(e) { //MousePosX = event.clientX + document.body.scrollLeft //MousePosY = event.clientY + document.body.scrollTop var IE = document.all?true:false if (IE) { // grab the x-y pos.s if browser is IE MousePosX = event.clientX + document.body.scrollLeft; MousePosY = event.clientY + document.body.scrollTop; } else { // grab the x-y pos.s if browser is NS MousePosX = e.pageX; MousePosY = e.pageY; } if (MousePosX < 0){MousePosX = 0} if (MousePosY < 0){MousePosY = 0} return true } // Cookie kezelés function setCookie(c_name,value,expiredays) { var c_name_app=gAppCode+c_name; var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name_app+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); } function getCookie(c_name,default_value) { var c_name_app=gAppCode+c_name; if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name_app + "="); if (c_start!=-1) { c_start=c_start + c_name_app.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return default_value; } // login ideiglenesen amíg a menüt meg nem változtatom function login(){ if (gUserId.substring(0,6)=="public") { if (dhxWins.isWindow("LOGIN")==true) { dhxWins.window("LOGIN").close(); } CreateWindowKey("LOGIN",getCookie("MachineId","NEW")); //if (qLoginCount==0){ // CreateWindowNobody("LOGIN"); //} else { // CreateWindowNobody("LOGIN_SELECT"); //} } else { dhxMenu.clearAll(); dhxMenu.setIconsPath("/images/menu_icons/"); dhxMenu.setOpenMode(MenuMode); dhxMenu.loadXML("/emig5/emig.aspx?u="+gUserId+"&s="+gSessionId+"&t=um"); exitBody(); // //if (document.getElementById("lockIcon").addEventListener) { // document.getElementById("lockIcon").addEventListener("click", function (){ // CreateWindow("LOCK"); // },true); //} else { // if (document.getElementById("lockIcon").attachEvent) { // document.getElementById("lockIcon").attachEvent("onclick", function () { // CreateWindow("LOCK"); // }); // } //} //*/ setLogDownload(LoginName + " - " + RuleName); if (dhxWins.isWindow("ALERT")==false) { CreateWindow("ALERT"); } } }; ; // Ablak myitása function CreateWindowNobody(WinCodeNobody) { if (ActiveBody!=""){exitBody();ActiveBody="";} document.getElementById("ebody").innerHTML=NoBody; CreateWindow(WinCodeNobody); }; function CreateWindow(WinCode) { setLog("Ablak megnyitása ..."); showDownload(); var QueryString="s="+gSessionId+"&u="+encodeURIComponent(gUserId); dhtmlxAjax.post("/emig5/emig.aspx",QueryString+"&t=crw&id=none&key="+WinCode,ProcessWindow); }; function CreateWindowKey(WinCode,Key) { setLog("Ablak megnyitása ..."); showDownload(); var QueryString="s="+gSessionId+"&u="+encodeURIComponent(gUserId); dhtmlxAjax.post("/emig5/emig.aspx",QueryString+"&t=crw&id="+Key+"&key="+WinCode,ProcessWindow); }; function ProcessWindow(loader){ WindowXML=loader.xmlDoc.responseXML; if (WindowXML.getElementsByTagName("status")[0].getAttribute("code") != "OK") { hideDownload(); setLog(WindowXML.getElementsByTagName("status")[0].getAttribute("message")); } else { if (IE){ var WinScript =WindowXML.getElementsByTagName("script")[0].text; } else { var WinScript =WindowXML.getElementsByTagName("script")[0].textContent; } try { var WinScriptMode =WindowXML.getElementsByTagName("script")[0].getAttribute("id"); if (WinScriptMode=="EVAL") { eval(WinScript); } else { try{ var wScript=getElementById(WinScriptMode); wScript.text=WinScript; } catch(e) { var wScript=document.createElement("script"); wScript.setAttribute("type","text/javascript"); wScript.setAttribute("id",WinScriptMode); document.getElementsByTagName("head")[0].appendChild(wScript); wScript.text=WinScript; } } setLog(""); } catch(e){ alert(e) setLog("Hiba az ablak megnyitása közben! Hiba:"+e.description); } hideDownload(); }; }; // Body területen program nyitása function CreateBody(BodyCode){ if (ActiveBody!=""){exitBody();} document.getElementById("ebody").innerHTML=NoBody; ActiveBody=BodyCode; setLog("Képernyő megnyitása ..."); showDownload(); var QueryString="s="+gSessionId+"&u="+encodeURIComponent(gUserId); dhtmlxAjax.post("/emig5/emig.aspx",QueryString+"&t=crb&key="+BodyCode,ProcessBody); }; function CreateBodyKey(BodyCode,Key) { if (ActiveBody != "") { exitBody(); } debugger; gRunQueryOnce=true; //showNoBody(); ActiveBody = BodyCode; setLog("Képernyő megnyitása ..."); debugText("BodyCode="+BodyCode+"
BodyKey="+Key); //showDownload(); // paraméterek beállítása if (dhx.version=='5.1.0') { window.dhx.ajax.post("/emig5/emig.aspx","s=" + gSessionId + "&u=" + encodeURIComponent(gUserId) + "&t=rpls&si=SAVE_QUERY_DATA_COMMAND_LINE&par=" + BodyCode+"|"+Key, function(){ var QueryString = "s=" + gSessionId + "&u=" + encodeURIComponent(gUserId); window.dhx.ajax.post("/emig5/emig.aspx", QueryString + "&t=crb&key=" + BodyCode, ProcessBody); }); } else { dhtmlxAjax.post("/emig5/emig.aspx","s=" + gSessionId + "&u=" + encodeURIComponent(gUserId) + "&t=rpls&si=SAVE_QUERY_DATA_COMMAND_LINE&par=" + BodyCode+"|"+Key, function(){ var QueryString = "s=" + gSessionId + "&u=" + encodeURIComponent(gUserId); dhtmlxAjax.post("/emig5/emig.aspx", QueryString + "&t=crb&key=" + BodyCode, ProcessBody); }); }; } function ProcessBody(loader){ BodyXML=loader.xmlDoc.responseXML; if (BodyXML.getElementsByTagName("status")[0].getAttribute("code") != "OK") { hideDownload(); setLog(BodyXML.getElementsByTagName("status")[0].getAttribute("message")); } else { if (IE){ var WinScript =BodyXML.getElementsByTagName("script")[0].text; } else { var WinScript =BodyXML.getElementsByTagName("script")[0].textContent; } try { document.getElementById("header").innerHTML=BodyXML.getElementsByTagName("body")[0].getAttribute("caption") try{document.title=BodyXML.getElementsByTagName("body")[0].getAttribute("caption");} catch(e){null;} var WinScriptMode =BodyXML.getElementsByTagName("script")[0].getAttribute("id"); if (WinScriptMode=="EVAL") { eval(WinScript); } else { try{ var wScript=getElementById(WinScriptMode); wScript.text=WinScript; } catch(e) { if (document.getElementById(WinScriptMode)!=null) { document.getElementsByTagName("head")[0].removeChild(document.getElementById(WinScriptMode)); } var wScript=document.createElement("script"); wScript.setAttribute("type","text/javascript"); wScript.setAttribute("id",WinScriptMode); document.getElementsByTagName("head")[0].appendChild(wScript); wScript.text=WinScript; } } setLog(""); } catch(e){ setLog("Hiba az ablak megnyitása közben! Hiba:"+e.description); } hideDownload(); }; }; function exitBody(){ try{ CloseActiveBody(); } catch(e) { null; } document.getElementById("ebody").innerHTML=NoBody; ActiveBody=""; document.getElementById("header").innerHTML="EMIG - FVS" } // segítség megjelenítése function HELP(helpURL,helpTEXT) { var wH=getInnerHeight()-20; var wW=getInnerWidth()-20; var winHelp = dhxWins.createWindow("HELP", 10,10, wW, wH); //winHelp.maximize() winHelp.setText(helpTEXT); //winHelp.denyMove(); //winHelp.denyResize(); winHelp.denyPark(); winHelp.setModal(true); winHelp.attachURL(helpURL); escfunction="closeHelp()"; } function closeHelp() { dhxWins.window("HELP").close(); escfunction=""; } function emigAlert(alertMessage,alertHeader,alertType,alertAutoclose,alertCloseFunctions) { if (dhxWins.isWindow("Alert")== false) { var winAlert = dhxWins.createWindow("Alert", 160,60, 570, 270); if (alertHeader==undefined) { winAlert.setText("EMIG - FVS"); } else { winAlert.setText(alertHeader); } winAlert.setModal(true); dhxWins.window("Alert").button("minmax1").hide(); dhxWins.window("Alert").button("minmax2").hide(); dhxWins.window("Alert").button("minmax2").hide(); dhxWins.window("Alert").button("park").hide(); var alertHtml=""; alertHtml+=''; alertHtml+=' '; alertHtml+=' '; alertHtml+=' ';break; case 'I': alertHtml+=' ';break; case 'W': alertHtml+=' ';break; case 'O': alertHtml+=' ';break; case 'B': alertHtml+=' ';break; case 'A': alertHtml+=' ';break; default : alertHtml+=' ';break; } alertHtml+=' '; alertHtml+=' '; alertHtml+=' '; alertHtml+=' '; alertHtml+=' '; alertHtml+=' '; alertHtml+=' '; alertHtml+='

'; switch (alertType){ case 'E': alertHtml+='
   
'; winAlert.attachHTMLString(alertHtml); if (alertCloseFunctions!=undefined) if (document.getElementById("OK").addEventListener) { // Firefox, Google Chrome, Safari, Opera document.getElementById("OK").addEventListener("click", alertCloseFunctions,true); } else { if (document.getElementById("OK").attachEvent) { // IE document.getElementById("OK").attachEvent("onclick", alertCloseFunctions); } } } switch (alertType){ case 'E': alertHtml+=document.getElementById("imgAlert").src="/images/error.png"; document.getElementById("OK").value="Rendben"; break; case 'I': alertHtml+=document.getElementById("imgAlert").src="/images/info.png"; document.getElementById("OK").value="Rendben"; break; case 'W': alertHtml+=document.getElementById("imgAlert").src="/images/warning.png"; document.getElementById("OK").value="Rendben"; break; case 'O': alertHtml+=document.getElementById("imgAlert").src="/images/ok.png"; document.getElementById("OK").value="Rendben"; break; case 'B': alertHtml+=document.getElementById("imgAlert").src="/images/ajax.gif"; document.getElementById("OK").value="Megszakít"; break; case 'A': alertHtml+=document.getElementById("imgAlert").src="/images/ajax.gif"; document.getElementById("OK").value="Bezár"; break; default : alertHtml+=document.getElementById("imgAlert").src="/images/warning.png"; document.getElementById("OK").value="Rendben"; break; } if (alertMessage.substr(0,2)=="$C"){ alertMessage=alertMessage.substr(2,2000); document.getElementById("xxxx").innerHTML="" } if (document.getElementById("xxxx").innerHTML==""){ document.getElementById("xxxx").innerHTML=alertMessage; }else { document.getElementById("xxxx").innerHTML+="
-----------------------
"+alertMessage; } if (alertAutoclose!=undefined){ if (alertCloseFunctions!=undefined) { var xTimeout=setTimeout(alertCloseFunctions,alertAutoclose*1000); } else { var xTimeout=setTimeout("closeAlert()",alertAutoclose*1000); } }; } function closeAlert(){ if (document.getElementById("OK").value=="Megszakít") { setLog("Lekérdezés megszakítása"); document.getElementById("xxxx").innerHTML+="
______________________________

A lekérdezés megszakítása folyamatban."; document.getElementById("OK").value="Megszakítás ..."; Query_Cancel(); } else { if (dhxWins.isWindow("Alert")== true) { dhxWins.window("Alert").close(); } } } function emigQuestion(QuestionMessage,QuestionHeader,QuestionIgenFunction,QuestionNemFunction) { if (dhxWins.isWindow("Question")== false) { var winQuestion = dhxWins.createWindow("Question", 160,60, 510, 240); if (QuestionHeader==undefined) { winQuestion.setText("EMIG - FVS"); } else { winQuestion.setText(QuestionHeader); } winQuestion.setModal(true); dhxWins.window("Question").button("minmax1").hide(); dhxWins.window("Question").button("minmax2").hide(); dhxWins.window("Question").button("minmax2").hide(); dhxWins.window("Question").button("park").hide(); var QuestionHtml=""; QuestionHtml+=''; QuestionHtml+=' '; QuestionHtml+=' '; QuestionHtml+=' '; QuestionHtml+=' '; QuestionHtml+=' '; QuestionHtml+=' '; QuestionHtml+=' '; QuestionHtml+=' '; QuestionHtml+=' '; QuestionHtml+=' '; QuestionHtml+='

'; QuestionHtml+='
    
'; winQuestion.attachHTMLString(QuestionHtml); } document.getElementById("qxxxx").innerHTML=QuestionMessage; if (document.getElementById("QuestionIgen").addEventListener) { // Firefox, Google Chrome, Safari, Opera document.getElementById("QuestionIgen").addEventListener("click", QuestionIgenFunction,true); } else { if (document.getElementById("QuestionIgen").attachEvent) { // IE document.getElementById("QuestionIgen").attachEvent("onclick", QuestionIgenFunction); } } if (QuestionNemFunction != undefined) { if (document.getElementById("QuestionNem").addEventListener) { // Firefox, Google Chrome, Safari, Opera document.getElementById("QuestionNem").addEventListener("click", QuestionNemFunction,true); } else { if (document.getElementById("QuestionNem").attachEvent) { // IE document.getElementById("QuestionNem").attachEvent("onclick", QuestionNemFunction); } } } } function emigText(EmigText,EmigTextType,EmigExpire){ if (EmigTextType==undefined){EmigTextType="warning"}; if (EmigExpire==undefined){EmigExpire=10000}; if (EmigTextType=="error"){EmigExpire=-1}; dhtmlx.message({text:EmigText,type:EmigTextType,expire:EmigExpire}); } function closeQuestion(){ if (dhxWins.isWindow("Question")== true) { dhxWins.window("Question").close(); } } function restoreWinPosition(wxxx,defaults){ //emigAlert("Restore positions:"+wxxx); var pos = getCookie(wxxx,defaults); //emigAlert(pos) //var posArray=pos.split("|"); var w = Number(pos.split("|")[0]); var h = Number(pos.split("|")[1]); var s =pos.split("|")[2]; dhxWins.window(wxxx).setPosition(w, h); if (s=="true"){ dhxWins.window(wxxx).stick(); } //emigAlert("Restored positions:"+wxxx); } // XML tag text éerék meghatározása function getXMLText(XmlData){ if (IE){ return XmlData.text; } else { return XmlData.textContent; } } // Audio tag betöltése ha nem ie var AlertElement = null; if (IE) { null; } else { AlertElement = document.createElement('audio'); AlertElement.setAttribute('src', '/eb.mp3'); AlertElement.load() } function PlaySound() { if (IE) { document.all.sound.src = "/eb.mp3"; } else { AlertElement.currentTime= 1; AlertElement.play(); } } function StopSound() { if(IE) { document.all.sound.src = ""; } else { AlertElement.pause(); } } // Text to Speech var TextToSpeechElement = null; if (IE) { null; } else { TextToSpeechElement = document.createElement('audio'); TextToSpeechElement.addEventListener("load", function() { debugText("Loaded and Play"); TextToSpeechElement.play(); }, true); } function TextToSpeech(Szoveg){ if (IE) { debugText(Szoveg+" (IE)"); document.all.sound.src = 'http://translate.google.com/translate_tts?ie=UTF-8&tl=hu&q='+encodeURIComponent(Szoveg); } else { debugText(Szoveg); TextToSpeechElement.setAttribute('src', 'http://translate.google.com/translate_tts?ie=UTF-8&tl=hu&q='+encodeURIComponent(Szoveg)); debugText("Attribute:"+'http://translate.google.com/translate_tts?ie=UTF-8&tl=hu&q='+encodeURIComponent(Szoveg)); TextToSpeechElement.load() debugText("Load"); //TextToSpeechElement.currentTime= 1; //TextToSpeechElement.play(); } } function ShowMail(MailAddress) { document.getElementById("download_target").src="mailto:"+MailAddress; debugText("Mail cím:"+MailAddress); } /* function CallMobile(PhoneNumber) { setLog("Telefonszám:"+PhoneNumber); if (IE) { window.clipboardData.setData("Text",""+PhoneNumber); } else { dhtmlxAjax.get("http://localhost:9500/?"+encodeURIComponent(""+PhoneNumber),function(loader) { null}); } } */ function CallMesage(MessageText) { if (IE) { window.clipboardData.setData("Text",""+MessageText); } else { dhtmlxAjax.get("http://localhost:9500/?"+encodeURIComponent(""+MessageText),function(loader) { null; }); } // MobileMessage } function getUrlVars() { var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; }); return vars; } function debugText(DebugText,DebugType) { if (gDebugMode=="I"){ if (DebugType=="error"){ dhtmlx.message({text:DebugText,type:"error",expire:-1}); } else { dhtmlx.message({text:DebugText,type:"warning", expire:10000}); }; }; }; function public_pd(){ debugText("Saját adatok módosítása."); CreateWindow("PUBLIC_USER_DATA"); } function public_find(){ debugText("Keresési ablak megnyitása."); CreateWindow("PUBLIC_FIND"); } // eXcells function eXcell_emig_select_ee_megj(cell) { if (cell){ //default pattern, just copy it this.cell = cell; this.grid = this.cell.parentNode.grid; } this.edit = function() { this.val = this.getValue(); /* Editor objektum meghatározása */ this.obj = document.createElement("DIV"); e = "
"; e += "
" e += " "; e += " "; e += "" e += "
" this.obj.editor = this; this.obj.innerHTML = e; document.body.appendChild(this.obj); this.obj.style.position = "absolute"; this.obj.style.zIndex=99999; this.obj.className = "emig_edit"; this.obj.onclick = function(a) { return(a || event).cancelBubble = ! 0 } ; /* Pozíció meghatározása */ var h = this.grid.getPosition(this.cell); this.obj.style.left = h[0] + "px"; if (this.obj.offsetHeight+h[1]+this.cell.offsetHeight > document.body.offsetHeight){ this.obj.style.top = h[1] - this.obj.offsetHeight + "px"; } else { this.obj.style.top = h[1] + this.cell.offsetHeight + "px"; } } ; this.setValue=function(val){ this.setCValue(val); } this.getValue=function(){ return this.cell.innerHTML; // get value } ; this.detach=function(){ this.setValue(this.obj.childNodes[0].childNodes[0].value);//+"\n"+this.cell.childNodes[1].value); //set the new value document.body.removeChild(this.obj); this.obj=null; return this.val!=this.getValue(); // compare the new and the old values } } eXcell_emig_select_ee_megj.prototype = new eXcell;