History

Show Presentation
 
 95
Home • .Templates • Toolbars • 95
 
<?xml version="1.0" encoding="<X-FC-ITEM DATA[Charset]>"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--Toolbars/95 H=<X-FC-REQUEST-TIME HEADER> LS=<X-FC-REQUEST-TIME LOGIN.START> L=<X-FC-REQUEST-TIME LOGIN> OS=<X-FC-REQUEST-TIME OPEN.START> O=<X-FC-REQUEST-TIME OPEN> T=<X-FC-REQUEST-TIME>--><X-FC-WHITESPACE STRIP>
<!--#rem
Style taken from Normal Text in preferences, falling back to Form Fields in WSP form.-->
<!--#if expr="<X-FC-FIELD PREFS.2001 DEFAULT=LANG.127.2001.11 FONTSIZE>"-->
        <!--#set var="DEFAULTSIZE" value="<X-FC-FIELD PREFS.2001 DEFAULT=LANG.127.2001.11 FONTSIZE>"-->
<!--#else-->
        <!--#set var="DEFAULTSIZE" value="<X-FC-FIELD PREFS.5696 DEFAULT=LANG.49.5696.11 FONTSIZE>"-->
<!--#endif-->
<!--#if expr="<X-FC-FIELD PREFS.2002 DEFAULT=LANG.127.2002.11EXISTS>"-->
        <!--#set var="DEFAULTCOLOUR" value="<X-FC-FIELD PREFS.2002 DEFAULT=LANG.127.2002.11 RGB>"-->
<!--#else-->
        <!--#set var="DEFAULTCOLOUR" value="<X-FC-FIELD PREFS.5697 DEFAULT=LANG.49.5697.11 RGB>"-->
<!--#endif-->
<!--#if expr="<X-FC-FIELD PREFS.2000 DEFAULT=LANG.127.2000.9 LENGTH>"-->
        <!--#set var="FONT" value="<X-FC-FIELD PREFS.2000 DEFAULT=LANG.127.2000.9 STRING>"-->
        <!--#set var="POSTFONT" value="<X-FC-FIELD PREFS.5695 DEFAULT=LANG.5695.9 STRING>"-->
        <!--#set var="PREFONT" expr="@split($POSTFONT,$FONT)"-->
        <!--#set var="FONTLEN" expr="@length($PREFONT)"-->
        <!--#if expr="$FONTLEN"-->
                <!--#set var="FONTLEN" expr="$FONTLEN - 1"-->
                <!--#if expr="@substr($PREFONT,$FONTLEN,1) == ','"-->
                        <!--#set var="PREFONT" expr="@substr($PREFONT,0,$FONTLEN)"-->
                <!--#endif-->
                <!--#set var="FONT" value="${FONT},${PREFONT}"-->
        <!--#endif-->
        <!--#set var="DEFAULTFONT" value="${FONT}${POSTFONT}"-->
<!--#else-->
        <!--#set var="DEFAULTFONT" value="<X-FC-FIELD PREFS.5695 DEFAULT=LANG.5675.9 STRING>"-->
<!--#endif-->
<!--#set var="STYLEINCTOOLBAR" value="1"-->
<X-FC-WHITESPACE RETAIN>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<X-FC-ITEM DATA[Charset]>"/>
<title></title>
<!--#include virtual="/.Templates/GlobalStyles.inc"-->
<script type="text/javascript" src="/.Templates/JavaScript/URLEscape.pjs"></script>
<script type="text/javascript">
<!--
<X-FC-WHITESPACE STRIP>
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
<!--#rem
dTBMI           doToolbarMouseIn()
Because IE6 has impotent :hover
-->
function dTBMI(){
var T=event.srcElement;
if(T.className=="tbplain"){
        T.className="tbhilite";
}else if(T.parentNode&&T.parentNode.className=="tbplain"){
        T.parentNode.className="tbhilite";
}
return true;
}
<!--#rem
dTBMO           doToolbarMouseOut()
Because IE6 has impotent :hover
-->
function dTBMO(){
var T=event.srcElement;
if(T.className=="tbhilite"){
        T.className="tbplain";
}else if(T.parentNode&&T.parentNode.className=="tbhilite"){
        T.parentNode.className="tbplain";
}
return true;
}
<!--#endif-->
<!--#rem
NRGB(s) NormalizeRGB(style)
converts a stylesheet rgb(r,g,b) value to an HTML standard #RRGGBB version
-->
function NRGB(s){
var cs="";
if(s==null){
        return "#000000";
}
s=""+s;
if(s.substr(0,4)=="rgb("){
        cs="#";
        s=s.substr(4,s.length);
        var cv=parseInt(s);
        cs+=(cv<16?"0":"")+cv.toString(16);
        s=s.substr(s.indexOf(",")+1,s.length);
        cv=parseInt(s);
        cs+=(cv<16?"0":"")+cv.toString(16);
        s=s.substr(s.indexOf(",")+1,s.length);
        cv=parseInt(s);
        cs+=(cv<16?"0":"")+cv.toString(16);
        cs=cs.toUpperCase();
}else if(s.charAt(0)=="#"){
        cs=s.toUpperCase();
}else{
        cs=parseInt(s).toString(16);
        while(cs.length<6){
                cs="0"+cs;
        }
        cs="#"+cs.toUpperCase();
}
return cs;
}
<!--#rem
dEC(c,v)        doExecuteCommand(command,value)
Executes one of the build in IE / Gecko editor commands
-->
function dEC(c,v){
parent.frames["EDITBODY"].document.execCommand(c,false,v);
dUASE();
return false;
}
<!--#rem
ISH(h)          InsertHTML(HTML)
Inserts some HTML at/over the current selection
-->
function ISH(h){
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
var D=parent.frames["EDITBODY"];
D.focus();
D=D.document;
var cp=D.selection.createRange(0);
cp.pasteHTML(h);
<!--#else-->
dEC("insertHTML",h);
<!--#endif-->
}
<!--#rem
gEE(n,n2)       getEnclosingElement(name,name2)
-->
function gEE(n,n2){
var EE=null;
var BE=parent.frames["EDITBODY"];
n=n.toLowerCase();
if(n2){
        n2=n2.toLowerCase();
}
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
var S=BE.document.selection;
if(S.type.toLowerCase()=="control"){
        N=S.createRange(0).item(0);
}else{
        N=S.createRange(0).parentElement();
}
<!--#else-->
<!--#rem
FF doesn't modify the selection sensibly when you apply a style (the selection winds up starting just before the new style run, so we have to manually advance the beginning if we then want to
edit it/toggle it etc...
-->
var S=BE.getSelection().getRangeAt(0);
if(S.startContainer.nodeType==3&&S.startOffset==S.startContainer.nodeValue.length&&S.startContainer.nextSibling){
        try{
                S.setStart(S.startContainer.nextSibling,0);
        }catch(e){
        }
}
N=S.commonAncestorContainer;
<!--#endif-->
while(EE==null&&N!=null){
        if(N.nodeType==1){
                var t=N.tagName.toLowerCase();
                if(t==n||(n2&&t==n2)){
                        EE=N;
                }
        }
        if(EE==null&&N.parentNode!=null&&N.parentNode!=BE.document.body){
                N=N.parentNode;
        }else{
                N=null;
        }
}
return EE;
}
<!--#if expr="<X-FC-BROWSER NAME.MSIE> == 0"-->
<!--#rem
gSD(S)          getSelectionDetails(Selection)
Retrieves info about the current selection.  Returns a SelectionDetails array consisting of:
SD[0]   Start node
SD[1]   Offset into start node
SD[2]   End Node
SD[3]   Offset into end node
SD[4]   Font name, null if no font at start
SD[5]   Font size (in points), null if no font size at start
SD[6]   Face Bits actice in start container
SD[7]   Fore Colour, null if no fore colour at start
SD[8]   Back Colour, null if no back colour at start
SD[9]   Text Justify (-1 == right, 0 == left, 1== center)

Face bits:
Bold            0x0001
Italic          0x0002
Underline       0x0004
Strikethrough   0x0010
Superscipt      0x0020
Subscript       0x0040
Link            0x0200
Quoted          0x0400
LiteralHTML     0x0800

