Avatar billede oersted Novice
27. oktober 2006 - 21:39 Der er 8 kommentarer og
1 løsning

js til xml

hent venligst denne fil: http://www.jspr.dk/admin.zip

meningen er at skrive til en xml fil, som bliver html formateret ved et klik på et ikon – eks. link, farve eller andet

... men det virker ikke :-(

Hvem kan hjælpe ?
Avatar billede olebole Juniormester
30. oktober 2006 - 10:28 #1
<ole>

Prøv at linke direkte til koden

/mvh
</bole>
Avatar billede oersted Novice
30. oktober 2006 - 10:45 #2
skulle gerne ligge i zipfilen
Avatar billede olebole Juniormester
30. oktober 2006 - 10:52 #3
Ja, men jeg skal ikke bruge eller downloade din zipfil  :)
Avatar billede oersted Novice
30. oktober 2006 - 11:07 #4
richtext.js:


// Cross-Browser Rich Text Editor
// http://www.kevinroth.com/rte/demo.htm
// Written by Kevin Roth (kevin@NOSPAMkevinroth.com - remove NOSPAM)
// Visit the support forums at http://www.kevinroth.com/forums/index.php?c=2
// This code is public domain. Redistribution and use of this code, with or without modification, is permitted.

//init variables
var isRichText = false;
var rng;
var currentRTE;
var allRTEs = "";

var isIE;
var isGecko;
var isSafari;
var isKonqueror;

var imagesPath;
var includesPath;
var cssFile;
var generateXHTML;

var lang = "en";
var encoding = "iso-8859-1";


function initRTE(imgPath, incPath, css, genXHTML) {
    //set browser vars
    var ua = navigator.userAgent.toLowerCase();
    isIE = ((ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1));
    isGecko = (ua.indexOf("gecko") != -1);
    isSafari = (ua.indexOf("safari") != -1);
    isKonqueror = (ua.indexOf("konqueror") != -1);

    generateXHTML = genXHTML;

    //check to see if designMode mode is available
    //Safari/Konqueror think they are designMode capable even though they are not
    if (document.getElementById && document.designMode && !isSafari && !isKonqueror) {
        isRichText = true;
    }

    if (isIE) {
        document.onmouseover = raiseButton;
        document.onmouseout  = normalButton;
        document.onmousedown = lowerButton;
        document.onmouseup  = raiseButton;
    }

    //set paths vars
    imagesPath = imgPath;
    includesPath = incPath;
    cssFile = css;

    if (isRichText) document.writeln('<style type="text/css">@import "' + includesPath + 'rte.css";</style>');

    //for testing standard textarea, uncomment the following line
    //isRichText = false;
}

function writeRichText(rte, html, width, height, buttons, readOnly) {
    if (isRichText) {
        if (allRTEs.length > 0) allRTEs += ";";
        allRTEs += rte;

        if (readOnly) buttons = false;

        //adjust minimum table widths
        if (isIE) {
            if (buttons && (width < 540)) width = 540;
            var tablewidth = width;
        } else {
            if (buttons && (width < 540)) width = 540;
            var tablewidth = width + 4;
        }

        document.writeln('<div class="rteDiv">');
        if (buttons == true) {
            document.writeln('<table class="rteBack" cellpadding="0" cellspacing="0" id="Buttons2_' + rte + '" width="' + tablewidth + '">');
            document.writeln('    <tr>');
                        document.writeln('    </tr>');
            document.writeln('</table>');
        }
        document.writeln('<iframe id="' + rte + '" name="' + rte + '" width="' + width + 'px" height="' + height + 'px" src="' + includesPath + 'blank.htm"></iframe>');
        //if (!readOnly) document.writeln('<br /><input type="checkbox" id="chkSrc' + rte + '" onclick="toggleHTMLSrc(\'' + rte + '\',' + buttons + ');" />&nbsp;<label for="chkSrc' + rte + '">View Source</label>');
        document.writeln('<iframe width="154" height="104" id="cp' + rte + '" src="' + includesPath + 'palette.php" marginwidth="0" marginheight="0" scrolling="no" style="visibility:hidden; position: absolute;"></iframe>');
        document.writeln('<input type="hidden" id="hdn' + rte + '" name="' + rte + '" value="">');
        document.writeln('</div>');

        document.getElementById('hdn' + rte).value = html;
        enableDesignMode(rte, html, readOnly);
    } else {
        if (!readOnly) {
            document.writeln('<textarea name="' + rte + '" id="' + rte + '" style="width: ' + width + 'px; height: ' + height + 'px;">' + html + '</textarea>');
        } else {
            document.writeln('<textarea name="' + rte + '" id="' + rte + '" style="width: ' + width + 'px; height: ' + height + 'px;" readonly>' + html + '</textarea>');
        }
    }
}

function enableDesignMode(rte, html, readOnly) {
    var frameHtml = "<html id=\"" + rte + "\">\n";
    frameHtml += "<head>\n";
    //to reference your stylesheet, set href property below to your stylesheet path and uncomment
    if (cssFile.length > 0) {
        frameHtml += "<link media=\"all\" type=\"text/css\" href=\"" + cssFile + "\" rel=\"stylesheet\">\n";
    } else {
        frameHtml += "<style>\n";
        frameHtml += "body {\n";
        frameHtml += "    background: #FFFFFF;\n";
        frameHtml += "    margin: 0px;\n";
        frameHtml += "    padding: 0px;\n";
        frameHtml += "}\n";
        frameHtml += "</style>\n";
    }
    frameHtml += "</head>\n";
    frameHtml += "<body>\n";
    frameHtml += html + "\n";
    frameHtml += "</body>\n";
    frameHtml += "</html>";

    if (document.all) {
        var oRTE = frames[rte].document;
        oRTE.open();
        oRTE.write(frameHtml);
        oRTE.close();
        if (!readOnly) {
            oRTE.designMode = "On";
            frames[rte].document.attachEvent("onkeypress", function evt_ie_keypress(event) {ieKeyPress(event, rte);});
        }
    } else {
        try {
            if (!readOnly) document.getElementById(rte).contentDocument.designMode = "on";
            try {
                var oRTE = document.getElementById(rte).contentWindow.document;
                oRTE.open();
                oRTE.write(frameHtml);
                oRTE.close();
                if (isGecko && !readOnly) {
                    //attach a keyboard handler for gecko browsers to make keyboard shortcuts work
                    oRTE.addEventListener("keypress", geckoKeyPress, true);
                }
            } catch (e) {
                alert("Error preloading content.");
            }
        } catch (e) {
            //gecko may take some time to enable design mode.
            //Keep looping until able to set.
            if (isGecko) {
                setTimeout("enableDesignMode('" + rte + "', '" + html + "', " + readOnly + ");", 10);
            } else {
                return false;
            }
        }
    }
}

function updateRTE(rte) {
    alert('hej1');
    if (!isRichText) return;

    //check for readOnly mode
    var readOnly = false;
    if (document.all) {
        if (frames[rte].document.designMode != "On") readOnly = true;
    } else {
        if (document.getElementById(rte).contentDocument.designMode != "on") readOnly = true;
    }

    if (isRichText && !readOnly) {
        setHiddenVal(rte);
    }
}

function setHiddenVal(rte) {
    alert('hej2');
    //set hidden form field value for current rte
    var oHdnField = document.getElementById('hdn' + rte);

    //convert html output to xhtml (thanks Timothy Bell and Vyacheslav Smolin!)
    if (oHdnField.value == null) oHdnField.value = "";
    if (document.all) {
        if (generateXHTML) {
            oHdnField.value = get_xhtml(frames[rte].document.body, lang, encoding);
        } else {
            oHdnField.value = frames[rte].document.body.innerHTML;
        }
    } else {
        if (generateXHTML) {
            oHdnField.value = get_xhtml(document.getElementById(rte).contentWindow.document.body, lang, encoding);
        } else {
            oHdnField.value = document.getElementById(rte).contentWindow.document.body.innerHTML;
        }
    }

    //if there is no content (other than formatting) set value to nothing
    if (stripHTML(oHdnField.value.replace("&nbsp;", " ")) == "" &&
        oHdnField.value.toLowerCase().search("<hr") == -1 &&
        oHdnField.value.toLowerCase().search("<img") == -1) oHdnField.value = "";
}

