// JavaScript Document function dialogAlert(message) { msg = document.createElement("div"); msg.className = "dialogWindowAlert"; /*msg.innerHTML = message;*/ msg.txtMessage = document.createTextNode(message); msg.ico = document.createElement("img"); msg.ico.className = "dialogIconAlert"; msg.appendChild(msg.ico); msg.appendChild(msg.txtMessage); msg.closeIcon = document.createElement("img"); msg.closeIcon.className = "closeButtonStyle"; msg.closeIcon.onclick = hideDialogAlert; msg.appendChild(msg.closeIcon); document.body.appendChild(msg); } // JavaScript Document function Debugger(message) { msg3 = document.createElement("div"); msg3.className = "dialogWindowDebugger"; /*msg.innerHTML = message;*/ msg3.txtMessage = document.createTextNode(message); msg3.appendChild(msg3.txtMessage); msg3.closeIcon = document.createElement("img"); msg3.closeIcon.className = "closeButtonStyle"; msg3.closeIcon.onclick = hideDialogDebugger; msg3.appendChild(msg3.closeIcon); document.body.appendChild(msg3); } function dialogMessage(message) { msg2 = document.createElement("div"); msg2.className = "dialogWindowMessage"; /*msg.innerHTML = message;*/ msg2.txtMessage = document.createTextNode(message); msg2.ico = document.createElement("img"); msg2.ico.className = "dialogIconMessage"; msg2.appendChild(msg2.ico); msg2.appendChild(msg2.txtMessage); msg2.closeIcon = document.createElement("img"); msg2.closeIcon.className = "closeButtonStyle"; msg2.closeIcon.onclick = hideDialogMessage; msg2.appendChild(msg2.closeIcon); document.body.appendChild(msg2); } function hideDialogAlert() { msg.style.display = 'none'; } function hideDialogMessage() { msg2.style.display = 'none'; } function hideDialogDebugger() { msg3.style.display = 'none'; } function openWindowGeneric(pageURL, w, h) { var param = "width="+w+",height="+h; var w = window.open(pageURL, 't', param); w.focus(); } function openNewsWindow(newsID) { var param = "/dln/admin/popups/popup_news.jsp?newsid="+newsID; var w = window.open(param, 'n', "width=760,height=530,scrollbars=yes,resizable=yes"); w.focus(); } function generateCertificate(eventid) { var param = "/dln/admin/popups/popup_certificate.jsp?erid="+ eventid; var w = window.open(param, 'n',"width=610,height=240,scrollbars=yes"); w.focus(); } function generateEmptyCertificate() { var param = "/dln/admin/popups/popup_createcertificate.jsp"; var w = window.open(param, 'n',"width=610,height=240,scrollbars=yes"); w.focus(); } function openNewsEditWindow(newsID) { var param = "/dln/admin/popups/update_news.jsp?id="+newsID; var w = window.open(param, 'n', "width=785,height=645,scrollbars=yes,resizable=yes"); w.focus(); } function openNewsList() { var param = "/dln/admin/popups/popup_newslist.jsp"; var w = window.open(param, 'n', "width=785,height=645,scrollbars=yes,resizable=yes"); w.focus(); } function openNESGEOWindow(schoolID) { var param = "/dln/admin/nes/getnesgeocoordinates.jsp?id="+schoolID; var w = window.open(param, 'n',"width=300,height=200"); w.focus(); } function openUserDetailsWindow(userID) { var param = "/dln/admin/popups/popup_userdetails_readonly.jsp?userid="+userID; var w = window.open(param, 'n', "width=485,height=250,scrollbars=yes"); w.focus(); } function openAddNews() { var param = "/dln/admin/popups/add_news.jsp"; var w = window.open(param, 'n', "width=720,height=645,scrollbars=yes,resizable=yes"); w.focus(); } function openTrainingWindow(file) { var param = "/dln/admin/tutorials/training_"+file; var w = window.open(param, 'n', "width=1028,height=690,scrollbars=yes"); w.focus(); } function toggleBox(id) { //check if browser supporst get elementById //if(!document.getElementById) //return; var eID = id; //alert(document.getElementById(eID).className); var box= document.getElementById(eID).className; if(box == "box_visible") document.getElementById(eID).className = "box_hidden"; else document.getElementById(eID).className = "box_visible"; } function openBox(id) { var eID = id; var box= document.getElementById(eID).className; if(box != "box_visible") document.getElementById(eID).className = "box_visible"; } function closeBox(id) { var eID = id; var box= document.getElementById(eID).className; if(box == "box_visible") document.getElementById(eID).className = "box_hidden"; } function showIndicator(id) { document.getElementById(id).className = "indicator_show"; } function Trim(TRIM_VALUE){ if(TRIM_VALUE.length < 1){ return""; } TRIM_VALUE = RTrim(TRIM_VALUE); TRIM_VALUE = LTrim(TRIM_VALUE); if(TRIM_VALUE==""){ return ""; } else{ return TRIM_VALUE; } } //End Function function RTrim(VALUE){ var w_space = String.fromCharCode(32); var v_length = VALUE.length; var strTemp = ""; if(v_length < 0){ return""; } var iTemp = v_length -1; while(iTemp > -1){ if(VALUE.charAt(iTemp) == w_space){ } else{ strTemp = VALUE.substring(0,iTemp +1); break; } iTemp = iTemp-1; } //End While return strTemp; } //End Function function LTrim(VALUE){ var w_space = String.fromCharCode(32); if(v_length < 1){ return""; } var v_length = VALUE.length; var strTemp = ""; var iTemp = 0; while(iTemp < v_length){ if(VALUE.charAt(iTemp) == w_space){ } else{ strTemp = VALUE.substring(iTemp,v_length); break; } iTemp = iTemp + 1; } //End While return strTemp; } //End Function