<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<fmt:setBundle basename="MessageResources"/>
<script language="javascript" src="<%=request.getContextPath()%>/js/calendar.js"></script>
<script language="javascript" src="<%=request.getContextPath()%>/js/calendar-en.js"></script>
<script language="javascript" src="<%=request.getContextPath()%>/js/calendar-setup.js"></script>
<link href="<%=request.getContextPath()%>/css/calendar-win2k-1.css" rel="stylesheet" type="text/css">
<script type="text/javascript" language="javascript" src="<%=request.getContextPath()%>/js/meetingTimezoneComp.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/meetingutil.js"> </script>
<table align="center" cellpadding="5" cellspacing="0" border="0" width="100%">
  <tr>
    <td><!-- Content Area -->
      <div id="main1">
        <table width="98%" cellpadding="0" cellspacing="0" border="0">
          <tr>
            <td class="leftside" align="center"><!-- Main body content area -->
              <table border="0" width="100%" class="contentblock">
                <tr>
                  <td rowspan="2" valign="top" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="63%" align="left" valign="top"><span id="headerContentDiv" class="BoldTextsmall"></span>
                          <div id="loadingDiv" style="display:none" class="BoldTextsmall"></div></td>
                        <td width="37%" align="right" valign="bottom" class="BoldTextsmall"><span class="cloudtwo"><span id="currentTime_span"></span> <a href="javascript:showTimeZoneComp()"><img class="img" src="images/time.gif"/></a></span></td>
                      </tr>
                    </table>
                    <div class="borderColor" style="width:100%;">
                      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="borderColor">
                        <tr>
                          <td colspan="2" align="center" valign="middle"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                              <tr>
                                <td width="46%" class="topmenuOnBg"></td>
                                <td id="createMeetingTab" class="topmenuOffBg"><a href="javascript:displayCreateView()">
                                  <fmt:message key="create.meetings"/>
                                  </a></td>
                                <td id="myMeetingsTab" class="topmenuOnBg"><a href="javascript:formMeetingsTable('myMeetings',false)">
                                  <fmt:message key="my.meetings"/>
                                  </a></td>
                                <td id="invitedMeetingsTab" class="topmenuOnBg"><a href="javascript:formMeetingsTable('invitedMeetings',false)">
                                  <fmt:message key="invited.meetings"/>
                                  </a></td>
                              </tr>
                              <tr>
                                <td width="46%"></td>
                                <td id="createMeetingArrow" class="arrowoff"></td>
                                <td id="myMeetingArrow" class="arrow"></td>
                                <td id="invitedMeetingArrow" class="arrowoff"></td>
                              </tr>
                            </table></td>
                        </tr>
                        <tr>
                          <td><!-- *********** START MEETING : STARTS HERE ***************** -->
                            <div id="startMeetingDiv" style="display:none">
                              <table width="50%" align="center" border="0" cellpadding="0" cellspacing="0" class="formtext">
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="meeting.topic"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="meetingTopic_span"/></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="meeting.dateandtime"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall" style="padding-top:5px;"><span id="meetingDateAndTime_span"/></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="agenda"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="agenda_span"></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="presenter"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="presenter_span"></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="participants"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><img src="images/view_list.gif" align="absmiddle"/> <a id="viewLink">View</a> <img class="img" src="images/invite.gif" width="16" height="14" align="absmiddle"/> <a id="inviteLink">
                                    <fmt:message key="invite"/>
                                    </a></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="meeting.key"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="meetingKey_span"/></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="meeting.status"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="meetingStatus_span"></span><img src="images/edit.gif" class="img" title="<fmt:message key="edit.meeting"/>" align="absmiddle"><a id="editMeetingLink">
                                    <fmt:message key="edit.meeting"/>
                                    </a></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace">&nbsp;</td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="downloadAgentIcon_span"><img src="<%=request.getContextPath()%>/images/download_zip_button.gif" class="img" style="padding-right:5px;border:none;"/></span> <span id="startMeetingButton"></span>
                                    <input name="login2" class="btnStyle" value="<fmt:message key="cancel"/>
                                    " onclick="javascript:formMeetingsTable('myMeetings',false)" type="submit" /></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace">&nbsp;</td>
                                  <td align="left" valign="top" class="Linktxtsmall">
                                    <br />
                                    <br />
                                    <span id="downloadAgentLink_span"> If START fails,<a href="#"> download this zip</a>.. <br />
                                    Unzip and start ZohoMeeting.exe </span></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace">&nbsp;</td>
                                  <td align="left" valign="middle" class="Linktxtsmall">&nbsp;</td>
                                </tr>
                                <tr>
                                  <td colspan="2" align="right" valign="top"></td>
                                </tr>
                              </table>
                            </div>
                            <!-- **** START MEETING : ENDS HERE ********************* -->
                            <!-- **** JOIN MEETING: STARTS HERE ********************* -->
                            <div id="joinMeetingDiv" style="display:none">
                              <table width="50%" align="center" border="0" cellpadding="0" cellspacing="0" class="formtext">
                                <tr>
                                  <td  align="right" valign="middle" class="formstop rowspace"><fmt:message key="meeting.topic"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="join_meetingTopic_span"/></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="meeting.dateandtime"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall" style="padding-top:5px;"><span id="join_meetingDateAndTime_span"/></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="agenda"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="join_agenda_span"></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="presenter"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="join_presenter_span"></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace"><fmt:message key="meeting.key"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="join_meetingKey_span"/></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace "><fmt:message key="meeting.status"/><span>:</span></td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="join_meetingStatus_span"/></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop rowspace">&nbsp;</td>
                                  <td align="left" valign="middle" class="Linktxtsmall"><span id="join_downloadAgentIcon_span"><img src="<%=request.getContextPath()%>/images/download_zip_button.gif" class="img" style="padding-right:5px;"/></span> <span id="joinMeetingButton"></span>
                                    <input name="login2" class="btnStyle" value="<fmt:message key="cancel"/>
                                    " onclick="javascript:formMeetingsTable('invitedMeetings',false)" type="submit" /></td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop">&nbsp;</td>
                                  <td align="left" valign="top" class="Linktxtsmall"><br />
                                    <br />
                                    <span id="join_downloadAgentLink_span"> If START fails,<a href="#"> download this zip</a>.. <br />
                                    Unzip and start ZohoMeeting.exe </span> </td>
                                </tr>
                                <tr>
                                  <td align="right" valign="middle" class="formstop">&nbsp;</td>
                                  <td align="left" valign="middle" class="Linktxtsmall">&nbsp;</td>
                                </tr>
                                <tr>
                                  <td colspan="2" align="right" valign="top"></td>
                                </tr>
                              </table>
                            </div>
                            <!-- **** JOIN MEETING: ENDS HERE *********************** -->
                            <!-- **** My Meetings Table Div ********************  -->
                            <div id="myMeetingsDiv" style="display:none;overflow:auto"> </div>
                            <!-- **** Invited Meetings Table Div ******************  -->
                            <div id="invitedMeetingsDiv" style="display:none;overflow:auto"></div>
                            <!-- ************ CREATE MEETING : STARTS HERE ************  -->
                            <div id="createMeetingsDiv" style="display:none">
                              <table width="50%" align="center" border="0" cellpadding="0" cellspacing="0" class="formtext">
                                <tr>
                                  <td width="30%" align="center" valign="middle" class="formstop"><fmt:message key="meeting.topic"/>
                                    :</td>
                                  <td width="70%" align="left" valign="middle" class="formstop"><input type="text" id="topic_create_TF" name="topic_create_TF" maxlength="100" size="22" value="<fmt:message key="meeting.topic"/>" class="borderColor" /></td>
                                </tr>
                                <tr><td height="10"></td> </tr>
                                <tr>
                                  <td rowspan="2" align="center" valign="middle" class="formstop"><fmt:message key="date.and.time"/>
                                    :</td>
                                  <td align="left" valign="middle"><input type="text" name="date_create_TF" id="date_create_TF" value="" readonly size="20" class="borderColor"/>
                                    <a href="javascript:;" onclick="javascript:callCalendar('date_create_TF','calButton','createView')"><img src="images/icon_sched.gif" border="0" id="calButton" class="img"></a> </td>
                                </tr>
                                <tr>
                                  <td colspan="2" align="left" valign="middle" class="borderColor"><form name="meridiemForm">
                                      <select name="hoursCombo_create_TF" class="timeField" id="hoursCombo_create_TF">
                                        <option value="01">01</option>
                                        <option value="02">02</option>
                                        <option value="03">03</option>
                                        <option value="04">04</option>
                                        <option value="05">05</option>
                                        <option value="06">06</option>
                                        <option value="07">07</option>
                                        <option value="08">08</option>
                                        <option value="09">09</option>
                                        <option value="10">10</option>
                                        <option value="11">11</option>
                                        <option value="12">12</option>
                                      </select>
                                      :
                                      <select name="minutesCombo_Create_TF" class="timeField" id="minutesCombo_Create_TF">
                                        <option value="00">00</option>
                                        <option value="05">05</option>
                                        <option value="10">10</option>
                                        <option value="15">15</option>
                                        <option value="20">20</option>
                                        <option value="25">25</option>
                                        <option value="30">30</option>
                                        <option value="35">35</option>
                                        <option value="40">40</option>
                                        <option value="45">45</option>
                                        <option value="50">50</option>
                                        <option value="55">55</option>
                                      </select>
                                      <input type="radio" name="meridiem_create_radio" value="AM" checked="checked" />
                                      AM
                                      <input type="radio" name="meridiem_create_radio" value="PM" />
                                      PM
                                    </form></td>
                                </tr>
                                <tr>
                                  <td align="center" valign="middle" class="formstop"><strong>
                                    <fmt:message key="agenda.optional"/>
                                    :</strong></td>
                                  <td align="left" valign="top" class="formstop"><div id="AddLink"><a href="javascript:void(null);" onclick="showAgendaTA ( );">
                                      <fmt:message key="add"/>
                                      </a></div>
                                    <div id="AgendaTA" style="display:none">
                                      <textarea name="agenda_create_TF" id="agenda_create_TF" class="setbox"></textarea>
                                    </div></td>
                                </tr>
                                <tr>
                                  <td align="center" valign="middle" class="formstop"><fmt:message key="presenter.email.id"/>
                                    : &nbsp;<img src="images/help.gif" onmouseout="javascript:hideDiv('PresenterHelp')" onmouseover="javascript:showDiv('PresenterHelp',false)" />
                                    <div id="PresenterHelp" class="tooltip" style="position: absolute; z-index: 1; display: none;">
                                      <fmt:message key="presenter.help"/>
                                    </div></td>
                                  <td align="left" valign="top" ><table border="0" cellpadding="0" cellspacing="0">
                                      <tr>
                                        <td align="left"><input type="text" name="presenter_mailid_create_TF" id="presenter_mailid_create_TF"  value="" class="borderColor">
                                        </td>
                                        <td><!--input type="checkbox" name="skype" value="yes" id="skype" /--></td>
                                        <td><!--label for="skype"><img src="http://meeting.zoho.com/images/skype_logo.gif" border="0" /></label--></td>
                                        <td ><!--label for="skype">Skype</label--></td>
                                      </tr>
                                    </table></td>
                                </tr>
                                <tr>
                                  <td align="center" valign="middle" class="formstop"><fmt:message key="participant.email.id.optional"/>
                                    <span style="font-size:11px;">&nbsp;</span>&nbsp;<img src="images/help.gif" onmouseout="javascript:hideDiv('ParticipantHelp')" onmouseover="javascript:showDiv('ParticipantHelp',false)" class="img" />
                                    <div id="ParticipantHelp" class="tooltip" style="position:absolute;z-index:1;display:none;">
                                      <fmt:message key="participant.help"/>
                                    </div></td>
                                  <td align="left" valign="middle" class="formstop"><div id="ParticipantsDiv">
                                      <table cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td><table id="ParticipantEmailTable" border="0" cellpadding="0" cellspacing="1">
                                              <tbody id="ParticipantEmailBody">
                                              </tbody>
                                            </table></td>
                                        </tr>
                                      </table>
                                      <span class="savetext">
                                      <fmt:message key="use.enter.to.separate.ids"/>
                                      </span> </div></td>
                                </tr>
                                <tr>
                                  <td align="center" valign="middle" class="formstop"><fmt:message key="control.transfer"/>
                                    <span style="font-size:11px;">&nbsp;</span>&nbsp;<img src="images/help.gif" onmouseout="javascript:hideDiv('TransferHelp')" onmouseover="javascript:showDiv('TransferHelp',false)" />
                                    <div id="TransferHelp" class="tooltip" style="position:absolute;z-index:1;display:none;">
                                      <fmt:message key="transfer.help"/>
                                    </div></td>
                                  <td align="left" valign="middle" class="txtField"><form name="createControlTransferForm">
                                      <input type="radio" name="agentType_create_TF" value="auto" id="auto" />
                                      <fmt:message key="auto"/>
                                      <input type="radio" name="agentType_create_TF" value="prompt" id="prompt" checked />
                                      <fmt:message key="prompt"/>
                                    </form></td>
                                </tr>
                                <tr>
                                  <td align="center" valign="middle" class="formstyle">&nbsp;</td>
                                  <td align="left" valign="middle"><span id="createButton_span"></span>
                                    <input name="Cancel" type="button" class="btnStyle" value="<fmt:message key="cancel"/>" title="Go back to previous page" onclick="javascript:formMeetingsTable('myMeetings',false)"/> </td>
                                </tr>
                                <tr>
                                  <td align="center" valign="middle" class="formstyle">&nbsp;</td>
                                  <td align="left" valign="middle">&nbsp;</td>
                                </tr>
                                <tr>
                                  <td colspan="4" align="right" valign="top"></td>
                                </tr>
                              </table>
                            </div>
                            <!-- ************ CREATE MEETING : ENDS HERE ************  -->
                            <div align="center" id="instructionDiv"></div></td>
                        </tr>
                      </table>
                    </div></td>
                </tr>
              </table>
              <!-- /Main body content area -->
            </td>
          </tr>
        </table>
      </div>
      <!-- /Content Area -->
    </td>
  </tr>