function updateRTEs() {
    var vRTEs = allRTEs.split(";");
    for (var i = 0; i < vRTEs.length; i++) {
        updateRTE(vRTEs[i]);
    }
}

function rteCommand(rte, command, option) {
    //function to perform command
    var oRTE;
    if (document.all) {
        oRTE = frames[rte];
    } else {
        oRTE = document.getElementById(rte).contentWindow;
    }

    try {
        oRTE.focus();
          oRTE.document.execCommand(command, false, option);
        oRTE.focus();
    } catch (e) {
//        alert(e);
//        setTimeout("rteCommand('" + rte + "', '" + command + "', '" + option + "');", 10);
    }
}

function toggleHTMLSrc(rte, buttons) {
    //contributed by Bob Hutzel (thanks Bob!)
    var oHdnField = document.getElementById('hdn' + rte);

    if (document.getElementById("chkSrc" + rte).checked) {
        //we are checking the box
        if (buttons) {
            showHideElement("Buttons1_" + rte, "hide");
            showHideElement("Buttons2_" + rte, "hide");
        }
        setHiddenVal(rte);
        if (document.all) {
            frames[rte].document.body.innerText = oHdnField.value;
        } else {
            var oRTE = document.getElementById(rte).contentWindow.document;
            var htmlSrc = oRTE.createTextNode(oHdnField.value);
            oRTE.body.innerHTML = "";
            oRTE.body.appendChild(htmlSrc);
        }
    } else {
        //we are unchecking the box
        if (buttons) {
            showHideElement("Buttons1_" + rte, "show");
            showHideElement("Buttons2_" + rte, "show");
        }
        if (document.all) {
            //fix for IE
            var output = escape(frames[rte].document.body.innerText);
            output = output.replace("%3CP%3E%0D%0A%3CHR%3E", "%3CHR%3E");
            output = output.replace("%3CHR%3E%0D%0A%3C/P%3E", "%3CHR%3E");
            frames[rte].document.body.innerHTML = unescape(output);
        } else {
            var oRTE = document.getElementById(rte).contentWindow.document;
            var htmlSrc = oRTE.body.ownerDocument.createRange();
            htmlSrc.selectNodeContents(oRTE.body);
            oRTE.body.innerHTML = htmlSrc.toString();
        }
    }
}

function dlgColorPalette(rte, command) {
    //function to display or hide color palettes
    setRange(rte);

    //get dialog position
    var oDialog = document.getElementById('cp' + rte);
    var buttonElement = document.getElementById(command + '_' + rte);
    var iLeftPos = getOffsetLeft(buttonElement);
    var iTopPos = getOffsetTop(buttonElement) + (buttonElement.offsetHeight + 4);
    oDialog.style.left = (iLeftPos) + "px";
    oDialog.style.top = (iTopPos) + "px";

    if ((command == parent.command) && (rte == currentRTE)) {
        //if current command dialog is currently open, close it
        if (oDialog.style.visibility == "hidden") {
            showHideElement(oDialog, 'show');
        } else {
            showHideElement(oDialog, 'hide');
        }
    } else {
        //if opening a new dialog, close all others
        var vRTEs = allRTEs.split(";");
        for (var i = 0; i < vRTEs.length; i++) {
            showHideElement('cp' + vRTEs[i], 'hide');
        }
        showHideElement(oDialog, 'show');
    }

    //save current values
    parent.command = command;
    currentRTE = rte;
}

function dlgInsertTable(rte, command) {
    //function to open/close insert table dialog
    //save current values
    parent.command = command;
    currentRTE = rte;
    InsertTable = popUpWin(includesPath + 'insert_table.htm', 'InsertTable', 360, 180, '');
}

function dlgInsertLink(rte, command) {
    //function to open/close insert table dialog
    //save current values
    parent.command = command;
    currentRTE = rte;
    InsertLink = popUpWin(includesPath + 'insert_link.htm', 'InsertLink', 360, 180, '');

    //get currently highlighted text and set link text value
    setRange(rte);
    var linkText = '';
    if (isIE) {
        linkText = stripHTML(rng.htmlText);
    } else {
        linkText = stripHTML(rng.toString());
    }
    setLinkText(linkText);
}

function setLinkText(linkText) {
    //set link text value in insert link dialog
    try {
        window.InsertLink.document.linkForm.linkText.value = linkText;
    } catch (e) {
        //may take some time to create dialog window.
        //Keep looping until able to set.
        setTimeout("setLinkText('" + linkText + "');", 10);
    }
}

function popUpWin (url, win, width, height, options) {
    var leftPos = (screen.availWidth - width) / 2;
    var topPos = (screen.availHeight - height) / 2;
    options += 'width=' + width + ',height=' + height + ',left=' + leftPos + ',top=' + topPos;
    return window.open(url, win, options);
}

function setColor(color) {
    //function to set color
    var rte = currentRTE;
    var parentCommand = parent.command;

    if (document.all) {
        if (parentCommand == "hilitecolor") parentCommand = "backcolor";

        //retrieve selected range
        rng.select();
    }

    rteCommand(rte, parentCommand, color);
    showHideElement('cp' + rte, "hide");
}

function addImage(rte) {
    //function to add image
    imagePath = prompt('Enter Image URL:', 'http://');
    if ((imagePath != null) && (imagePath != "")) {
        rteCommand(rte, 'InsertImage', imagePath);
    }
}

// Ernst de Moor: Fix the amount of digging parents up, in case the RTE editor itself is displayed in a div.
// KJR 11/12/2004 Changed to position palette based on parent div, so palette will always appear in proper location regardless of nested divs
function getOffsetTop(elm) {
    var mOffsetTop = elm.offsetTop;
    var mOffsetParent = elm.offsetParent;
    var parents_up = 2; //the positioning div is 2 elements up the tree

    while(parents_up > 0) {
        mOffsetTop += mOffsetParent.offsetTop;
        mOffsetParent = mOffsetParent.offsetParent;
        parents_up--;
    }

    return mOffsetTop;
}

// Ernst de Moor: Fix the amount of digging parents up, in case the RTE editor itself is displayed in a div.
// KJR 11/12/2004 Changed to position palette based on parent div, so palette will always appear in proper location regardless of nested divs
function getOffsetLeft(elm) {
    var mOffsetLeft = elm.offsetLeft;
    var mOffsetParent = elm.offsetParent;
    var parents_up = 2;

    while(parents_up > 0) {
        mOffsetLeft += mOffsetParent.offsetLeft;
        mOffsetParent = mOffsetParent.offsetParent;
        parents_up--;
    }

    return mOffsetLeft;
}

function selectFont(rte, selectname) {
    //function to handle font changes
    var idx = document.getElementById(selectname).selectedIndex;
    // First one is always a label
    if (idx != 0) {
        var selected = document.getElementById(selectname).options[idx].value;
        var cmd = selectname.replace('_' + rte, '');
        rteCommand(rte, cmd, selected);
        document.getElementById(selectname).selectedIndex = 0;
    }
}

function insertHTML(html) {
    //function to add HTML -- thanks dannyuk1982
    var rte = currentRTE;

    var oRTE;
    if (document.all) {
        oRTE = frames[rte];
    } else {
        oRTE = document.getElementById(rte).contentWindow;
    }

    oRTE.focus();
    if (document.all) {
        var oRng = oRTE.document.selection.createRange();
        oRng.pasteHTML(html);
        oRng.collapse(false);
        oRng.select();
    } else {
        oRTE.document.execCommand('insertHTML', false, html);
    }
}