-->
function gSD(S){
var SD=[];
var R=S.getRangeAt(0);
SD[0]=R.startContainer;
SD[1]=R.startOffset;
SD[2]=R.endContainer;
SD[3]=R.endOffset;
SD[4]=null;
SD[5]=null;
SD[6]=0;
SD[7]=null;
SD[8]=null;
SD[9]=0;
var CN=R.startContainer;
if(R.startOffset==0){
        while(CN.firstChild!=null&&CN.firstChild.nodeType==1){
                CN=CN.firstChild;
        }
}
while(CN!=null){
        if(CN.nodeType==1){
                if(CN.tagName=="TD"||CN.tagName=="DIV"||CN.tagName=="P"||CN.tagName=="BODY"||CN.tagName=="LI"){
                        if(CN.align&&CN.align=="right"){
                                SD[9]=-1;
                        }else if(CN.align&&CN.align=="center"){
                                SD[9]=1;
                        }
                        CN=null;
                }else if(CN.tagName=="B"||CN.tagName=="STRONG"){
                        SD[6]|=0x0001;
                }else if(CN.tagName=="I"||CN.tagName=="EM"){
                        SD[6]|=0x0002;
                }else if(CN.tagName=="U"){
                        SD[6]|=0x0004;
                }else if(CN.tagName=="STRIKE"){
                        SD[6]|=0x0008;
                }else if(CN.tagName=="SUPER"){
                        SD[6]|=0x0010;
                }else if(CN.tagName=="SUB"){
                        SD[6]|=0x0020;
                }else if(CN.tagName=="A"){
                        SD[6]|=0x0200;
                }else if(CN.tagName=="FONT"){
                        if(SD[4]==null){
                                SD[4]=gSAV(CN,"font-family");
                        }
                        if(SD[5]==null){
                                SD[5]=gSAV(CN,"font-size");
                                if(SD[5]){
                                        SD[5]=parseInt(SD[5]);
                                }
                        }
                        if(SD[7]==null)SD[7]=gSAV(CN,"color");
                        if(SD[8]==null)SD[8]=gSAV(CN,"background-color");
                }else if(CN.tagName=="SPAN"){
                        if(gSAV(CN,"font-weight")=="bold"){
                                SD[6]|=0x0001;
                        }
                        if(gSAV(CN,"font-style")=="italic"){
                                SD[6]|=0x0002;
                        }
                        if(gSAV(CN,"text-decoration")=="underline"){
                                SD[6]|=0x0004;
                        }
                        if(gSAV(CN,"text-decoration")=="line-through"){
                                SD[6]|=0x0010;
                        }
                        if(gSAV(CN,"vertical-align")=="super"){
                                SD[6]|=0x0020;
                        }
                        if(gSAV(CN,"vertical-align")=="sub"){
                                SD[6]|=0x0040;
                        }
                        if(SD[4]==null){
                                SD[4]=gSAV(CN,"font-family");
                        }
                        if(SD[5]==null){
                                SD[5]=gSAV(CN,"font-size");
                                if(SD[5]){
                                        SD[5]=parseInt(SD[5]);
                                }
                        }
                        if(SD[7]==null){
                                SD[7]=gSAV(CN,"color");
                        }
                        if(SD[8]==null){
                                SD[8]=gSAV(CN,"background-color");
                        }
                        var bgc=gSAV(CN,"background-color");
                        if(bgc){
                                if(bgc.toLowerCase()=="#d0d0d0"){
                                        SD[6]|=0x0400;
                                }else if(bgc.toLowerCase()=="#00d0d0"){
                                        SD[6]|=0x0800;
                                }
                        }
                }
        }
        if(CN){
                CN=CN.parentNode;
        }
}
return SD;
}
<!--#endif-->
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
<!--#rem
fSAV(E,a,s,v)   findStyleAttributeValue(element,attribute,set,value)
Because IE is written by twits
-->
function fSAV(E,a,s,v){
var T=E.style.cssText;
var ci=0;
var nsc;
var nc;
var f=0;
do{
        nsc=T.indexOf(";",ci);
        if(nsc==-1){
                nsc=T.length;
        }
        nc=T.indexOf(":",ci);
        if(nc!=-1&&T.substring(ci,nc).toUpperCase()==a.toUpperCase()){
                if(s){
                        if(f==0&&v!=null&&v!=""){
                                T=T.substr(0,ci)+a+":"+v+";"+T.substring(nsc+1,T.length);
                                ci=T.indexOf(";",ci)+1;
                        }else{
                                T=T.substr(0,ci)+T.substring(nsc+1,T.length);
                        }
                }else{
                        nc=nc+1;
                        while(nc<nsc&&T.charAt(nc)==" "){
                                ++nc;
                        }
                        while(nsc>nc&&T.charAt(nsc-1)==" "){
                                --nsc;
                        }
                        return T.substring(nc,nsc);
                }
                f=1;
        }else{
                ci=nsc+1;
        }
        while(ci<T.length&&T.charAt(ci)==" "){
                ++ci;
        }
}while(ci<T.length);
if(s){
        if(f==0&&v!=null&&v!=""){
                T=a+":"+v+";"+T;
        }
        E.style.cssText=T;
}
return null;
}
<!--#endif-->
<!--#rem
gSAV(E,a)       getStyleAttributeValue(element,attribute)
-->
function gSAV(E,a){
var v=null;
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
v=fSAV(E,a,0,null);
<!--#else-->
v=E.style.getPropertyValue(a);
if(v!=null&&v.length==0){
        v=null;
}
<!--#endif-->
return v;
}
<!--#rem
sSAV(E,a,v)     setStyleAttributeValue(element,attribute,value)
-->
function sSAV(E,a,v){
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
fSAV(E,a,1,v);
<!--#else-->
E.style.setProperty(a,v,"");
<!--#endif-->
}
<!--#rem
rSAV(E,a)       removeStyleAttributeValue(element,attribute)
-->
function rSAV(E,a){
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
fSAV(E,a,1,null);
<!--#else-->
E.style.removeProperty(a);
<!--#endif-->
}
<!--#rem
dIS(c)          doInsertion(command)
Inserts an object at/over the current selection
-->
function dIS(c){
if(c==1){
        dFI(-1);
}else if(c==2){
        ISH("<hr width=\"100%\" color=\"#999999\" size=\"2\" noshade=\"noshade\" title=\"<X-FC-FIELD LANG.614.13 STRING>\" style=\"page-break-after:always;\"\/>");
}else if(c==3){
        ISH("<hr width=\"<!--#echo expr="<X-FC-FIELD FCft.307.1001.11 DEFAULT=900 NUMBER> / 10"-->%\" color=\"<X-FC-FIELD FCft.307.1002.11 DEFAULT="#000000" RGB>\" size=\"<X-FC-FIELD FCft.307.1000.11 DEFAULT=1 NUMBER>\" noshade=\"noshade\" style=\"margin-top:<X-FC-FIELD FCft.307.1004.11 DEFAULT=0 NUMBER>px;visibility:visible;\"\/>");
}else if(c==4){
        dIL();
}else if (c==5){
        dIK();
}else if(c==6){
        dIG();
}else if(c==7){
        ISH("<!--#echo expr="@escape(`<X-FC-FIELD PREFS.1109 DEFAULT=LANG.127.1109.9 STRING>`)"-->");
}else{
        alert("<X-FC-FIELD LANG.7544.5 STRING>");
}
return false;
}
var IAS=["right","left","center","top","bottom","middle"];
<!--#rem
dSI(i)          doSetImage(index)
-->
function dSI(i){
if(DW!=null){
        var A=parent.frames["EDITBODY"].document.images;
        if(i<0||i>=A.length){
                var E=DW.document.forms["MainForm"];
                if(E["I:U"].value.length){
                        var w=parseInt(E["I:SW"].value);
                        var h=parseInt(E["I:SH"].value);
                        var p=parseInt(E["I:P"].value);
                        var a=parseInt(E["I:A"].options[E["I:A"].selectedIndex].value);
                        var i="<img src=\""+E["I:U"].value+"\" alt=\""+E["I:C"].value+"\" title=\""+E["I:C"].value+"\"";
                        if(!isNaN(h)&&!isNaN(w)&&h>0&&w>0){
                                i+=" width=\""+w+"\" height=\""+h+"\"";
                        }
                        if(!isNaN(p)&&p>0){
                                i+=" hspace=\""+p+"\" vspace=\""+p+"\"";
                        }
                        if(!isNaN(a)&&a>=0&&a<=5){
                                i+=" align=\""+IAS[a]+"\"";
                        }
                        i+=" border=\"0\"/>";
                        ISH(i);
                }
        }else{
                var E=DW.document.forms["MainForm"];
                if(E["I:U"].value.length){
                        var I=A[i];
                        var w=parseInt(E["I:SW"].value);
                        var h=parseInt(E["I:SH"].value);
                        var p=parseInt(E["I:P"].value);
                        var a=parseInt(E["I:A"].options[E["I:A"].selectedIndex].value);
                        I.src=E["I:U"].value;
                        I.alt=E["I:C"].value;
                        I.title=E["I:C"].value;
                        if(!isNaN(h)&&!isNaN(w)&&h>0&&w>0){
                                I.width=w;
                                I.height=h;
                        }else{
                                I.removeAttribute("width");
                                I.removeAttribute("height");
                        }
                        if(isNaN(p)||p<0){
                                p=0;
                        }
                        I.hspace=p;
                        I.vspace=p;
                        if(isNaN(a)||a<0||a>5){
                                a=0;
                        }
                        I.align=IAS[a];
                }
        }
        dCD();
}
}
<!--#rem
dIG()           doInsertTable()
-->
var CC=null,CR=null,CT=null;
function dIG(){
if(DW){
        dCD();
}
CC=CR=CT=null;
DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=316&Close=-1&Index=-1","FCEDITWIN","width=400,height=250,resizable");
}
<!--#rem
dSG(i)          doSetTable(index)
-->
function dSG(i){
if(i==-1){
        var E=DW.document.forms["MainForm"];
        var NR=parseInt(E["FieldID:1000=LONG"].value);
        var NC=parseInt(E["FieldID:1001=LONG"].value);
        var a=parseInt(E["T:A"].options[E["T:A"].selectedIndex].value);
        var r=0;
        var t="<table";
        switch(a){
        case -1:t+=" align=\"right\"";break;
        case 0:t+=" align=\"left\"";break;
        case 1:t+=" align=\"center\"";break;
        }
        if(parseInt(E["FieldID:1004=LONG"].value)){
                t+=" width=\""+E["FieldID:1004=LONG"].value+(parseInt(E["T:WT"].options[E["T:WT"].selectedIndex].value)?"%":"")+"\"";
        }
        t+=" cellpadding=\"3\" cellspacing=\"0\" border=\"2\" frame=\"box\" rules=\"all\" summary=\"\" style=\"margin:5px;border-style:solid;border-width:2px;border-color:#000000;border-collapse:collapse;";
        if(E["T:F"].checked){
                if(a==0){
                        t+="float:left;";
                }else if(a==-1){
                        t+="float:right;";
                }
        }
        t+="vertical-align:text-top;\">";
        if(E["T:H"].checked){
                t+="<thead><tr>";
                for(var c=0;c<NC;c++){
                        t+="<td valign=\"top\"><font style=\"font-family:<!--#echo var="DEFAULTFONT"-->;font-size:<!--#echo var="DEFAULTSIZE"-->pt;color:<!--#echo var="DEFAULTCOLOUR"-->;\">&nbsp;<\/font><\/td>";
                }
                t+="<\/tr><\/thead>";
                ++r;
        }
        t+="<tbody>";
        for(;r<NR;r++){
                t+="<tr>";
                for(var c=0;c<NC;c++){
                        t+="<td valign=\"top\"><font style=\"font-family:<!--#echo var="DEFAULTFONT"-->;font-size:<!--#echo var="DEFAULTSIZE"-->pt;color:<!--#echo var="DEFAULTCOLOUR"-->;\">&nbsp;<\/font><\/td>";
                }
                t+="<\/tr>";    
        }
        t+="<\/tbody><\/table>";
        ISH(t);
}else if(CT!=null){
        var E=DW.document.forms["MainForm"];
        var a=parseInt(E["T:A"].options[E["T:A"].selectedIndex].value);
        switch(a){
                case -1:CT.align="right";break;
                case 0:CT.align="left";break;
                case 1:CT.align="center";break;
        }
        if(parseInt(E["FieldID:1004=LONG"].value)){
                CT.width=(E["FieldID:1004=LONG"].value+(parseInt(E["T:WT"].options[E["T:WT"].selectedIndex].value)?"%":""));
        }
        if(E["T:F"].checked){
                if(a==0){
                        CT.style.<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->styleFloat<!--#else-->cssFloat<!--#endif-->="left";
                }else if(a==-1){
                        CT.style.<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->styleFloat<!--#else-->cssFloat<!--#endif-->="right";
                }else{
                        CT.style.<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->styleFloat<!--#else-->cssFloat<!--#endif-->="none";
                }
        }else{
                CT.style.<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->styleFloat<!--#else-->cssFloat<!--#endif-->="none";  
        }
        CT.style.margin=parseInt(E["FieldID:1006=LONG"].value)+"px";
        if(E["T:HR"].checked&&E["T:VR"].checked){
                CT.rules="all";
        }else if(E["T:HR"].checked){
                CT.rules="rows";
        }else if(E["T:VR"].checked){
                CT.rules="cols";
        }else{
                CT.rules="none";
        }
        if(E["T:ER"].checked){
                CT.frame="box";
                CT.style.borderStyle="solid";
        }else{
                CT.frame="void";
                CT.style.borderStyle="none";
        }
        if(parseInt(E["FieldID:1014=LONG"].value)){
                CT.border=parseInt(E["FieldID:1014=LONG"].value);
                CT.style.borderWidth=parseInt(E["FieldID:1014=LONG"].value)+"px";
        }       
        CT.style.borderColor=E["FieldID:1010=RGB"].value;
        CT.summary=E["T:S"].value;
        if(E["T:H"].checked&&CT.tHead==null){
                CT.createTHead();
                CT.tHead.insertRow(0);
                for(var c=0;c<CT.tBodies[0].rows[0].cells.length;c++){
                        var OC=CT.tBodies[0].rows[0].cells[c];
                        var NC=CT.tHead.rows[0].insertCell(c);
                        if(OC.align.length)NC.align=OC.align;
                        if(OC.vAlign.length)NC.vAlign=OC.vAlign;
                        if(OC.bgColor.length)NC.bgColor=OC.bgColor;
                        if(OC.width.length)NC.width=OC.width;
                        if(OC.style.border.length)NC.style.border=OC.style.border;
                        if(OC.style.margin.length)NC.style.margin=OC.style.margin;
                        NC.colSpan=OC.colSpan;
                        NC.rowSpan=OC.rowSpan;
                        NC.innerHTML=OC.innerHTML;
                }
                CT.tBodies[0].deleteRow(0);
        }else if((!E["T:H"].checked)&&CT.tHead!=null){
                CT.tBodies[0].insertRow(0);
                for(var c=0;c<CT.tHead.rows[0].cells.length;c++){
                        var OC=CT.tHead.rows[0].cells[c];
                        var NC=CT.tBodies[0].rows[0].insertCell(c);
                        if(OC.align.length)NC.align=OC.align;
                        if(OC.vAlign.length)NC.vAlign=OC.vAlign;
                        if(OC.bgColor.length)NC.bgColor=OC.bgColor;
                        if(OC.width.length)NC.width=OC.width;
                        if(OC.style.border.length)NC.style.border=OC.style.border;
                        if(OC.style.margin.length)NC.style.margin=OC.style.margin;
                        NC.colSpan=OC.colSpan;
                        NC.rowSpan=OC.rowSpan;
                        NC.innerHTML=OC.innerHTML;
                }
                CT.tHead.deleteRow(0);
                CT.deleteTHead();
        }
}else{
        alert("<X-FC-FIELD LANG.7544.5 STRING>");
}
CC=CR=CT=null;
dCD();
}
<!--#rem
dSGC()  doSetTableCell()
-->
function dSGC(){
if(CC!=null&&CR!=null&&CT!=null){
        var E=DW.document.forms["MainForm"];
        var a=parseInt(E["TC:AH"].options[E["TC:AH"].selectedIndex].value);
        switch(a){
                case -1:CC.align="right";break;
                case 0:CC.align="left";break;
                case 1:CC.align="center";break;
        }
        a=parseInt(E["TC:AV"].options[E["TC:AV"].selectedIndex].value);
        switch(a){
                case 0:CC.vAlign="top";break;
                case 1:CC.vAlign="bottom";break;
                case 2:CC.vAlign="middle";break;
        }
        CC.style.margin=parseInt(E["FieldID:1002=LONG"].value)+"px";
        if(parseInt(E["FieldID:1003=LONG"].value)){
                CC.width=(E["FieldID:1003=LONG"].value+(parseInt(E["TC:WT"].options[E["TC:WT"].selectedIndex].value)?"%":""));
        }else{
                CC.width=null;
        }
        if(E["TC:PB"].checked){
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
                sSAV(CR,"page-break-before","always");
<!--#else-->
                CR.style.pageBreakBefore="always";
<!--#endif-->
        }else{
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
                rSAV(CR,"page-break-before");
<!--#else-->
                CR.style.pageBreakBefore=null;
<!--#endif-->
        }
        rSAV(CC,"border");
        rSAV(CC,"border-left");
        rSAV(CC,"border-right");
        rSAV(CC,"border-top");
        rSAV(CC,"border-bottom");
        rSAV(CC,"border-style");
        rSAV(CC,"border-left-style");
        rSAV(CC,"border-right-style");
        rSAV(CC,"border-top-style");
        rSAV(CC,"border-bottom-style");
        rSAV(CC,"border-width");
        rSAV(CC,"border-left-width");
        rSAV(CC,"border-right-width");
        rSAV(CC,"border-top-width");
        rSAV(CC,"border-bottom-width");
        if(E["TC:BH"].checked&&E["TC:BV"].checked){
                if(CT.rules.toLowerCase()!="all"){
                        CC.style.borderStyle="solid";
                }
        }else if(E["TC:BH"].checked){
                if(CT.rules.toLowerCase()!="rows"){
                        CC.style.borderStyle="solid none";
                }
        }else if(E["TC:BV"].checked){
                if(CT.rules.toLowerCase()!="cols"){
                        CC.style.borderStyle="none solid";
                }
        }else{
                if(CT.rules.toLowerCase()!="none"){
                        CC.style.borderStyle="none";
                }
        }
        if(E["FieldID:1007=LONG"].value!=parseInt(CT.style.borderWidth)||E["FieldID:1008=LONG"].value!=parseInt(CT.style.borderWidth)){
                CC.style.borderWidth="0px "+E["FieldID:1007=LONG"].value+"px "+E["FieldID:1008=LONG"].value+"px 0px";
        }
        if(E["TC:BC"].checked){
                CC.bgColor=E["FieldID:1009=RGB"].value;
        }else{
                CC.bgColor="";
        }
}else{
        alert("<X-FC-FIELD LANG.7544.5 STRING>");
}
CC=CR=CT=null;
dCD();
}
<!--#rem
RACU(T,R,C)     ResolveAbsoluteColumnIndex(Table, Row, Column)
returns the absolute column # of a given cell in a given row
-->
function RACI(T,R,C){
var aci=0,cc=0,nC=0;
if(R.rowIndex!=0){
        for(var c=0;c<T.rows[0].cells.length;c++){
                nC+=T.rows[0].cells[c].colSpan;
        }
        for(var c=0;c<R.cells.length;c++){
                cc+=R.cells[c].colSpan;
        }
}
if(cc==nC||R.rowIndex==0){
        <!--#rem
        Simple case, no messy rowspans-->
        for(var c=0;c<C.cellIndex;c++){
                aci+=R.cells[c].colSpan;
        }
}else{
        <!--#rem
        We've got a rowspan sticking through here, back up 'till we find a row without such (or we reach the top of the table),
        then walk forward, keeping track of the rowspans, in order to figure out the absolute column count-->
        var RC=[];
        var lar=R.rowIndex;
        var rci;
        while(lar>0&&cc!=nC){
                --lar;
                cc=0;
                for(var c=0;c<T.rows[lar].cells.length;c++){
                        cc+=T.rows[lar].cells[c].colSpan;
                }
        }
        for(var i=0;i<nC;i++){
                RC[i]=0;
        }
        for(;lar<R.rowIndex;lar++){
                rci=0;
                for(var c=0;c<RC.length;c++){
                        if(RC[c]>0){
                                --RC[c];
                        }else{
                                if(T.rows[lar].cells[rci].rowSpan>1){
                                        for(var cs=0;cs<T.rows[lar].cells[rci].colSpan;cs++){
                                                RC[c+cs]=T.rows[lar].cells[rci].rowSpan-1;
                                        }
                                }
                                c+=(T.rows[lar].cells[rci].colSpan-1);
                                ++rci;
                        }
                }
        }
        for(var c=0;RC[c]>0;c++){
                ++aci;
        }
        rci=0;
        while(rci<C.cellIndex){
                if(RC[c]>0){
                        ++aci;
                }else{
                        aci+=R.cells[rci++].colSpan;
                }
        }
}
return aci;
}
<!--#rem
GAC(T,R,aci)    GetAbsoluteColumn(Table, Row, AbsoluteColumnIndex)
returns an array, the first member of which is the index, in the given row, of the cell corresponding to the absolute column
and the second member is the colspan index, of that cell index, of the column in question.
in the event of there being no cell for this absolute column in this row (ie its a rowspan from a higher level), (-1,0) will be returned
-->
function GAC(T,R,aci){
var cc=0,nC=0,caci=0;
var rci=[-1,0];
if(R.rowIndex!=0){
        for(var c=0;c<T.rows[0].cells.length;c++){
                nC+=T.rows[0].cells[c].colSpan;
        }
        for(var c=0;c<R.cells.length;c++){
                cc+=R.cells[c].colSpan;
        }
}
if(cc==nC||R.rowIndex==0){
        <!--#rem
        Simple case, no messy rowspans-->
        var cs;
        rci[0]=0;
        while(rci[0]<R.cells.length&&caci<aci){
                cs=R.cells[rci[0]].colSpan;
                if(caci+cs>aci){
                        rci[1]=aci-caci-1;
                }else{
                        ++rci[0];
                }
                caci+=cs;
        }
}else{
        <!--#rem
        We've got a rowspan sticking through here, back up 'till we find a row without such (or we reach the top of the table),
        then walk forward, keeping track of the rowspans, in order to figure out the absolute column count-->
        var RC=[];
        var lar=R.rowIndex;
        var crci=0;
        while(lar>0&&cc!=nC){
                --lar;
                cc=0;
                for(var c=0;c<T.rows[lar].cells.length;c++){
                        cc+=T.rows[lar].cells[c].colSpan;
                }
        }
        for(var i=0;i<nC;i++){
                RC[i]=0;
        }
        for(;lar<R.rowIndex;lar++){
                crci=0;
                for(var c=0;c<RC.length;c++){
                        if(RC[c]>0){
                                --RC[c];
                        }else{
                                if(T.rows[lar].cells[crci].rowSpan>1){
                                        for(var cs=0;cs<T.rows[lar].cells[crci].colSpan;cs++){
                                                RC[c+cs]=T.rows[lar].cells[crci].rowSpan-1;
                                        }
                                }
                                c+=(T.rows[lar].cells[crci].colSpan-1);
                                ++crci;
                        }
                }
        }
        if(RC[aci]==0){
                var c=0,cs;
                for(;RC[c]>0;c++){
                        ++caci;
                }
                if(caci<=aci){
                        rci[0]=0;
                }
                while(caci<aci){
                        if(RC[c]>0){
                                ++caci;
                        }else{
                                cs=R.cells[rci[0]].colSpan;
                                if(caci+cs>aci){
                                        rci[1]=aci-caci-1;
                                }else{
                                        ++rci[0];
                                }
                                caci+=cs;
                        }
                        ++c;
                }
        }
}
return rci;
}
<!--#rem
dG(c)           doTable(command)
-->
function dG(c){
var BE=parent.frames["EDITBODY"];
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
var S=BE.document.selection;
var N=null;
if(S.type.toLowerCase()=="control"){
        N=S.createRange(0).item(0);
}else{
        N=S.createRange(0).parentElement();
}
<!--#else-->
var R=BE.getSelection().getRangeAt(0);
var N=R.startContainer;
if(N.nodeType==1&&R.startOffset>=0&&R.startOffset<N.childNodes.length){
        N=N.childNodes[R.startOffset];
}
<!--#endif-->
var f=false;
var T=null,C=null,R=null;
var ci=-1,ri=-1,nC=0;
if(N!=null&&N.nodeType==1){
        if(N.tagName.toLowerCase()=="td"){
                C=N;
                ci=C.cellIndex;
                R=gEE("tr");
                if(R!=null){
                        ri=R.rowIndex;
                        T=gEE("table");
                }
        }else if(N.tagName.toLowerCase()=="tr"){
                R=N;
                ri=R.rowIndex;
                if(R.cells.length){
                        ci=0;
                        C=N.cells[0];
                }
                T=gEE("table");
        }else if(N.tagName.toLowerCase()=="table"){
                T=N;
                if(T.rows.length){
                        ri=0;
                        R=T.rows[0];
                        if(R.cells.length){
                                ci=0;
                                C=R.cells[0];
                        }
                }
        }
}
if(C==null&&R==null&&T==null){
        C=gEE("td");
        if(C!=null){
                ci=C.cellIndex;
                R=gEE("tr");
                if(R!=null){
                        ri=R.rowIndex;
                        T=gEE("table");
                }
        }
}
if(ci==-1||ri==-1||C==null||R==null||T==null){
        c=0;
}else{
        for(var i=0;i<T.rows[0].cells.length;i++){
                nC+=T.rows[0].cells[i].colSpan;
        }
}
if(c==1||c==2){
        <!--#rem
        Insert Row/Insert Row After-->
        if(c==2){
                ++ri;
        }
        if(T.tHead&&ri==1){
                R=T.tBodies[0].insertRow(0);
        }else{
                R=T.insertRow(ri);
        }
        if(ri==0){
                for(var c=0;c<nC;c++){
                        C=R.insertCell(c);
                        C.innerHTML="<font style=\"font-family:<!--#echo var="DEFAULTFONT"-->;font-size:<!--#echo var="DEFAULTSIZE"-->pt;color:<!--#echo var="DEFAULTCOLOUR"-->;\">&nbsp;<\/font>";
                }
                if(T.tHead!=null&&T.tHead.rows.length>1){
                        var NR=T.tBodies[0].insertRow(0);
                        for(var c=0;c<T.tHead.rows[1].cells.length;c++){
                                var OC=T.tHead.rows[1].cells[c];
                                var NC=T.tBodies[0].rows[0].insertCell(c);
                                if(OC.align.length)NC.align=OC.align;
                                if(OC.vAlign.length)NC.vAlign=OC.vAlign;
                                if(OC.bgColor.length)NC.bgColor=OC.bgColor;
                                if(OC.width.length)NC.width=OC.width;
                                if(OC.style.border.length)NC.style.border=OC.style.border;
                                if(OC.style.margin.length)NC.style.margin=OC.style.margin;
                                NC.colSpan=OC.colSpan;
                                NC.rowSpan=OC.rowSpan;
                                NC.innerHTML=OC.innerHTML;
                        }
                        T.tHead.deleteRow(1);
                }
        }else{
                var cf=0,dc=0;
                for(var c=0;c<T.rows[ri-1].cells.length;c++){
                        if(T.rows[ri-1].cells[c].rowSpan>1){
                                ++T.rows[ri-1].cells[c].rowSpan;
                                cf+=C.colSpan;
                        }else{
                                C=R.insertCell(dc++);
                                C.innerHTML="<font style=\"font-family:<!--#echo var="DEFAULTFONT"-->;font-size:<!--#echo var="DEFAULTSIZE"-->pt;color:<!--#echo var="DEFAULTCOLOUR"-->;\">&nbsp;<\/font>";
                                if(T.rows[ri-1].cells[c].colSpan>1){
                                        C.colSpan=T.rows[ri-1].cells[c].colSpan;
                                }
                                cf+=C.colSpan;
                        }
                }
                if(cf<nC){
                        var cr=ri-2;
                        while(cf<nC&&cr>=0){
                                for(var c=0;c<T.rows[cr].cells.length;c++){
                                        if(T.rows[cr].cells[c].rowSpan>=ri-cr){
                                                ++T.rows[cr].cells[c].rowSpan;
                                                cf+=T.rows[cr].cells[c].colSpan;
                                        }
                                }
                                --cr;
                        }
                        while(cf<nC){
                                C=R.insertCell(dc++);
                                C.innerHTML="<font style=\"font-family:<!--#echo var="DEFAULTFONT"-->;font-size:<!--#echo var="DEFAULTSIZE"-->pt;color:<!--#echo var="DEFAULTCOLOUR"-->;\">&nbsp;<\/font>";
                                ++cf;
                        }                               
                }
        }
}else if(c==3||c==4){
        <!--#rem
        Insert Column/Insert Column After-->
        var aci=RACI(T,R,C);
        var NC;
        if(c==4){
                ++aci;
        }
        if(aci==nC){
                for(var r=0;r<T.rows.length;r++){
                        NC=T.rows[r].insertCell(T.rows[r].cells.length);
                        NC.innerHTML="<font style=\"font-family:<!--#echo var="DEFAULTFONT"-->;font-size:<!--#echo var="DEFAULTSIZE"-->pt;color:<!--#echo var="DEFAULTCOLOUR"-->;\">&nbsp;<\/font>";
                }
        }else{
                var rci,r=0;
                while(r<T.rows.length){
                        rci=GAC(T,R,aci);
                        if(rci[0]==-1){
                                ++r;
                        }else if(rci[1]>0){
                                NC=T.rows[r].cells[rci[0]];
                                ++NC.colSpan;
                                r+=NC.rowSpan;
                        }else{
                                NC=T.rows[r].insertCell(rci[0]);
                                NC.innerHTML="<font style=\"font-family:<!--#echo var="DEFAULTFONT"-->;font-size:<!--#echo var="DEFAULTSIZE"-->pt;color:<!--#echo var="DEFAULTCOLOUR"-->;\">&nbsp;<\/font>";
                                ++r;
                        }
                }
        }
}else if(c==5){
        <!--#rem
        Merge Rows (Up)-->
        if(T.rows.length>1){
                if(ri==0){
                        ++ri;
                }
        }
        var aci=RACI(T,R,C);
        var ci=ri-1;
        var pca=GAC(T,T.rows[ci--],aci);
        while(pca[0]==-1&&ci>=0){
                pca=GAC(T,T.rows[ci--],aci);
        }
        if(pca[0]>=0&&pca[1]==0){
                var pC=T.rows[ci+1].cells[pca[0]];
                if(pC.colSpan==C.colSpan){
                        pC.innerHTML+=C.innerHTML;
                        pC.rowSpan+=C.rowSpan;
                        R.deleteCell(C.cellIndex);
                }
        }
}else if(c==6){
        <!--#rem
        Merge Columns (Left)-->
        if(R.cells.length>1){
                var dm=false;
                var nCR=0;
                for(var i=0;i<R.cells.length;i++){
                        nCR+=R.cells[i].colSpan;
                }
                if(nCR==nC){
                        <!--#rem
                        simple case, no rowspans sticking through this row-->
                        if(ci==0){
                                ++ci;
                        }
                        dm=true;                
                }else if(ci>0){
                        <!--#rem
                        slightly more complicated.  Make sure the cell to the left isn't acutally a spanned row (if it is, merge is impossible)-->
                        var aci0=-1;
                        var aci1=RACI(T,R,R.cells[ci]);
                        if(ci==0&&aci1==0){
                                aci0=0;
                                aci1=RACI(T,R,R.cells[++ci]);
                        }else if(ci>0){
                                aci0=RACI(T,R,R.cells[ci-1]);
                        }
                        if(ci>0){
                                if(aci0+R.cells[ci-1].colSpan==aci1){
                                        dm=true;
                                }
                        }
                }
                if(dm&&R.cells[ci].rowSpan!=R.cells[ci-1].rowSpan){
                        dm=false;
                }
                if(dm){
                        R.cells[ci-1].innerHTML+=R.cells[ci].innerHTML;
                        R.cells[ci-1].colSpan+=R.cells[ci].colSpan;
                        R.deleteCell(ci);
                }
        }
}else if(c==7){
        <!--#rem
        Split Rows-->
        if(C.rowSpan>1){
                var aci=RACI(T,R,C)-1;
                var rci=[];
                rci[0]=-1;
                while(rci[0]==-1&&aci>0){
                        rci=GAC(T,T.rows[ri+C.rowSpan-1],aci);
                        aci-=1;
                }
                var NC=T.rows[ri+C.rowSpan-1].insertCell(rci[0]+1);
                NC.colSpan=C.colSpan;
                NC.innerHTML="<font style=\"font-family:<!--#echo var="DEFAULTFONT"-->;font-size:<!--#echo var="DEFAULTSIZE"-->pt;color:<!--#echo var="DEFAULTCOLOUR"-->;\">&nbsp;<\/font>";
                C.rowSpan-=1;
        }
}else if(c==8){<!--#rem
        Split Columns-->
        if(C.colSpan>1){
                var NC=T.rows[ri].insertCell(ci+1);
                NC.rowSpan=C.rowSpan;
                NC.innerHTML="<font style=\"font-family:<!--#echo var="DEFAULTFONT"-->;font-size:<!--#echo var="DEFAULTSIZE"-->pt;color:<!--#echo var="DEFAULTCOLOUR"-->;\">&nbsp;<\/font>";
                C.colSpan-=1;
        }
}else if(c==9){<!--#rem
        Delete Rows-->
        if(T.rows.length>1){
                var nCR=0;
                var hrs=false;
                for(var c=0;c<R.cells.length;c++){
                        nCR+=R.cells[c].colSpan;
                        if(R.cells[c].rowSpan>1){
                                hrs=true;
                        }
                }
                if(nCR==nC&&!hrs){
                        <!--#rem
                        Simple case, no rowspans involved-->
                }else{
                        if(hrs){
                                <!--#rem
                                Complex case: part 1
                                if there are any rowspans in this row, shove the data in those cells down a row-->
                                for(var c=0;c<R.cells.length;c++){
                                        if(R.cells[c].rowSpan>1){
                                                var aci=RACI(T,R,R.cells[c]);
                                                var nrci;
                                                if(aci==0){
                                                        nrci=0;
                                                }else{
                                                        var rcid=[-1,0];
                                                        while(aci>0&&rcid[0]==-1){
                                                                aci-=1;
                                                                rcid=GAC(T,T.rows[R.rowIndex+1],aci);
                                                        }
                                                        if(rcid[0]==-1){
                                                                nrci=0;
                                                        }else{
                                                                nrci=rcid[0]+1;
                                                        }
                                                }
                                                var OC=R.cells[c];
                                                var NC=T.rows[R.rowIndex+1].insertCell(nrci);
                                                if(OC.align.length){
                                                        NC.align=OC.align;
                                                }
                                                if(OC.vAlign.length){
                                                        NC.vAlign=OC.vAlign;
                                                }
                                                if(OC.bgColor.length){
                                                        NC.bgColor=OC.bgColor;
                                                }
                                                if(OC.width.length){
                                                        NC.width=OC.width;
                                                }
                                                if(OC.style.border.length){
                                                        NC.style.border=OC.style.border;
                                                }
                                                if(OC.style.margin.length){
                                                        NC.style.margin=OC.style.margin;
                                                }
                                                NC.colSpan=OC.colSpan;
                                                NC.rowSpan=OC.rowSpan-1;
                                                NC.innerHTML=OC.innerHTML;
                                        }
                                }
                        }
                        if(nCR<nC){
                                <!--#rem
                                Complex case: part 2
                                if there are any rowspans above this row, sticking through, find them and shorten them-->
                                var rci;
                                for(var aci=0;aci<nC&&nCR<nC;aci++){
                                        rci=GAC(T,R,aci);
                                        if(rci[0]==-1){
                                                for(var r=R.rowIndex-1;r>=0&&rci[0]==-1;r--){
                                                        rci=GAC(T,T.rows[r],aci);
                                                        if(rci[0]!=-1){
                                                                T.rows[r].cells[rci[0]].rowSpan-=1;
                                                                nCR+=T.rows[r].cells[rci[0]].colSpan;
                                                        }
                                                }
                                        }
                                }
                        }
                }
                if(ri==0&&T.tHead!=null){
                        T.tHead.deleteRow(0);
                        T.deleteTHead();
                }else{
                        T.deleteRow(ri);
                }
        }
}else if(c==10){
        <!--#rem
        Delete Columns-->
        if(nC>1){
                var r=0;
                var aci=RACI(T,R,C);
                var rci=[];
                var rs;
                while (r<T.rows.length){
                        if(aci==nC-1){
                                rci[0]=T.rows[r].cells.length-1;
                        }else{
                                rci=GAC(T,T.rows[r],aci);
                        }
                        if(rci[0]!=-1){
                                rs=T.rows[r].cells[rci[0]].rowSpan;
                                if(T.rows[r].cells[rci[0]].colSpan>1){
                                        --T.rows[r].cells[rci[0]].colSpan;
                                }else{
                                        T.rows[r].deleteCell(rci[0]);
                                }
                                r+=rs;
                        }else{
                                ++r;
                        }
                }
        }
}else if(c==11){
        <!--#rem
        Format Cells-->
        var u="<X-FC-OBJURL>?Templates=Edit&FormID=311&Close=-1";
        var BC,TCB;
        CT=T;
        CR=R;
        CC=C;
        if(CC.align.toLowerCase()=="right"){
                u+="&TCAH=-1";
        }else if(CC.align.toLowerCase()=="center"){
                u+="&TCAH=1";
        }
        if(CC.vAlign.toLowerCase()=="bottom"){
                u+="&TCAV=1";
        }else if(CC.vAlign.toLowerCase()=="middle"||CC.vAlign.toLowerCase()=="center"){
                u+="&TCAV=2";
        }
        u+="&TCW="+parseInt(CC.width)+"&TCWT="+(CC.width.indexOf("%")!=-1?"1":"0")+"&TCM="+parseInt(CC.style.margin);
        if(gSAV(CR,"page-break-before")=="always"){
                u+="&TCPB=1";
        }
        BC=CC.bgColor;
        if(BC!=null&&BC.length){        
                if(BC.charAt(0)=="#"){
                        BC=BC.substr(1,6);
                }
                BC=parseInt(BC,16);
                u+="&TCBC=1&BCR="+((BC>>16)&0x000000FF)+"&BCG="+((BC>>8)&0x000000FF)+"&BCB="+(BC&0x000000FF);
        }
        TCB=CC.style.borderStyle;
        if(TCB!=null&&TCB.length){
                var ci=0,lci=0,cbe;
                var B=[];
                do{
                        ci=TCB.indexOf(" ",lci);
                        if(ci==-1){
                                cbe=TCB.substr(lci,TCB.length);
                        }else{
                                cbe=TCB.substr(lci,ci-lci);
                        }
                        if(cbe.toLowerCase()=="solid"){
                                B[B.length]=1;
                        }else{
                                B[B.length]=0;
                        }
                        lci=ci+1;
                }while(ci!=-1);
                if(B.length==4){
                        u+="&TCBH="+B[1]+"&TCBV="+B[2];
                }else if(B.length==2){
                        u+="&TCBH="+B[0]+"&TCBV="+B[1];
                }else if(B.length==1){
                        u+="&TCBH="+B[0]+"&TCBV="+B[0];
                }
        }else if(CT.rules.toLowerCase()=="all"){
                u+="&TCBH=1&TCBV=1";
        }else if(CT.rules.toLowerCase()=="rows"){
                u+="&TCBH=1";
        }else if(CT.rules.toLowerCase()=="cols"){
                u+="&TCBV=1";
        }
        TCB=CC.style.borderWidth;
        if(TCB!=null&&TCB.length){
                var ci=0,lci=0,cbe;
                var B=[];
                do{
                        ci=TCB.indexOf(" ",lci);
                        if(ci==-1){
                                cbe=TCB.substr(lci,TCB.length);
                        }else{
                                cbe=TCB.substr(lci,ci-lci);
                        }
                        B[B.length]=parseInt(cbe);
                        lci=ci+1;
                }while(ci!=-1);
                if(B.length==4){
                        u+="&TCBWH="+B[1]+"&TCBWV="+B[2];
                }else if(B.length==2){
                        u+="&TCBWH="+B[0]+"&TCBWV="+B[1];
                }else if(B.length==1){
                        u+="&TCBWH="+B[0]+"&TCBWV="+B[0];
                }
        }else{
                u+="&TCBWH="+CT.border+"&TCBWV="+CT.border;
        }
        DW=window.open(u,"FCEDITWIN","width=565,height=360,resizable");
}else if(c==12){
        <!--#rem
        Format Table-->
        var u="<X-FC-OBJURL>?Templates=Edit&FormID=310&Close=-1";
        var BC;
        var tr=0;
        CT=T;
        CC=null;
        CR=null;
        if(CT.align.toLowerCase()=="right"){
                u+="&TA=-1";
        }else if(CT.align.toLowerCase()=="center"){
                u+="&TA=1";
        }
        u+="&TW="+parseInt(CT.width)+"&TWT="+(CT.width.indexOf("%")!=-1?"1":"0")+"&TM="+parseInt(CT.style.margin);
        if(CT.style.<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->styleFloat<!--#else-->cssFloat<!--#endif-->.toLowerCase()==CT.align.toLowerCase()){
                u+="&TF=1";
        }
        if(CT.tHead!=null){
                u+="&TH=1";
        }
        u+="&TB="+CT.border;
        BC=CT.style.borderColor;
        if(BC.substr(0,4)=="rgb("){
                var BCV=(parseInt(BC.substr(4,BC.length))<<16);
                var ni=BC.indexOf(',');
                BCV+=(parseInt(BC.substr(ni+1,BC.length))<<8);
                ni=BC.indexOf(',',ni+1);
                BCV+=parseInt(BC.substr(ni+1,BC.length));
                BC=BCV;
        }else{
                if(BC.charAt(0)=="#"){
                        BC=BC.substr(1,6);
                }
                BC=parseInt(BC,16);
        }
        u+="&BCR="+((BC>>16)&0x000000FF)+"&BCG="+((BC>>8)&0x000000FF)+"&BCB="+(BC&0x000000FF);
        if(CT.frame.toLowerCase()=="box"){
                tr+=1;
        }
        if(CT.rules.toLowerCase()=="all"||CT.rules.toLowerCase()=="rows"){
                tr+=2;
        }
        if(CT.rules.toLowerCase()=="all"||CT.rules.toLowerCase()=="cols"){
                tr+=4;
        }
        u+="&TR="+tr;
        if(CT.summary.length){
                u+="&TS="+uesc(CT.summary);
        }
        DW=window.open(u,"FCEDITWIN","width=540,height=390,resizable");
}else{
        alert("<X-FC-FIELD LANG.7544.5 STRING>");
}
}
<!--#rem
dIL()           doInsertLink(index)
-->
function dIL(){
if(DW){
        dCD();
}
DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=302&Close=-1&Index=-1","FCEDITWIN","width=450,height=250,resizable");
}
<!--#rem
gLA             getLinkArray
FireFox doesn't properly update the document links[] array when in edit mode, so we have to manually construct one
-->
function gLA(){
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
return parent.frames["EDITBODY"].document.links;
<!--#else-->
var A=[];
var BE=parent.frames["EDITBODY"].document.body;
var N=BE.firstChild;
while(N!=null){
        if(N.nodeType==1&&N.tagName.toLowerCase()=="a"&&N.href.length){
                A[A.length]=N;
        }
        if(N.hasChildNodes()){
                N=N.firstChild;
        }else if(N.nextSibling!=null){
                N=N.nextSibling;
        }else if(N==N.parentNode.lastChild){
                while(N!=null&&(N.parentNode==null||N.parentNode.nextSibling==null)){
                        N=N.parentNode;
                }
                if(N!=null){
                        N=N.parentNode.nextSibling;
                }
        }else if(N==BE){
                N=null;
        }else{
                N=N.parentNode;
        }
}
return A;
<!--#endif-->
}
<!--#rem
RLI(L)          ResolveLinkIndex(Link)
-->
function RLI(L){
var i=-1;
var A=gLA();
var a;
for(a=0;a<A.length&&i==-1;a++){
        if(A[a]==L){
                i=a;
        }
}
return i;
}
<!--#rem
RMI(M)          ResolveMarkerIndex(Marker)
-->
function RMI(M){
var i=-1;
var A=parent.frames["EDITBODY"].document.anchors;
var a;
for(a=0;a<A.length&&i==-1;a++){
        if(A[a]==M){
                i=a;
        }
}
return i;
}
<!--#rem
RII(I)          ResolveImageIndex(Image)
-->
function RII(I){
var i=-1;
var A=parent.frames["EDITBODY"].document.images;
var a;
for(a=0;a<A.length&&i==-1;a++){
        if(A[a]==I){
                i=a;
        }
}
return i;
}
<!--#rem
dSL(i)          doSetLink(index)
-->
function dSL(i){
if(DW){
        var E=DW.document.forms["MF"].elements;
        var U=E["L:U"].value;
        var L=null;
        if(U.length==0){
                ;
        }else if(i==-1){
                dEC("createLink",U);
                L=gEE("a");
        }else{
                var A=gLA();
                if(i>=0&&i<A.length){
                        L=A[i];
                        L.href=U;
                }
        }
        if(L!=null){
                var T=E["L:T"].value;
                var W=E["L:W"].options[E["L:W"].selectedIndex].value;
                var N=E["L:N"].value;
                if(T.length){
                        L.title=T;
                }else{
                        L.title="";
                }
                if(W==0){
                        L.target="";
                }else if(W==1){
                        L.target="_blank";
                }else{
                        L.target=N;
                }
        }
        dCD();
}
}
<!--#rem
dIK()           doInsertMarker()
-->
function dIK(){
var c=true;
var n="";
while(c==true&&n!=null){
        n=prompt("<X-FC-FIELD FCft.303.3000.30 STRING>:","");
        if(n!=null){
                if(n.length==0){
                        n=null;
                }else{
                        var A=parent.frames["EDITBODY"].document.anchors;
                        var f=false;
                        for(var a=0;a<A.length&&f==false;a++){
                                if(A[a].name==n){
                                        f=true;
                                }
                        }
                        if(f){
                                c=confirm("<!--#set var="MARKERSTR" value="<X-FC-FIELD LANG.7544.2 STRING>"--><!--#echo expr="@split($MARKERSTR,'^1')"-->\""+n+"\"<!--#echo var="MARKERSTR"-->");
                        }else{
                                c=false;
                                ISH("<a name=\""+n+"\"><\/a>");
                        }
                }
        }
}
}
<!--#rem
dF(c)           doFormat(command)
-->
function dF(c){
if(c==0){
        dFL(-1);
}else if(c==1){
        dFK(-1);
}else if(c==2){
        dFM();
}else if(c==3){
        dFB();
}else{
        alert("<X-FC-FIELD LANG.7544.5 STRING>");
}
}
<!--#rem
dFS()           doFormatSelected
-->
function dFS(){
var BE=parent.frames["EDITBODY"];
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
var S=BE.document.selection;
var N=null;
if(S.type.toLowerCase()=="control"){
        N=S.createRange(0).item(0);
}else{
        N=S.createRange(0).parentElement();
}
<!--#else-->
var R=BE.getSelection().getRangeAt(0);
var N=R.startContainer;
if(N.nodeType==1&&R.startOffset>=0&&R.startOffset<N.childNodes.length){
        N=N.childNodes[R.startOffset];
}
<!--#endif-->
var f=false;
if(N.nodeType==1){
        if(N.tagName.toLowerCase()=="img"){
                var i=RII(N);
                if(i!=-1){
                        dFI(i);
                }
                f=true;
        }else if(N.tagName.toLowerCase()=="hr"){
                dFR(N);
                f=true;
        }else if(N.tagName.toLowerCase()=="a"){
                if(N.href.length){
                        var i=RLI(N);
                        if(i!=-1){
                                dFL(i);
                        }
                }else{
                        var i=RMI(N);
                        if(i!=-1){
                                dFK(i);
                        }
                }
                f=true;
        }
}
if(!f){
        var A=gEE("a");
        if(A!=null){
                if(A.href.length){
                        var i=RLI(A);
                        if(i!=-1){
                                dFL(i);
                        }
                }else{
                        var i=RMI(A);
                        if(i!=-1){
                                dFK(i);
                        }
                }
        }else{
                dFT();
        }
}
return false;
}
<!--#rem
dFT()           doFormatText
-->
function dFT(){
if(DW!=null){
        dCD();
}
var BE=parent.frames["EDITBODY"].document;
var FD=0,FP=0;
var FF=BE.queryCommandValue("fontname");
var FS=9,FC=0;
if(BE.queryCommandState("bold")){
        FD|=0x01;
}
if(BE.queryCommandState("italic")){
        FD|=0x02;
}
if(BE.queryCommandState("underline")){
        FD|=0x04;
}
if(BE.queryCommandState("strikethrough")){
        FD|=0x08;
}
if(NRGB(BE.queryCommandValue(<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->'backcolor'<!--#else-->'hilitecolor'<!--#endif-->))=="#D0D0D0"){
        FD|=0x10;
}else if(NRGB(BE.queryCommandValue(<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->'backcolor'<!--#else-->'hilitecolor'<!--#endif-->))=="#00C0C0"){
        FD|=0x20;
}
if(BE.queryCommandState("superscript")){
        FP=1;
}else if(BE.queryCommandState("subscript")){
        FP=2;
}
FC=BE.queryCommandValue("forecolor");
if(FC==null||FC==""){
        FC=0x<!--#echo expr="@substr($DEFAULTCOLOUR,1,6)"-->;
}
FC=FC.toString(16);
while (FC.length<6){
        FC="0"+FC;
}
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
<!--#rem
IE 6 has a byte reversal bug whereby the forecolour comes back as BBGGRR.-->
FC=FC.substr(4,2)+FC.substr(2,2)+FC.substr(0,2);
<!--#else-->
if(FC.substr(0,4)=="rgb("){
        FC=NRGB(FC);
}
if(FC.charAt(0)=="#"){
        FC=FC.substr(1,6);
}
<!--#endif-->
FC=parseInt(FC,16);
FS=BE.queryCommandValue("fontsize");
if(FS==null||FS==""){
        FS=<!--#echo var="DEFAULTSIZE"-->;
}else if(FS.toString().charAt(0)=="+"){
        FS=<!--#echo var="DEFAULTSIZE"-->;
}else if(FS.toString().charAt(0)=="-"){
        FS=<!--#echo var="DEFAULTSIZE"-->;
}else if(!isNaN(parseInt(FS))){
        if(FS>HFS.length){
                FS=HFS.length;
        }
        FS=HFS[FS-1];
}else{
        FS=<!--#echo var="DEFAULTSIZE"-->;
}
if(gEE("font")!=null){
        var fsp=gEE("font").style.fontSize;
        if(fsp==null||fsp==""){
                fsp=gSAV(gEE("font"),"font-size");
        }
        if(fsp){
                fsp=parseInt(fsp);
                if(!isNaN(fsp)){
                        FS=fsp;
                }
        }
}
DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=300&Close=-1&FF="+uesc(FF)+"&FS="+FS+"&FC="+FC+"&FP="+FP+"&FD="+FD,"FCEDITWIN","width=500,height=300,resizable");
return false;
}
<!--#rem
dST()           doSetText
-->
function dST(){
if(DW!=null){
        var E=DW.document.forms["MainForm"].elements;
        var BE=parent.frames["EDITBODY"].document;
        dEC("fontname",E["T:FF"]);
        var fc=E["FieldID:1016=RGB"].value;
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
        document.images["EDIT:COLOUR"].src="/__Color/"+fc+"?Width=16&Height=16";
<!--#else-->
        var FC=document.forms["EDITFORM"].elements["EDIT:COLOUR"];
        FC.selectedIndex=0;
        for(i=1;i<FC.options.length;i++){
                if(FC.options[i].value==fc){
                        FC.selectedIndex=i;
                }
        }
<!--#endif-->
        dEC("forecolor",fc);
        if(E["T:FDB"].checked){
                if(!BE.queryCommandState("bold")){
                        dEC("bold");
                }
        }else{
                rIFE(BE,"bold");
        }
        if(E["T:FDI"].checked){
                if(!BE.queryCommandState("italic")){
                        dEC("italic");
                }
        }else{
                rIFE(BE,"italic");
        }
        if(E["T:FDU"].checked){
                if(!BE.queryCommandState("underline")){
                        dEC("underline");
                }
        }else{
                var rc=2;
                dEC("underline");
                while(rc>0&&BE.queryCommandState("underline")&&gEE("a")==null){
                        dEC("underline");
                        rc-=1;
                }
        }
        if(E["T:FDX"].checked){
                if(!BE.queryCommandState("strikethrough")){
                        dEC("strikethrough");
                }
        }else{
                rIFE(BE,"strikethrough");
        }
        if(E["T:FDQ"].checked){
                if(NRGB(BE.queryCommandValue(<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->'backcolor'<!--#else-->'hilitecolor'<!--#endif-->))!=0xD0D0D0){
                        dEC(<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->'backcolor'<!--#else-->'hilitecolor'<!--#endif-->,"#D0D0D0");
                }
        }else if(E["T:FDL"].checked){
                if(NRGB(BE.queryCommandValue(<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->'backcolor'<!--#else-->'hilitecolor'<!--#endif-->))!=0x00BFBF){
                        dEC(<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->'backcolor'<!--#else-->'hilitecolor'<!--#endif-->,"#00BFBF");
                }
        }else{
                dEC(<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->'backcolor'<!--#else-->'hilitecolor'<!--#endif-->,"");
        }
        var fp=parseInt(E["T:FP"].options[E["T:FP"].selectedIndex].value);
        if(fp==2){
                if(!BE.queryCommandState("subscript")){
                        rIFE(BE,"superscript");
                        dEC("subscript");
                }
        }else if(fp==1){
                if(!BE.queryCommandState("superscript")){
                        rIFE(BE,"subscript");
                        dEC("superscript");
                }
        }else{
                rIFE(BE,"superscript");
                rIFE(BE,"subscript");
        }
        dFFS(parseInt(E["T:FS"].options[E["T:FS"].selectedIndex].value));
        dCD();
}
}
<!--#rem
dFP()           doFormatParagraphs
-->
function dFP(){
if(DW!=null){
        dCD();
}
var PA=0;
var PP=null,PL=null,PIL=null,PIR=null,PIF=null;
var ED=gEE("div","p");
if(ED!=null){
        PA=ED.align;
        if(PA=="center"){
                PA=1;
        }else if(PA=="right"){
                PA=-1;
        }else{
                PA=0;
        }
        PP=parseInt(gSAV(ED,"margin-top"));
        PL=parseInt(gSAV(ED,"line-height"));
        PIL=parseInt(gSAV(ED,"padding-left"));
        PIR=parseInt(gSAV(ED,"padding-right"));
        PIF=parseInt(gSAV(ED,"text-indent"));
}
if(PP==null||PP==""){
        PP=0;
}
if(PL==null||PL==""||isNaN(PL)){
        PL=100;
}
if(PIL==null||PIL==""){
        PIL=0;
}
if(PIR==null||PIR==""){
        PIR=0;
}
if(PIF==null||PIF==""){
        PIF=0;
}
DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=301&Close=-1&PA="+PA+"&PP="+PP+"&PL="+PL+"&PIL="+PIL+"&PIF="+PIF+"&PIR="+PIR,"FCEDITWIN","width=450,height=300,resizable");
return false;
}
<!--#rem
dSP()           doSetParagraphs
-->
function dSP(){
if(DW!=null){
        var E=DW.document.forms["MF"];
        if(typeof(E)!="undefined"){
                var ED=gEE("div","p");
                var A=parseInt(E["P:A"].options[E["P:A"].selectedIndex].value);
                A=(A==-1?"Right":(A==1?"Center":"Left"));
                if(ED==null){
                        dEC("Justify"+A,null);
                        ED=gEE("div","p");
                }
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
                if(ED.tagName.toLowerCase()=="p"){
                        var h=ED.innerHTML;
                        var ND=parent.frames["EDITBODY"].document.createElement("div");
                        ED.replaceNode(ND);
                        ED=ND;
                        ED.innerHTML=h;
                }
<!--#endif-->
                sSAV(ED,"text-align",A);
                ED.align=A;
               sSAV(ED,"margin-top",E["P:P"].value+"px");
                sSAV(ED,"line-height",E["P:L"].value+"%");
                sSAV(ED,"vertical-align",E["P:L"].value+"%");
                sSAV(ED,"padding-left",E["P:IL"].value+"px");
                sSAV(ED,"padding-right",E["P:IR"].value+"px");
                sSAV(ED,"text-indent",E["P:IF"].value+"px");
        }
        dCD();
}
}
<!--#rem
dFL(i)  doFormatLinks(index)
-->
function dFL(i){
var A=gLA();
if(A.length==0){
        alert("<X-FC-FIELD LANG.7544.3 STRING>")
}else if(i<0||i>=A.length){
        if(DW){
                dCD();
        }
        DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=315&Close=-1","FCEDITWIN","width=500,height=250,resizable");
}else{
        var L=A[i];
        var U=L.getAttribute("href");
        var T=L.title;
        var W=0;
        var N=null;
        if(L.target=="_blank"){
                W=1;
        }else if(L.target!=null&&L.target.length){
                W=2;
                N=L.target;
        }
        if(DW){
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
                DW.resizeTo(450,300);
<!--#else-->
                dCD();
<!--#endif-->
        }
        DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=302&Close=-1&Index="+i+"&LU="+uesc(U)+"&LW="+W+(W==2?"&LN="+uesc(N):"")+(T.length?"&T="+uesc(T):""),"FCEDITWIN","width=450,height=300,resizable");
}
}
<!--#rem
dFK(i)  doFormatMarkers(index)
-->
function dFK(i){
if(i==-1){
        var A=parent.frames["EDITBODY"].document.anchors;
        if(A.length){
                if(DW){
                        dCD();
                }
                DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=306&Close=-1","FCEDITWIN","width=250,height=250,resizable");
        }else{
                alert("<X-FC-FIELD LANG.7544.3 STRING>")
        }
}else{
        var BE=parent.frames["EDITBODY"].document;
        var MN=BE.anchors[i].name;
        MN=prompt("<X-FC-FIELD FTft.303.3000.30 STRING> \""+MN+"\": ",MN);
        dSK(i,MN);
}
}
<!--#rem
dSK(i,n)        doSetMarker(index,name)
-->
function dSK(i,n){
var BE=parent.frames["EDITBODY"].document;
var A=BE.anchors;
if(i>=0&&i<A.length&&n!=null){
        if(n.length==0){
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
                A[i].removeNode(true);
<!--#else-->
                var R=BE.createRange();
                R.selectNode(A[i]);
                R.deleteContents();
<!--#endif-->
        }else{
                var A=parent.frames["EDITBODY"].document.anchors;
                var f=false;
                for(var a=0;a<A.length&&f==false;a++){
                        if(i!=a&&A[a].name==n){
                                f=true;
                        }
                }
                if(f){
                        c=alert("<!--#set var="MARKERSTR" value="<X-FC-FIELD LANG.7544.2 STRING>"--><!--#echo expr="@split($MARKERSTR,'^1')"-->\""+n+"\"<!--#echo var="MARKERSTR"-->");
                }else{
                        A[i].name=n;
                }
        }
}
if(DW!=null){
        dCD();
}
}
<!--#rem
dFI(i)  doFormatImages(index)
-->
function dFI(i){
if(DW!=null){
        dCD();
}
var A=parent.frames["EDITBODY"].document.images;
if(i<0||i>=A.length){
        DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=308&Close=-1&Show=2&Index=-1","FCEDITWIN","resizable,width=600,height=<!--#echo expr="400 + (30 * <X-FC-LIST-COUNT>)"-->");
}else{
        var I=A[i];
        var w=parseInt(I.width);
        var h=parseInt(I.height);
        var p=parseInt(I.hspace);
        var as=I.align.toLowerCase();
        var a=-1;
        var is; 
        for(is=0;is<IAS.length&&a==-1;is++){
                if(as==IAS[is]){
                        a=is;
                }
        }
        DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=308&Close=-1&Show=2&Index="+i+"&IU="+uesc(I.src)+"&IC="+uesc(I.alt)+"&IP="+p+(w?"&ISW="+w:"")+(h?"&ISH="+w:"")
,"FCEDITWIN","resizable,width=600,height=<!--#echo expr="400 + (30 * <X-FC-LIST-COUNT>)"-->");
}
}
<!--#rem
dFM()           doFormatMargins
-->
function dFM(){
if(DW!=null){
        dCD();
}
var BE=parent.frames["EDITBODY"].document.body;
var M=gSAV(BE,"margin");
var ML=null,MR=null,MT=null,MB=null;
if(M!=null){
        var ni=-1;
        MT=parseInt(M);
        ni=M.indexOf(" ");
        if(ni>-1){
                while(ni<M.length&&M.charAt(++ni)==" ");
                if(ni<M.length){
                        MR=parseInt(M.substr(ni,M.length));
                        ni=M.indexOf(" ",ni);
                        if(ni>-1){
                                while(ni<M.length&&M.charAt(++ni)==" ");
                                if(ni<M.length){
                                        MB=parseInt(M.substr(ni,M.length));
                                        ni=M.indexOf(" ",ni);
                                        if(ni>-1){
                                                while(ni<M.length&&M.charAt(++ni)==" ");
                                                if(ni<M.length){
                                                        ML=parseInt(M.substr(ni,M.length));
                                                }
                                        }
                                }
                        }
                }
        }               
}else{
        ML=gSAV(BE,"margin-left");
        MR=gSAV(BE,"margin-right");
        MT=gSAV(BE,"margin-top");
        MB=gSAV(BE,"margin-bottom");
}
if(MT==null||isNaN(MT)){
        MT=10;
}
if(MR==null||isNaN(MR)){
        MR=MT;
}
if(MB==null||isNaN(MB)){
        MB=MT;
}
if(ML==null||isNaN(ML)){
        ML=MR;
}
DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=309&Close=-1&ML="+ML+"&MR="+MR+"&MT="+MT+"&MB="+MB,"FCEDITWIN","width=300,height=100,resizable");
return false;
}
<!--#rem
dSM()           doSetMargins
-->
function dSM(){
if(DW!=null){
        var E=DW.document.forms["MF"];
        var BE=parent.frames["EDITBODY"].document.body;
        if(typeof(E)!="undefined"){
                E=E.elements;
                var ML=parseInt(E["M:L"].value);
                var MR=parseInt(E["M:R"].value);
                var MT=parseInt(E["M:T"].value);
                var MB=parseInt(E["M:B"].value);
                if(gSAV(BE,"margin")!=null){
                        if(ML==MR&&MT==MB&&ML==MT){
                                sSAV(BE,"margin",MT+"px");
                        }else if(ML==MR&&MT==MB){
                                sSAV(BE,"margin",MT+"px "+MR+"px");
                        }else{
                                sSAV(BE,"margin",MT+"px "+MR+"px "+MB+"px "+ML+"px");
                        }
                }else{
                        sSAV(BE,"margin-left",ML+"px");
                        sSAV(BE,"margin-right",MR+"px");
                        sSAV(BE,"margin-top",MT+"px");
                        sSAV(BE,"margin-bottom",MB+"px");
                }
                DW.close();
                DW=null;
        }
}
}
<!--#rem
dFB()           doFormatBackground
-->
function dFB(){
var BE=parent.frames["EDITBODY"].document.body;
var BGI=gSAV(BE,"background-image");
var BGIT=gSAV(BE,"background-repeat");
var BGIC=gSAV(BE,"background-position");
var BGC=gSAV(BE,"background-color");
var u="<X-FC-OBJURL>?Templates=Edit&FormID=320&Close=-1&Show=2";
if(BGI==null){
        BGI=BE.getAttribute("background",1);
        if(BGI!=null&&BGI.length==0){
                BGI=null;
        }
}
if(BGC==null){
        BGC=BE.getAttribute("bgcolor",1);
        if(BGC!=null&&BGC.length==0){
                BGC=null;
        }
}
if(BGI!=null){
        if(BGI.substr(0,4)=="url("){
                BGI=BGI.substr(4,BGI.length-5);
        }
        u+="&BGI="+uesc(BGI);
        if(BGIT!=null&&BGIT=="repeat"){
                u+="&BGIP=16";
        }else if(BGIC!=null&&BGIC=="center"){
                u+="&BGIP=32";
        }else{
                u+="&BGIP=128";
        }
}
if(BGC!=null){
        if(BGC.substr(0,4)=="rgb("){
                var BGCV=(parseInt(BGC.substr(4,BGC.length))<<16);
                var ni=BGC.indexOf(',');
                BGCV+=(parseInt(BGC.substr(ni+1,BGC.length))<<8);
                ni=BGC.indexOf(',',ni+1);
                BGCV+=parseInt(BGC.substr(ni+1,BGC.length));
                BGC=BGCV;
        }else{
                if(BGC.charAt(0)=="#"){
                        BGC=BGC.substr(1,6);
                }
                BGC=parseInt(BGC,16);
        }
        u+="&BGCR="+((BGC>>16)&0x000000FF)+"&BGCG="+((BGC>>8)&0x000000FF)+"&BGCB="+(BGC&0x000000FF);
}
if(DW!=null){
        dCD();
}
DW=window.open(u,"FCEDITWIN","resizable,width=600,height=<!--#echo expr="170 + (30 * <X-FC-LIST-COUNT>)"-->");
}
<!--#rem
dSB             doSetBackground
-->
function dSB(){
if(DW!=null){
        var BE=parent.frames["EDITBODY"].document.body;
        var E=DW.document.forms["BGForm"].elements;
        var IP=parseInt(E["B:IP"].value);
        if(E["B:UC"].checked){
                var BGC=E["FieldID:1010=RGB"].value;
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
                BE.bgColor=BGC;
<!--#else-->
                BE.setAttribute("bgcolor",BGC,1);
<!--#endif-->
                BGC=parseInt(BGC.substr(1,6),16);
                BGC="rgb("+((BGC>>16)&0x000000FF)+","+((BGC>>8)&0x000000FF)+","+(BGC&0x000000FF)+")";
                sSAV(BE,"background-color",BGC);
        }else{
                rSAV(BE,"background-color");
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
                BE.bgColor="";
<!--#else-->
                BE.removeAttribute("bgcolor");
<!--#endif-->
        }
        if(E["B:I"].value!=""){
                sSAV(BE,"background-image","url("+E["B:I"].value+")");
                BE.setAttribute("background",E["B:I"].value,1);
                if(IP==16){
                        sSAV(BE,"background-repeat","repeat");
                }else{
                        sSAV(BE,"background-repeat","no-repeat");
                }
                if(IP==32){
                        sSAV(BE,"background-position","center");
                }else{
                        sSAV(BE,"background-position","top left");
                }
        }else{
                rSAV(BE,"background-image");
                rSAV(BE,"background-repeat");
                rSAV(BE,"background-position");
                BE.removeAttribute("background");
        }
        dCD();
}
}
<!--#rem
dFR(R)          doFormatRule(Rule)
-->
var FR=null;
function dFR(R){
        var PB=gSAV(R,"page-break-after");
        if(PB=="always"){
                return;
        }
        var RC=gSAV(R,"color");
        var RP=gSAV(R,"margin-top");
        var RCR=0,RCG=0,RCB=0;
        if(RC==null||RC==""){
                RC=R.color;
        }
        RC=NRGB(RC);
        RCR=parseInt(RC.substr(1,2),16);
        RCG=parseInt(RC.substr(3,2),16);
        RCB=parseInt(RC.substr(5,2),16);
        if(RP==null||typeof(RP)=="undefined"){
                RP=0;
        }
        if(DW){
                dCD();
        }
        FR=R;
        DW=window.open("<X-FC-OBJURL>?Templates=Edit&FormID=307&Close=-1&RT="+R.size+"&RP="+RP+"&RH="+(R.style.visibility=="hidden"?1:0)+"&RW="+parseInt(R.width)+"&RCR="+RCR+"&RCG="+RCG+"&RCB="+RCB,"FCEDITWIN","width=525,height=300,resizable");
}
<!--#rem
dSR()           doSetRule
-->
function dSR(){
        if(DW!=null&FR!=null){
                var E=DW.document.forms["MF"].elements;
                FR.size=E["R:T"].value;
                FR.style.height=FR.size+"px";
                FR.style.marginTop=E["R:P"].value+"px";
                FR.style.visibility=(E["R:V"].checked?"visible":"hidden");
                FR.width=E["R:W"].value+"%";
                rSAV(FR,"color");
                FR.color=E["FieldID:1002=RGB"].value;
        }
        FR=null;
        dCD();
}
<!--#rem
dFFS(ps)        doFormatFontSize(PointSize)
-->
var HFS=[<!--#echo expr="@fontsize(8)"-->,<!--#echo expr="@fontsize(10)"-->,<!--#echo expr="@fontsize(12)"-->,<!--#echo expr="@fontsize(14)"-->,<!--#echo expr="@fontsize(18)"-->,<!--#echo expr="@fontsize(24)"-->,<!--#echo expr="@fontsize(36)"-->];
function dFFS(ps){
var i=0;
while(i<(HFS.length-1)&&ps>HFS[i]){
        ++i;
}
dEC("FontSize",i+1);
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
var FE=gEE("font");
if(FE!=null){
        sSAV(FE,"font-size",ps+"pt");
}
<!--#else-->
var R=parent.frames["EDITBODY"].getSelection().getRangeAt(0);
var N=R.startContainer;
if(N.nodeType==3){
        if(R.startOffset&&N.nextSibling){
                N=N.nextSibling;
        }else{
                N=N.parentNode;
        }
}
while(N!=null&&R.intersectsNode(N)){
        if(N.nodeType==1&&N.tagName.toLowerCase()=="font"){
                sSAV(N,"font-size",ps+"pt");
        }
        if(N.hasChildNodes()){
                N=N.firstChild;
        }else if(N.nextSibling!=null){
                N=N.nextSibling;
        }else if(N==N.parentNode.lastChild){
                while(N!=null&&(N.parentNode==null||N.parentNode.nextSibling==null)){
                        N=N.parentNode;
                }
                if(N!=null){
                        N=N.parentNode.nextSibling;
                }
        }else{
                N=N.parentNode;
        }
}
<!--#endif-->
}
<!--#rem
rIFE(d,e)       removeInlineFormattingElement(document,element)
-->
function rIFE(d,e){
var rc=2;
dEC(e);
while(rc>0&&d.queryCommandState(e)){
        dEC(e);
        rc-=1;
}
}
<!--#rem
dRIF()  doRemoveInlineFormatting
-->
function dRIF(){
var BF=parent.frames["EDITBODY"];
var BE=BF.document;
var rc;
rIFE(BE,"bold");
rIFE(BE,"italic");
rc=2;
dEC("underline");
while(rc>0&&BE.queryCommandState("underline")&&gEE("a")==null){
        dEC("underline");
        rc-=1;
}
rIFE(BE,"strikethrough");
rIFE(BE,"superscript");
rIFE(BE,"subscript");
dEC(<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->'backcolor'<!--#else-->'hilitecolor'<!--#endif-->,"#FFFFFF");
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
var S=BE.selection;
var R=S.createRange(0);
if(S.type.toLowerCase()=="control"){
        N=R.item(0);
        rSAV(N,"background-color");
}else{
        N=R.parentElement();
        rSAV(N,"background-color");
}
<!--#else-->
var R=BF.getSelection().getRangeAt(0);
N=R.startContainer;
while(N!=null&&R.intersectsNode(N)){
        if(N.nodeType==1){
                rSAV(N,"background-color");
        }
        if(N.hasChildNodes()){
                N=N.firstChild;
        }else if(N.nextSibling!=null){
                N=N.nextSibling;
        }else if(N==N.parentNode.lastChild){
                while(N!=null&&(N.parentNode==null||N.parentNode.nextSibling==null)){
                        N=N.parentNode;
                }
                if(N!=null){
                        N=N.parentNode.nextSibling;
                }
        }else{
                N=N.parentNode;
        }
}
<!--#endif-->
return false;
}
<!--#rem
dCD()           doCloseDialog()
-->
var DW=null;
function dCD(){
if(DW!=null){
        var CD=DW;
        DW=null;
        CD.close();
}
}
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
<!--#rem
dCP()           doChooseColour
-->
function dCP(){
var c=0x<!--#echo expr="@substr($DEFAULTCOLOUR,1,6)"-->;
var I=document.images["EDIT:COLOUR"];
var s=I.src;
var ni=s.lastIndexOf("/");
if(ni!=-1){
        s=s.substr(ni+1,s.length);
}
ni=s.indexOf("?");
if(ni!=-1){
        s=s.substr(0,ni);
}
if(s&&!isNaN(parseInt(s,16))){
        c=parseInt(s,16);
}
c=DH.ChooseColorDlg(c);
c=c.toString(16);
while(c.length<6){
        c="0"+c;
}
I.src="/__Color/"+c+"?Width=16&Height=16";
return dEC("ForeColor",c);
}
<!--#rem
LFDD()          LoadFontDropDown
Populates the contents of the font dropdown on IE
-->
function LFDD(){
var f=0;
var c=DH.fonts.count;
var E=document.forms["EDITFORM"].elements["EDIT:FACE"];
var O=E.options;
var F=[];
for(f=1;f<=c;f++){
        F[f-1]=DH.fonts(f);
}
F.sort();
for(f=0;f<c;f++){
        if((f+1)==O.length){
                O[f+1]=new Option();
        }
        O[f+1].text=F[f];
        O[f+1].value=F[f];
}
}
<!--#endif-->
<!--#rem
dL      doLoad
onLoad event
-->
function dL(){
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
LFDD();
<!--#endif-->
}
<!--#rem
dUASE(IL)               doUpdateActiveStyleElements(initialLoad)
-->
function dUASE(IL){
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
var BE=parent.frames["EDITBODY"].document;
var E=document.forms["EDITFORM"];
var I=document.images;
var i=0;
var pt=1;
if(BE.queryCommandState("bold")){
        I["EDIT:BOLD"].style.borderColor="<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>";
        pt=0;
}else{
        I["EDIT:BOLD"].style.borderColor="<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
}
if(BE.queryCommandState("italic")){
        I["EDIT:ITALIC"].style.borderColor="<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>";
        pt=0;
}else{
        I["EDIT:ITALIC"].style.borderColor="<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
}
if(BE.queryCommandState("underline")){
        I["EDIT:UNDERLINE"].style.borderColor="<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>";
        pt=0;
}else{
        I["EDIT:UNDERLINE"].style.borderColor="<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
}
if(NRGB(BE.queryCommandValue(<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->'backcolor'<!--#else-->'hilitecolor'<!--#endif-->))=="#D0D0D0"){
        I["EDIT:QUOTE"].style.borderColor="<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>";
        pt=0;
}else{
        I["EDIT:QUOTE"].style.borderColor="<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
}
if(IL==0&&gEE("a")!=null){
        I["EDIT:LINK"].style.borderColor="<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>";
        pt=0;
}else{
        I["EDIT:LINK"].style.borderColor="<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
}
if(BE.queryCommandState("strikethrough")){
        pt=0;
}
if(BE.queryCommandState("subscript")){
        pt=0;
}
if(BE.queryCommandState("superscript")){
        pt=0;
}
if(pt){
        I["EDIT:PLAIN"].style.borderColor="<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>";
}else{
        I["EDIT:PLAIN"].style.borderColor="<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
}
var ff=BE.queryCommandValue("fontname");
var FD=E["EDIT:FACE"];
FD.selectedIndex=0;
if(ff!=null&&ff!=""){
        for(i=0;i<FD.options.length&&FD.selectedIndex==0;i++){
                if(FD.options[i].value.toUpperCase()==ff.toUpperCase()){
                        FD.selectedIndex=i;
                }
        }
}
var fc=BE.queryCommandValue("forecolor");
if(fc==null||fc==""){
        fc=0x<!--#echo expr="@substr($DEFAULTCOLOUR,1,6)"-->;
}
fc=fc.toString(16);
while (fc.length<6){
        fc="0"+fc;
}
        <!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
<!--#rem
IE 6 has a byte reversal bug whereby the forecolour comes back as BBGGRR.
-->
fc=fc.substr(4,2)+fc.substr(2,2)+fc.substr(0,2);
var FC=I["EDIT:COLOUR"];
var s=FC.src;
var ni=s.lastIndexOf("/");
if(ni!=-1){
        s=s.substr(ni+1,s.length);
}
ni=s.indexOf("?");
if(ni!=-1){
        s=s.substr(0,ni);
}
if(!(s&&!isNaN(parseInt(s,16))&&s==fc)){
        FC.src="/__Color/"+fc+"?Width=16&Height=16";
}
        <!--#else-->
if(fc.substr(0,4)=="rgb("){
        fc=NRGB(fc);
}else if(fc.charAt(0)!="#"){
        fc="#"+fc;
}
var FC=E["EDIT:COLOUR"];
FC.selectedIndex=0;
for(i=1;i<FC.options.length;i++){
        if(FC.options[i].value==fc){
                FC.selectedIndex=i;
        }
}
        <!--#endif-->
var fs=BE.queryCommandValue("fontsize");
if(fs==null||fs==""){
        fs=<!--#echo var="DEFAULTSIZE"-->;
}else if(fs.toString().charAt(0)=="+"){
        fs=<!--#echo var="DEFAULTSIZE"-->;
}else if(fs.toString().charAt(0)=="-"){
        fs=<!--#echo var="DEFAULTSIZE"-->;
}else if(!isNaN(parseInt(fs))){
        if(fs>HFS.length){
                fs=HFS.length;
        }
        fs=HFS[fs-1];
}else{
        fs=<!--#echo var="DEFAULTSIZE"-->;
}
if(IL==0&&gEE("font")!=null){
        var fsp=gEE("font").style.fontSize;
        if(fsp==null||fsp==""){
                fsp=gSAV(gEE("font"),"font-size");
        }
        if(fsp){
                fsp=parseInt(fsp);
                if(!isNaN(fsp)){
                        fs=fsp;
                }
        }
}
var FS=E["EDIT:SIZE"];
for(i=0;i<FS.options.length;i++){
        if(i==FS.options.length-1){
                FS.selectedIndex=i;
        }else if(fs>=parseInt(FS.options[i].value)&&fs<parseInt(FS.options[i+1].value)){
                FS.selectedIndex=i;
                i=FS.options.length;
        }
}
var FA=E["EDIT:ALIGN"];
FA.selectedIndex=0;
if(BE.queryCommandState("JustifyRight")){
        FA.selectedIndex=2;
}else if(BE.queryCommandState("JustifyCenter")){
        FA.selectedIndex=1;
}
var FT=E["EDIT:TABLE"];
if(IL==0&&gEE("table")!=null){
        FT.disabled=false;
}else{
        FT.disabled=true;
}
<!--#else-->
var SD=gSD(parent.frames["EDITBODY"].getSelection());
var E=document.forms["EDITFORM"];
var I=document.images;
I["EDIT:BOLD"].style.borderColor=(SD[6]&0x0001)?"<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>":"<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
I["EDIT:ITALIC"].style.borderColor=(SD[6]&0x0002)?"<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>":"<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
I["EDIT:UNDERLINE"].style.borderColor=(SD[6]&0x0004)?"<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>":"<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
I["EDIT:QUOTE"].style.borderColor=(SD[6]&0x0400)?"<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>":"<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
I["EDIT:LINK"].style.borderColor=(SD[6]&0x0200)?"<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>":"<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
I["EDIT:PLAIN"].style.borderColor=(SD[6]==0)?"<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>":"<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>";
var FD=E["EDIT:FACE"];
FD.selectedIndex=0;
if(SD[4]!=null&&SD[4]!=""){
        SD[4]=SD[4].toUpperCase();
        for(i=0;i<FD.options.length&&FD.selectedIndex==0;i++){
                if(FD.options[i].value.toUpperCase()==SD[4]){
                        FD.selectedIndex=i;
                }
        }
}
if(SD[7]==null||SD[7]==""){
        SD[7]="<!--#echo var="DEFAULTCOLOUR"-->";
}
if(SD[7].substr(0,4)=="rgb("){
        SD[7]=NRGB(SD[7]);
}else if(SD[7].charAt(0)!="#"){
        SD[7]="#"+SD[7];
}
SD[7]=SD[7].toUpperCase();
var FC=E["EDIT:COLOUR"];
FC.selectedIndex=0;
for(i=1;i<FC.options.length;i++){
        if(FC.options[i].value==SD[7]){
                FC.selectedIndex=i;
        }
}
if(SD[5]==null||SD[5]==""){
        SD[5]=<!--#echo var="DEFAULTSIZE"-->;
}
var FS=E["EDIT:SIZE"];
for(i=0;i<FS.options.length;i++){
        if(i==FS.options.length-1){
                FS.selectedIndex=i;
        }else if(SD[5]>=parseInt(FS.options[i].value)&&SD[5]<parseInt(FS.options[i+1].value)){
                FS.selectedIndex=i;
                i=FS.options.length;
        }
}
var FA=E["EDIT:ALIGN"].selectedIndex=(SD[9]==1?2:(SD[9]==-1?1:0));
var FT=E["EDIT:TABLE"].disabled=!(IL==0&&gEE("table")!=null);
<!--#endif-->
}
<X-FC-WHITESPACE RETAIN>
//-->
</script>
</head>
<body<!--#if expr="<X-FC-BROWSER NAME.MSIE>"--> unselectable="on"<!--#endif--> onload="dL();" onunload="dCD();" style="margin:2px;background-color:<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>;background:url('/__Gradient/VG_<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB,X>_25_64') repeat;">
<X-FC-WHITESPACE STRIP>
<form name="EDITFORM" action="JavaScript://" onsubmit="return false;">
<table width="100%" cellpadding="0" cellspacing="0" border="0" summary=""<!--#if expr="<X-FC-BROWSER NAME.MSIE>"--> onmouseover="dTBMI();" onmouseout="dTBMO();"<!--#endif-->>
<tr>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dRIF();"><img name="EDIT:PLAIN" src="<!--#if expr="<X-FC-RESOURCE ICON.11303 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11030" alt="<X-FC-FIELD LANG.CMD.30.0 STRING>" title="<X-FC-FIELD LANG.CMD.30.9 STRING>" width="24" height="24" hspace="2" vspace="2" border="1" style="border-color:<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>;border-style:solid;border-width:1px;"/></td>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dEC('bold',null);"><img name="EDIT:BOLD" src="<!--#if expr="<X-FC-RESOURCE ICON.11031 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11031" alt="<X-FC-FIELD LANG.CMD.31.0 STRING>" title="<X-FC-FIELD LANG.CMD.31.9 STRING>" width="24" height="24" hspace="2" vspace="2" border="1" style="border-color:<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>;border-style:solid;border-width:1px;"/></td>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dEC('italic',null);"><img name="EDIT:ITALIC" src="<!--#if expr="<X-FC-RESOURCE ICON.11032 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11032" alt="<X-FC-FIELD LANG.CMD.32.0 STRING>" title="<X-FC-FIELD LANG.CMD.32.9 STRING>" width="24" height="24" hspace="2" vspace="2" border="1" style="border-color:<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>;border-style:solid;border-width:1px;"/></td>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dEC('underline',null);"><img name="EDIT:UNDERLINE" src="<!--#if expr="<X-FC-RESOURCE ICON.11033 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11033" alt="<X-FC-FIELD LANG.CMD.33.0 STRING>" title="<X-FC-FIELD LANG.CMD.33.9 STRING>" width="24" height="24" hspace="2" vspace="2" border="1" style="border-color:<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>;border-style:solid;border-width:1px;"/></td>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dEC(<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->'backcolor'<!--#else-->'hilitecolor'<!--#endif-->,'#D0D0D0');"><img name="EDIT:QUOTE" src="<!--#if expr="<X-FC-RESOURCE ICON.11036 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11036" alt="<X-FC-FIELD LANG.CMD.36.0 STRING>" title="<X-FC-FIELD LANG.CMD.36.9 STRING>" width="24" height="24" hspace="2" vspace="2" border="1" style="border-color:<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>;border-style:solid;border-width:1px;"/></td>
        <td class="tbtext">&nbsp;</td>
        <td bgcolor="<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>" style="width:1px;"><div style="width:1px;"></div></td>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dEC('Indent',null);"><img src="<!--#if expr="<X-FC-RESOURCE ICON.11563 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11563" alt="<X-FC-FIELD LANG.CMD.563.0 STRING>" title="<X-FC-FIELD LANG.CMD.563.9 STRING>" width="24" height="24" hspace="2" vspace="2"/></td>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dEC('Outdent',null);"><img src="<!--#if expr="<X-FC-RESOURCE ICON.11562 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11562" alt="<X-FC-FIELD LANG.CMD.562.0 STRING>" title="<X-FC-FIELD LANG.CMD.562.9 STRING>" width="24" height="24" hspace="2" vspace="2"/></td>
        <td class="tbtext">&nbsp;</td>
        <td bgcolor="<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>" style="width:1px;"><div style="width:1px;"></div></td>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dFS();"><img src="<!--#if expr="<X-FC-RESOURCE ICON.11530 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11530" alt="<X-FC-FIELD LANG.CMD.530.0 STRING>" title="<X-FC-FIELD LANG.CMD.530.9 STRING>" width="24" height="24" hspace="2" vspace="2"/></td>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dFP();"><img src="<!--#if expr="<X-FC-RESOURCE ICON.11511 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11511" alt="<X-FC-FIELD LANG.CMD.511.0 STRING>" title="<X-FC-FIELD LANG.CMD.511.9 STRING>" width="24" height="24" hspace="2" vspace="2"/></td>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dIS(4);"><img name="EDIT:LINK" src="<!--#if expr="<X-FC-RESOURCE ICON.11703 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11703" alt="<X-FC-FIELD LANG.CMD.703.0 STRING>" title="<X-FC-FIELD LANG.CMD.703.9 STRING>" width="24" height="24" hspace="2" vspace="2" border="1" style="border-color:<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>;border-style:solid;border-width:1px;"/></td>
        <td class="tbtext">&nbsp;</td>
        <td bgcolor="<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>" style="width:1px;"><div style="width:1px;"></div></td>
        <td class="tbtext">&nbsp;</td>
        <td class="tbplain" onclick="return dIS(7);"><img src="<!--#if expr="<X-FC-RESOURCE ICON.11355 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i11355" alt="<X-FC-FIELD LANG.CMD.355.0 STRING>" title="<X-FC-FIELD LANG.CMD.355.9 STRING>" width="24" height="24" hspace="2" vspace="2"/></td>
        <td class="tbtext" width="100%">&nbsp;</td>
<!--#if expr="$EDITORDEBUG"-->
        <td class="tbplain" onclick="alert(parent.frames['EDITBODY'].document.documentElement.innerHTML);return false;"><img src="<!--#if expr="<X-FC-RESOURCE ICON.7027 OVERRIDE>"--><X-FC-LOGIN><!--#else-->/<!--#endif-->Icons/i7027" alt="<X-FC-FIELD LANG.7544.4 STRING>" title="<X-FC-FIELD LANG.7544.4 STRING>" width="24" height="24" hspace="2" vspace="2"/></td>
        <td class="tbtext">&nbsp;</td>
<!--#endif-->
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" summary="">
<tr>
        <td style="height:2px;"></td>
</tr>
<tr>
        <td bgcolor="<X-FC-FIELD PREFS.5606 DEFAULT=LANG.49.5606.11 RGB>" style="height:1px;"></td>
</tr>
<tr>
        <td style="height:2px;"></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" summary="">
<tr>
        <td class="tbtext">&nbsp;</td>
        <td><select name="EDIT:FACE" class="tbtext" onchange="dEC('FontName',this.options[this.selectedIndex].value);" style="color:#000000;">
                <option value="<!--#echo var="DEFAULTFONT"-->" selected="selected"></option><!--#if expr="@length($CUSTOMFONTS)"--><!--#set var="FONTLIST" value="$CUSTOMFONTS"--><!--#else--><!--#set var="FONTLIST" value="<X-FC-FIELD LANG.7502 STRING>"--><!--#endif--><!--#while expr="@length($FONTLIST)"--><!--#set var="FONT" expr="@split($FONTLIST,';')"-->
                <option value="<!--#echo expr="@mlescape($FONT)"-->"><!--#echo expr="@mlescape($FONT)"--></option><!--#endwhile-->
        </select></td>
        <td class="tbtext">&nbsp;</td>
        <td><select name="EDIT:SIZE" class="tbtext" onchange="dFFS(this.options[this.selectedIndex].value);" style="color:#000000;"><!--#set var="FONTSIZES" value="8;10;12;14;16;18;20;24;36;48;72"--><!--#while expr="$FONTSIZES"--><!--#set var="FONTSIZE" expr="@split($FONTSIZES,';')"-->
                <option value="<!--#echo expr="@fontsize($FONTSIZE)"-->"<!--#if expr="$DEFAULTSIZE == @fontsize($FONTSIZE)"--> selected="selected"<!--#endif-->><!--#echo var="FONTSIZE"--></option><!--#endwhile-->
        </select></td>
        <td class="tbtext">&nbsp;</td>
        <td><table cellpadding="0" cellspacing="0" border="0" summary="" style="width:16px;height:16px;border-style:solid;border-color:<X-FC-FIELD PREFS.5602 DEFAULT=LANG.49.5602.11 RGB>;border-width:2px;">
        <tr><!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
                <td><a href="JavaScript://" onclick="return dCP();"><img id="EDIT:COLOUR" src="/__Color/<!--#echo expr="@substr($DEFAULTCOLOUR,1,6)"-->?Width=16&amp;Height=16" width="16" height="16"/></a></td><!--#else-->
                <td><select class="tbtext" name="EDIT:COLOUR" onchange="if(this.selectedIndex>0)dEC('ForeColor',this.options[this.selectedIndex].value);" style="color:#000000;">
                        <option value="#000000"><X-FC-FIELD LANG.7545.1 STRING></option><!--#set var="INDEX" value="1"--><!--#while expr="++$INDEX < 18"--><!--#set var="COLOUR" value="<X-FC-FIELD LANG.7545.`$INDEX` STRING>"--><!--#set var="COLOURSTR" expr="@split($COLOUR,'=')"-->
                        <option value="<!--#echo var="COLOUR"-->"<!--#if expr="$COLOUR==~$DEFAULTCOLOUR"--> selected="selected"<!--#endif-->><!--#echo var="COLOURSTR"--></option><!--#endwhile-->
                </select></td><!--#endif-->
        </tr>
        </table></td>
        <td class="tbtext">&nbsp;</td>
        <td><select name="EDIT:ALIGN" class="tbtext" onchange="dEC(this.options[this.selectedIndex].value,null);" style="color:#000000;">
                <option value="JustifyLeft"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1012.10 LITERALSTRING>`,0)"--></option>
                <option value="JustifyCenter"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1012.10 LITERALSTRING>`,1)"--></option>
                <option value="JustifyRight"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1012.10 LITERALSTRING>`,-1)"--></option>
        </select></td>
        <td class="tbtext">&nbsp;</td>
        <td><select name="EDIT:INSERT" class="tbtext" onchange="if(this.selectedIndex>0){dIS(this.options[this.selectedIndex].value);this.selectedIndex=0;}" style="color:#000000;">
                <option value="-1" selected="selected"><X-FC-FIELD LANG.CMD.422.0 STRING>...</option>
                <option value="7"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1060.10 LITERALSTRING>`,7)"--></option>
                <option value="1"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1060.10 LITERALSTRING>`,1)"--></option>
                <option value="6"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1060.10 LITERALSTRING>`,6)"--></option>
                <option value="2"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1060.10 LITERALSTRING>`,2)"--></option>
                <option value="3"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1060.10 LITERALSTRING>`,3)"--></option>
                <option value="4"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1060.10 LITERALSTRING>`,4)"--></option>
                <option value="5"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1060.10 LITERALSTRING>`,5)"--></option>
        </select></td>
        <td class="tbtext">&nbsp;</td>
        <td><select name="EDIT:FORMAT" class="tbtext" onchange="if(this.selectedIndex>0){dF(this.options[this.selectedIndex].value);this.selectedIndex=0;}" style="color:#000000;">
                <option value="-1" selected="selected"><X-FC-FIELD LANG.CMD.577.0 STRING>...</option>
                <option value="0"><X-FC-FIELD FCft.302.0.25 STRING></option>
                <option value="1"><X-FC-FIELD FCft.303.0.25 STRING></option>
                <option value="2"><X-FC-FIELD FCft.309.0.25 STRING></option>
                <option value="3"><X-FC-FIELD FCft.320.0.25 STRING></option>
        </select></td>
        <td class="tbtext">&nbsp;</td>
        <td><select name="EDIT:TABLE" class="tbtext" onchange="if(this.selectedIndex>0){dG(this.options[this.selectedIndex].value);this.selectedIndex=0;}" disabled="disabled" style="color:#000000;">
                <option value="-1" selected="selected"><X-FC-FIELD LANG.614.39 STRING></option>
                <option value="12"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1067.10 LITERALSTRING>`,6)"--></option>
                <option value="11"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1067.10 LITERALSTRING>`,5)"--></option>
                <option value="8"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1066.10 LITERALSTRING>`,8)"--></option>
                <option value="6"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1066.10 LITERALSTRING>`,6)"--></option>
                <option value="7"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1066.10 LITERALSTRING>`,7)"--></option>
                <option value="5"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1066.10 LITERALSTRING>`,5)"--></option>
                <option value="3"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1066.10 LITERALSTRING>`,3)"--></option>
                <option value="4"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1066.10 LITERALSTRING>`,4)"--></option>
                <option value="1"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1066.10 LITERALSTRING>`,1)"--></option>
                <option value="2"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1066.10 LITERALSTRING>`,2)"--></option>
                <option value="10"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1066.10 LITERALSTRING>`,10)"--></option>
                <option value="9"><!--#echo expr="@list(`<X-FC-FIELD FCft.350.1066.10 LITERALSTRING>`,9)"--></option>
        </select></td>
        <td width="100%"></td>
</tr>
</table>
</form>
<!--#if expr="<X-FC-BROWSER NAME.MSIE>"-->
<object id="DH" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0" height="0"></object>
<!--#endif-->
<X-FC-WHITESPACE RETAIN>
</body>
<!--*Toolbars/95 BSS=<X-FC-REQUEST-TIME BODY.SETUPSTART> BSE=<X-FC-REQUEST-TIME BODY.SETUPEND> BSD=<X-FC-REQUEST-TIME BODY.STYLEDONE> B=<X-FC-REQUEST-TIME BODY> D=<X-FC-REQUEST-TIME>-->
</html>