</table>
<form name="joinOptionsForm">
  <div id="joinOptionsDiv" style="display:none;font-family:Verdana,sans-serif;font-size:12px;border:1px Solid black;width:200;height:110;"> </div>
</form>
<div id="configureTimeZoneDiv" style="display:none">
  <table>
    <tr>
      <td><div class="BoldTextsmall">
          <fmt:message key="configure.timezone"/>
          <div id="timezoneLoadingDiv" class="BoldTextsmall" >
            <fmt:message key="loading"/>
            <img src="<%=request.getContextPath()%>/images/loading.gif"></div>
        </div>
        <div class="BoldTextsmall">
          <fmt:message key="timezone"/>
          :
          <div id="timezoneComp" class="Linktxtsmall">
            <script>getTZComp('timezoneComp')</script>
          </div>
        </div>
        <div class="bookmarktext" align="right"><img src="images/spacer.gif" width="68" height="1"/>
          <input type="button" name="submit_confgTZ" value="<fmt:message key="set"/>
          " class="btnStyle" onclick="javascript:configureTimezone()"/>
          <input type="button" name="cancel_confgTZ" value="<fmt:message key="cancel"/>
          " class="btnStyle" onclick="javascript:hideDiv('configureTimeZoneDiv')"/></div></td>
      <td align="right" valign="top" class="rowadd" style="border-bottom:solid 1px #CCCCCC"><a href="javascript:hideDiv('configureTimeZoneDiv')"><img src="images/icon_cancel.gif" border="0" class="imgcancel" title="Close"/></a></td>
    </tr>
  </table>