function showHideElement(element, showHide) {
    //function to show or hide elements
    //element variable can be string or object
    if (document.getElementById(element)) {
        element = document.getElementById(element);
    }

    if (showHide == "show") {
        element.style.visibility = "visible";
    } else if (showHide == "hide") {
        element.style.visibility = "hidden";
    }
}

function setRange(rte) {
    //function to store range of current selection
    var oRTE;
    if (document.all) {
        oRTE = frames[rte];
        var selection = oRTE.document.selection;
        if (selection != null) rng = selection.createRange();
    } else {
        oRTE = document.getElementById(rte).contentWindow;
        var selection = oRTE.getSelection();
        rng = selection.getRangeAt(selection.rangeCount - 1).cloneRange();
    }
    return rng;
}

function stripHTML(oldString) {
    //function to strip all html
    var newString = oldString.replace(/(<([^>]+)>)/ig,"");

    //replace carriage returns and line feeds
  newString = newString.replace(/\r\n/g," ");
  newString = newString.replace(/\n/g," ");
  newString = newString.replace(/\r/g," ");

    //trim string
    newString = trim(newString);

    return newString;
}

function trim(inputString) {
  // Removes leading and trailing spaces from the passed string. Also removes
  // consecutive spaces and replaces it with one space. If something besides
  // a string is passed in (null, custom object, etc.) then return the input.
  if (typeof inputString != "string") return inputString;
  var retValue = inputString;
  var ch = retValue.substring(0, 1);

  while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
  }
  ch = retValue.substring(retValue.length - 1, retValue.length);

  while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length - 1);
      ch = retValue.substring(retValue.length - 1, retValue.length);
  }

    // Note that there are two spaces in the string - look for multiple spaces within the string
  while (retValue.indexOf("  ") != -1) {
        // Again, there are two spaces in each of the strings
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ") + 1, retValue.length);
  }
  return retValue; // Return the trimmed string back to the user
}

//********************
//Gecko-Only Functions
//********************
function geckoKeyPress(evt) {
    //function to add bold, italic, and underline shortcut commands to gecko RTEs
    //contributed by Anti Veeranna (thanks Anti!)
    var rte = evt.target.id;

    if (evt.ctrlKey) {
        var key = String.fromCharCode(evt.charCode).toLowerCase();
        var cmd = '';
        switch (key) {
            case 'b': cmd = "bold"; break;
            case 'i': cmd = "italic"; break;
            case 'u': cmd = "underline"; break;
        };

        if (cmd) {
            rteCommand(rte, cmd, null);

            // stop the event bubble
            evt.preventDefault();
            evt.stopPropagation();
        }
    }
}

//*****************
//IE-Only Functions
//*****************
function ieKeyPress(evt, rte) {
    var key = (evt.which || evt.charCode || evt.keyCode);
    var stringKey = String.fromCharCode(key).toLowerCase();

//the following breaks list and indentation functionality in IE (don't use)
//    switch (key) {
//        case 13:
//            //insert <br> tag instead of <p>
//            //change the key pressed to null
//            evt.keyCode = 0;
//
//            //insert <br> tag
//            currentRTE = rte;
//            insertHTML('<br>');
//            break;
//    };
}

function checkspell() {
    //function to perform spell check
    try {
        var tmpis = new ActiveXObject("ieSpell.ieSpellExtension");
        tmpis.CheckAllLinkedDocuments(document);
    }
    catch(exception) {
        if(exception.number==-2146827859) {
            if (confirm("ieSpell not detected.  Click Ok to go to download page."))
                window.open("http://www.iespell.com/download.php","DownLoad");
        } else {
            alert("Error Loading ieSpell: Exception " + exception.number);
        }
    }
}

function raiseButton(e) {
    var el = window.event.srcElement;

    className = el.className;
    if (className == 'rteImage' || className == 'rteImageLowered') {
        el.className = 'rteImageRaised';
    }
}

function normalButton(e) {
    var el = window.event.srcElement;

    className = el.className;
    if (className == 'rteImageRaised' || className == 'rteImageLowered') {
        el.className = 'rteImage';
    }
}

