D:\my docs\My Received Files\Yabb\Yabb\YaBB_2.5_AEB\cgi-bin\yabb2_old\Sources\InstantMessage.pl D:\WEBSITES\testbed\cgi-bin\yabb252\Sources\InstantMessage.pl
############################################################################### ###############################################################################
# InstantMessage.pl                                                           # # InstantMessage.pl                                                           #
############################################################################### ###############################################################################
# YaBB: Yet another Bulletin Board                                            # # YaBB: Yet another Bulletin Board                                            #
# Open-Source Community Software for Webmasters                               # # Open-Source Community Software for Webmasters                               #
# Version:        YaBB 2.5 Anniversary Edition                                # # Version:        YaBB 2.5.2                                                  #
# Packaged:       July 04, 2010                                               # # Packaged:       September 30, 2012                                          #
# Distributed by: http://www.yabbforum.com                                    # # Distributed by: http://www.yabbforum.com                                    #
# =========================================================================== # # =========================================================================== #
# Copyright (c) 2000-2010 YaBB (www.yabbforum.com) - All Rights Reserved.     # # Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved.     #
# Software by:  The YaBB Development Team                                     # # Software by:  The YaBB Development Team                                     #
#               with assistance from the YaBB community.                      # #               with assistance from the YaBB community.                      #
# Sponsored by: Xnull Internet Media, Inc. - http://www.ximinc.com            #    
#               Your source for web hosting, web design, and domains.         #    
############################################################################### ###############################################################################
   
$instantmessageplver = 'YaBB 2.5 AE $Revision: 1.108 $'; $instantmessageplver = 'YaBB 2.5.2 $Revision: 1.1 $';
if ($action eq 'detailedversion') { return 1; } if ($action eq 'detailedversion') { return 1; }
  $set_subjectMaxLength ||= 50;  
   
## create the send IM section of the screen ## create the send IM section of the screen
   
#### ####
# new format:  for  msg file: # new format:  for  msg file:
#messageid|(from)user|(touser(s))|(ccuser(s))|(bccuser(s))| #messageid|(from)user|(touser(s))|(ccuser(s))|(bccuser(s))|
#   subject|date|message|(parentmid)|reply#|ip|messagestatus| #   subject|date|message|(parentmid)|reply#|ip|messagestatus|
#       flags|storefolder|attachment #       flags|storefolder|attachment
   
# (optional) [placeholder] # (optional) [placeholder]
   
# for outbox: # for outbox:
#messageid|(from)user|(touser(s))|(ccuser(s))|(bccuser(s))| #messageid|(from)user|(touser(s))|(ccuser(s))|(bccuser(s))|
#   subject|date|message|(parentmid)|reply#|ip|messagestatus| #   subject|date|message|(parentmid)|reply#|ip|messagestatus|
#       flags|storefolder|attachment #       flags|storefolder|attachment
   
## messagestatus = c(onfidential)/h(igh importance)/s(tandard)/a(lert)/g(uest)/(b)roadcast/(n)otify of post ## messagestatus = c(onfidential)/h(igh importance)/s(tandard)/a(lert)/g(uest)/(b)roadcast/(n)otify of post
## flags = u(nread)/f(orward)/q(oute)/r(eply)/c(alled back) ## flags = u(nread)/f(orward)/q(oute)/r(eply)/c(alled back)
## parentmid = stays same ## parentmid = stays same
## reply# = increments for replies, so we can build conversation threads ## reply# = increments for replies, so we can build conversation threads
   
## storefolder = name of storage folder. Start with in & out for everyone. ## storefolder = name of storage folder. Start with in & out for everyone.
#1  $mnum = 3; #1  $mnum = 3;
#2  $imnewcount = 0; #2  $imnewcount = 0;
#3  $moutnum = 17; #3  $moutnum = 17;
#4  $storenum = 0; #4  $storenum = 0;
#5  $draftnum = 0; #5  $draftnum = 0;
#6  @folders  (name1|name2|name3) #6  @folders  (name1|name2|name3)
   
# MF-B: new .ims file format # MF-B: new .ims file format
#   ### UserIMS YaBB 2.2 Version ### #   ### UserIMS YaBB 2.2 Version ###
#   '${$username}{'PMmnum'}',"value" #   '${$username}{'PMmnum'}',"value"
#   '${$username}{'PMimnewcount'}',"value" #   '${$username}{'PMimnewcount'}',"value"
#   '${$username}{'PMmoutnum'}',"value" #   '${$username}{'PMmoutnum'}',"value"
#   '${$username}{'PMstorenum'}',"value" #   '${$username}{'PMstorenum'}',"value"
#   '${$username}{'PMdraftnum'}',"value" #   '${$username}{'PMdraftnum'}',"value"
#   '${$username}{'PMfolders'}',"value" #   '${$username}{'PMfolders'}',"value"
#   '${$username}{'PMfoldersCount'}',"value" #   '${$username}{'PMfoldersCount'}',"value"
   
#   @storecurrentin = qw/ /; # list of messages in .imstore from msg #   @storecurrentin = qw/ /; # list of messages in .imstore from msg
#   @storecurrentout = qw/ /; # list of messages in .imstore from outbox #   @storecurrentout = qw/ /; # list of messages in .imstore from outbox
   
   
   