</div>
<div id="viewParticipantsDiv" onmouseover="javascript:showDiv('viewParticipantsDiv',false)" onmouseout="javascript:hideDiv('viewParticipantsDiv')" style="display:none;border:1px Solid black;font-family:Verdana,sans-serif;font-size:12px;overflow:auto"></div>
<div id="inviteParitcipantsDiv" style="padding: 10px 20px 20px 5px;display:none;position: absolute;" >
  <table cellpadding="0" cellspacing="0">
    <tr>
      <td><div class="bubbleheader">
          <fmt:message key="invite.participant"/>
        </div>
        <div id="inviteEmailSection" class="borderBottomColor">
          <div id="processingInviteDiv" style="display:none" class="formtext">
            <fmt:message key="processing"/>
            <img src="images/loading.gif"></div>
          <div style="font-size:13px;padding-top:5px; padding-bottom:5px;">
            <fmt:message key="invite.using.zoho.meeting"/>
          </div>
          <div style="font-size:13px;padding-top:5px; padding-bottom:5px;">
            <fmt:message key="enter.email.ids"/>
            : <img src="images/spacer.gif" width="40" height="1"/>
            <textarea id="inviteParticipants_Text" name="inviteParticipants_Text" rows="3" cols="30"></textarea>
            <img src="images/spacer.gif" width="8" height="1"/><span id="inviteMeetingButton"></span></div>
        </div>
        <div>OR </div>
        <div id="sendEmailSection" style="font-size:13px;padding-top:5px; padding-bottom:5px;"></div>
        <div align="center">
          <input type="button" value="<fmt:message key="close"/>
          " onclick="javascript:hideDiv('inviteParitcipantsDiv')"></div></td>
    </tr>
  </table>
