var xinhaeditors = new Array(); xinha_editors = null; xinha_config = null; xinha_plugins = null; /** STEP 2 *************************************************************** * Now, what are the plugins you will be using in the editors on this * page. List all the plugins you will need, even if not all the editors * will use all the plugins. * * The list of plugins below is a good starting point, but if you prefer * a simpler editor to start with then you can use the following * * xinha_plugins = xinha_plugins ? xinha_plugins : [ ]; * * which will load no extra plugins at all. ************************************************************************/ xinha_plugins = xinha_plugins ? xinha_plugins : [ 'ListType', 'ExtendedFileManager', 'Linker' ]; // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :) 'SuperClean', Xinha.loadPlugins(xinha_plugins, null); /** STEP 3 *************************************************************** * We create a default configuration to be used by all the editors. * If you wish to configure some of the editors differently this will be * done in step 5. * * If you want to modify the default config you might do something like this. * * xinha_config = new Xinha.Config(); * xinha_config.width = '640px'; * xinha_config.height = '420px'; * *************************************************************************/ xinha_config = xinha_config ? xinha_config() : new Xinha.Config(); // To adjust the styling inside the editor, we can load an external stylesheet like this // NOTE : YOU MUST GIVE AN ABSOLUTE URL xinha_config.pageStyleSheets = [ "URL_EDITOR_CSS" ]; function initXinha() { for (i=0; i -1; var isNS6 = strUserAgent.indexOf("netscape6") > -1; var isNS4 = !isIE && !isNS6 && parseFloat(navigator.appVersion) < 5; var arrSpecialChars = new Array(8, 9, 35, 36, 37, 38, 39, 40, 46); function initializeMap() { if (document.getElementById("map")!=undefined) { initialize(); } } function eventListener(object, event, func) { if (isIE) { object.attachEvent("on"+event, func); } else { object.addEventListener(event, func, false); } } function formModified () { var fm = document.getElementById('formmodified'); if (fm!=undefined) { fm.value = 1; } return true; } function InArray(arr, key) { for (var i=0; i < arr.length; i++) { if (arr[i] == key) return i; } return -1; } function open_win(tlink, winname, xwidth, xheight, scrollbars){ open(tlink, winname,'width='+xwidth+',height='+xheight+',top='+((screen.height-xheight-20)/2)+',left='+((screen.width-xwidth)/2)); } function VerifyInteger(event, objInput) { var arrValidIntChars = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"); var strText = objInput.value; var keyCode = event.keyCode||event.charCode; if (InArray(arrSpecialChars, keyCode) >= 0) return true; var strChar = String.fromCharCode(keyCode); return (InArray(arrValidIntChars, strChar)>=0); } function VerifyFloat(event, objInput) { var arrValidFloatChars = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", ","); var strText = objInput.value; var keyCode = event.keyCode||event.charCode; if (InArray(arrSpecialChars, keyCode) >= 0) return true; var strChar = String.fromCharCode(keyCode); return (InArray(arrValidFloatChars, strChar)>=0); } function openEditPopUpWin(t,c,k,v,l,cid) { var x = cid.indexOf('|'); if (x==-1) { var e = document.getElementById(cid); } else { var e = document.getElementById(cid.substr(0,x)); } if (e.nodeName == 'SELECT') { var selected = document.getElementById(cid).value; if (selected>0) { open_win('ertek.php?&id='+selected+'&lookuptabla='+t+'&lookupcimke='+c+'&lookupertek='+v+'&lookupkey='+k+'&nyelvfuggo='+l+'&cid='+cid, cid, POPUPWIDTH, POPUPHEIGHT); } } else { selected = cid.substr(x+1,cid.length-1); cid = cid.substr(0,x); open_win('ertek.php?&id='+selected+'&lookuptabla='+t+'&lookupcimke='+c+'&lookupertek='+v+'&lookupkey='+k+'&nyelvfuggo='+l+'&cid='+cid, cid, POPUPWIDTH, POPUPHEIGHT); } return false; } function openNewPopUpWin(t,c,k,v,l,cid,ff) { var str = 'ertek.php?&id=0&lookuptabla='+t+'&lookupcimke='+c+'&lookupertek='+v+'&lookupkey='+k+'&nyelvfuggo='+l+'&cid='+cid; if (ff) { var val = document.getElementById(ff).value; if (val<1) { return false; } str = str+'&fuggoseg='+val; } open_win(str, cid, POPUPWIDTH, POPUPHEIGHT); return false; } function addOptionAndSelectIt(selectName, optionValue, optionText, optpar) { var n = document.getElementById(selectName); if (n.nodeName == 'DIV') { if (optpar!=undefined) { var node = document.getElementById(optpar); if (node!=undefined) { raiseEvent(node, "change"); } } /*if (n.id.indexOf('chkgroup_') > -1) { var newCheck = ' '+optionText+'Módosítás   '; x = n.innerHTML.indexOf(' '+optionText+'
'; } //echo '
Módosítás'; }*/ } else if (n.nodeName == 'SELECT') { var opt = new Option(optionText, optionValue); var len = n.options.length; n.options[len]=opt; n.value=optionValue; raiseEvent(n, "change"); } } function alterOptionAndSelectIt(selectName, optionValue, optionText) { var n = document.getElementById(selectName); if (n.nodeName == 'DIV') { if (n.id.indexOf('chkgroup_') > -1) { var x = n.innerHTML.indexOf('value="'+optionValue+'"'); ih1 = n.innerHTML.substr(0, x); ih2 = n.innerHTML.substr(x, n.innerHTML.length-1); x2 = ih2.indexOf('> '); ih1 = ih1+ih2.substr(0,x2+7); ih1 = ih1+optionText; x2 = ih2.indexOf('<'); if (x2>-1) ih1 = ih1+ih2.substr(x2, ih2.length); n.innerHTML = ih1; } } else if (n.nodeName == 'SELECT') { var opts = document.getElementById(selectName).options; i=0; ok = true; while (i4) { x = opts[i].split('|'); if ((x!=undefined) && (x.length==2)) { select.options[select.options.length] = new Option(x[1],x[0]); } } } optionConsumer = null; raiseEvent(select, 'change'); } if(xmlHttp.readyState==4 && xmlHttp.status!=200) { optionConsumer = null; } } function valueReady() { if (xmlHttp.readyState==4 || xmlHttp.readyState=='complete') { document.getElementById(valueConsumer).value = xmlHttp.responseText; valueConsumer = null; } if(xmlHttp.readyState==4 && xmlHttp.status!=200) { valueConsumer = null; } } function inArray(array, value) { var i = 0; var result = false; while ((!result) && (i < array.length)) { result = (array[i] == value); i++; } return result; } function innerHTMLReady() { if (xmlHttp.readyState==4 || xmlHttp.readyState=='complete') { var div = document.getElementById(innerHTMLConsumer); var checkboxes = div.getElementsByTagName("INPUT"); var selected = new Array(); if (checkboxes) { for (i=0;i0) { checkboxes = div.getElementsByTagName("INPUT"); if (checkboxes) { for (i=0;i-1)) { innerHTMLConsumer = e.id; xmlHttp.open('GET','http://www.hazlaz.hu/admin/includes/getchkgroup.php?nyelv=hu&nyelvfuggo='+nyelvfuggo+'&lookupcimke='+lookupcimke+'&lookupertek='+lookupertek+'&lookuptabla='+lookuptabla+'&lookupkey='+lookupkey+'&value='+escape(value)+'&fugges='+fugges+'&elementid='+e.id.substr(9,e.id.length)+'&uresertek='+escape(uresertek)+'&urescimke='+escape(urescimke),true); xmlHttp.onreadystatechange=innerHTMLReady; xmlHttp.send(null); } } } function addOption(selectName, optionValue, optionText) { var opt = new Option(optionText, optionValue); var len = document.getElementById(selectName).options.length; document.getElementById(selectName).options[len]=opt; } function alterOption(selectName, optionValue, optionText) { var opts = document.getElementById(selectName).options; i=0; ok = true; while (i= "0") && (strKey <= "9")) { } else { return false; } } } var formAlreadySubmitted = false; function alreadySubmitted() { var a = formAlreadySubmitted; if (!a) { var img1=new Image() img1.src = 'images/ok_disabled.gif'; var img2=new Image(); img2.src='images/cancel_disabled.gif'; var button = document.getElementById('ok'); if (button != null) button.src=img1.src; button = document.getElementById('cancel'); if (button != null) button.src=img2.src; formAlreadySubmitted = true; } return !a; } function setFocusToFirstControl() { for (i=0;i