function lowerButton(e) {
    var el = window.event.srcElement;

    className = el.className;
    if (className == 'rteImage' || className == 'rteImageRaised') {
        el.className = 'rteImageLowered';
    }
}
Avatar billede oersted Novice
30. oktober 2006 - 11:08 #5
richtext_compressed.js:

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'\\w+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('d 6a="6b";d 9S="6d-8";d L=t;d 1r=t;d 6B=9T;d 6C=8R;d 1U="";d 1k="";d 1w="";d 1i;d 1G;d 3D=20;d 1e=0;d 6f=1I.8S.c.9i.8U+"//"+c.8V+"/";d E="";d 1p="";d 2y="";d 3S=j;d 1K=t;d Z=5U.5Y.2b();d 1f=((Z.1c("6e")!=-1)&&(Z.1c("6r")==-1)&&(Z.1c("8W")==-1));d 6v=3G(Z.28(Z.1c(\'6e \')+5));d 2A=(Z.1c("8Y")!=-1);d 1X=(Z.1c("8Z")!=-1);d 1z=5G();a(1z){1z=1z["2r"]}B{1z=3N}d 7p=(Z.1c("6q")!=-1);d 90=3G(Z.28(Z.1c(\'6q/\')+10));d 2G=(Z.1c("6r")!=-1);d 7g=(Z.1c("93")!=-1);d 7q=3G(Z.28(Z.94(\'/\')+1));d 3M=j;d 8I=j;d 6I=j;d 6p=j;d 7e=j;d 42=t;d 3k=t;d 63=j;d 49=j;d 4a=j;d 3h=j;d 4l=j;d 5N=j;d 4i=j;d 5u=j;d 4v=j;d 2U=j;d 2Y=j;d 2T=j;d 2R=j;d 2P=j;d 2S=j;d 4W=j;d 7l=j;d 1C=j;d 3T=t;d 2W=j;d 2Z=j;d 31=j;d 32=j;d 2j=j;d 5w=j;d 5A=j;d 36=j;d 2X=j;x 9U(4N,6s,1H,4H,6t){A{E=4N;1p=6s;2y=1H;3S=4H;a(6t)1K=j;a(c.27){a(c.U&&!1f&&!1X&&!7p){1r=j;a(2A||2G){42=j;3k=j;31=t;32=t;2j=t}a(7g&&7q<8){1C=t}}B a(1f&&6v>=5.5){1r=j;3T=j}B a(1X){a(1z>=9a){1r=j}B a(1z>=9N){1r=j;3M=t;3h=t;2U=t;2Y=t;2T=t;2R=t;2P=t;2S=t;2Z=t;2j=t;1C=t;2W=t;2X=t;36=t}}}a(1r){c.f(\'<W 1L="12/1H">@6h "\'+1p+\'9.1H";</W>\');c.f(\'<2q q="9b" w="18" T="1F" F="\'+1p+\'9L.26" 9c="0" 9e="0" 9f="9g" 5P="0" W="2u:2s; 9h: 9F;"></2q>\');a(1f){c.9E=3q;c.9k=6o;c.K=6Y;c.9l=3q}}}C(e){a(L)z(e)}}x 9m(T){k.l=T;k.J="";k.q=6B;k.w=6C;k.13=t;k.1v=j;k.1A=j;k.6K=j;k.76=j;k.7f=j;k.7h=t;k.7o=t;k.4r=j;k.61=j;k.4b=j;k.4m=t;k.5S=t;k.5H=t;k.4j=j;k.4u=j;k.54=j;k.51=t;k.5C=j;k.4G=j;k.4K=j;k.4f=j;k.4S=j;k.4X=j;k.52=j;k.57=j;k.5b=j;k.5c=j;k.5f=j;k.6V=j;k.5n=t;k.5q=t;k.5s=t;k.5x=t;k.5B=t;k.5E=t;k.58=t;k.3p=j;k.3R=3R}x 3R(){9x(k){a(1r){a(k.13){k.1v=t;k.1A=t}6E(k);3r(k.l,2d(k.J),k.13);a(2A){1k=k.l;5m("<9o>");H(k.l,"33")}a(k.3p)c.U("1D"+k.l).3w=t}B{6F(k)}}}x 6F(9){a(!9.13){c.f(\'<2H 2v="\'+9.l+\'" T="\'+9.l+\'" W="q: \'+9.q+\'1B; w: \'+9.w+\'1B;">\'+9.J+\'</2H>\')}B{c.f(\'<2H 2v="\'+9.l+\'" T="\'+9.l+\'" W="q: \'+9.q+\'1B; w: \'+9.w+\'1B;" 9p>\'+9.J+\'</2H>\')}}x 6E(9){A{a(1U.2k>0)1U+=";";1U+=9.l;c.f(\'<1N q="\'+9.q+\'" 3g="0" 3b="0" W="9q: 9r 9t #9u;">\');c.f(\'    <1R>\');c.f(\'        <h>\');a(3M&&9.1v){c.f(\'        <1N G="48" 3g="2" 3b="0" T="43\'+9.l+\'" q="18%">\');c.f(\'            <1R>\');a(6I&&9.6K){c.f(\'                <h>\');c.f(\'                    <1u T="9v\'+9.l+\'" 40="2J(\\\'\'+9.l+\'\\\', k.T);">\');c.f(\'                        <m N="">[9w]</m>\');c.f(\'                        <m N="<p>">9y &16;p&17;</m>\');c.f(\'                        <m N="<6x>">1J 1 &16;6x&17;</m>\');c.f(\'                        <m N="<6y>">1J 2 &16;6y&17;</m>\');c.f(\'                        <m N="<6O>">1J 3 &16;6O&17;</m>\');c.f(\'                        <m N="<6Q>">1J 4 &16;6Q&17;</m>\');c.f(\'                        <m N="<6R>">1J 5 &16;6R&17;</m>\');c.f(\'                        <m N="<6S>">1J 6 &16;6S&17;</m>\');c.f(\'                        <m N="<9B>">9C &16;9D&17;</m>\');c.f(\'                        <m N="<74>">9G &16;74&17;</m>\');c.f(\'                    </1u>\');c.f(\'                </h>\')}a(6p&&9.76){c.f(\'                <h>\');c.f(\'                    <1u T="9I\'+9.l+\'" 40="2J(\\\'\'+9.l+\'\\\', k.T)">\');c.f(\'                        <m N="1Q" 30>[1Q]</m>\');c.f(\'                        <m N="3X, 7b, 7c-3Z">3X</m>\');c.f(\'                        <m N="3F 1x, 3F, 9J">3F 1x</m>\');c.f(\'                        <m N="3K 1x 7a, 3K, 3Z">3K 1x 7a</m>\');c.f(\'                        <m N="7d, 3X, 7b, 7c-3Z">7d</m>\');c.f(\'                    </1u>\');c.f(\'                </h>\')}a(7e&&9.7f){c.f(\'                <h>\');c.f(\'                    <1u T="9O\'+9.l+\'" 40="2J(\\\'\'+9.l+\'\\\', k.T);">\');c.f(\'                        <m N="1P">[1P]</m>\');c.f(\'                        <m N="1">1</m>\');c.f(\'                        <m N="2">2</m>\');c.f(\'                        <m N="3">3</m>\');c.f(\'                        <m N="4">4</m>\');c.f(\'                        <m N="5">5</m>\');c.f(\'                        <m N="6">6</m>\');c.f(\'                        <m N="7">7</m>\');c.f(\'                    </1u>\');c.f(\'                </h>\')}a(42&&9.7h)c.f(\'                <h><I G="D" F="\'+E+\'9P.Q" q="25" w="24" O="7m 1Q 1P" M="7m 1Q 1P" K="H(\\\'\'+9.l+\'\\\', \\\'9R\\\')"></h>\');a(3k&&9.7o)c.f(\'                <h><I G="D" F="\'+E+\'7r.Q" q="25" w="24" O="6j 1Q 1P" M="6j 1Q 1P" K="H(\\\'\'+9.l+\'\\\', \\\'7s\\\')"></h>\');c.f(\'                <h q="18%"></h>\');c.f(\'            </1R>\');c.f(\'        </1N>\')}a(9.1A){c.f(\'        <1N G="48" 3g="0" 3b="0" T="3j\'+9.l+\'" q="18%">\');c.f(\'            <1R>\');a(63&&9.4r)c.f(\'                <h><I G="D" F="\'+E+\'3y.Q" q="25" w="24" O="4q" M="4q" K="H(\\\'\'+9.l+\'\\\', \\\'3y\\\')"></h>\');a(49&&9.61)c.f(\'                <h><I G="D" F="\'+E+\'3L.Q" q="25" w="24" O="4p" M="4p" K="H(\\\'\'+9.l+\'\\\', \\\'3L\\\')"></h>\');a(4a&&9.4b)c.f(\'                <h><I G="D" F="\'+E+\'3I.Q" q="25" w="24" O="4n" M="4n" K="H(\\\'\'+9.l+\'\\\', \\\'3I\\\')"></h>\');a(3h&&9.4m)c.f(\'                <h><I G="D" F="\'+E+\'5R.Q" q="25" w="24" O="4d" M="4d" K="H(\\\'\'+9.l+\'\\\', \\\'5R\\\', \\\'\\\')"></h>\');a(4l&&9.5S)c.f(\'                <h><I G="D" F="\'+E+\'5K.Q" q="25" w="24" O="4k" M="4k" K="H(\\\'\'+9.l+\'\\\', \\\'5K\\\')"></h>\');a(5N&&9.5H)c.f(\'                <h><I G="D" F="\'+E+\'5Z.Q" q="25" w="24" O="5O" M="5O" K="H(\\\'\'+9.l+\'\\\', \\\'5Z\\\')"></h>\');a(4i&&9.4j)c.f(\'                <h><I G="D" F="\'+E+\'7y.Q" q="25" w="24" O="2E 4t" M="2E 4t" K="H(\\\'\'+9.l+\'\\\', \\\'7A\\\')"></h>\');a(5u&&9.4u)c.f(\'                <h><I G="D" F="\'+E+\'7B.Q" q="25" w="24" O="5h" M="5h" K="H(\\\'\'+9.l+\'\\\', \\\'7C\\\')"></h>\');a(4v&&9.54)c.f(\'                <h><I G="D" F="\'+E+\'7E.Q" q="25" w="24" O="2E 4x" M="2E 4x" K="H(\\\'\'+9.l+\'\\\', \\\'7F\\\')"></h>\');a(2U&&9.51)c.f(\'                <h><I G="D" F="\'+E+\'4D.Q" q="25" w="24" O="4Q 4U" M="4Q 4U" K="H(\\\'\'+9.l+\'\\\', \\\'4D\\\')"></h>\');a(2Y&&9.5C)c.f(\'                <h><I G="D" F="\'+E+\'78.Q" q="25" w="24" O="4J 4F" M="4J 4F" K="H(\\\'\'+9.l+\'\\\', \\\'7I\\\')"></h>\');a(2T&&9.4G)c.f(\'                <h><I G="D" F="\'+E+\'7J.Q" q="25" w="24" O="4C 2h" M="4C 2h" K="H(\\\'\'+9.l+\'\\\', \\\'7K\\\')"></h>\');a(2R&&9.4K)c.f(\'                <h><I G="D" F="\'+E+\'7L.Q" q="25" w="24" O="4M 2h" M="4M 2h" K="H(\\\'\'+9.l+\'\\\', \\\'7O\\\')"></h>\');a(2P&&9.4f)c.f(\'                <h><I G="D" F="\'+E+\'4R.Q" q="25" w="24" O="4s" M="4s" K="H(\\\'\'+9.l+\'\\\', \\\'4R\\\')"></h>\');a(2S&&9.4S)c.f(\'                <h><I G="D" F="\'+E+\'4V.Q" q="25" w="24" O="4c" M="4c" K="H(\\\'\'+9.l+\'\\\', \\\'4V\\\')"></h>\');a(4W&&9.4X)c.f(\'                <h><1q T="7R\'+9.l+\'"><I G="D" F="\'+E+\'7S.Q" q="25" w="24" O="4Z 2e" M="4Z 2e" K="44(\\\'\'+9.l+\'\\\', \\\'7T\\\', \\\'\\\'); X t;"></1q></h>\');a(7l&&9.52)c.f(\'                <h><1q T="7V\'+9.l+\'"><I G="D" F="\'+E+\'7W.Q" q="25" w="24" O="55 2e" M="55 2e" K="44(\\\'\'+9.l+\'\\\', \\\'4E\\\', \\\'\\\'); X t;"></1q></h>\');a((1C||2W)&&9.57)c.f(\'                <h><I G="D" F="\'+E+\'7X.Q" q="25" w="24" O="1M 2I" M="1M 2I" K="6N(\\\'\'+9.l+\'\\\')"></h>\');a(2X&&9.58)c.f(\'                <h><I G="D" F="\'+E+\'5a.Q" q="25" w="24" O="2z 2I" M="2z 2I" K="H(\\\'\'+9.l+\'\\\', \\\'5a\\\')"></h>\');a(2Z&&9.5b)c.f(\'                <h><I G="D" F="\'+E+\'7Y.Q" q="25" w="24" O="75 2Q" M="75 2Q" K="4L(\\\'\'+9.l+\'\\\')"></h>\');a(1C&&9.5c)c.f(\'                <h><I G="D" F="\'+E+\'7Z.Q" q="25" w="24" O="1M 72 71" M="1M 72 71" K="77(\\\'\'+9.l+\'\\\')"></h>\');a(1C&&9.5f&&!2G)c.f(\'                <h><1q T="80\'+9.l+\'"><I G="D" F="\'+E+\'6M.Q" q="25" w="24" O="1M 5i" M="1M 5i" K="6J(\\\'\'+9.l+\'\\\')"></1q></h>\');a(3T&&9.6V)c.f(\'                <h><I G="D" F="\'+E+\'81.Q" q="25" w="24" O="6T 5l" M="6T 5l" K="5k()"></h>\');a(31&&9.5n)c.f(\'                <h><I G="D" F="\'+E+\'5p.Q" q="25" w="24" O="6P" M="6P" K="H(\\\'\'+9.l+\'\\\', \\\'5p\\\')"></h>\');a(32&&9.5q)c.f(\'                <h><I G="D" F="\'+E+\'5r.Q" q="25" w="24" O="6L" M="6L" K="H(\\\'\'+9.l+\'\\\', \\\'5r\\\')"></h>\');a(2j&&9.5s)c.f(\'                <h><I G="D" F="\'+E+\'5v.Q" q="25" w="24" O="6H" M="6H" K="H(\\\'\'+9.l+\'\\\', \\\'5v\\\')"></h>\');a(5w&&9.5x)c.f(\'                <h><I G="D" F="\'+E+\'33.Q" q="25" w="24" O="5z" M="5z" K="H(\\\'\'+9.l+\'\\\', \\\'33\\\')"></h>\');a(5A&&9.5B)c.f(\'                <h><I G="D" F="\'+E+\'5D.Q" q="25" w="24" O="6z" M="6z" K="H(\\\'\'+9.l+\'\\\', \\\'5D\\\')"></h>\');a(36&&9.5E)c.f(\'                <h><I G="D" F="\'+E+\'5M.Q" q="25" w="24" O="2z 5L" M="2z 5L" K="H(\\\'\'+9.l+\'\\\', \\\'5M\\\')"></h>\');c.f(\'                <h q="18%"></h>\');c.f(\'            </1R>\');c.f(\'        </1N>\')}c.f(\'            <2q T="\'+9.l+\'" 2v="\'+9.l+\'" F="\'+1p+\'8e.26" 5P="0" W="q: 18%; w: \'+9.w+\'1B; 3s: 0; 3t: 0;"></2q>\');c.f(\'        </h>\');c.f(\'    </1R>\');c.f(\'</1N>\');c.f(\'<1q W="3s: 0; 3t: 0;">\');a(!9.13&&9.3p)c.f(\'<5W 1L="8f" T="1D\'+9.l+\'" 8i="6i(\\\'\'+9.l+\'\\\',\'+9.1v+\',\'+9.1A+\');" />&73;<5V 6u="1D\'+9.l+\'">8j 8k</5V>\');c.f(\'<5W 1L="2s" T="3O\'+9.l+\'" 2v="\'+9.l+\'" N="">\');c.f(\'</1q>\')}C(e){a(L)z(e)}}x 3r(9,J,13){A{d V="<!8n J 8o \\"-//8p//64 8q 1.0 8r//8s\\" \\"1T://45.68.69/8t/65/64/65-8w.8x\\">\\n";V+="<J T=\\""+9+"\\" 8y=\\"1T://45.68.69/8z/8A\\" 6c:6a=\\"6b\\">\\n";V+="<6g>\\n";V+="<8B 1T-8C=\\"2C-1L\\" 2C=\\"12/J; 8D=6d-8\\" />\\n";V+="<8F 8G=\\""+6f+"\\" />\\n";V+="</6g>\\n";V+="<15 W=\\"3s: 0; 3t: 0;\\">\\n";a(2y.2k>0){V+=J+"\\n";V+="<W 1L=\\"12/1H\\">@6h 1Z("+2y+");</W>\\n"}B{V+="<W 1L=\\"12/1H\\">\\n";V+="15 {\\n";V+="    8J: #8K;\\n";V+="}\\n";V+="</W>\\n";V+=J+"\\n"}V+="</15>\\n";V+="</J>";d R=c.U(9);A{a(2A){a(!13)R.8L.27="3m";A{d y=R.Y.c;y.29("12/J","S");y.3x(V);y.46();a(!13)y.8M("8N",6k,j)}C(e){z("1t 6m 2C.")}1e=0}B a(R.Y){A{d y=R.Y.c;y.29("12/J","S");y.3x(V);y.46();a(!13&&1f)y.6n("7k",2O)}C(e){z("1t 6m 2C.")}a(!13)y.27="3m";1e=0}B{d y=R.c;y.29("12/J","S");y.3x(V);y.46();a(!13&&1f)y.6n("7k",2O);a(!13)y.27="3m";1e=0}}C(e){a(1e<3D){1Y("3r(\'"+9+"\', \'"+J+"\', "+13+");",18);1e+=1}B{z("1t 91 27.")}}}C(e){a(L)z(e)}}x 6w(9){A{a(1r){a(c.U("1D"+9)&&c.U("1D"+9).3w)c.U("1D"+9).95();3Q(9)}B{X}}C(e){a(L)z(e)}}x 96(){A{a(1U!=""){d 3W=1U.5j(";");6u(d i=0;i<3W.2k;i++){6w(3W[i])}}}C(e){a(L)z(e)}}x H(9,1m,m){A{d R=c.U(9);a(R.Y){R.Y.1y();R.Y.c.70(1m,t,m)}B{R.c.1y();R.c.70(1m,t,m)}1e=0;X t}C(e){a(L)z(e);a(1e<3D){1Y("H(\'"+9+"\', \'"+1m+"\', \'"+m+"\');",18);1e+=1}B{z("1t 9j 1m.")}}}x 44(9,1m){A{23(9);d 2D=c.U(1m+\'5g\'+9);d 6Z=4Y(2D);d 6D=7i(2D)+2D.9n;d 2l=c.U(\'1F\');2l.W.4w=6Z+"1B";2l.W.5e=6D+"1B";a((1m==1G)&&(9==1k)){a(2l.W.2u=="2s"){1g(\'1F\',\'21\')}B{1g(\'1F\',\'22\')}}B{1g(\'1F\',\'21\')}1G=1m;1k=9}C(e){a(L)z(e)}}x 6J(9){A{23(9);1k=9;2F=2t(1p+\'6M.26\',\'2F\',3z,6W,\'\');a(2F){1Y("2F.1y()",18)}B{z("1t: 41 3A 1x 3n...\\3l 3o 2V 3i 2N 1O 3a.\\n\\3c 3e 3u 1O 39 3v")}}C(e){a(L)z(e)}}x 6N(9){A{a(1C){23(9);1k=9;2p=2t(1p+\'9A.26?1w=\'+1w,\'2p\',3z,6W,\'\');a(2p){1Y("2p.1y()",18)}B{z("1t: 41 3A 1x 3n...\\3l 3o 2V 3i 2N 1O 3a.\\n\\3c 3e 3u 1O 39 3v")}}B{d 1Z=4O("4P 4T","1T://");H(9,"9H",1Z)}}C(e){a(L)z(e)}}x 77(9){A{23(9);1k=9;2B=2t(1p+\'9K.26\',\'2B\',3z,9M,\'\');a(2B){1Y("2B.1y()",18)}B{z("1t: 41 3A 1x 3n...\\3l 3o 2V 3i 2N 1O 3a.\\n\\3c 3e 3u 1O 39 3v")}}C(e){a(L)z(e)}}x 2t(1Z,4A,q,w,2M){A{d 4y=(4h.7w-q)/2;d 5o=(4h.7x-w)/2;2M+=\'q=\'+q+\',w=\'+w+\',5e=\'+5o+\',4w=\'+4y;X 1I.29(1Z,4A,2M)}C(e){a(L)z(e)}}x 7G(4I){A{d 9=1k;a(1X||1f){a(1G=="4E")1G="7H";a(!1X)1i.1u()}H(9,1G,4I);1g(\'1F\',"22")}C(e){a(L)z(e)}}x 4L(9){A{2m=4O(\'4P 2Q 4T:\',\'1T://\');a((2m!=3N)&&(2m!="")){H(9,\'7Q\',2m)}}C(e){a(L)z(e)}}x 4Y(14){d 2K=0;a(14.2f){2K=14.50;56(14=14.2f){2K+=14.50}}X 2K}x 7i(14){d 2g=0;a(14.2f){2g=14.59;56(14=14.2f){2g+=14.59}}X 2g}x 2J(9,2a){A{d 3U=c.U(2a).6U;a(3U!=0){d 30=c.U(2a).2M[3U].N;d 1n=2a.S(\'5g\'+9,\'\');H(9,1n,30);c.U(2a).6U=0}}C(e){a(L)z(e)}}x 5m(J){A{a(c.5T&&!2G){1i.82(J);1i.83(t);1i.1u()}B{H(1k,\'85\',J)}}C(e){a(L)z(e)}}x 1g(19,3H){A{a(c.U(19)){19=c.U(19);a(3H=="21"){a(19.T.28(0,7)=="5F")19.W.5I="86";19.W.2u="87"}B a(3H=="22"){a(19.T.28(0,7)=="5F")19.W.5I="8c";19.W.2u="2s"}}}C(e){a(L)z(e)}}x 23(9){A{d R=c.U(9);a(R.Y){d y=R.Y.c;R.Y.1y()}B{d y=R.c;y.1y()}a(c.5T){5X=y.8l;1i=5X.3J();a(1K){1w=1W(1i.12.3Y())}B{1w=1i.12.3Y()}}B a(c.3d){1i=y.3J();a(1K){1w=1W(y.3d())}B{1w=y.3d()}}}C(e){a(L)z(e)}}x 6X(62){A{d 1d=62.S(/(<([^>]+)>)/1h,"");1d=1d.S(/\\r\\n/g," ");1d=1d.S(/\\n/g," ");1d=1d.S(/\\r/g," ");1d=67(1d);X 1d}C(e){a(L)z(e)}}x 67(2w){A{2w=2w.S(/^\\s+/g,"");X 2w.S(/\\s+$/g,"")}C(e){a(L)z(e)}}x 6G(1b){1b=1V(1b).S(/<\\\\?\\?6c[^>]*>/g,"");1b=1V(1b).S(/<\\/?o:p[^>]*>/g,"");1b=1V(1b).S(/<\\/?v:[^>]*>/g,"");1b=1V(1b).S(/<\\/?o:[^>]*>/g,"");X 1b}x 6i(9,1v,1A){A{d 1o=c.U(\'3O\'+9);d R=c.U(9);a(R.Y){d y=R.Y.c}B{d y=R.c}a(c.U("1D"+9).3w){a(1v)1g("43"+9,"22");a(1A)1g("3j"+9,"22");3Q(9);a(1K){d 1l=y.6l(2d(1o.N))}B{d 1l=y.6l(1o.N)}y.15.2i="";y.15.8Q(1l)}B{a(1v)1g("43"+9,"21");a(1A)1g("3j"+9,"21");a(1f){d 1l=y.15.97}B{d 1l=y.15.99.3J();1l.9d(y.15);1l=1l.3Y()}47(9,1l)}}C(e){a(L)z(e)}}x 3Q(9){A{d 1o=c.U(\'3O\'+9);a(1o.N==3N)1o.N="";d J=7n(9);J=6G(J);a(3S){J=9z(J)}a(6X(J.S("&73;"," "))==""&&J.2b().79("<78")==-1&&J.2b().79("<I")==-1)J="";a(1K){1o.N=1W(J)}B{1o.N=J}}C(e){a(L)z(e)}}x 7n(9){A{d R=c.U(9);a(R.Y){d y=R.Y.c}B{d y=R.c}X y.15.2i}C(e){a(L)z(e)}}x 47(9,J){A{d R=c.U(9);a(R.Y){d y=R.Y.c}B{d y=R.c}a(1f){d 1E=1W(J);1E=1E.S("%7v%3E%4g%4o%2L%3E","%2L%3E");1E=1E.S("%2L%3E%4g%4o%3C/P%3E","%2L%3E");y.15.2i=2d(1E)}B{y.15.2i=J}}C(e){a(L)z(e)}}x 1W(12){X 12.S(/\\&/1h,\'&7j;\').S(/\\</1h,\'&16;\').S(/\\>/1h,\'&17;\').S(/\\"/1h,\'&5d;\')}x 2d(12){X 12.S(/\\&7j\\;/1h,\'&\').S(/\\&16\\;/1h,\'<\').S(/\\&17\\;/1h,\'>\').S(/\\&5d\\;/1h,\'"\')}x 60(2n){A{d 34=2n.5j(".");d 1S=(2n[2n.2k-1]=="+");a(1S){d 1s="+"}B{d 1s=5y(34[1]);a(84(1s)){1s=""}}X{2r:5y(34[0]),1s:1s,1S:1S}}C(e){a(L)z(e)}}x 5G(){A{d 5Q=5t 8b("\\\\(.*\\\\) 8d/(.*) \\\\((.*)");d 3f=5Q.8g(5U.5Y);a(3f){d 2x=60(3f[1])}X{2r:2x[\'2r\'],1s:2x[\'1s\'],1S:2x[\'1S\']}}C(e){}}x 6k(1a){A{d 9=1a.8O.T;a(1a.8T){d 2o=1V.53(1a.4z).2b();d 1n=\'\';92(2o){3P\'b\':1n="3y";3B;3P\'i\':1n="3L";3B;3P\'u\':1n="3I";3B};a(1n){H(9,1n);1a.9Q();1a.7t()}}}C(e){a(L)z(e)}}x 2O(2c){A{4e(2c,9)}C(e){a(L)z(e)}}x 4e(1a,9){A{d 2o=(1a.7D||1a.4z||1a.7M);d 7P=1V.53(2o).2b()}C(e){a(L)z(e)}}x 5k(){A{d 5J=5t 88("37.8a");5J.8h(c)}C(e){a(e.66==-8u){a(8v("37 8E 8H.  8P 8X 6A 98 6A 4B 9s."))1I.29("1T://45.7u.7z/4B.7N","7U")}B{z("1t 89 37: 8m "+e.66)}}}x 3q(e){A{d 1j=1I.2c.3V;11=1j.11;a(11==\'D\'||11==\'35\'){1j.11=\'38\'}}C(e){a(L)z(e)}}x 6o(e){A{d 1j=1I.2c.3V;11=1j.11;a(11==\'38\'||11==\'35\'){1j.11=\'D\'}}C(e){a(L)z(e)}}x 6Y(e){A{d 1j=1I.2c.3V;11=1j.11;a(11==\'D\'||11==\'38\'){1j.11=\'35\'}}C(e){a(L)z(e)}}',62,615,'|||||||||rte|if||document|var||writeln||td||true|this|rteID|option||||width|||false|||height|function|oRTEDoc|alert|try|else|catch|rteImage|imagesPath|src|class|rteCommand|img|html|onmousedown|debugMode|title|value|alt||gif|oRTE|replace|id|getElementById|frameHtml|style|return|contentWindow|ua||className|text|readOnly|obj|body|lt|gt|100|element|evt|wordContent|indexOf|newString|loopCnt|isIE|showHideElement|ig|rng|el|currentRTE|htmlSrc|command|cmd|oHdnField|includesPath|div|isRichText|minor|Error|select|toolbar1|selectionText|New|focus|webkitVersion|toolbar2|px|cmdInsertHTMLEnabled|chkSrc|output|cp|lastCommand|css|window|Heading|encodeHTML|type|Insert|table|Popup|Size|Font|tr|is_nightly|http|allRTEs|String|htmlEncode|isSafari|setTimeout|url||show|hide|setRange|||htm|designMode|substring|open|selectname|toLowerCase|event|htmlDecode|Color|offsetParent|curtop|List|innerHTML|cmdPasteEnabled|length|oDialog|imagePath|version|key|InsertLink|iframe|major|hidden|popUpWin|visibility|name|sInString|webkit_version|cssFile|Remove|isGecko|InsertSpecialChar|content|buttonElement|Align|InsertTable|isOpera|textarea|Link|selectFont|curleft|3CHR|options|up|evt_ie_keypress|cmdOutdentEnabled|Image|cmdInsertUnorderedListEnabled|cmdIndentEnabled|cmdInsertOrderedListEnabled|cmdJustifyFullEnabled|maybe|cmdCreateLinkEnabled|cmdUnlinkEnabled|cmdInsertHorizontalRuleEnabled|cmdInsertImageEnabled|selected|cmdCutEnabled|cmdCopyEnabled|undo|bits|rteImageLowered|cmdRemoveFormatEnabled|ieSpell|rteImageRaised|Blocker|windows|cellspacing|nPlease|getSelection|check|matches|cellpadding|cmdStrikethroughEnabled|blocking|toolbar2_|cmdDecreaseFontSizeEnabled|nYour|on|Window|browser|toggleSrc|raiseButton|enableDesignMode|margin|padding|your|Settings|checked|write|bold|360|Launching|break||maxLoops||Courier|parseFloat|showHide|underline|createRange|Times|italic|toolbar1Enabled|null|hdn|case|setHiddenVal|build|generateXHTML|cmdSpellCheckEnabled|idx|srcElement|vRTEs|Arial|toString|serif|onchange|While|cmdIncreaseFontSizeEnabled|toolbar1_|dlgColorPalette|www|close|setHtmlSrc|rteBack|cmdItalicEnabled|cmdUnderlineEnabled|cmdUnderline|Indent|Strikethrough|ieKeyPress|cmdOutdent|0D|screen|cmdJustifyLeftEnabled|cmdJustifyLeft|Superscript|cmdSuperscriptEnabled|cmdStrikethrough|Underline|0A|Italic|Bold|cmdBold|Outdent|Left|cmdJustifyCenter|cmdJustifyRightEnabled|left|Right|leftPos|charCode|win|download|Ordered|justifyfull|hilitecolor|Rule|cmdInsertOrderedList|genXHTML|color|Horizontal|cmdInsertUnorderedList|addImage|Unordered|imgPath|prompt|Enter|Justify|outdent|cmdIndent|URL|Full|indent|cmdForeColorEnabled|cmdForeColor|findPosX|Text|offsetLeft|cmdJustifyFull|cmdHiliteColor|fromCharCode|cmdJustifyRight|Background|while|cmdInsertLink|cmdUnlink|offsetTop|unlink|cmdInsertImage|cmdInsertSpecialChars|quot|top|cmdInsertTable|_|Center|Table|split|checkspell|Check|insertHTML|cmdCut|topPos|cut|cmdCopy|copy|cmdPaste|new|cmdJustifyCenterEnabled|paste|cmdUndoEnabled|cmdUndo|parseInt|Undo|cmdRedoEnabled|cmdRedo|cmdInsertHorizontalRule|redo|cmdRemoveFormat|toolbar|get_webkit_version|cmdSubscript|display|tmpis|superscript|Formatting|removeformat|cmdSubscriptEnabled|Subscript|frameborder|regex|strikethrough|cmdSuperscript|all|navigator|label|input|sel|userAgent|subscript|parse_webkit_version|cmdItalic|oldString|cmdBoldEnabled|DTD|xhtml1|number|trim|w3|org|lang|en|xml|UTF|msie|baseUrl|head|import|toggleHTMLSrc|Decrease|geckoKeyPress|createTextNode|preloading|attachEvent|normalButton|cmdFontNameEnabled|konqueror|opera|incPath|encHTML|for|ieVersion|updateRTE|h1|h2|Redo|to|defaultWidth|defaultHeight|iTopPos|writeRichText|writePlainText|cleanWordContent|Paste|cmdFormatBlockEnabled|dlgInsertTable|cmdFormatBlock|Copy|insert_table|dlgInsertLink|h3|Cut|h4|h5|h6|Spell|selectedIndex|cmdSpellcheck|180|stripHTML|lowerButton|iLeftPos|execCommand|Character|Special|nbsp|pre|Add|cmdFontName|dlgInsertSpecialChar|hr|search|Roman|Helvetica|sans|Verdana|cmdFontSizeEnabled|cmdFontSize|isNetscape|cmdIncreaseFontSize|findPosY|amp|onkeypress|cmdHiliteColorEnabled|Increase|getHtmlSrc|cmdDecreaseFontSize|isKonqueror|netscapeVersion|decrease_font|decreasefontsize|stopPropagation|iespell|3CP|availWidth|availHeight|left_just|com|justifyleft|centre|justifycenter|which|right_just|justifyright|setColor|backcolor|inserthorizontalrule|numbered_list|insertorderedlist|list|keyCode|php|insertunorderedlist|stringKey|InsertImage|forecolor_|textcolor|forecolor|DownLoad|hilitecolor_|bgcolor|hyperlink|image|special_chars|table_|spellcheck|pasteHTML|collapse|isNaN|inserthtml|block|visible|ActiveXObject|Loading|ieSpellExtension|RegExp|none|AppleWebKit|blank|checkbox|exec|CheckAllLinkedDocuments|onclick|View|Source|selection|Exception|DOCTYPE|PUBLIC|W3C|XHTML|Transitional|EN|TR|2146827859|confirm|transitional|dtd|xmlns|1999|xhtml|meta|equiv|charset|not|base|href|detected|toolbar2Enabled|background|FFF|contentDocument|addEventListener|keypress|target|Click|appendChild|200|parent|ctrlKey|protocol|domain|webtv|Ok|gecko|safari|konquerorVersion|enabling|switch|netscape|lastIndexOf|click|updateRTEs|innerText|go|ownerDocument|420|150|marginwidth|selectNodeContents|marginheight|scrolling|no|position|location|executing|onmouseout|onmouseup|richTextEditor|offsetHeight|br|readonly|border|1px|page|solid|000|formatblock_|Style|with|Paragraph|getXHTML|insert_link|address|Address|ADDR|onmouseover|absolute|Formatted|createlink|fontname_|mono|insert_special_char|palette|250|312|fontsize_|increase_font|preventDefault|increasefontsize|encoding|500|initRTE'.split('|'),0,{}))
Avatar billede oersted Novice
30. oktober 2006 - 11:09 #6
index.php:
<head>
    <script language="JavaScript" type="text/javascript" src="html2xhtml.js"></script>
    <script language="JavaScript" type="text/javascript" src="richtext.js"></script>
</head>
<body>

<?php
$debug=0;
include("settings.inc");
  echo "<form name='filvalg' action='";
  echo $_SERVER["PHP_SELF"];
  echo "' method='post'>";
    echo "Vælg en fil:<br>";
  echo "<select size = '1' name='file'>";
  for($n=0; $n<count($filer); $n++){
    if($filer[$n]==$file){
      echo "<option selected='selected'>$filer[$n]</option>";
    }
    else{
      echo "<option>$filer[$n]</option>";
    }
  }
  echo "</select>";
  echo "<input type='submit' name='submit' value='Åben'>";
  echo "</form>";
?>
<form name="RTEDemo" action="<?=$_SERVER["PHP_SELF"]?>" method="post" onsubmit="return submitForm();">
<script language="JavaScript" type="text/javascript">
<!--
function submitForm() {
  var oHdnField = document.getElementById('hdn' + 'rte1');
  oHdnField.value = frames['rte1'].document.body.innerHTML;
    return true;
}

initRTE("images/", "", "", false);
//-->
</script>
<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>

<?php
if(isset($file)){
  if($rte1){
    $was = $rte1;
    $fra = array("<br>","<BR>","SPAN","  ");
    $til = array("<br />","<br />","span"," ");
    $rte1 = str_replace($fra, $til, $rte1);
    $rte1 = "<?xml version='1.0' ?>\n<myNode>\n<title>Flash XML</title>\n<body id='body'>\n".$rte1."\n</body>\n</myNode>";
    $is = klartilgem($rte1);
    $fp = fopen("$file", "w");
    $isis = $is;
    fputs($fp,$is);
    fclose($fp);
  }
  $fp = fopen($file, "r");
  $content = fread($fp, filesize($file));
  fclose($fp);
  $fra2 = array("<?xml version='1.0' ?>\n<myNode>\n<title>Flash XML</title>\n<body id='body'>\n","\n</body>\n</myNode>","SPAN");
  $til2 = array("","","span");
  //$content = rteSafe(str_replace($fra2,$til2,$content));
  $content = str_replace($fra2,$til2,$content);
  $content = rtesafe($content);
  //echo $content;
  $content = klartilgem($content);
  //Usage: writeRichText(fieldname, html, width, height, buttons, readOnly)
  echo "<script language='JavaScript' type='text/javascript'>\n";
  echo "<!--\n";
  echo "writeRichText('rte1','$content', 520, 200, true, false);\n";
  echo "//-->\n";
?>
</script>
<?php
echo "<select size = '1' name='file'>";
for($n=0; $n<count($filer); $n++){
  if($filer[$n]==$file){
    echo "<option selected='selected'>$filer[$n]</option>";
  }
  else{
    echo "<option>$filer[$n]</option>";
  }
}
echo "</select>";
?>
<input type="submit" name="submit" value="Gem">
</p>
</form>

<?php
if($debug){
  echo "<a href='$file'>Se resultat</a>";
  echo "<br>før:<br>";
  echo "<textarea rows='10' cols='80'>";
  echo $was;
  echo "</textarea>";

  echo "<br>nu:<br>";
  echo "<textarea rows='10' cols='80'>";
  echo $isis;
  echo "</textarea>";
}
}
?>
</body>
</html>

<?php
function rteSafe($strText) {
    $tmpString = $strText;
//    $tmpString = str_replace(chr(145), chr(39), $tmpString);
//    $tmpString = str_replace(chr(146), chr(39), $tmpString);
//    $tmpString = str_replace("'", "&#39;", $tmpString);
//    $tmpString = str_replace(chr(147), chr(34), $tmpString);
//    $tmpString = str_replace(chr(148), chr(34), $tmpString);
    $tmpString = str_replace(chr(10), " ", $tmpString);
    $tmpString = str_replace(chr(13), " ", $tmpString);
    return $tmpString;
}

function klartilgem($ind){
  $is=explode('</span>',$ind);
  for($n=0; $n<count($is); $n++){
    $formatb[$n]="";
    $formats[$n]="";
    if(stristr($is[$n],'italic')){
      $formatb[$n]=$formatb[$n].'<i>';
      $formats[$n]='</i>'.$formats[$n];
    }
    if(stristr($is[$n],'bold')){
      $formatb[$n]=$formatb[$n].'<b>';
      $formats[$n]='</b>'.$formats[$n];
    }
    if(stristr($is[$n],'underline')){
      $formatb[$n]=$formatb[$n].'<u>';
      $formats[$n]='</u>'.$formats[$n];
    }
    if(stristr($is[$n],'color: ')){
      $num = explode("rgb(", $is[$n]);
      $num = explode(");", $num[1]);
      $fjern = 'color: rgb('.$num[0].');\">';
      $num = explode(",", $num[0]);
      $udnum = "#";
      for($nn=0; $nn<3; $nn++){
        $temp = dechex($num[$nn]);
        print_r($temp);
        if(strlen($temp)==1){
          $udnum = $udnum."0".$temp;
        }
        elseif(strlen($temp)==2){
          $udnum = $udnum.$temp;
        }
        else{
          $udnum = $udnum."00".$temp;
        }
      }
      $is[$n] = str_replace($fjern, "", $is[$n]);
      $formatb[$n]=$formatb[$n].'<font color="'.$udnum.'">';
      $formats[$n]='</font>'.$formats[$n];
    }
    if(stristr($is[$n],"color=#")){
      $is[$n] = ereg_replace("#+[[:alnum:]]+>","\"\\0\">",$is[$n]);
    }
    $is[$n] = str_replace('<span',$formatb[$n],$is[$n]);
    $is[$n] = $is[$n].$formats[$n];
  }
  $is = implode("",$is);
  $fra3 = array('style=\"',
                'font-weight:',
                'font-style:',
                'text-decoration:',
                'bold;\">',
                'italic;\">',
                'underline;\">',
                'bold;',
                'italic;',
                'underline;',
                'color: rgb',
                'FONT',
                'STRONG',
                '<EM>',
                '</EM>',
                '<I>',
                '</I>',
                '<U',
                '<A',
                '</A',
                '</U',
                '<B',
                '</B',
                '\"',
                'bbll',
                '</P>',
                '=_blank>',
                '<P>');
  $til3 = array('',
                '',
                '',
                '',
                '',
                '',
                '',
                '',
                '',
                '',
                '',
                'font',
                'b',
                '<i>',
                '</i>',
                '<i>',
                '</i>',
                '<u',
                '<a',
                '</a',
                '</u',
                '<b',
                '</b',
                '"',
                '"',
                '<br />',
                '="_blank">',
                '',);
  $is = str_replace($fra3, $til3 ,$is);
  return $is;
}
?>
Avatar billede olebole Juniormester
30. oktober 2006 - 11:13 #7
- og hvad er det, du har prøvet at få til at virke?

1) hvad sketet der ved det?
2) hvad skete der ikke?
3) hvad fik du af evt. fejl?
Avatar billede oersted Novice
19. marts 2007 - 21:52 #8
det virkede bare ikke ... der sker intet :-)
Avatar billede oersted Novice
12. august 2007 - 19:25 #9
lukker ...
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester