<?php
if ($_REQUEST['view'] == "askquestion") {
    $lable = "Answer";
} else {
    $lable = "Messages";
}
?>
<script type="text/javascript">
    function validate()
    {
        if(trim(document.getElementById('var_message').value) == "")
        {
            alert("Please enter <?php echo $lable; ?>.");
            document.getElementById('var_message').focus();
            return false;
        }
        document.getElementById('h_save').value = 'T';
        return true;
    }
    
</script>
<?php if ($_REQUEST['action'] != '') $action = ucwords($_REQUEST['action']); ?>
<?= $messagebox ?>
<?php
if ($_REQUEST['view'] == "newslatter") {
    $view = "&view=newslatter";
}
if ($_REQUEST['view'] == "askquestion") {
    $view = "&view=askquestion";
}
?>
<form  name="frmcontact" id="frmcontact" action="index.php?module=contactusmsg<?= $view; ?>&action=email&sub=reply" method="post" onSubmit="return validate();" enctype="multipart/form-data" >
    <input type="hidden" name="h_save" id="h_save" value="F">
    <input type="hidden" name="userid" id="userid" value="<?php echo $_REQUEST['id']; ?>" />
    <div class="web-booking-main">
        <div class="grid-list-subtitle-bg" style="margin-top:10px; " >
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td align="left" valign="top" class="grid-td-left">Reply Form</td>
                </tr>
            </table>
        </div>
        <div class="information-white-bg" id="messages" >
            <div class="clear"></div>
            <div class="grid-list-inner-table-text">
                <table width="100%" border="0" cellspacing="3" cellpadding="3">
                    <tr>
                        <td width="26%" align="left" valign="top" class="add-new-user-text"><?php echo $lable; ?> : <span>(required)</span></td>
                        <td width="724" align="left" valign="top">
                            <textarea cols="50" rows="5" style="width:95%;" id="var_message" name="var_message" class="textarea2"></textarea>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <br/>&nbsp;
        <div class="clear"></div>&nbsp;&nbsp;
        <input type="image" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image81','','<?= GLOBAL_ADMIN_IMAGES_PATH ?>/submit-button-blue-hover.gif',1)" src="<?= GLOBAL_ADMIN_IMAGES_PATH ?>/submit-button-blue.gif" name="Image34" width="81" height="25">
        <a href="index.php?module=contactusmsg<?= $view; ?>" onClick="SetBackground()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image35','','<?= GLOBAL_ADMIN_IMAGES_PATH ?>/cancel-button.jpg',1)"><img src="<?= GLOBAL_ADMIN_IMAGES_PATH ?>/cancel-button.jpg" alt="Submit" name="Image35" border="0" id="Image35" /></a>
    </div>
</form>