//Run code functionRunEx (cod1) {cod=document.getElementById (COD1)varCode =Cod.value; if(Code! = "") { varNewwin = window.open (', ', ', '); Newwin.opener=NULLnewwin.document.write (code); Newwin.document.close (); } } //Copy Code functiondocopy (ID) {if(document.all) {TextRange=document.getElementById (ID). createTextRange (); Textrange.execcommand ("Copy"); } Else { //alert ("This function only works on IE");CopyToClipboard (document.getElementById (ID). value); } } //Save As Code functionSavecode (cod1) {cod=document.getElementById (COD1)varCode =Cod.value; if(Code! = "") { varWinname = window.open (', ' _blank ', ' top=10000 '); Winname.document.open (' text/html ', ' replace '); Winname.document.write (code); Winname.document.execCommand (' SaveAs ', ' ', ' code.htm '); Winname.close (); } } functionCopyToClipboard (TXT) {if(window.clipboarddata) {window.clipboardData.clearData (); Window.clipboardData.setData ("Text", TXT); } Else if(Navigator.userAgent.indexOf ("Opera")! =-1) {window.location=txt; } Else if(window.netscape) {Try{Netscape.security.PrivilegeManager.enablePrivilege ("Universalxpconnect"); } Catch(e) {alert ("Rejected by the browser!" \ n Please enter ' About:config ' in the browser address bar and return to \ n and set ' Signed.applets.codebase_principal_support ' to ' true '); } varClip = components.classes[' @mozilla. Org/widget/clipboard;1 '].createinstance (Components.interfaces.nsIClipboard); if(!clip)return; vartrans = Components.classes[' @mozilla. Org/widget/transferable;1 '].createinstance (Components.interfaces.nsITransferable); if(!Trans)return; Trans.adddataflavor (' Text/unicode '); varstr =NewObject (); varLen =NewObject (); varstr = components.classes["@mozilla. Org/supports-string;1"].createinstance (Components.interfaces.nsISupportsString); varCopyText =txt; Str.data=CopyText; Trans.settransferdata ("Text/unicode", str, copytext.length * 2); varClipid =Components.interfaces.nsIClipboard; if(!clip)return false; Clip.setdata (trans,NULL, Clipid.kglobalclipboard); } }