sub buildIMsend { sub buildIMsend {
   &LoadLanguage('InstantMessage');    &LoadLanguage('InstantMessage');
   &LoadLanguage('Post');    &LoadLanguage('Post');
   &LoadCensorList;    &LoadCensorList;
   
   if ($FORM{'previewim'}) {    if ($FORM{'previewim'}) {
       require "$sourcedir/Post.pl";        require "$sourcedir/Post.pl";
       if (!$error){ &Preview; $subject = $csubject; }        if (!$error){ &Preview; $subject = $csubject; }
       else { &Preview($error); }        else { &Preview($error); }
       &FromHTML($message);        &FromHTML($message);
       &FromHTML($subject);        &FromHTML($subject);
   }    }
   $mctitle = $inmes_txt{'775'};    $mctitle = $inmes_txt{'775'};
   ## check for a draft being opened    ## check for a draft being opened
   if ($INFO{'caller'} == 4 && $INFO{'id'}) {    if ($INFO{'caller'} == 4 && $INFO{'id'}) {
       if (!-e "$memberdir/$username.imdraft") { &fatal_error('cannot_open', "$username.imdraft");}        if (!-e "$memberdir/$username.imdraft") { &fatal_error('cannot_open', "$username.imdraft");}
       fopen(DRAFT, "$memberdir/$username.imdraft");        fopen(DRAFT, "$memberdir/$username.imdraft");
       my @draftPM = <DRAFT>;        my @draftPM = <DRAFT>;
       fclose(DRAFT);        fclose(DRAFT);
       chomp @draftPM;        chomp @draftPM;
       my $flagfound;        my $flagfound;
       foreach my $draftMess (@draftPM) {        foreach my $draftMess (@draftPM) {
           my ($checkId, undef) = split(/\|/, $draftMess, 2);            my ($checkId, undef) = split(/\|/, $draftMess, 2);
           if ($checkId eq $INFO{'id'}){            if ($checkId eq $INFO{'id'}){
               ($dmessageid, $dmusername, $userto, $usernamecc, $usernamebcc, $subject, $dmdate, $message, $dmpmessageid, $dmreplyno, $dmips, $dmessageStatus, $dmessageFlags, $dstoreFolder, $dmessageAttachment) = split(/\|/, $draftMess);                ($dmessageid, $dmusername, $userto, $usernamecc, $usernamebcc, $subject, $dmdate, $message, $dmpmessageid, $dmreplyno, $dmips, $dmessageStatus, $dmessageFlags, $dstoreFolder, $dmessageAttachment) = split(/\|/, $draftMess);
               $flagfound = 1;                $flagfound = 1;
               last;                last;
           }            }
       }        }
       if (!$flagfound) { &fatal_error('cannot_find_draftmess'); }        if (!$flagfound) { &fatal_error('cannot_find_draftmess'); }
       &FromHTML($message);        &FromHTML($message);
       &FromHTML($subject);        &FromHTML($subject);
   }    }
   
   my $pmicon = 'standard';    my $pmicon = 'standard';
   $stselect = '';    $stselect = '';
   $urselect = '';    $urselect = '';
   $cnselect = '';    $cnselect = '';
   if ($FORM{'status'} || $INFO{'status'}) { $thestatus = $FORM{'status'} || $INFO{'status'}; }    if ($FORM{'status'} || $INFO{'status'}) { $thestatus = $FORM{'status'} || $INFO{'status'}; }
   elsif ($dmessageStatus){ $thestatus = $dmessageStatus; }    elsif ($dmessageStatus){ $thestatus = $dmessageStatus; }
   else { $thestatus = 's'; }    else { $thestatus = 's'; }
   
   if ($thestatus eq 's') { $stselect = qq~ selected="selected"~; }    if ($thestatus eq 's') { $stselect = qq~ selected="selected"~; }
   elsif ($thestatus eq 'u') { $urselect = qq~ selected="selected"~; }    elsif ($thestatus eq 'u') { $urselect = qq~ selected="selected"~; }
   elsif ($thestatus eq 'c') { $cnselect = qq~ selected="selected"~; }    elsif ($thestatus eq 'c') { $cnselect = qq~ selected="selected"~; }
   elsif ($thestatus eq 'sb') { $stselect = qq~ selected="selected"~; $sendBMess = 1; }    elsif ($thestatus eq 'sb') { $stselect = qq~ selected="selected"~; $sendBMess = 1; }
   elsif ($thestatus eq 'ub') { $urselect = qq~ selected="selected"~; $sendBMess = 1; }    elsif ($thestatus eq 'ub') { $urselect = qq~ selected="selected"~; $sendBMess = 1; }
   elsif ($thestatus eq 'cb') { $cnselect = qq~ selected="selected"~; $sendBMess = 1; }    elsif ($thestatus eq 'cb') { $cnselect = qq~ selected="selected"~; $sendBMess = 1; }
   $sendBMess = 0 unless $sendBMess == 1 && (($PMenableBm_level == 1 && ($iamadmin || $iamgmod || $iammod)) || ($PMenableBm_level == 2 && ($iamadmin || $iamgmod)) || ($PMenableBm_level == 3 && $iamadmin));    $sendBMess = 0 unless $sendBMess == 1 && (($PMenableBm_level == 1 && ($iamadmin || $iamgmod || $iammod)) || ($PMenableBm_level == 2 && ($iamadmin || $iamgmod)) || ($PMenableBm_level == 3 && $iamadmin));
   
   ##########   post code   #########    ##########   post code   #########
   if (!$iamadmin && !$iamgmod && !$staff && ${$uid.$username}{'postcount'} < $numposts) {    if (!$iamadmin && !$iamgmod && !$staff && ${$uid.$username}{'postcount'} < $numposts) {
       &fatal_error('im_low_postcount');        &fatal_error('im_low_postcount');
   }    }
   
   if (!$replyguest) {    if (!$replyguest) {
       if ($is_preview) { $post_txt{'507'} = $post_txt{'771'}; }        if ($is_preview) { $post_txt{'507'} = $post_txt{'771'}; }
       $normalquot = $post_txt{'599'};        $normalquot = $post_txt{'599'};
       $simpelquot = $post_txt{'601'};        $simpelquot = $post_txt{'601'};
       $simpelcode = $post_txt{'602'};        $simpelcode = $post_txt{'602'};
       $edittext = $post_txt{'603'};        $edittext = $post_txt{'603'};
       if (!$fontsizemax) { $fontsizemax = 72; }        if (!$fontsizemax) { $fontsizemax = 72; }
       if (!$fontsizemin) { $fontsizemin = 6; }        if (!$fontsizemin) { $fontsizemin = 6; }
   
       # this defines what the top area of the post box will look like:        # this defines what the top area of the post box will look like:
       ## if this is a reply , load the 'from' name off the message        ## if this is a reply , load the 'from' name off the message
       if ($INFO{'reply'} || $INFO{'quote'}) { $INFO{'to'} = $mfrom; }        if ($INFO{'reply'} || $INFO{'quote'}) { $INFO{'to'} = $mfrom; }
       if (!$INFO{'to'} && $FORM{'to'} ne '') { $INFO{'to'} = $FORM{'to'}; }        if (!$INFO{'to'} && $FORM{'to'} ne '') { $INFO{'to'} = $FORM{'to'}; }
   
       ## if cloaking is enabled, and 'to' is not a blank        ## if cloaking is enabled, and 'to' is not a blank
       if ($do_scramble_id && $INFO{'to'} ne '') {        if ($do_scramble_id && $INFO{'to'} ne '') {
           &decloak($INFO{'to'});            &decloak($INFO{'to'});
       }        }
   
       if (!$sendBMess) { &LoadUser($INFO{'to'}); }        if (!$sendBMess) { &LoadUser($INFO{'to'}); }
   }    }
   
   
   $message =~ s~<br.*?>~\n~gi;    $message =~ s~<br.*?>~\n~gi;
   $message =~ s/&nbsp;/ /g;    $message =~ s/&nbsp;/ /g;
   &ToChars($message);    &ToChars($message);
   $message = &Censor($message);    $message = &Censor($message);
   &ToHTML($message);    &ToHTML($message);
   $message =~ s/ &nbsp; &nbsp; &nbsp;/\t/ig;    $message =~ s/ &nbsp; &nbsp; &nbsp;/\t/ig;
   
   if ($msubject) { $subject = $msubject; }    if ($msubject) { $subject = $msubject; }
   &ToChars($subject);    &ToChars($subject);
   $subject = &Censor($subject);    $subject = &Censor($subject);
   &ToHTML($subject);    &ToHTML($subject);
   
   
   if ($action eq "modify" || $action eq "modify2") {    if ($action eq "modify" || $action eq "modify2") {
       $displayname = qq~$mename~;        $displayname = qq~$mename~;
   } else {    } else {
       $displayname = ${$uid.$username}{'realname'};        $displayname = ${$uid.$username}{'realname'};
   }    }
   require "$sourcedir/ContextHelp.pl";    require "$sourcedir/ContextHelp.pl";
   &ContextScript("post");    &ContextScript("post");
   
   $MCGlobalFormStart .= qq~    $MCGlobalFormStart .= qq~
   $ctmain    $ctmain
   <script language="JavaScript1.2" src="$yyhtml_root/yabbc.js" type="text/javascript"></script>    <script language="JavaScript1.2" src="$yyhtml_root/yabbc.js" type="text/javascript"></script>
   <script language="JavaScript1.2" src="$yyhtml_root/ubbc.js" type="text/javascript"></script>    <script language="JavaScript1.2" src="$yyhtml_root/ubbc.js" type="text/javascript"></script>
   <script language="JavaScript1.2" type="text/javascript">    <script language="JavaScript1.2" type="text/javascript">
   var displayNames = new Object();    var displayNames = new Object();
   $template_names    $template_names
   </script>    </script>
   ~;    ~;
   
   if ($prevmain && !$replyguest) {    if ($prevmain && !$replyguest) {
       $imsend .= qq~        $imsend .= qq~
   <tr>    <tr>
       <td class="windowbg">        <td class="windowbg">
       $prevmain        $prevmain
       </td>        </td>
   </tr>    </tr>
   ~;    ~;
   }    }
   
   if (((!$enable_PMcontrols && $enable_PMActprev) || ($enable_PMcontrols && ${$uid.$username}{'pmactprev'})) && !$replyguest) {    if (((!$enable_PMcontrols && $enable_PMActprev) || ($enable_PMcontrols && ${$uid.$username}{'pmactprev'})) && !$replyguest) {
       $imsend .= qq~        $imsend .= qq~
   <tr>    <tr>
       <td class="windowbg" valign="top">        <td class="windowbg" valign="top">
           <table width="95%" align="left" cellpadding="2">            <table width="95%" align="left" cellpadding="2">
            <tr>             <tr>
             <td align="left">              <td align="left">
              <img name="prevwin" id="prevwin" src="$defaultimagesdir/cat_expand.gif" alt="$npf_txt{'01'}" title="$npf_txt{'01'}" border="0" style="cursor:pointer; cursor:hand;" onclick="enabPrev();" /> <b>$npf_txt{'04'}</b>               <img name="prevwin" id="prevwin" src="$defaultimagesdir/cat_expand.gif" alt="$npf_txt{'01'}" title="$npf_txt{'01'}" border="0" style="cursor:pointer; cursor:hand;" onclick="enabPrev();" /> <b>$npf_txt{'04'}</b>
             </td>              </td>
            </tr>             </tr>
           </table>            </table>
       </td>        </td>
   </tr>    </tr>
   <tr>    <tr>
       <td class="windowbg">        <td class="windowbg">
           <div id="savetable" class="bordercolor" style="height:0px; padding:1px; width:100%; margin:auto; visibility:hidden;">            <div id="savetable" class="bordercolor" style="height:0px; padding:1px; width:100%; margin:auto; visibility:hidden;">
           <table border="0" width="100%" cellpadding="3" cellspacing="0" style="table-layout:fixed;">            <table border="0" width="100%" cellpadding="3" cellspacing="0" style="table-layout:fixed;">
             <tr>              <tr>
               <td class="titlebg">                <td class="titlebg">
                <div id="savetopic" style="height:0px; text-align:left; vertical-align:middle; font-weight:bold; overflow:auto;">&nbsp;</div>                 <div id="savetopic" style="height:0px; text-align:left; vertical-align:middle; font-weight:bold; overflow:auto;">&nbsp;</div>
               </td>                </td>
             </tr>              </tr>
             <tr>              <tr>
               <td class="windowbg2">                <td class="windowbg2">
                <div id="saveframe" class="message" style="height:0px; text-align:left; vertical-align:top; overflow:auto;">&nbsp;</div>                 <div id="saveframe" class="message" style="height:0px; text-align:left; vertical-align:top; overflow:auto;">&nbsp;</div>
               </td>                </td>
             </tr>              </tr>
           </table>            </table>
           </div>            </div>
       </td>        </td>
   </tr>    </tr>
       ~;        ~;
   }    }
         
   if ($replyguest) {    if ($replyguest) {
       $imsend .= qq~        $imsend .= qq~
   <tr>    <tr>
       <td class="windowbg2">        <td class="windowbg2">
       $guest_reply{'guesttext'}        $guest_reply{'guesttext'}
       </td>        </td>
   </tr>    </tr>
       ~;        ~;
   }    }
   
   $imsend .= qq~    $imsend .= qq~
   <tr>    <tr>
       <td class="windowbg" width="50%">        <td class="windowbg" width="50%">
           <table width="95%" align="left" cellpadding="2">~;            <table width="95%" align="left" cellpadding="2">~;
   
   if (!$replyguest && !$sendBMess && ($PMenable_cc || $PMenable_bcc)) {    if (!$replyguest && !$sendBMess && ($PMenable_cc || $PMenable_bcc)) {
       $yyjavascripttoform = qq~        $yyjavascripttoform = qq~
   
           <script language="JavaScript1.2" type="text/javascript">            <script language="JavaScript1.2" type="text/javascript">
           <!--            <!--
           function changeRecepientTab(tabto) {            function changeRecepientTab(tabto) {
               document.getElementById('usersto').style.display = 'none';                document.getElementById('usersto').style.display = 'none';
               document.getElementById('bnttoto').className = 'windowbg';                document.getElementById('bnttoto').className = 'windowbg';
       ~;        ~;
   
       $imsend .= qq~        $imsend .= qq~
               <tr>                <tr>
                   <td align="left">                    <td align="left">
                   <div id="bnttoto" style="float: left; padding: 5px;" class="windowbg2"><a href="javascript:void(0);" onclick="changeRecepientTab('to'); return false;">$inmes_txt{'324'}:</a></div>                    <div id="bnttoto" style="float: left; padding: 5px;" class="windowbg2"><a href="javascript:void(0);" onclick="changeRecepientTab('to'); return false;">$inmes_txt{'324'}:</a></div>
       ~;             ~;     
       if ($PMenable_cc) {        if ($PMenable_cc) {
           $yyjavascripttoform .= qq~            $yyjavascripttoform .= qq~
               document.getElementById('userscc').style.display = 'none';                document.getElementById('userscc').style.display = 'none';
               document.getElementById('bnttocc').className = 'windowbg';                document.getElementById('bnttocc').className = 'windowbg';
           ~;            ~;
           $imsend .= qq~            $imsend .= qq~
                   <div id="bnttocc" style="float: left; padding: 5px;" class="windowbg"><a href="javascript:void(0);" onclick="changeRecepientTab('cc'); return false;">$inmes_txt{'325'}:</a></div>                    <div id="bnttocc" style="float: left; padding: 5px;" class="windowbg"><a href="javascript:void(0);" onclick="changeRecepientTab('cc'); return false;">$inmes_txt{'325'}:</a></div>
           ~;                 ~;     
       }        }
       if ($PMenable_bcc) {        if ($PMenable_bcc) {
           $yyjavascripttoform .= qq~            $yyjavascripttoform .= qq~
               document.getElementById('usersbcc').style.display = 'none';                document.getElementById('usersbcc').style.display = 'none';
               document.getElementById('bnttobcc').className = 'windowbg';                document.getElementById('bnttobcc').className = 'windowbg';
           ~;            ~;
           $imsend .= qq~            $imsend .= qq~
                   <div id="bnttobcc" style="float: left; padding: 5px;" class="windowbg"><a href="javascript:void(0);" onclick="changeRecepientTab('bcc'); return false;">$inmes_txt{'326'}:</a></div>                    <div id="bnttobcc" style="float: left; padding: 5px;" class="windowbg"><a href="javascript:void(0);" onclick="changeRecepientTab('bcc'); return false;">$inmes_txt{'326'}:</a></div>
           ~;                 ~;     
       }        }
       $yyjavascripttoform .= qq~        $yyjavascripttoform .= qq~
               document.getElementById('users' + tabto).style.display = 'inline';                document.getElementById('users' + tabto).style.display = 'inline';
               document.getElementById('bntto' + tabto).className = 'windowbg2';                document.getElementById('bntto' + tabto).className = 'windowbg2';
           }            }
       //-->        //-->
       </script>        </script>
       ~;        ~;
       $imsend .= qq~$yyjavascripttoform        $imsend .= qq~$yyjavascripttoform
                   </td>                    </td>
               </tr>                </tr>
       ~;        ~;
   }    }
   
   $imsend .= qq~    $imsend .= qq~
               <tr>                <tr>
                   <td width="60%" valign="top" align="left">\n~;                    <td width="60%" valign="top" align="left">\n~;
   
   # now uses a multi-line select    # now uses a multi-line select
   &ProcIMrecs;    &ProcIMrecs;
   
   $toname = $INFO{'forward'} ? '' : $INFO{'to'};    $toname = $INFO{'forward'} ? '' : $INFO{'to'};
   
   my $toUsersTitle = $inmes_txt{'torecepients'};    my $toUsersTitle = $inmes_txt{'torecepients'};
   
   my ($onchangeText, $onchangeText2);    my ($onchangeText, $onchangeText2);
   if (((!$enable_PMcontrols && $enable_PMActprev) || ($enable_PMcontrols && ${$uid.$username}{'pmactprev'})) && !$replyguest) {    if (((!$enable_PMcontrols && $enable_PMActprev) || ($enable_PMcontrols && ${$uid.$username}{'pmactprev'})) && !$replyguest) {
       $onchangeText = qq~ onkeyup="updatTopic();"~;        $onchangeText = qq~ onkeyup="updatTopic();"~;
       $onchangeText2 = qq~ updatTopic();~;        $onchangeText2 = qq~ updatTopic();~;
   }    }
   
   if (!$replyguest) {    if (!$replyguest) {
       if ($sendBMess) { $toUsersTitle = $inmes_txt{'togroups'}; }        if ($sendBMess) { $toUsersTitle = $inmes_txt{'togroups'}; }
       if ($PMenable_cc || $PMenable_bcc) {        if ($PMenable_cc || $PMenable_bcc) {
           $us_winhight = 370;            $us_winhight = 370;
       } else {        } else {
           $us_winhight = 345;            $us_winhight = 345;
       }        }
   
       my $toIdtext = $sendBMess ? 'groups' : 'toshow';        my $toIdtext = $sendBMess ? 'groups' : 'toshow';
   
       $imsend  .= qq~        $imsend  .= qq~
       <script language="JavaScript1.2" type="text/javascript">        <script language="JavaScript1.2" type="text/javascript">
       <!--        <!--
       function imWin() {        function imWin() {
           window.open('$scripturl?action=imlist;sort=recentpm;toid=$toIdtext','imWin','status=no,height=$us_winhight,width=464,menubar=no,toolbar=no,top=50,left=50,scrollbars=no');            window.open('$scripturl?action=imlist;sort=recentpm;toid=$toIdtext','imWin','status=no,height=$us_winhight,width=464,menubar=no,toolbar=no,top=50,left=50,scrollbars=no');
       }        }
       function imWinCC() {        function imWinCC() {
           window.open('$scripturl?action=imlist;sort=recentpm;toid=toshowcc','imWin','status=no,height=$us_winhight,width=464,menubar=no,toolbar=no,top=50,left=50,scrollbars=no');            window.open('$scripturl?action=imlist;sort=recentpm;toid=toshowcc','imWin','status=no,height=$us_winhight,width=464,menubar=no,toolbar=no,top=50,left=50,scrollbars=no');
       }        }
       function imWinBCC() {        function imWinBCC() {
           window.open('$scripturl?action=imlist;sort=recentpm;toid=toshowbcc','imWin','status=no,height=$us_winhight,width=464,menubar=no,toolbar=no,top=50,left=50,scrollbars=no');            window.open('$scripturl?action=imlist;sort=recentpm;toid=toshowbcc','imWin','status=no,height=$us_winhight,width=464,menubar=no,toolbar=no,top=50,left=50,scrollbars=no');
       }        }
       function removeUser(oElement) {        function removeUser(oElement) {
           var indexToRemove = oElement.options.selectedIndex;            var indexToRemove = oElement.options.selectedIndex;
           if (confirm("$post_txt{'768'}")) { oElement.remove(indexToRemove); }            if (confirm("$post_txt{'768'}")) { oElement.remove(indexToRemove); }
       }        }
       //-->        //-->
       </script>        </script>
       <div id="usersto" style="width: 98%; display: inline; float: left;">        <div id="usersto" style="width: 98%; display: inline; float: left;">
       <b>$inmes_txt{'324'} $toUsersTitle:</b>&nbsp;<a href="javascript: void(0);" onclick="imWin();" tabindex="1"><span class="small">$inmes_txt{'clickto1'} <i>$inmes_txt{'324'}</i> $toUsersTitle $inmes_txt{'clickto2'}</span></a><br />        <b>$inmes_txt{'324'} $toUsersTitle:</b>&nbsp;<a href="javascript: void(0);" onclick="imWin();" tabindex="1"><span class="small">$inmes_txt{'clickto1'} <i>$inmes_txt{'324'}</i> $toUsersTitle $inmes_txt{'clickto2'}</span></a><br />
       <select name="toshow" id="toshow" multiple="multiple" size="6" style="width: 100%;" ondblclick="removeUser(this);">\n~;        <select name="toshow" id="toshow" multiple="multiple" size="6" style="width: 100%;" ondblclick="removeUser(this);">\n~;
   
       my $usefields;        my $usefields;
       if (!$sendBMess) {        if (!$sendBMess) {
           if ($toname) {            if ($toname) {
               &LoadUser($toname);                &LoadUser($toname);
               if(${$uid.$toname}{'realname'}) {                if(${$uid.$toname}{'realname'}) {
                   $imsend  .= qq~<option selected="selected" value="$useraccount{$toname}">${$uid.$toname}{'realname'}</option>\n~;                    $imsend  .= qq~<option selected="selected" value="$useraccount{$toname}">${$uid.$toname}{'realname'}</option>\n~;
               }                }
           }            }
           if ($FORM{'toshow'}) {            if ($FORM{'toshow'}) {
               foreach my $touser (split(/,/, $FORM{'toshow'})) {                foreach my $touser (split(/,/, $FORM{'toshow'})) {
                   &LoadUser($touser);                    &LoadUser($touser);
                   $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;                    $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;
               }                }
           }            }
           if ($userto) {            if ($userto) {
               foreach my $touser (split(/,/, $userto)) {                foreach my $touser (split(/,/, $userto)) {
                   &LoadUser($touser);                    &LoadUser($touser);
                   $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;                    $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;
               }                }
           }            }
   
       } else {        } else {
           $FORM{'toshow'} = $mto || $FORM{'toshow'};            $FORM{'toshow'} = $mto || $FORM{'toshow'};
           if ($FORM{'toshow'}) {            if ($FORM{'toshow'}) {
               foreach my $touser (split(/,/, $FORM{'toshow'})) {                foreach my $touser (split(/,/, $FORM{'toshow'})) {
                   if ($touser eq 'all') { $imsend .= qq~<option selected="selected" value="all">$inmes_txt{'bmallmembers'}</option>\n~;                    if ($touser eq 'all') { $imsend .= qq~<option selected="selected" value="all">$inmes_txt{'bmallmembers'}</option>\n~;
                   } elsif ($touser eq 'admins') { $imsend .= qq~<option selected="selected" value="admins">$inmes_txt{'bmadmins'}</option>\n~;                    } elsif ($touser eq 'admins') { $imsend .= qq~<option selected="selected" value="admins">$inmes_txt{'bmadmins'}</option>\n~;
                   } elsif ($touser eq 'gmods') { $imsend .= qq~<option selected="selected" value="gmods">$inmes_txt{'bmgmods'}</option>\n~;                    } elsif ($touser eq 'gmods') { $imsend .= qq~<option selected="selected" value="gmods">$inmes_txt{'bmgmods'}</option>\n~;
                   } elsif ($touser eq 'mods') { $imsend .= qq~<option selected="selected" value="mods">$inmes_txt{'bmmods'}</option>\n~;                    } elsif ($touser eq 'mods') { $imsend .= qq~<option selected="selected" value="mods">$inmes_txt{'bmmods'}</option>\n~;
                   } else {                    } else {
                       foreach (keys %NoPost) {                        foreach (keys %NoPost) {
                           my ($title, undef) = split(/\|/, $NoPost{$_}, 2);                            my ($title, undef) = split(/\|/, $NoPost{$_}, 2);
                           if ($touser eq $_) { $imsend .= qq~<option selected="selected" value="$_">$title</option>\n~; }                            if ($touser eq $_) { $imsend .= qq~<option selected="selected" value="$_">$title</option>\n~; }
                       }                        }
                   }                    }
               }                }
           }            }
       }        }
   
       $imsend .= qq~            </select><input type="hidden" name="immulti" value="yes" />        $imsend .= qq~            </select><input type="hidden" name="immulti" value="yes" />
           </div>            </div>
       ~;        ~;
   
       $JSandInput = qq~        $JSandInput = qq~
       <script language="JavaScript1.2" type="text/javascript">        <script language="JavaScript1.2" type="text/javascript">
       <!--        <!--
       // this function forces all users listed on IM mult to be selected for processing        // this function forces all users listed on IM mult to be selected for processing
       function selectNames() {        function selectNames() {
           var oList = document.getElementById('toshow')            var oList = document.getElementById('toshow')
           for (var i = 0; i < oList.options.length; i++) { oList.options[i].selected = true; }            for (var i = 0; i < oList.options.length; i++) { oList.options[i].selected = true; }
       ~;        ~;
   
       if (!$sendBMess) {        if (!$sendBMess) {
           if ($PMenable_cc) {            if ($PMenable_cc) {
               $JSandInput .= qq~                $JSandInput .= qq~
                   var oList = document.getElementById('toshowcc')                      var oList = document.getElementById('toshowcc')  
                   for (var i = 0; i < oList.options.length; i++){ oList.options[i].selected = true; }                    for (var i = 0; i < oList.options.length; i++){ oList.options[i].selected = true; }
               ~;                ~;
               $imsend .= qq~                $imsend .= qq~
               <div id="userscc" style="width: 98%; display: none; float: left;">                <div id="userscc" style="width: 98%; display: none; float: left;">
               <b>$inmes_txt{'325'} $toUsersTitle:</b>&nbsp;<a href="javascript: void(0);" onclick="imWinCC();"><span class="small">$inmes_txt{'clickto1'} <i>$inmes_txt{'325'}</i> $toUsersTitle $inmes_txt{'clickto2'}</span></a><br />                <b>$inmes_txt{'325'} $toUsersTitle:</b>&nbsp;<a href="javascript: void(0);" onclick="imWinCC();"><span class="small">$inmes_txt{'clickto1'} <i>$inmes_txt{'325'}</i> $toUsersTitle $inmes_txt{'clickto2'}</span></a><br />
               <select name="toshowcc" id="toshowcc" multiple="multiple" size="6" style="width: 100%;" ondblclick="removeUser(this);">\n~;                <select name="toshowcc" id="toshowcc" multiple="multiple" size="6" style="width: 100%;" ondblclick="removeUser(this);">\n~;
               if ($FORM{'toshowcc'}) {                if ($FORM{'toshowcc'}) {
                   foreach my $touser (split(/\,/, $FORM{'toshowcc'})) {                    foreach my $touser (split(/\,/, $FORM{'toshowcc'})) {
                       &LoadUser($touser);                        &LoadUser($touser);
                       $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;                        $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;
                   }                    }
               }                }
               if ($usernamecc) {                if ($usernamecc) {
                   foreach my $touser (split(/\,/, $usernamecc)) {                    foreach my $touser (split(/\,/, $usernamecc)) {
                       &LoadUser($touser);                        &LoadUser($touser);
                       $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;                        $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;
                   }                    }
               }                }
               $imsend .= qq~                </select>                $imsend .= qq~                </select>
               </div>                </div>
               ~;                ~;
           }            }
   
           if ($PMenable_bcc) {            if ($PMenable_bcc) {
               $JSandInput .= qq~                $JSandInput .= qq~
                   var oList = document.getElementById('toshowbcc')                    var oList = document.getElementById('toshowbcc')
                   for (var i = 0; i < oList.options.length; i++) { oList.options[i].selected = true; }                    for (var i = 0; i < oList.options.length; i++) { oList.options[i].selected = true; }
               ~;                ~;
               $imsend .= qq~                $imsend .= qq~
               <div id="usersbcc" style="width: 98%; display: none; float: left;">                <div id="usersbcc" style="width: 98%; display: none; float: left;">
               <b>$inmes_txt{'326'} $toUsersTitle:</b>&nbsp;<a href="javascript: void(0);" onclick="imWinBCC();"><span class="small">$inmes_txt{'clickto1'} <i>$inmes_txt{'326'}</i> $toUsersTitle $inmes_txt{'clickto2'}</span></a><br />                <b>$inmes_txt{'326'} $toUsersTitle:</b>&nbsp;<a href="javascript: void(0);" onclick="imWinBCC();"><span class="small">$inmes_txt{'clickto1'} <i>$inmes_txt{'326'}</i> $toUsersTitle $inmes_txt{'clickto2'}</span></a><br />
               <select name="toshowbcc" id="toshowbcc" multiple="multiple" size="6" style="width: 100%;" ondblclick="removeUser(this);">\n~;                <select name="toshowbcc" id="toshowbcc" multiple="multiple" size="6" style="width: 100%;" ondblclick="removeUser(this);">\n~;
               if ($FORM{'toshowbcc'}) {                if ($FORM{'toshowbcc'}) {
                   foreach my $touser (split(/\,/, $FORM{'toshowbcc'})) {                    foreach my $touser (split(/\,/, $FORM{'toshowbcc'})) {
                       &LoadUser($touser);                        &LoadUser($touser);
                       $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;                        $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;
                   }                    }
               }                }
               if ($usernamebcc) {                if ($usernamebcc) {
                   foreach my $touser (split(/\,/, $usernamebcc)) {                    foreach my $touser (split(/\,/, $usernamebcc)) {
                       &LoadUser($touser);                        &LoadUser($touser);
                       $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;                        $imsend .= qq~<option selected="selected" value="$useraccount{$touser}">${$uid.$touser}{'realname'}</option>\n~;
                   }                    }
               }                }
               $imsend .= qq~                </select>                  $imsend .= qq~                </select>  
               </div>                </div>
               ~;                ~;
           }            }
       }        }
   
       $JSandInput .= qq~        $JSandInput .= qq~
           }            }
       //-->        //-->
       </script>        </script>
       ~;        ~;
   
       $imsend .= qq~        $imsend .= qq~
                   </td>                    </td>
                   <td width="40%" valign="top" align="left">                    <td width="40%" valign="top" align="left">
                       <label for="status"><b>$inmes_txt{'status'}:</b></label><br />                        <label for="status"><b>$inmes_txt{'status'}:</b></label><br />
                       <select name="status" id="status" tabindex="2" size="3" onchange="showtpstatus();$onchangeText2">                        <select name="status" id="status" tabindex="2" size="3" onchange="showtpstatus();$onchangeText2">
                       <option value="s"$stselect>$im_message_status{'standard'}</option>                        <option value="s"$stselect>$im_message_status{'standard'}</option>
                       <option value="c"$cnselect>$im_message_status{'confidential'}</option>                        <option value="c"$cnselect>$im_message_status{'confidential'}</option>
                       <option value="u"$urselect>$im_message_status{'urgent'}</option>                        <option value="u"$urselect>$im_message_status{'urgent'}</option>
                       </select><img src="$imagesdir/$pmicon.gif" name="icons" border="0" hspace="10" alt="$im_message_status{'$pmicon'}" title="$im_message_status{'$pmicon'}" />                        </select><img src="$imagesdir/$pmicon.gif" name="icons" border="0" hspace="10" alt="$im_message_status{'$pmicon'}" title="$im_message_status{'$pmicon'}" />
                   </td>                    </td>
                   </tr>                    </tr>
               </table>                </table>
           </td>              </td>  
       </tr>        </tr>
       ~;        ~;
   
   } else {    } else {
   
       $imsend .= qq~                        <b>$inmes_txt{'324'} $toUsersTitle:</b> <input type="text" name="toguest" id="toguest" value="$guestName" size="50" maxlength="25" style="width: 95%;" /><input type="hidden" name="toshow" id="toshow" value="$guestName" />        $imsend .= qq~                        <b>$inmes_txt{'324'} $toUsersTitle:</b> <input type="text" name="toguest" id="toguest" value="$guestName" size="50" maxlength="25" style="width: 95%;" /><input type="hidden" name="toshow" id="toshow" value="$guestName" />
                   </td>                    </td>
                   <td width="40%" valign="top" align="left">                    <td width="40%" valign="top" align="left">
                       &nbsp;                        &nbsp;
                   </td>                    </td>
               </tr>                </tr>
               <tr>                <tr>
                   <td width="60%" valign="top" align="left">                    <td width="60%" valign="top" align="left">
                       <b>$post_txt{'69'}:</b> <input type="text" name="guestemail" id="guestemail" value="$guestEmail" size="50" maxlength="40" style="width: 95%;" />                        <b>$post_txt{'69'}:</b> <input type="text" name="guestemail" id="guestemail" value="$guestEmail" size="50" maxlength="40" style="width: 95%;" />
                       <input type="hidden" name="replyguest" id="replyguest" value="1" />                        <input type="hidden" name="replyguest" id="replyguest" value="1" />
                   </td>                    </td>
                   <td width="40%" valign="top" align="left">                    <td width="40%" valign="top" align="left">
                       &nbsp;                        &nbsp;
                   </td>                    </td>
               </tr>                </tr>
               </table>                </table>
           </td>              </td>  
       </tr>        </tr>
       ~;        ~;
   }    }
   
   $subtitle = "<i>$subject</i>";    $subtitle = "<i>$subject</i>";
   #this is the end of the upper area of the post page.    #this is the end of the upper area of the post page.
   
   # this declares the beginning of the UBBC section    # this declares the beginning of the UBBC section
   $JSandInput .= qq~    $JSandInput .= qq~
   <script language="JavaScript1.2" type="text/javascript">    <script language="JavaScript1.2" type="text/javascript">
   <!--    <!--
   function showimage() {    function showimage() {
       document.images.status.src=document.postmodify.status.options[document.postmodify.images.status.selectedIndex].value;        document.images.status.src=document.postmodify.status.options[document.postmodify.images.status.selectedIndex].value;
   }    }
   //-->    //-->
   </script>    </script>
   ~;    ~;
   
   $JSandInput .= qq~    $JSandInput .= qq~
   <input type="hidden" name="threadid" id="threadid" value="$threadid" />    <input type="hidden" name="threadid" id="threadid" value="$threadid" />
   <input type="hidden" name="postid" id="postid" value="$postid" />    <input type="hidden" name="postid" id="postid" value="$postid" />
   <input type="hidden" name="info" id="info" value="$INFO{'id'}$FORM{'info'}" />    <input type="hidden" name="info" id="info" value="$INFO{'id'}$FORM{'info'}" />
   <input type="hidden" name="mename" id="mename" value="$mename" />    <input type="hidden" name="mename" id="mename" value="$mename" />
   <input type="hidden" name="post_entry_time" id="post_entry_time" value="$date" />    <input type="hidden" name="post_entry_time" id="post_entry_time" value="$date" />
   ~;    ~;
   
   if ($FORM{'draftid'} || $INFO{'caller'} == 4) {    if ($FORM{'draftid'} || $INFO{'caller'} == 4) {
       $JSandInput .= qq~<input type="hidden" name="draftid" id="draftid" value="~ . ($FORM{'draftid'} || $INFO{'id'}) . qq~" />~;        $JSandInput .= qq~<input type="hidden" name="draftid" id="draftid" value="~ . ($FORM{'draftid'} || $INFO{'id'}) . qq~" />~;
   }    }
   
   $imsend .= qq~    $imsend .= qq~
   <tr>    <tr>
       <td align="left" class="windowbg2">        <td align="left" class="windowbg2">
           $JSandInput            $JSandInput
           <label for="subject"><b>$inmes_txt{'70'}:</b></label><br /><input type="text" name="subject" id="subject" value="$subject" size="50" maxlength="~ . ($set_subjectMaxLength + ($subject =~ /^Re: / ? 4 : 0)) . qq~" tabindex="3" style="width: 437px;"$onchangeText />            <label for="subject"><b>$inmes_txt{'70'}:</b></label><br /><input type="text" name="subject" id="subject" value="$subject" size="50" maxlength="~ . ($set_subjectMaxLength + ($subject =~ /^Re: / ? 4 : 0)) . qq~" tabindex="3" style="width: 437px;"$onchangeText />
       </td>        </td>
   
   </tr>    </tr>
   <tr>    <tr>
       <td class="windowbg2">        <td class="windowbg2">
   ~;    ~;
   
   # this is for the ubbc buttons    # this is for the ubbc buttons
   if (!$replyguest) {    if (!$replyguest) {
       if ($enable_ubbc && $showyabbcbutt) {        if ($enable_ubbc && $showyabbcbutt) {
           $imsend .= qq~<b>$post_txt{'252'}:</b><br />            $imsend .= qq~<b>$post_txt{'252'}:</b><br />
           <div style="float: left; width: 440px;">            <div style="float: left; width: 440px;">
           <script language="JavaScript1.2" type="text/javascript">            <script language="JavaScript1.2" type="text/javascript">
           <!--            <!--
           HAND = "style='cursor: pointer;'";            HAND = "style='cursor: pointer;'";
           HAND += " onmouseover='contextTip(event, this.alt)' onmouseout='contextTip(event, this.alt)' oncontextmenu='if(!showcontexthelp(this.src, this.alt)) return false;'";            HAND += " onmouseover='contextTip(event, this.alt)' onmouseout='contextTip(event, this.alt)' oncontextmenu='if(!showcontexthelp(this.src, this.alt)) return false;'";
           document.write('<div style="width: 437px; float: left;">');            document.write('<div style="width: 437px; float: left;">');
           document.write("<img src='$imagesdir/url.gif' onclick='hyperlink();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'257'}' title='$post_txt{'257'}' border='0' />");            document.write("<img src='$imagesdir/url.gif' onclick='hyperlink();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'257'}' title='$post_txt{'257'}' border='0' />");
           document.write("<img src='$imagesdir/ftp.gif' onclick='ftp();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'434'}' title='$post_txt{'434'}' border='0' />");            document.write("<img src='$imagesdir/ftp.gif' onclick='ftp();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'434'}' title='$post_txt{'434'}' border='0' />");
           document.write("<img src='$imagesdir/img.gif' onclick='image();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'435'}' title='$post_txt{'435'}' border='0' />");            document.write("<img src='$imagesdir/img.gif' onclick='image();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'435'}' title='$post_txt{'435'}' border='0' />");
           document.write("<img src='$imagesdir/email2.gif' onclick='emai1();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'258'}' title='$post_txt{'258'}' border='0' />");            document.write("<img src='$imagesdir/email2.gif' onclick='emai1();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'258'}' title='$post_txt{'258'}' border='0' />");
           document.write("<img src='$imagesdir/media.gif' onclick='flash();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'433'}' title='$post_txt{'433'}' border='0' />");            document.write("<img src='$imagesdir/media.gif' onclick='flash();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'433'}' title='$post_txt{'433'}' border='0' />");
           document.write("<img src='$imagesdir/table.gif' onclick='table();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'436'}' title='$post_txt{'436'}' border='0' />");            document.write("<img src='$imagesdir/table.gif' onclick='table();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'436'}' title='$post_txt{'436'}' border='0' />");
           document.write("<img src='$imagesdir/tr.gif' onclick='trow();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'449'}' title='$post_txt{'449'}' border='0' />");            document.write("<img src='$imagesdir/tr.gif' onclick='trow();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'449'}' title='$post_txt{'449'}' border='0' />");
           document.write("<img src='$imagesdir/td.gif' onclick='tcol();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'437'}' title='$post_txt{'437'}' border='0' />");            document.write("<img src='$imagesdir/td.gif' onclick='tcol();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'437'}' title='$post_txt{'437'}' border='0' />");
           document.write("<img src='$imagesdir/hr.gif' onclick='hr();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'531'}' title='$post_txt{'531'}' border='0' />");            document.write("<img src='$imagesdir/hr.gif' onclick='hr();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'531'}' title='$post_txt{'531'}' border='0' />");
           document.write("<img src='$imagesdir/tele.gif' onclick='teletype();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'440'}' title='$post_txt{'440'}' border='0' />");            document.write("<img src='$imagesdir/tele.gif' onclick='teletype();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'440'}' title='$post_txt{'440'}' border='0' />");
           document.write("<img src='$imagesdir/code.gif' onclick='selcodelang();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'259'}' title='$post_txt{'259'}' border='0' />");            document.write("<img src='$imagesdir/code.gif' onclick='selcodelang();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'259'}' title='$post_txt{'259'}' border='0' />");
           document.write("<img src='$imagesdir/quote2.gif' onclick='quote();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'260'}' title='$post_txt{'260'}' border='0' />");            document.write("<img src='$imagesdir/quote2.gif' onclick='quote();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'260'}' title='$post_txt{'260'}' border='0' />");
           document.write("<img src='$imagesdir/edit.gif' onclick='edit();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'603'}' title='$post_txt{'603'}' border='0' />");            document.write("<img src='$imagesdir/edit.gif' onclick='edit();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'603'}' title='$post_txt{'603'}' border='0' />");
           document.write("<img src='$imagesdir/sup.gif' onclick='superscript();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'447'}' title='$post_txt{'447'}' border='0' />");            document.write("<img src='$imagesdir/sup.gif' onclick='superscript();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'447'}' title='$post_txt{'447'}' border='0' />");
           document.write("<img src='$imagesdir/sub.gif' onclick='subscript();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'448'}' title='$post_txt{'448'}' border='0' />");            document.write("<img src='$imagesdir/sub.gif' onclick='subscript();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'448'}' title='$post_txt{'448'}' border='0' />");
   
           document.write("<img src='$imagesdir/list.gif' onclick='bulletset();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'261'}' title='$post_txt{'261'}' border='0' />");            document.write("<img src='$imagesdir/list.gif' onclick='bulletset();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'261'}' title='$post_txt{'261'}' border='0' />");
           document.write("<img src='$imagesdir/me.gif' onclick='me();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'604'}' title='$post_txt{'604'}' border='0' />");            document.write("<img src='$imagesdir/me.gif' onclick='me();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'604'}' title='$post_txt{'604'}' border='0' />");
           document.write("<img src='$imagesdir/move.gif' onclick='move();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'439'}' title='$post_txt{'439'}' border='0' />");            document.write("<img src='$imagesdir/move.gif' onclick='move();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'439'}' title='$post_txt{'439'}' border='0' />");
           document.write("<img src='$imagesdir/timestamp.gif' onclick='timestamp($date);' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'245'}' title='$post_txt{'245'}' border='0' /><br />");            document.write("<img src='$imagesdir/timestamp.gif' onclick='timestamp($date);' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'245'}' title='$post_txt{'245'}' border='0' /><br />");
           document.write('</div>');            document.write('</div>');
           document.write('<div style="width: 115px; float: left;">');            document.write('<div style="width: 115px; float: left;">');
           document.write("<img src='$imagesdir/bold.gif' onclick='bold();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'253'}' title='$post_txt{'253'}' border='0' />");            document.write("<img src='$imagesdir/bold.gif' onclick='bold();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'253'}' title='$post_txt{'253'}' border='0' />");
           document.write("<img src='$imagesdir/italicize.gif' onclick='italicize();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'254'}' title='$post_txt{'254'}' border='0' />");            document.write("<img src='$imagesdir/italicize.gif' onclick='italicize();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'254'}' title='$post_txt{'254'}' border='0' />");
           document.write("<img src='$imagesdir/underline.gif' onclick='underline();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'255'}' title='$post_txt{'255'}' border='0' />");            document.write("<img src='$imagesdir/underline.gif' onclick='underline();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'255'}' title='$post_txt{'255'}' border='0' />");
           document.write("<img src='$imagesdir/strike.gif' onclick='strike();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'441'}' title='$post_txt{'441'}' border='0' />");            document.write("<img src='$imagesdir/strike.gif' onclick='strike();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'441'}' title='$post_txt{'441'}' border='0' />");
           document.write("<img src='$imagesdir/highlight.gif' onclick='highlight();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'246'}' title='$post_txt{'246'}' border='0' />");            document.write("<img src='$imagesdir/highlight.gif' onclick='highlight();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'246'}' title='$post_txt{'246'}' border='0' />");
           document.write('</div>');            document.write('</div>');
           document.write('<div style="width: 139px; float: left; text-align: center;">');            document.write('<div style="width: 139px; float: left; text-align: center;">');
           document.write('<select name="fontface" id="fontface" onchange="if(this.options[this.selectedIndex].value) fontfce(this.options[this.selectedIndex].value);" style="width: 90px; margin-top: 2px; margin-left: 2px; margin-right: 1px; font-size: 9px;">');            document.write('<select name="fontface" id="fontface" onchange="if(this.options[this.selectedIndex].value) fontfce(this.options[this.selectedIndex].value);" style="width: 90px; margin-top: 2px; margin-left: 2px; margin-right: 1px; font-size: 9px;">');
           document.write('<option value="">Verdana</option>');            document.write('<option value="">Verdana</option>');
           document.write('<option value="">-\\-\\-\\-\\-\\-\\-\\-\\-</option>');            document.write('<option value="">-\\-\\-\\-\\-\\-\\-\\-\\-</option>');
           document.write('<option value="Arial" style="font-family: Arial">Arial</option>');            document.write('<option value="Arial" style="font-family: Arial">Arial</option>');
           document.write('<option value="Bitstream Vera Sans Mono" style="font-family: Bitstream Vera Sans Mono">Bitstream</option>');            document.write('<option value="Bitstream Vera Sans Mono" style="font-family: Bitstream Vera Sans Mono">Bitstream</option>');
           document.write('<option value="Bradley Hand ITC" style="font-family: Bradley Hand ITC">Bradley Hand ITC</option>');            document.write('<option value="Bradley Hand ITC" style="font-family: Bradley Hand ITC">Bradley Hand ITC</option>');
           document.write('<option value="Comic Sans MS" style="font-family: Comic Sans MS">Comic Sans MS</option>');            document.write('<option value="Comic Sans MS" style="font-family: Comic Sans MS">Comic Sans MS</option>');
           document.write('<option value="Courier" style="font-family: Courier">Courier</option>');            document.write('<option value="Courier" style="font-family: Courier">Courier</option>');
           document.write('<option value="Courier New" style="font-family: Courier New">Courier New</option>');            document.write('<option value="Courier New" style="font-family: Courier New">Courier New</option>');
           document.write('<option value="Georgia" style="font-family: Georgia">Georgia</option>');            document.write('<option value="Georgia" style="font-family: Georgia">Georgia</option>');
           document.write('<option value="Impact" style="font-family: Impact">Impact</option>');            document.write('<option value="Impact" style="font-family: Impact">Impact</option>');
           document.write('<option value="Lucida Sans" style="font-family: Lucida Sans">Lucida Sans</option>');            document.write('<option value="Lucida Sans" style="font-family: Lucida Sans">Lucida Sans</option>');
           document.write('<option value="Microsoft Sans Serif" style="font-family: Microsoft Sans Serif">MS Sans Serif</option>');            document.write('<option value="Microsoft Sans Serif" style="font-family: Microsoft Sans Serif">MS Sans Serif</option>');
           document.write('<option value="Papyrus" style="font-family: Papyrus">Papyrus</option>');            document.write('<option value="Papyrus" style="font-family: Papyrus">Papyrus</option>');
           document.write('<option value="Tahoma" style="font-family: Tahoma">Tahoma</option>');            document.write('<option value="Tahoma" style="font-family: Tahoma">Tahoma</option>');
           document.write('<option value="Tempus Sans ITC" style="font-family: Tempus Sans ITC">Tempus Sans ITC</option>');            document.write('<option value="Tempus Sans ITC" style="font-family: Tempus Sans ITC">Tempus Sans ITC</option>');
           document.write('<option value="Times New Roman" style="font-family: Times New Roman">Times New Roman</option>');            document.write('<option value="Times New Roman" style="font-family: Times New Roman">Times New Roman</option>');
           document.write('<option value="Verdana" style="font-family: Verdana" selected="selected">Verdana</option>');            document.write('<option value="Verdana" style="font-family: Verdana" selected="selected">Verdana</option>');
           document.write('</select>');            document.write('</select>');
           var fntoptions = ["6", "7", "8", "9", "10", "11", "12", "14", "16", "18", "20", "22", "24", "36", "48", "56", "72"]            var fntoptions = ["6", "7", "8", "9", "10", "11", "12", "14", "16", "18", "20", "22", "24", "36", "48", "56", "72"]
           document.write('<select name="fontsize" id="fontsize" onchange="if(this.options[this.selectedIndex].value) fntsize(this.options[this.selectedIndex].value);" style="width: 39px; margin-top: 2px; margin-left: 1px; margin-right: 2px; font-size: 9px;">');            document.write('<select name="fontsize" id="fontsize" onchange="if(this.options[this.selectedIndex].value) fntsize(this.options[this.selectedIndex].value);" style="width: 39px; margin-top: 2px; margin-left: 1px; margin-right: 2px; font-size: 9px;">');
           document.write('<option value="">11</option>');            document.write('<option value="">11</option>');
           document.write('<option value="">-\\-</option>');            document.write('<option value="">-\\-</option>');
           for(var i = 0; i < fntoptions.length; i++) {            for(var i = 0; i < fntoptions.length; i++) {
               if(fntoptions[i] >= $fontsizemin && fntoptions[i] <= $fontsizemax) {                if(fntoptions[i] >= $fontsizemin && fntoptions[i] <= $fontsizemax) {
                   if(fntoptions[i] == 11) document.write('<option value="11" selected="selected">11</option>');                    if(fntoptions[i] == 11) document.write('<option value="11" selected="selected">11</option>');
                   else document.write('<option value=' + fntoptions[i] + '>' + fntoptions[i] + '</option>');                    else document.write('<option value=' + fntoptions[i] + '>' + fntoptions[i] + '</option>');
               }                }
           }            }
           document.write('</select>');            document.write('</select>');
           document.write('</div>');            document.write('</div>');
   
   
           function selcodelang() {            function selcodelang() {
               if (document.getElementById("codelang").style.display == "none")                if (document.getElementById("codelang").style.display == "none")
               document.getElementById("codelang").style.display = "inline-block";                document.getElementById("codelang").style.display = "inline-block";
               else                else
               document.getElementById("codelang").style.display = "none";                document.getElementById("codelang").style.display = "none";
               document.getElementById("codelang").style.zIndex = "100";                document.getElementById("codelang").style.zIndex = "100";
   
               var openbox = document.getElementsByTagName("div");                var openbox = document.getElementsByTagName("div");
               for (var i = 0; i < openbox.length; i++) {                for (var i = 0; i < openbox.length; i++) {
                   if (openbox[i].className == "ubboptions" && openbox[i].id != "codelang") {                    if (openbox[i].className == "ubboptions" && openbox[i].id != "codelang") {
                       openbox[i].style.display = "none";                        openbox[i].style.display = "none";
                   }                    }
               }                }
           }            }
   
           function syntaxlang(lang, optnum) {            function syntaxlang(lang, optnum) {
               AddSelText("[code"+lang+"]","[/code]");                AddSelText("[code"+lang+"]","[/code]");
               document.getElementById("codesyntax").options[optnum].selected = false;                document.getElementById("codesyntax").options[optnum].selected = false;
               document.getElementById("codelang").style.display = "none";                document.getElementById("codelang").style.display = "none";
           }            }
   
           function bulletset() {            function bulletset() {
               if (document.getElementById("bullets").style.display == "none")                if (document.getElementById("bullets").style.display == "none")
               document.getElementById("bullets").style.display = "block";                document.getElementById("bullets").style.display = "block";
               else                else
               document.getElementById("bullets").style.display = "none";                document.getElementById("bullets").style.display = "none";
               document.getElementById("bullets").style.zIndex = "100";                document.getElementById("bullets").style.zIndex = "100";
   
               var openbox = document.getElementsByTagName("div");                var openbox = document.getElementsByTagName("div");
               for (var i = 0; i < openbox.length; i++) {                for (var i = 0; i < openbox.length; i++) {
                   if (openbox[i].className == "ubboptions" && openbox[i].id != "bullets") {                    if (openbox[i].className == "ubboptions" && openbox[i].id != "bullets") {
                       openbox[i].style.display = "none";                        openbox[i].style.display = "none";
                   }                    }
               }                }
           }            }
                 
           function showbullets(bullet) {            function showbullets(bullet) {
               AddSelText("[list "+bullet+"][*]", "\\n[/list]");                AddSelText("[list "+bullet+"][*]", "\\n[/list]");
           }            }
   
           function olist() {            function olist() {
               AddSelText("[olist][*]", "\\n[/olist]");                AddSelText("[olist][*]", "\\n[/olist]");
           }            }
             function ulist() {  
                   AddSelText("[list][*]", "\\n[/list]");  
             }  
   
           // Palette            // Palette
           var thistask = 'post';            var thistask = 'post';
           function tohex(i) {            function tohex(i) {
               a2 = ''                 a2 = '' 
               ihex = hexQuot(i);                ihex = hexQuot(i);
               idiff = eval(i + '-(' + ihex + '*16)')                idiff = eval(i + '-(' + ihex + '*16)')
               a2 = itohex(idiff) + a2;                a2 = itohex(idiff) + a2;
               while( ihex >= 16) {                while( ihex >= 16) {
                   itmp = hexQuot(ihex);                    itmp = hexQuot(ihex);
                   idiff = eval(ihex + '-(' + itmp + '*16)');                    idiff = eval(ihex + '-(' + itmp + '*16)');
                   a2 = itohex(idiff) + a2;                    a2 = itohex(idiff) + a2;
                   ihex = itmp;                    ihex = itmp;
               }                  }  
               a1 = itohex(ihex);                a1 = itohex(ihex);
               return a1 + a2 ;                return a1 + a2 ;
           }            }
   
           function hexQuot(i) {            function hexQuot(i) {
               return Math.floor(eval(i +'/16'));                return Math.floor(eval(i +'/16'));
           }            }
   
           function itohex(i) {            function itohex(i) {
               if( i == 0) { aa = '0' }                if( i == 0) { aa = '0' }
               else { if( i == 1 ) { aa = '1' }                else { if( i == 1 ) { aa = '1' }
               else { if( i == 2 ) { aa = '2' }                else { if( i == 2 ) { aa = '2' }
               else { if( i == 3 ) { aa = '3' }                else { if( i == 3 ) { aa = '3' }
               else { if( i == 4 ) { aa = '4' }                else { if( i == 4 ) { aa = '4' }
               else { if( i == 5 ) { aa = '5' }                else { if( i == 5 ) { aa = '5' }
               else { if( i == 6 ) { aa = '6' }                else { if( i == 6 ) { aa = '6' }
               else { if( i == 7 ) { aa = '7' }                else { if( i == 7 ) { aa = '7' }
               else { if( i == 8 ) { aa = '8' }                else { if( i == 8 ) { aa = '8' }
               else { if( i == 9 ) { aa = '9' }                else { if( i == 9 ) { aa = '9' }
               else { if( i == 10) { aa = 'a' }                else { if( i == 10) { aa = 'a' }
               else { if( i == 11) { aa = 'b' }                else { if( i == 11) { aa = 'b' }
               else { if( i == 12) { aa = 'c' }                else { if( i == 12) { aa = 'c' }
               else { if( i == 13) { aa = 'd' }                else { if( i == 13) { aa = 'd' }
               else { if( i == 14) { aa = 'e' }                else { if( i == 14) { aa = 'e' }
               else { if( i == 15) { aa = 'f' }                else { if( i == 15) { aa = 'f' }
               }}}}}}}}}}}}}}}                }}}}}}}}}}}}}}}
               return aa;                return aa;
           }            }
   
           function ConvShowcolor(color) {            function ConvShowcolor(color) {
               if ( c=color.match(/rgb\\((\\d+?)\\, (\\d+?)\\, (\\d+?)\\)/i) ) {                if ( c=color.match(/rgb\\((\\d+?)\\, (\\d+?)\\, (\\d+?)\\)/i) ) {
                   var rhex = tohex(c[1]);                    var rhex = tohex(c[1]);
                   var ghex = tohex(c[2]);                    var ghex = tohex(c[2]);
                   var bhex = tohex(c[3]);                    var bhex = tohex(c[3]);
                   var newcolor = '#'+rhex+ghex+bhex;                    var newcolor = '#'+rhex+ghex+bhex;
               }                }
               else {                else {
                   var newcolor = color;                    var newcolor = color;
               }                }
               if(thistask == "post") showcolor(newcolor);                if(thistask == "post") showcolor(newcolor);
               if(thistask == "templ") previewColor(newcolor);                if(thistask == "templ") previewColor(newcolor);
           }            }
           //-->            //-->
           </script>            </script>
           <div style="float: left; height: 22px; width: 91px;">            <div style="float: left; height: 22px; width: 91px;">
           <div class="bordercolor" style="height: 20px; width: 66px; padding-left: 1px; padding-top: 1px; margin-top: 1px; float: left;">            <div class="bordercolor" style="height: 20px; width: 66px; padding-left: 1px; padding-top: 1px; margin-top: 1px; float: left;">
               <span style="float: left; background-color: #000000; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#000000')">&nbsp;</span>                <span style="float: left; background-color: #000000; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#000000')">&nbsp;</span>
               <span style="float: left; background-color: #333333; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#333333')">&nbsp;</span>                <span style="float: left; background-color: #333333; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#333333')">&nbsp;</span>
               <span style="float: left; background-color: #666666; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#666666')">&nbsp;</span>                <span style="float: left; background-color: #666666; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#666666')">&nbsp;</span>
               <span style="float: left; background-color: #999999; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#999999')">&nbsp;</span>                <span style="float: left; background-color: #999999; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#999999')">&nbsp;</span>
               <span style="float: left; background-color: #cccccc; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#cccccc')">&nbsp;</span>                <span style="float: left; background-color: #cccccc; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#cccccc')">&nbsp;</span>
               <span style="float: left; background-color: #ffffff; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#ffffff')">&nbsp;</span>                <span style="float: left; background-color: #ffffff; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#ffffff')">&nbsp;</span>
               <span id="defaultpal1" style="float: left; background-color: $pallist[0]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>                <span id="defaultpal1" style="float: left; background-color: $pallist[0]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>
               <span id="defaultpal2" style="float: left; background-color: $pallist[1]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>                <span id="defaultpal2" style="float: left; background-color: $pallist[1]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>
               <span id="defaultpal3" style="float: left; background-color: $pallist[2]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>                <span id="defaultpal3" style="float: left; background-color: $pallist[2]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>
               <span id="defaultpal4" style="float: left; background-color: $pallist[3]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>                <span id="defaultpal4" style="float: left; background-color: $pallist[3]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>
               <span id="defaultpal5" style="float: left; background-color: $pallist[4]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>                <span id="defaultpal5" style="float: left; background-color: $pallist[4]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>
               <span id="defaultpal6" style="float: left; background-color: $pallist[5]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>                <span id="defaultpal6" style="float: left; background-color: $pallist[5]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>
           </div>            </div>
           <div style="height: 22px; width: 23px; padding-left: 1px; float: right;">            <div style="height: 22px; width: 23px; padding-left: 1px; float: right;">
               <img src="$imagesdir/palette1.gif" style="cursor: pointer" onclick="window.open('$scripturl?action=palette;task=post', '', 'height=308,width=302,menubar=no,toolbar=no,scrollbars=no')" alt="" border="0" />                <img src="$imagesdir/palette1.gif" style="cursor: pointer" onclick="window.open('$scripturl?action=palette;task=post', '', 'height=308,width=302,menubar=no,toolbar=no,scrollbars=no')" alt="" border="0" />
           </div>            </div>
           </div>            </div>
           <script language="JavaScript1.2" type="text/javascript">            <script language="JavaScript1.2" type="text/javascript">
           <!--            <!--
           HAND = "style='cursor: pointer;'";            HAND = "style='cursor: pointer;'";
           HAND += " onmouseover='contextTip(event, this.alt)' onmouseout='contextTip(event, this.alt)' oncontextmenu='if(!showcontexthelp(this.src, this.alt)) return false;'";            HAND += " onmouseover='contextTip(event, this.alt)' onmouseout='contextTip(event, this.alt)' oncontextmenu='if(!showcontexthelp(this.src, this.alt)) return false;'";
           document.write('<div style="width: 92px; float: left;">');            document.write('<div style="width: 92px; float: left;">');
           document.write("<img src='$imagesdir/pre.gif' onclick='pre();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'444'}' title='$post_txt{'444'}' border='0' />");            document.write("<img src='$imagesdir/pre.gif' onclick='pre();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'444'}' title='$post_txt{'444'}' border='0' />");
           document.write("<img src='$imagesdir/left.gif' onclick='left();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'445'}' title='$post_txt{'445'}' border='0' />");            document.write("<img src='$imagesdir/left.gif' onclick='left();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'445'}' title='$post_txt{'445'}' border='0' />");
           document.write("<img src='$imagesdir/center.gif' onclick='center();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'256'}' title='$post_txt{'256'}' border='0' />");            document.write("<img src='$imagesdir/center.gif' onclick='center();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'256'}' title='$post_txt{'256'}' border='0' />");
           document.write("<img src='$imagesdir/right.gif' onclick='right();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'446'}' title='$post_txt{'446'}' border='0' />");            document.write("<img src='$imagesdir/right.gif' onclick='right();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'446'}' title='$post_txt{'446'}' border='0' />");
           document.write('</div>');            document.write('</div>');
           //-->            //-->
           </script>            </script>
           <noscript>            <noscript>
           <span class="small">$maintxt{'noscript'}</span>            <span class="small">$maintxt{'noscript'}</span>
           </noscript>            </noscript>
           </div><div id="spell_container" style="float: left;"></div>            </div><div id="spell_container" style="float: left;"></div>
           ~;            ~;
       }        }
   }    }
   
   if ($replyguest) {    if ($replyguest) {
       $tmpmtext =qq~<b>$post_txt{'72'}:</b> ~;        $tmpmtext =qq~<b>$post_txt{'72'}:</b> ~;
   }    }
   
   # set size of messagebox and text    # set size of messagebox and text
   if (!${$uid.$username}{'postlayout'}) { $pheight = 130; $pwidth = 425; $textsize = 10; }    if (!${$uid.$username}{'postlayout'}) { $pheight = 130; $pwidth = 425; $textsize = 10; }
   else { ($pheight, $pwidth, $textsize, $col_row) = split(/\|/, ${$uid.$username}{'postlayout'}); }    else { ($pheight, $pwidth, $textsize, $col_row) = split(/\|/, ${$uid.$username}{'postlayout'}); }
   if(!$textsize || $textsize < 6) { $textsize = 6; }    if(!$textsize || $textsize < 6) { $textsize = 6; }
   if($textsize > 16) { $textsize = 16; }    if($textsize > 16) { $textsize = 16; }
   if($pheight > 400) { $pheight = 400; }    if($pheight > 400) { $pheight = 400; }
   if($pheight < 130) { $pheight = 130; }    if($pheight < 130) { $pheight = 130; }
   if($pwidth > 855) { $pwidth = 855; }    if($pwidth > 855) { $pwidth = 855; }
   if($pwidth < 425) { $pwidth = 425; }    if($pwidth < 425) { $pwidth = 425; }
   $mtextsize = $textsize . "pt";    $mtextsize = $textsize . "pt";
   $mheight = $pheight . "px";    $mheight = $pheight . "px";
   $mwidth = $pwidth . "px";    $mwidth = $pwidth . "px";
   $dheight = ($pheight + 12) . "px";    $dheight = ($pheight + 12) . "px";
   $dwidth = ($pwidth + 12) . "px";    $dwidth = ($pwidth + 12) . "px";
   $jsdragwpos = $pwidth - 425;    $jsdragwpos = $pwidth - 425;
   $dragwpos = ($pwidth - 425) . "px";    $dragwpos = ($pwidth - 425) . "px";
   $jsdraghpos = $pheight - 130;    $jsdraghpos = $pheight - 130;
   $draghpos = ($pheight - 130) . "px";    $draghpos = ($pheight - 130) . "px";
   
   $imsend .= qq~    $imsend .= qq~
       <div style="float: left; width: 99%;">        <div style="float: left; width: 99%;">
       <div style="float: left; text-align: left;">        <div style="float: left; text-align: left;">
       <input type="hidden" name="col_row" value="$col_row" />        <input type="hidden" name="col_row" value="$col_row" />
       <input type="hidden" name="messagewidth" id="messagewidth" value="$pwidth" />        <input type="hidden" name="messagewidth" id="messagewidth" value="$pwidth" />
       <input type="hidden" name="messageheight" id="messageheight" value="$pheight" />        <input type="hidden" name="messageheight" id="messageheight" value="$pheight" />
       <div id="dragcanvas" style="position: relative; top: 0px; left: 0px; height: $dheight; width: $dwidth; border: 0; z-index: 1;">        <div id="dragcanvas" style="position: relative; top: 0px; left: 0px; height: $dheight; width: $dwidth; border: 0; z-index: 1;">
       <textarea name="message" id="message" rows="8" cols="68" style="position: absolute; top: 0px; left: 0px; z-index: 2; height: $mheight; width: $mwidth; font-size: $mtextsize; padding: 5px; margin: 0px; visibility: visible;" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="4">$message</textarea>        <textarea name="message" id="message" rows="8" cols="68" style="position: absolute; top: 0px; left: 0px; z-index: 2; height: $mheight; width: $mwidth; font-size: $mtextsize; padding: 5px; margin: 0px; visibility: visible;" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="4">$message</textarea>
       <div id="dragbgw" style="position: absolute; top: 0px; left: 437px; width: 3px; height: $dheight; border: 0; z-index: 3;">        <div id="dragbgw" style="position: absolute; top: 0px; left: 437px; width: 3px; height: $dheight; border: 0; z-index: 3;">
       <img id="dragImg1" src="$defaultimagesdir/resize_wb.gif" class="drag" style="position: absolute; top: 0px; left: $dragwpos; z-index: 4; width: 3px; height: $dheight; cursor: e-resize;" alt="resize_wb" />        <img id="dragImg1" src="$defaultimagesdir/resize_wb.gif" class="drag" style="position: absolute; top: 0px; left: $dragwpos; z-index: 4; width: 3px; height: $dheight; cursor: e-resize;" alt="resize_wb" />
       </div>        </div>
   
       <div id="dragbgh" style="position: absolute; top: 142px; left: 0px; width: $dwidth; height: 3px; border: 0; z-index: 3;">        <div id="dragbgh" style="position: absolute; top: 142px; left: 0px; width: $dwidth; height: 3px; border: 0; z-index: 3;">
       <img id="dragImg2" src="$defaultimagesdir/resize_hb.gif" class="drag" style="position: absolute; top: $draghpos; left: 0px; z-index: 4; width: $dwidth; height: 3px; cursor: n-resize;"  alt="resize_hb" />        <img id="dragImg2" src="$defaultimagesdir/resize_hb.gif" class="drag" style="position: absolute; top: $draghpos; left: 0px; z-index: 4; width: $dwidth; height: 3px; cursor: n-resize;"  alt="resize_hb" />
       </div>        </div>
       <div class="ubboptions" id="bullets" style="position: absolute; top: -22px; left: 345px; width: 63px; border: 1px solid #666666; padding: 2px; text-align: center; background-color: #CCCCCC; display: none;">        <div class="ubboptions" id="bullets" style="position: absolute; top: -22px; left: 345px; width: 63px; border: 1px solid #666666; padding: 2px; text-align: center; background-color: #CCCCCC; display: none;">
           <input type="button" value="$npf_txt{'default'}" style="width: 56px; margin: 3px 0px 0px 0px; font-size: 9px; padding: 0px; text-align: center;" onclick="list(), bulletset()" /><br />            <input type="button" value="$npf_txt{'default'}" style="width: 56px; margin: 3px 0px 0px 0px; font-size: 9px; padding: 0px; text-align: center;" onclick="ulist(), bulletset()" /><br />
           <input type="button" value="$npf_txt{'ordered'}" style="width: 56px; margin: 3px 0px 3px 0px; font-size: 9px; padding: 0px; text-align: center;" onclick="olist(), bulletset()" /><br />            <input type="button" value="$npf_txt{'ordered'}" style="width: 56px; margin: 3px 0px 3px 0px; font-size: 9px; padding: 0px; text-align: center;" onclick="olist(), bulletset()" /><br />
           <img src="$defaultimagesdir/bull-redball.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-redball'), bulletset()" /><img src="$defaultimagesdir/bull-greenball.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-greenball'), bulletset()" /><img src="$defaultimagesdir/bull-blueball.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blueball'), bulletset()" /><img src="$defaultimagesdir/bull-blackball.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blackball'), bulletset()" /><br />            <img src="$defaultimagesdir/bull-redball.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-redball'), bulletset()" /><img src="$defaultimagesdir/bull-greenball.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-greenball'), bulletset()" /><img src="$defaultimagesdir/bull-blueball.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blueball'), bulletset()" /><img src="$defaultimagesdir/bull-blackball.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blackball'), bulletset()" /><br />
           <img src="$defaultimagesdir/bull-redsq.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-redsq'), bulletset()" /><img src="$defaultimagesdir/bull-greensq.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-greensq'), bulletset()" /><img src="$defaultimagesdir/bull-bluesq.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-bluesq'), bulletset()" /><img src="$defaultimagesdir/bull-blacksq.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blacksq'), bulletset()" /><br />            <img src="$defaultimagesdir/bull-redsq.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-redsq'), bulletset()" /><img src="$defaultimagesdir/bull-greensq.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-greensq'), bulletset()" /><img src="$defaultimagesdir/bull-bluesq.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-bluesq'), bulletset()" /><img src="$defaultimagesdir/bull-blacksq.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blacksq'), bulletset()" /><br />
           <img src="$defaultimagesdir/bull-redpin.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-redpin'), bulletset()" /><img src="$defaultimagesdir/bull-greenpin.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-greenpin'), bulletset()" /><img src="$defaultimagesdir/bull-bluepin.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-bluepin'), bulletset()" /><img src="$defaultimagesdir/bull-blackpin.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blackpin'), bulletset()" /><br />            <img src="$defaultimagesdir/bull-redpin.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-redpin'), bulletset()" /><img src="$defaultimagesdir/bull-greenpin.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-greenpin'), bulletset()" /><img src="$defaultimagesdir/bull-bluepin.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-bluepin'), bulletset()" /><img src="$defaultimagesdir/bull-blackpin.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blackpin'), bulletset()" /><br />
           <img src="$defaultimagesdir/bull-redcheck.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-redcheck'), bulletset()" /><img src="$defaultimagesdir/bull-greencheck.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-greencheck'), bulletset()" /><img src="$defaultimagesdir/bull-bluecheck.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-bluecheck'), bulletset()" /><img src="$defaultimagesdir/bull-blackcheck.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blackcheck'), bulletset()" /><br />            <img src="$defaultimagesdir/bull-redcheck.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-redcheck'), bulletset()" /><img src="$defaultimagesdir/bull-greencheck.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-greencheck'), bulletset()" /><img src="$defaultimagesdir/bull-bluecheck.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-bluecheck'), bulletset()" /><img src="$defaultimagesdir/bull-blackcheck.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blackcheck'), bulletset()" /><br />
           <img src="$defaultimagesdir/bull-redarrow.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-redarrow'), bulletset()" /><img src="$defaultimagesdir/bull-greenarrow.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-greenarrow'), bulletset()" /><img src="$defaultimagesdir/bull-bluearrow.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-bluearrow'), bulletset()" /><img src="$defaultimagesdir/bull-blackarrow.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blackarrow'), bulletset()" /><br />            <img src="$defaultimagesdir/bull-redarrow.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-redarrow'), bulletset()" /><img src="$defaultimagesdir/bull-greenarrow.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-greenarrow'), bulletset()" /><img src="$defaultimagesdir/bull-bluearrow.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-bluearrow'), bulletset()" /><img src="$defaultimagesdir/bull-blackarrow.gif" style="width: 8px; height: 8px; background-color: #CCCCCC; margin: 3px; cursor: pointer;" onclick="showbullets('bull-blackarrow'), bulletset()" /><br />
       </div>        </div>
       <div class="ubboptions" id="codelang" style="position: absolute; top: -22px; left: 230px; width: 92px; padding: 0px; background-color: #CCCCCC; display: none;">        <div class="ubboptions" id="codelang" style="position: absolute; top: -22px; left: 230px; width: 92px; padding: 0px; background-color: #CCCCCC; display: none;">
           <select size="10" name="codesyntax" id="codesyntax" onchange="syntaxlang(this.options[this.selectedIndex].value, this.selectedIndex);" style="margin:0px; font-size: 9px; width: 92px;">            <select size="10" name="codesyntax" id="codesyntax" onchange="syntaxlang(this.options[this.selectedIndex].value, this.selectedIndex);" style="margin:0px; font-size: 9px; width: 92px;">
           <option value="" title="$npf_txt{'default'}">$npf_txt{'default'}</option>            <option value="" title="$npf_txt{'default'}">$npf_txt{'default'}</option>
           <option value=" c++" title="C++">C++</option>            <option value=" c++" title="C++">C++</option>
           <option value=" css" title="CSS">CSS</option>            <option value=" css" title="CSS">CSS</option>
           <option value=" html" title="HTML">HTML</option>            <option value=" html" title="HTML">HTML</option>
           <option value=" java" title="Java">Java</option>            <option value=" java" title="Java">Java</option>
           <option value=" javascript" title="Javascript">Javascript</option>            <option value=" javascript" title="Javascript">Javascript</option>
           <option value=" pascal" title="Pascal">Pascal</option>            <option value=" pascal" title="Pascal">Pascal</option>
           <option value=" perl" title="Perl">Perl</option>            <option value=" perl" title="Perl">Perl</option>
           <option value=" php" title="PHP">PHP</option>            <option value=" php" title="PHP">PHP</option>
           <option value=" sql" title="SQL">SQL</option>            <option value=" sql" title="SQL">SQL</option>
           </select>            </select>
       </div>        </div>
       </div>        </div>
       <div style="float: left; width: 315px; text-align: left;">        <div style="float: left; width: 315px; text-align: left;">
       <img src="$imagesdir/green1.gif" name="chrwarn" height="8" width="8" border="0" vspace="0" hspace="0" alt="" align="middle" />        <img src="$imagesdir/green1.gif" name="chrwarn" height="8" width="8" border="0" vspace="0" hspace="0" alt="" align="middle" />
       <span class="small">$npf_txt{'03'} <input value="$MaxMessLen" size="3" name="msgCL" class="windowbg2" style="border: 0px; font-size: 11px; width: 40px; padding: 1px" readonly="readonly" /></span>        <span class="small">$npf_txt{'03'} <input value="$MaxMessLen" size="3" name="msgCL" class="windowbg2" style="border: 0px; font-size: 11px; width: 40px; padding: 1px" readonly="readonly" /></span>
       </div>        </div>
       <div style="float: left; width: 127px; text-align: right;">        <div style="float: left; width: 127px; text-align: right;">
       <span class="small">$post_txt{'textsize'} <input value="$textsize" size="2" name="txtsize" id="txtsize" class="windowbg2" style="border: 0px; font-size: 11px; width: 15px; padding: 1px" readonly="readonly" />pt <img src="$imagesdir/smaller.gif" height="11" width="11" border="0" alt="" align="middle" onclick="sizetext(-1);" /><img src="$imagesdir/larger.gif" height="11" width="11" border="0" alt="" align="middle" onclick="sizetext(1);" /></span>        <span class="small">$post_txt{'textsize'} <input value="$textsize" size="2" name="txtsize" id="txtsize" class="windowbg2" style="border: 0px; font-size: 11px; width: 15px; padding: 1px" readonly="readonly" />pt <img src="$imagesdir/smaller.gif" height="11" width="11" border="0" alt="" align="middle" onclick="sizetext(-1);" /><img src="$imagesdir/larger.gif" height="11" width="11" border="0" alt="" align="middle" onclick="sizetext(1);" /></span>
       </div>        </div>
       </div>        </div>
       </div>        </div>
       <script type="text/javascript" language="JavaScript1.2">        <script type="text/javascript" language="JavaScript1.2">
       <!--        <!--
   
       // set size of messagebox and text        // set size of messagebox and text
   
       var oldwidth = parseInt(document.getElementById('message').style.width) - $jsdragwpos;        var oldwidth = parseInt(document.getElementById('message').style.width) - $jsdragwpos;
       var olddragwidth = parseInt(document.getElementById('dragbgh').style.width) - $jsdragwpos;        var olddragwidth = parseInt(document.getElementById('dragbgh').style.width) - $jsdragwpos;
       var oldheight = parseInt(document.getElementById('message').style.height) - $jsdraghpos;        var oldheight = parseInt(document.getElementById('message').style.height) - $jsdraghpos;
       var olddragheight = parseInt(document.getElementById('dragbgw').style.height) - $jsdraghpos;        var olddragheight = parseInt(document.getElementById('dragbgw').style.height) - $jsdraghpos;
   
       var skydobject={        var skydobject={
       x: 0, y: 0, temp2 : null, temp3 : null, targetobj : null, skydNu : 0, delEnh : 0,        x: 0, y: 0, temp2 : null, temp3 : null, targetobj : null, skydNu : 0, delEnh : 0,
   
       initialize:function() {        initialize:function() {
           document.onmousedown = this.skydeKnap            document.onmousedown = this.skydeKnap
           document.onmouseup=function(){            document.onmouseup=function(){
               this.skydNu = 0;                this.skydNu = 0;
               document.getElementById('messagewidth').value = parseInt(document.getElementById('message').style.width);                document.getElementById('messagewidth').value = parseInt(document.getElementById('message').style.width);
               document.getElementById('messageheight').value = parseInt(document.getElementById('message').style.height);                document.getElementById('messageheight').value = parseInt(document.getElementById('message').style.height);
           }            }
       },        },
       changeSize:function(deleEnh, knapId) {        changeSize:function(deleEnh, knapId) {
           if (knapId == "dragImg1") {            if (knapId == "dragImg1") {
               newwidth = oldwidth+parseInt(deleEnh);                newwidth = oldwidth+parseInt(deleEnh);
               newdragwidth = olddragwidth+parseInt(deleEnh);                newdragwidth = olddragwidth+parseInt(deleEnh);
               document.getElementById('message').style.width = newwidth+'px';                document.getElementById('message').style.width = newwidth+'px';
               document.getElementById('dragbgh').style.width = newdragwidth+'px';                document.getElementById('dragbgh').style.width = newdragwidth+'px';
               document.getElementById('dragImg2').style.width = newdragwidth+'px';                document.getElementById('dragImg2').style.width = newdragwidth+'px';
           }            }
           if (knapId == "dragImg2") {            if (knapId == "dragImg2") {
               newheight = oldheight+parseInt(deleEnh);                newheight = oldheight+parseInt(deleEnh);
               newdragheight = olddragheight+parseInt(deleEnh);                newdragheight = olddragheight+parseInt(deleEnh);
               document.getElementById('message').style.height = newheight+'px';                document.getElementById('message').style.height = newheight+'px';
               document.getElementById('dragbgw').style.height = newdragheight+'px';                document.getElementById('dragbgw').style.height = newdragheight+'px';
               document.getElementById('dragImg1').style.height = newdragheight+'px';                document.getElementById('dragImg1').style.height = newdragheight+'px';
               document.getElementById('dragcanvas').style.height = newdragheight+'px';                document.getElementById('dragcanvas').style.height = newdragheight+'px';
           }            }
       },        },
   
       flytKnap:function(e) {        flytKnap:function(e) {
           var evtobj = window.event ? window.event : e            var evtobj = window.event ? window.event : e
           if (this.skydNu == 1) {            if (this.skydNu == 1) {
               sizestop = f_clientWidth()                sizestop = f_clientWidth()
               maxstop = parseInt(((sizestop*66)/100)-427)                maxstop = parseInt(((sizestop*66)/100)-427)
               if(maxstop > 413) maxstop = 413                if(maxstop > 413) maxstop = 413
               if(maxstop < 60) maxstop = 60                if(maxstop < 60) maxstop = 60
   
               glX = parseInt(this.targetobj.style.left)                glX = parseInt(this.targetobj.style.left)
               this.targetobj.style.left = this.temp2 + evtobj.clientX - this.x + "px"                 this.targetobj.style.left = this.temp2 + evtobj.clientX - this.x + "px" 
               nyX = parseInt(this.temp2 + evtobj.clientX - this.x)                nyX = parseInt(this.temp2 + evtobj.clientX - this.x)
               if (nyX > glX) retning = "vn"; else retning = "hj";                if (nyX > glX) retning = "vn"; else retning = "hj";
               if (nyX < 1 && retning == "hj") { this.targetobj.style.left = 0 + "px"; nyX = 0; retning = "vn"; }                if (nyX < 1 && retning == "hj") { this.targetobj.style.left = 0 + "px"; nyX = 0; retning = "vn"; }
               if (nyX > maxstop && retning == "vn") { this.targetobj.style.left = maxstop + "px"; nyX = maxstop; retning = "hj"; }                if (nyX > maxstop && retning == "vn") { this.targetobj.style.left = maxstop + "px"; nyX = maxstop; retning = "hj"; }
               delEnh = parseInt(nyX)                delEnh = parseInt(nyX)
               var knapObj = this.targetobj.id                var knapObj = this.targetobj.id
               skydobject.changeSize(delEnh, knapObj)                skydobject.changeSize(delEnh, knapObj)
               return false                return false
           }            }
           if (this.skydNu == 2) {            if (this.skydNu == 2) {
               glY = parseInt(this.targetobj.style.top)                glY = parseInt(this.targetobj.style.top)
               this.targetobj.style.top = this.temp3 + evtobj.clientY - this.y + "px"                 this.targetobj.style.top = this.temp3 + evtobj.clientY - this.y + "px" 
               nyY = parseInt(this.temp3 + evtobj.clientY - this.y)                nyY = parseInt(this.temp3 + evtobj.clientY - this.y)
               if (nyY > glY) retning = "vn"; else retning = "hj";                if (nyY > glY) retning = "vn"; else retning = "hj";
               if (nyY < 1 && retning == "hj") { this.targetobj.style.top = 0 + "px"; nyY = 0; retning = "vn"; }                if (nyY < 1 && retning == "hj") { this.targetobj.style.top = 0 + "px"; nyY = 0; retning = "vn"; }
               if (nyY > 270 && retning == "vn") { this.targetobj.style.top = 270 + "px"; nyY = 270; retning = "hj"; }                if (nyY > 270 && retning == "vn") { this.targetobj.style.top = 270 + "px"; nyY = 270; retning = "hj"; }
               delEnh = parseInt(nyY)                delEnh = parseInt(nyY)
               var knapObj = this.targetobj.id                var knapObj = this.targetobj.id
               skydobject.changeSize(delEnh, knapObj)                skydobject.changeSize(delEnh, knapObj)
               return false                return false
           }            }
       },        },
       skydeKnap:function(e) {        skydeKnap:function(e) {
           var evtobj = window.event ? window.event : e            var evtobj = window.event ? window.event : e
           this.targetobj = window.event ? event.srcElement : e.target            this.targetobj = window.event ? event.srcElement : e.target
           if (this.targetobj.className == "drag") {            if (this.targetobj.className == "drag") {
               if(this.targetobj.id == "dragImg1") this.skydNu = 1                if(this.targetobj.id == "dragImg1") this.skydNu = 1
               if(this.targetobj.id == "dragImg2") this.skydNu = 2                if(this.targetobj.id == "dragImg2") this.skydNu = 2
               this.knapObj = this.targetobj                this.knapObj = this.targetobj
               if (isNaN(parseInt(this.targetobj.style.left))) this.targetobj.style.left = 0                if (isNaN(parseInt(this.targetobj.style.left))) this.targetobj.style.left = 0
               if (isNaN(parseInt(this.targetobj.style.top))) this.targetobj.style.top = 0                if (isNaN(parseInt(this.targetobj.style.top))) this.targetobj.style.top = 0
               this.temp2 = parseInt(this.targetobj.style.left)                this.temp2 = parseInt(this.targetobj.style.left)
               this.temp3 = parseInt(this.targetobj.style.top)                this.temp3 = parseInt(this.targetobj.style.top)
               this.x = evtobj.clientX                this.x = evtobj.clientX
               this.y = evtobj.clientY                this.y = evtobj.clientY
               if (evtobj.preventDefault) evtobj.preventDefault()                if (evtobj.preventDefault) evtobj.preventDefault()
               document.onmousemove = skydobject.flytKnap                document.onmousemove = skydobject.flytKnap
           }            }
       }        }
       } // End of: var skydobject={        } // End of: var skydobject={
   
       function f_clientWidth() {        function f_clientWidth() {
           return f_filterResults (            return f_filterResults (
               window.innerWidth ? window.innerWidth : 0,                window.innerWidth ? window.innerWidth : 0,
               document.documentElement ? document.documentElement.clientWidth : 0,                document.documentElement ? document.documentElement.clientWidth : 0,
               document.body ? document.body.clientWidth : 0                document.body ? document.body.clientWidth : 0
           );            );
       }        }
   
       function f_filterResults(n_win, n_docel, n_body) {        function f_filterResults(n_win, n_docel, n_body) {
           var n_result = n_win ? n_win : 0;            var n_result = n_win ? n_win : 0;
           if (n_docel && (!n_result || (n_result > n_docel))) n_result = n_docel;            if (n_docel && (!n_result || (n_result > n_docel))) n_result = n_docel;
           return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;            return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
       }        }
   
       var orgsize = $textsize;        var orgsize = $textsize;
   
       function sizetext(sizefact) {        function sizetext(sizefact) {
           orgsize = orgsize + sizefact;            orgsize = orgsize + sizefact;
           if(orgsize < 6) orgsize = 6;            if(orgsize < 6) orgsize = 6;
           if(orgsize > 16) orgsize = 16;            if(orgsize > 16) orgsize = 16;
           document.getElementById('message').style.fontSize = orgsize+'pt';            document.getElementById('message').style.fontSize = orgsize+'pt';
           document.getElementById('txtsize').value = orgsize;            document.getElementById('txtsize').value = orgsize;
       }        }
   
       skydobject.initialize()        skydobject.initialize()
       //-->        //-->
       </script>        </script>
       </td>        </td>
   </tr>    </tr>
   ~;    ~;
   
   if ($img_greybox) {    if ($img_greybox) {
       $yyinlinestyle .= qq~<link href="$yyhtml_root/greybox/gb_styles.css" rel="stylesheet" type="text/css" />\n~;        $yyinlinestyle .= qq~<link href="$yyhtml_root/greybox/gb_styles.css" rel="stylesheet" type="text/css" />\n~;
       $yyjavascript .= qq~        $yyjavascript .= qq~
var GB_ROOT_DIR = "$yyhtml_root/greybox/"; var GB_ROOT_DIR = "$yyhtml_root/greybox/";
// --> // -->
</script> </script>
<script type="text/javascript" src="$yyhtml_root/AJS.js"></script> <script type="text/javascript" src="$yyhtml_root/AJS.js"></script>
<script type="text/javascript" src="$yyhtml_root/AJS_fx.js"></script> <script type="text/javascript" src="$yyhtml_root/AJS_fx.js"></script>
<script type="text/javascript" src="$yyhtml_root/greybox/gb_scripts.js"></script> <script type="text/javascript" src="$yyhtml_root/greybox/gb_scripts.js"></script>
<script type="text/javascript"> <script type="text/javascript">
<!--~; <!--~;
   }    }
   
   if (!$replyguest) {    if (!$replyguest) {
       $imsend .= qq~        $imsend .= qq~
   <tr>    <tr>
       <td valign="middle" class="windowbg2">        <td valign="middle" class="windowbg2">
           <script language="JavaScript1.2" type="text/javascript">            <script language="JavaScript1.2" type="text/javascript">
           <!--            <!--
       ~;        ~;
   
       $moresmilieslist = '';        $moresmilieslist = '';
       $more_smilie_array = '';        $more_smilie_array = '';
       $i = 0;        $i = 0;
       if ($showadded == 1) {        if ($showadded == 1) {
           while ($SmilieURL[$i]) {            while ($SmilieURL[$i]) {
               if ($SmilieURL[$i] =~ /\//i) { $tmpurl = $SmilieURL[$i]; }                if ($SmilieURL[$i] =~ /\//i) { $tmpurl = $SmilieURL[$i]; }
               else { $tmpurl = qq~$imagesdir/$SmilieURL[$i]~; }                else { $tmpurl = qq~$imagesdir/$SmilieURL[$i]~; }
               $moresmilieslist .= qq~                document.write('<img src="$tmpurl" align="bottom" alt="$SmilieDescription[$i]" border="0" onclick="javascript: MoreSmilies($i);" style="cursor: pointer;" />$SmilieLinebreak[$i] ');\n~;                $moresmilieslist .= qq~                document.write('<img src="$tmpurl" align="bottom" alt="$SmilieDescription[$i]" border="0" onclick="javascript: MoreSmilies($i);" style="cursor: pointer;" />$SmilieLinebreak[$i] ');\n~;
               $tmpcode = $SmilieCode[$i];                $tmpcode = $SmilieCode[$i];
               $tmpcode =~ s/\&quot;/"+'"'+"/g;    #" Adding that because if not it screws up my syntax view'                 $tmpcode =~ s/\&quot;/"+'"'+"/g;    #" Adding that because if not it screws up my syntax view' 
               &FromHTML($tmpcode);                &FromHTML($tmpcode);
               $tmpcode =~ s/&#36;/\$/g;                $tmpcode =~ s/&#36;/\$/g;
               $tmpcode =~ s/&#64;/\@/g;                $tmpcode =~ s/&#64;/\@/g;
               $more_smilie_array .= qq~" $tmpcode", ~;                $more_smilie_array .= qq~" $tmpcode", ~;
               $i++;                $i++;
           }            }
       }        }
   
       if ($showsmdir == 1) {        if ($showsmdir == 1) {
           opendir