<tmpl_var header_template escape="none">

<form action="<tmpl_var url_cgi escape="none">/openwebmail-cal.pl" method="post" name="editcalendar" enctype="multipart/form-data" override="1">
<input type="hidden" name="action" value="calupdate">
<input type="hidden" name="folder" value="<tmpl_var folder escape="html">">
<input type="hidden" name="message_id" value="<tmpl_var message_id escape="html">">
<input type="hidden" name="sessionid" value="<tmpl_var sessionid escape="html">">
<input type="hidden" name="index" value="<tmpl_var index escape="html">">
<tmpl_if callist>
<input type="hidden" name="callist" value="1">
</tmpl_if>
<br><br>
<table border="0" align="center" width="60%" cellpadding="3" cellspacing="1">
<tr>
 <td nowrap class="titlebar" colspan="2">Change Calendar Entry</td>
</tr>
<tr>
 <td align="right" class="rowdark"><b>Date:</b></td>
 <td class="rowdark">
 <select name="month" onchange="valiDate('editcalendar')">
 <tmpl_loop monthselectloop>
   <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
 </tmpl_loop>
 </select>
 <select name="day" onchange="valiDate('editcalendar')">
 <tmpl_loop dayselectloop>
   <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
 </tmpl_loop>
 </select>
 <select name="year" onchange="valiDate('editcalendar')">
 <tmpl_loop yearselectloop>
   <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
 </tmpl_loop>
 </select>
 &nbsp;
 <a href="#" onClick="calPopup(this,'editcalendarpopupCal',25,15,'editcalendar','valiDate');" title="Calendar"><IMG SRC="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/cal-popup.gif" border="0" align="absmiddle" alt="Calendar"></a>&nbsp;
 </td>
</tr>
<tr>
 <td align="right" class="rowdark"><b>New entry</b></td>
 <td class="rowdark"><input type="text" name="string" size="32" value="<tmpl_var eventtxt escape="html">" /></td>
<tr>
<tr>
 <td align="right" class="rowdark"><b>Start time:</b></td>
 <td class="rowdark">
 <select name="starthour">
 <tmpl_loop starthourselectloop>
   <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
 </tmpl_loop>
 </select>
 <b>:</b>
 <select name="startmin">
 <tmpl_loop startminselectloop>
   <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
 </tmpl_loop>
 </select>
 <tmpl_if format12>
 <select name="startampm" >
  <option <tmpl_if startam>selected="selected" </tmpl_if>value="am">am</option>
  <option <tmpl_unless startam>selected="selected" </tmpl_unless>value="pm">pm</option>
 </select>
 </tmpl_if>
 </td>
</tr>
<tr>
 <td align="right" class="rowdark"><b>End time:</b></td>
 <td class="rowdark">
 <select name="endhour">
 <tmpl_loop endhourselectloop>
   <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
 </tmpl_loop>
 </select>
 <b>:</b>
 <select name="endmin">
 <tmpl_loop endminselectloop>
   <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
 </tmpl_loop>
 </select>
 <tmpl_if format12>
 <select name="endampm" >
  <option <tmpl_if endam>selected="selected" </tmpl_if>value="am">am</option>
  <option <tmpl_unless endam>selected="selected" </tmpl_unless>value="pm">pm</option>
 </select>
 </tmpl_if>
 </td>
</tr>
<tr>
 <td align="right" class="rowdark"><b>Recurrence:</b></td>
 <td class="rowdark">
 <select name="dayfreq">
 <tmpl_loop dayfreqselectloop>
   <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
 </tmpl_loop>
 </select>
 </td>
</tr>
<tr>
 <td align="right" class="rowdark">&nbsp;</td>
 <td class="rowdark">
  <label><input type="checkbox" name="thisandnextndays" value="1" <tmpl_if thisandnextndays>checked="checked"</tmpl_if>/></label> This day and the next <input type="text" name="ndays" size="2" value="<tmpl_var ndays escape="html">" /> days
 </td>
</tr>
<tr>
 <td align="right" class="rowdark">&nbsp;</td>
 <td class="rowdark">
 <select name="monthfreq">
 <tmpl_loop monthfreqselectloop>
   <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
 </tmpl_loop>
 </select>
 </td>
</tr>
<tr>
 <td align="right" class="rowdark">&nbsp;</td>
 <td class="rowdark">
  <label><input type="checkbox" name="everyyear" value="1" <tmpl_if everyyear>checked="checked"</tmpl_if>/></label> Every year
 </td>
</tr>
<tr>
 <td align="right" class="rowdark"><b>New link:</b></td>
 <td class="rowdark">
  <input type="text" name="link" value="<tmpl_var linkstr escape="html">" size="32" />
 </td>
</tr>
<tmpl_if notifyenabled>
<tr>
 <td align="right" class="rowdark"><b>Notify Email:</b></td>
 <td class="rowdark">
  <input type="text" name="email" value="<tmpl_var emailstr escape="html">" size="32" />
 </td>
