var rich=false,edID="",selTx="",rng,lcm,mxL=20,loopCnt=0,ccp=true;function wl(s){d.writeln(s)}
function initEd(){try{switch(brz){case "ie":if(brzV>5.5)rich=true;break;case "ff":if(brzV>=2)rich=true;ccp=false;break;
//		    case "op":if(brzV>=9)rich=true;break;
//		    case "saf":if(brzV>=4)rich=true;break;
//            default:if(document.designMode&&document.getElementById)rich=true;break;
}if(rich)wl('<iframe width="150" height="100" id="icp" src="palette.htm" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" style="visibility:hidden;position:absolute;z-index:3100;"></iframe>');}catch(e){rich=false;}}
function rTE(id,x,y,w,h){this.id=id;this.html="";this.x=x;this.y=y;this.w=w;this.h=h;this.bld=bld;}
function rteCommand(c,p){try{var o=gFR(edID);if(!o) return;if(o.contentWindow){o.contentWindow.focus();o.contentWindow.document.execCommand(c,false,p);}else{o.document.focus();o.document.execCommand(c,false,p);}loopCnt=0;return false;}catch(e){if(loopCnt<mxL){setTimeout("rteCommand('"+c+"','"+p+"');",100);loopCnt+=1;}else alert("Error executing command.");}}
function insertHTML(html){try{if(brz=="ff"){rng.pasteHTML(html);rng.collapse(false);rng.select();}else{rteCommand('inserthtml',html);}}catch(e){}}
function hDc(t){return t.replace(/\&amp\;/ig,'&').replace(/\&lt\;/ig,'<').replace(/\&gt\;/ig,'>').replace(/\&quot\;/ig,'"');}
function gtEd(){try{var hdn=gFR('fDescription'),h="";if(!hdn.value)hdn.value="";var tx=gFR(edID);if(rich){if(tx.contentWindow)h=tx.contentWindow.document.body.innerHTML;else h=tx.document.body.innerHTML;h=cleanWordContent(h);if(stripHTML(h.replace("&nbsp;"," "))==""&&h.toLowerCase().search("<hr")==-1&&h.toLowerCase().search("<img")==-1)h="";hdn.value=h}else hdn.value=tx.value;}catch(e){}}
function dlgColorPalette(c){try{setRange();var e=gFR(c);var l=e.offsetLeft,t=e.offsetTop;if(e.offsetParent)while(e=e.offsetParent){l+=e.offsetLeft;t+=e.offsetTop;}var o=gF('icp');o.left=l+"px";o.top=(t+23)+"px";if(c==lcm){if(o.visibility=="hidden")sF('icp');else hF('icp');}else sF('icp');lcm=c;}catch(ex){}}
function setColor(c){try{if(brz=="ie"){if(lcm=="hilitecolor")lcm="backcolor";rng.select();}rteCommand(lcm,c);hF('icp');}catch(e){}}
function trim(s){try{s=s.replace(/^\s+/g,"");return s.replace(/\s+$/g,"");}catch(e){}}
function cleanWordContent(wordContent){wordContent=String(wordContent).replace(/<\\?\?xml[^>]*>/g,"");wordContent=String(wordContent).replace(/<\/?o:p[^>]*>/g,"");wordContent=String(wordContent).replace(/<\/?v:[^>]*>/g,"");wordContent=String(wordContent).replace(/<\/?o:[^>]*>/g,"");return wordContent;}
function geckoKeyPress(evt){try{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(cmd);evt.preventDefault();evt.stopPropagation();}}}catch(e){}}
function evt_ie_keypress(event){try{ieKeyPress(event);}catch(e){}} 
function ieKeyPress(evt){try{var key=(evt.which||evt.charCode||evt.keyCode);var stringKey=String.fromCharCode(key).toLowerCase();}catch(e){}}
function selectFont(n){try{var i=gFR(n).selectedIndex;if(i>=0){var s=gFR(n).options[i].value;rteCommand(n,s);}}catch(e){}}
function setRange(){try{var o=gFR(edID);if(o.contentWindow){var od=o.contentWindow.document;o.contentWindow.focus();}else{var od=o.document;od.focus();}if(d.all){sel=od.selection;rng=sel.createRange();selTx=rng.text.toString();} else if(d.getSelection){rng=od.createRange();selTx=od.getSelection();}}catch(e){}}
function bld(){edID=this.id;var id=edID;if(rich){wl("<div id='"+id+"tbr' class='tbr' style='position:absolute;left:"+this.x+"px;top:"+this.y+"px;width:"+(this.w+(brz=="ie"?2:0))+"px;height:25px;z-index:1000;'><table class='tb' cellspacing=0 cellpadding=0 border=0 valign=middle width="+this.w+"><tr height=2><td colspan=10><img src='g/s.gif' alt=''></td></tr><tr height=22><td width=4>&nbsp;</td><td width=76><select id='formatblock' class='sel' style='width:76px' onchange='selectFont(\"formatblock\");'><option value='<p>'>Paragraph</option><option value='<h1>'>Heading 1</option><option value='<h2>'>Heading 2</option><option value='<h3>'>Heading 3</option><option value='<h4>'>Heading 4</option><option value='<h5>'>Heading 5</option><option value='<h6>'>Heading 6</option><option value='<address>'>Address</option><option value='<pre>'>Formatted</option></select></td><td width=4>&nbsp;</td><td width=100><select id='fontname' class='sel' style='width:100px' onchange=\"selectFont('fontname');\"><option value='Arial'>Arial</option><option value='Arial Black'>Arial Black</option><option value='Arial Narrow'>Arial Narrow</option><option value='Comic Sans MS'>Comic Sans MS</option><option value='Courier New'>Courier New</option><option value='System'>System</option><option value='Times New Roman'>Times New Roman</option><option value='Verdana'>Verdana</option><option value='WingDings'>WingDings</option></select></td><td width=4>&nbsp;</td><td width=40><select id='fontsize' class='sel' style='width:40px' onchange=\"selectFont('fontsize');\"><option value='1'>8</option><option value='2'>9</option><option value='3'>10</option><option value='4'>11</option><option value='5'>12</option><option value='6'>14</option><option value='7'>18</option></select></td><td width=4>&nbsp;</td><td><img id='forecolor' src='g/edB15.gif' alt='Bold' class='edB' onmouseover=\"bS('forecolor','g/edBH15.gif')\" onmouseout=\"bS('forecolor','g/edB15.gif')\" onmousedown=\"dlgColorPalette('forecolor');return false;\"></td><td><img id='hilitecolor' src='g/edB16.gif' alt='Bold' class='edB' onmouseover=\"bS('hilitecolor','g/edBH16.gif')\" onmouseout=\"bS('hilitecolor','g/edB16.gif')\" onmousedown=\"dlgColorPalette('hilitecolor');return false;\"></td><td width=7 align=center><img src='g/tbd.gif' alt=''></td><td><img id='"+id+"1' src='g/edB1.gif' alt='Bold' class='edB' onmouseover=\"bS('"+id+"1','g/edBH1.gif')\" onmouseout=\"bS('"+id+"1','g/edB1.gif')\" onmousedown=\"rteCommand('bold');\"></td><td><img id='"+id+"2' src='g/edB2.gif' alt='Underline' class='edB' onmouseover=\"bS('"+id+"2','g/edBH2.gif')\" onmouseout=\"bS('"+id+"2','g/edB2.gif')\" onmousedown=\"rteCommand('underline');\"></td><td><img id='"+id+"3' src='g/edB3.gif' alt='Italic' class='edB' onmouseover=\"bS('"+id+"3','g/edBH3.gif')\" onmouseout=\"bS('"+id+"3','g/edB3.gif')\" onmousedown=\"rteCommand('italic');\"></td><td width=7 align=center><img src='g/tbd.gif' alt=''></td><td><img id='"+id+"4' src='g/edB4.gif' alt='Justify Left' class='edB' onmouseover=\"bS('"+id+"4','g/edBH4.gif')\" onmouseout=\"bS('"+id+"4','g/edB4.gif')\" onmousedown=\"rteCommand('JustifyLeft',null);\"></td><td><img id='"+id+"5' src='g/edB5.gif' alt='Justify Center' class='edB' onmouseover=\"bS('"+id+"5','g/edBH5.gif')\" onmouseout=\"bS('"+id+"5','g/edB5.gif')\" onmousedown=\"rteCommand('JustifyCenter','');\"></td><td><img id='"+id+"6' src='g/edB6.gif' alt='Justify Right' class='edB' onmouseover=\"bS('"+id+"6','g/edBH6.gif')\" onmouseout=\"bS('"+id+"6','g/edB6.gif')\" onmousedown=\"rteCommand('JustifyRight',null);\"></td><td><img id='"+id+"7' src='g/edB7.gif' alt='Proportional' class='edB' onmouseover=\"bS('"+id+"7','g/edBH7.gif')\" onmouseout=\"bS('"+id+"7','g/edB7.gif')\" onmousedown=\"rteCommand('JustifyFull',null);\"></td><td width=7 align=center><img src='g/tbd.gif' alt=''></td><td><img id='"+id+"8' src='g/edB8.gif' alt='Bullet' class='edB' onmouseover=\"bS('"+id+"8','g/edBH8.gif')\" onmouseout=\"bS('"+id+"8','g/edB8.gif')\" onmousedown=\"rteCommand('insertunorderedlist');\"></td><td><img id='"+id+"9' src='g/edB9.gif' alt='Numbered' class='edB' onmouseover=\"bS('"+id+"9','g/edBH9.gif')\" onmouseout=\"bS('"+id+"9','g/edB9.gif')\" onmousedown=\"rteCommand('insertorderedlist');\"></td><td width=7 align=center><img src='g/tbd.gif' alt=''></td><td><img id='"+id+"10' src='g/edB10.gif' alt='Decrease Indent' class='edB' onmouseover=\"bS('"+id+"10','g/edBH10.gif')\" onmouseout=\"bS('"+id+"10','g/edB10.gif')\" onmousedown=\"rteCommand('outdent');\"></td><td><img id='"+id+"11' src='g/edB11.gif' alt='Increase Indent' class='edB' onmouseover=\"bS('"+id+"11','g/edBH11.gif')\" onmouseout=\"bS('"+id+"11','g/edB11.gif')\" onmousedown=\"rteCommand('indent');\"></td><td width=7 align=center><img src='g/tbd.gif' alt=''></td>");
if(ccp){wl("<td><img id='"+id+"12' src='g/edB12.gif' alt='Cut' class='edB' onmouseover=\"bS('"+id+"12','g/edBH12.gif')\" onmouseout=\"bS('"+id+"12','g/edB12.gif')\" onmousedown=\"rteCommand('cut');\"></td><td><img id='"+id+"13' src='g/edB13.gif' alt='Copy' class='edB' onmouseover=\"bS('"+id+"13','g/edBH13.gif')\" onmouseout=\"bS('"+id+"13','g/edB13.gif')\" onmousedown=\"rteCommand('copy');\"></td><td><img id='"+id+"14' src='g/edB14.gif' alt='Paste' class='edB' onmouseover=\"bS('"+id+"14','g/edBH14.gif')\" onmouseout=\"bS('"+id+"14','g/edB14.gif')\" onmousedown=\"rteCommand('paste');\"></td>");
}else{wl("<td><img id='"+id+"12' src='g/edB12.gif' alt='Cut' class='edB'></td><td><img id='"+id+"13' src='g/edB13.gif' alt='Copy' class='edB'></td><td><img id='"+id+"14' src='g/edB14.gif' alt='Paste' class='edB'></td>");sA(gF(id+"12"),50);sA(gF(id+"13"),50);sA(gF(id+"14"),50);}
wl("</tr></table></div><iframe id='"+id+"' name='"+id+"' src='blank.htm' frameborder='0' style='position:absolute;left:"+this.x+"px;top:"+(this.y+24)+"px;width:"+this.w+"px;height:"+(this.h-24)+"px;background:transparent;z-index:3000;border:solid 1px buttonshadow;'></iframe>");eDM(hDc(this.html));
}else{wl("<textarea id='"+id+"' style='position:absolute;left:"+this.x+"px;top:"+this.y+"px;width:"+(this.w+2)+"px;height:"+(this.h+2)+"px;'>"+this.html+"</textarea>")}}
function eDM(html){try{var h="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" >\n<html id=\""+edID+"\">\n<head>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n</head>\n<body style='font:8pt Arial;color:#333542;margin:0px;text-align:left;background-color:white;'>\n"+html+"\n</body>\n</html>";var o=gFR(edID);
try{switch(brz){case "ff":o.contentDocument.designMode="on";try{var od=o.contentWindow.document;od.open("text/html","replace");od.write(h);od.close();od.addEventListener("keypress",geckoKeyPress,true);}catch(e){}loopCnt=0;break;
case "ie":try{var od=o.contentWindow.document;od.open("text/html","replace");od.write(h);od.close();od.attachEvent("onkeypress",evt_ie_keypress);}catch(e){}od.designMode="on";loopCnt=0;break;
}}catch(e){if(loopCnt<mxL){setTimeout("eDM('"+html+"');",100);loopCnt+=1;}else alert("Error enabling designMode.");}}catch(e){}}




