/* /////////////////////////////////////////////////////////////////////// if (!e) e=window.event; if (window.event) { window.event.cancelBubble=true; } if (e.stopPropagation) e.stopPropagation(); /////////////////////////////////////////////////////////////////////// */ function execRS(iScript) { document.getElementById("rs_iframe").src=iScript; return false; } function popup (iURL,iHeight,iWidth,iFluid,iStatus) { var sFluid =(iFluid ?"yes":"no"); var sStatus=(iStatus?"yes":"no"); var iWin=window.open(iURL,"popup","dependent,height="+iHeight+",width="+iWidth+",left="+parseInt((screen.width -iWidth )/2)+",top="+parseInt((screen.height-iHeight)/2)+",toolbar=no,menubar=no,scrollbars="+sFluid+",resizable="+sFluid+",location=no,directories=no,status="+sStatus); iWin.focus(); return false; } var iLibShield = false; var iIdFocus =-2; // -1:no focus , -2:start var iIdMax = 0; function setLibrary(iLibrary) { iLibShield = true; execRS("action.php5?_library="+iLibrary); } function insertFunction(iFunction) { var iValue=iFunction+"( )"; var iField=document.getElementById("i_"+iIdFocus); iField.focus(); if (document.selection) // IE { var iSel = document.selection.createRange(); iSel.text = iValue; iField.focus(); return; } if (iField.selectionStart || iField.selectionStart=="0") // MOZILLA/NETSCAPE { var iStartPos = iField.selectionStart; var iEndPos = iField.selectionEnd; iField.value = iField.value.substring(0,iStartPos) + iValue + iField.value.substring(iEndPos,iField.value.length); iField.focus(); iField.selectionStart = iStartPos + iValue.length-2; iField.selectionEnd = iStartPos + iValue.length-1; return; } iField.value += iValue; iField.focus(); } function setInfo(iObject,iLabel,iInfo) { iObject.style.border="1px solid #"+((iLabel=="")?"FFFFFF":"C0C0C0"); iLabel=iLabel+((iLabel=="")?"":"()  "); document.getElementById("fct_info").innerHTML="
"+iLabel+""+iInfo+"
"; } function setLibInfo(iInfo) { if ((iInfo=='') && iLibShield) return; iLibShield = false; document.getElementById("lib_info").innerHTML=iInfo; } function onInsertClick() { document.getElementById("_selected").value=iIdFocus; } function fold(iDiv,e) { var o=document.getElementById(iDiv); o.style.display=(o.style.display=="none")?"block":"none"; execRS("cookie.php?"+iDiv+"="+o.style.display); restoreFocus(e); } function DKDown(e) { var evt = window.event?event:e; var iKey = evt.keyCode?evt.keyCode:evt.charCode; if (iKey==38) {if (iIdFocus==1) {return;} iId=((iIdFocus==0)?iIdMax:iIdFocus-1); document.getElementById("i_"+iId).focus();} if (iKey==40) {if (iIdFocus==0) {return;} iId=((iIdFocus==iIdMax)?0:iIdFocus+1); document.getElementById("i_"+iId).focus();} } function DKey(e) { var evt = window.event?event:e; var iKey = evt.keyCode?evt.keyCode:evt.charCode; if (evt.keyCode) { try {if (iKey==13) evt.keyCode=0;} catch(ex) {} } if (iKey==13) {document.f.submit();} } function updateResults(iHTML,iId,iResults) { var o=document.getElementById("results"); o.innerHTML = ""+iHTML+"
Enter an instruction
"; o.scrollTop = o.scrollHeight; iIdFocus = -2; iIdMax = iResults; doFocus(iId); } function updateLibrary(iHTML) { document.getElementById("library" ).innerHTML=iHTML; document.getElementById("lib_info").innerHTML=''; if (iIdFocus!=-1) doFocus((iIdFocus==-2)?0:iIdFocus); } function doFocus(iId) { setTimeout('document.getElementById("i_"+'+iId +' ).focus()',250); } function DClick (iId) { document.getElementById("i_" +iId ).focus(); } function DOver (iId) { if (iIdFocus==-1 ) document.getElementById("r_" +iId).className="ROver"; } function DOut (iId) { if (iIdFocus!=iId) { o=document.getElementById("r_"+iId); if (o.className!="R") o.className ="R"; } } function DFocus(iId) { if (iIdFocus>=0) document.getElementById("r_"+iIdFocus).className="R"; document.getElementById("r_"+iId ).className="ROver"; iIdFocus = iId; } function unfocus() { if (iIdMax==0) { document.getElementById("i_0").focus(); return; } if (iIdFocus>=0) { document.getElementById("r_"+iIdFocus).className="R"; document.getElementById("i_"+iIdFocus).blur(); } iIdFocus=-1; } function restoreFocus(e) { e.cancelBubble=true; if (iIdFocus>=0) document.getElementById("i_"+iIdFocus).focus(); }