</div>
<iframe id="joinMeetingIframe" height="0" width="0" frameborder="0"></iframe>
<%
    String axn = request.getParameter("operation");
    if(axn != null && axn.equals("start"))
    {
%>
<!--iframe id="startMeetingIframe" height="0" width="0" frameborder="0"></iframe-->
<script type="text/javascript">
            var meetingKey = "<%=request.getParameter("key")%>";
            var meetingTopic = "<%=request.getParameter("topic")%>";
            var status = "";
            var meetingType = "<%=request.getParameter("meetingType")%>"
            if(meetingType == "myMeetings")
            {
                startMeetingDetails(meetingTopic,meetingKey,status,'Presenter',meetingType,'start');
            }
            else if(meetingType == "invitedMeetings")
            {
                joinMeetingDetails(meetingTopic,meetingKey,status,'Presenter',meetingType,'join');
            }
        </script>
<iframe id="startMeetingIframe" src="http://meeting.zoho.com/login/meeting_details.jsp?meetingKey=<%=request.getParameter("key")%>&startMeeting=true&reloaded=true&source=ZohoConnect&fb=no&live=no&inv=no" height="0" width="0" frameborder="0"></iframe>
<%
    }
    else if(axn != null && axn.equals("join"))
    {
%>
<script type="text/javascript">
            var meetingKey = "<%=request.getParameter("key")%>";
            var meetingTopic = "<%=request.getParameter("topic")%>";
            var status = "";
            var meetingType = "<%=request.getParameter("meetingType")%>";
            formMeetingsTable(meetingType,false);
        </script>
<%
           String viewerType = request.getParameter("viewerType");
           if(viewerType.equals("java"))
           {
        %>
<div align="left">
  <iframe align="center" id="joinMeetingIframe" src="/jsp/javaviewer.jsp?key=<%=request.getParameter("key")%>&email=<%=request.getParameter("email")%>" height="40" width="415" frameborder="0" scrolling="no"></iframe>
</div>
<%
           }
           else
           {
        %>
<iframe id="joinMeetingIframe" src="http://meeting.zoho.com/login/meeting_details.jsp?meetingKey=<%=request.getParameter("key")%>&joinMeeting=true&email=<%=request.getParameter("email")%>&viewer=<%=request.getParameter("viewerType")%>&source=ZohoConnect&fb=no&live=no&inv=no" height="0" width="0" frameborder="0"></iframe>
<%
           }
        %>
<%
    }
    else if(axn != null && axn.trim().equals("view"))
    {
%>
<script type="text/javascript">
            var meetingKey = "<%=request.getParameter("key")%>";
            var meetingTopic = "<%=request.getParameter("topic")%>";
            var sstatus = "<%=request.getParameter("status")%>";
            var role = "<%=request.getParameter("role")%>"
            startMeetingDetails(meetingTopic,meetingKey,sstatus,role,'myMeetings','view');
        </script>
<%
    }
    else
    {
%>
<script type="text/javascript">getAllMyMeetings();</script>
<%
    }
%>
<script type="text/javascript">
fetchMailId();
document.getElementById("docTab").className="MainTabUnSelect";
document.getElementById("meetingTab").className="MainTabSelect";
</script>
<script type="text/javascript">setTimezoneInCombo();</script>