</tr>
<tmpl_else>
<input type="hidden" name="email" value="<tmpl_var emailstr escape="html">">
</tmpl_if>
<tr>
 <td align="right" class="rowdark"><b>Event reminder:</b></td>
 <td class="rowdark">
  <select name="eventreminder">
  <option <tmpl_if eventreminder>selected="selected"</tmpl_if> value="1">Yes</option>
  <option <tmpl_unless eventreminder>selected="selected"</tmpl_unless> value="0">No</option>
  </select>
 </td>
</tr>
<tr>
 <td align="right" class="rowdark"><b>Event Color:</b></td>
 <td class="rowdark">
  <table>
   <tr>
    <td>
     <select name="eventcolor">
     <tmpl_loop eventcolorselectloop>
       <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
     </tmpl_loop>
     </select>
    </td>
    <tmpl_loop eventcolorlistloop>
    <td width="14" align="center" bgcolor="#<tmpl_var eventcolor>"><a href="#" onClick='javascript:document.editcalendar.eventcolor.selectedIndex="<tmpl_var eventcolornum>"'><tmpl_var eventcolorkey></a></td>
    </tmpl_loop>
    <td width="14" align="center"><a href="#" onClick='javascript:document.editcalendar.eventcolor.selectedIndex="0"'>--</a></td>
   </tr>
  </table>
 </td>
</tr>
<tr>
 <td colspan="2" align="center" bgcolor="#AAEFAA">
  <table border=0 cellpading=5 align=center width="40%">
   <tr>
    <td align=center><input type="submit" name="Save" value="Save" /></td>
</form>
<form action="<tmpl_var url_cgi escape="none">/openwebmail-cal.pl" method="post" enctype="multipart/form-data">
<tmpl_if callist>
<input type="hidden" name="action" value="callist">
<tmpl_else>
<input type="hidden" name="action" value="calday">
<input type="hidden" name="day" value="<tmpl_var day escape="html">">
<input type="hidden" name="month" value="<tmpl_var month escape="html">">
</tmpl_if>
<input type="hidden" name="folder" value="<tmpl_var folder escape="html">">
<input type="hidden" name="year" value="<tmpl_var year escape="html">">
<input type="hidden" name="message_id" value="<tmpl_var message_id escape="html">">
<input type="hidden" name="sessionid" value="<tmpl_var sessionid escape="html">">
    <td align="center"<input type="submit" name="Cancel" value="Cancel" /></td>
</form>
   </tr>
  </table>
 </td>
</tr>
</table>

<style type="text/css">
<!--
#editcalendarpopupCal{ position: absolute;
             visibility: hidden; }
//-->
</style>

<div id="editcalendarpopupCal"></div>
<script language="javascript">
<!--
   function submit_changed_dateselform() {
      document.dateselform.submit();
   }
//-->
</script>

<script src="<tmpl_var url_html escape="none">/javascript/validate.js" type="text/javascript"></script> 
<script src="<tmpl_var url_html escape="none">/javascript/calpopup.js" type="text/javascript"></script> 

<script type="text/javascript">//<![CDATA[
// calpopup.js tmpl vars
var wStart = <tmpl_var weekstart>;
var min_year = <tmpl_var min_year>;
// calpopup.js language and preferences
var wDay = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
var wDayAbbrev = new Array('S','M','T','W','T','F','S');
var wMonth = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
var wOrder = new Array('1st','2nd','3rd','4th','last');
// validate.js language and preferences
var thisdayonlytxt = "This day's date only";
var everyoddmonththisyeartxt = "Every odd month this year";
var everyevenmonththisyeartxt = "Every even month this year";
function thewdayofthismonthtxt(wOrdn,wDayn) { return "The "+wOrder[(wOrdn-1)]+" "+wDay[(wDayn)]+" of the month"; }
function everywdaythismonthtxt(wDayn) { return "Every "+wDay[(wDayn)]+" this month"; }
function alerttxt(selectedmonth,daysinmonth,formYear,daysinmonth) { return "Sorry, "+selectedmonth+" only has "+daysinmonth+" days in "+formYear+".\n"+"Changing the day to "+daysinmonth+"."; }
//]]></script> 

<!-- calpopup specific styles -->
<style type="text/css">
.stylecal { font-size: 9pt; color: #000000; }
A.notmonth:link { font-size: 9pt; color: #cccccc; }
A.notmonth:visited { font-size: 9pt; color: #cccccc; }
A.notmonth:hover { font-size: 9pt; color: #ff0000; }
A.stylecal:link { font-size: 9pt; color: #000000; }
A.stylecal:visited { font-size: 9pt; color: #000000; }
A.stylecal:hover { font-size: 9pt; color: #ff0000; }
</style>
<tmpl_var footer_template escape="none">
