 
<script type="text/javascript">
   
    function validate()
    {
        if(trim(document.getElementById('var_title').value) == '')
        { 
            alert('Please enter title.');
            document.getElementById('var_title').value='';
            document.getElementById('var_title').focus();
            return false;
        }
        
        if(trim(document.getElementById('var_phone').value)=='')
        { 
            alert('Please enter phone.');
            document.getElementById('var_phone').value='';
            document.getElementById('var_phone').focus();
            return false;
        }
        var len=(document.getElementById('var_phone').value.length);
        if(len < 5)
        { 
            alert('Please enter at least 5 character.');
            document.getElementById('var_phone').value='';
            document.getElementById('var_phone').focus();
            return false;
        }

        if(trim(document.getElementById('var_email').value)=="")
        {
            alert("Please enter Email ID.");
            document.getElementById('var_email').value='';
            document.getElementById('var_email').focus();
            return false;
        }
        else if(!checkemail(document.getElementById('var_email').value))
        {
            alert("Please enter valid Email ID.");
             document.getElementById('var_email').value='';
            document.getElementById('var_email').focus();
            return false;
        }
        
    
        document.getElementById('h_save').value ='T';
        return true;
    }
    
    
    
    
      
    
  function checkemail(str)
    {
        var testresults;
        
        var filter=/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/i;

        if (filter.test(str))
            testresults=true
        else
            testresults=false

        return (testresults)
    }
    
   
</script>


<?php if ($_REQUEST['action'] != '') $action = ucwords($_REQUEST['action']); ?>
<div class="breadcrumbs"><a href="index.php">Home </a>&nbsp;>&nbsp; <span class="current"><?= $action ?> Contact Us Page Details</span>  </div>
<div class="add-new-user-title">
    <h2><img src="<?= GLOBAL_ADMIN_IMAGES_PATH ?>/add-new-user-icon.png"><?= $action ?> Contact Us Page Details</h2>
</div>
<?= $messagebox ?>
<form  name="frmphotogallery"  id="frmphotogallery" action="<?= $frmaction ?>" method="post" onSubmit="return validate();" enctype="multipart/form-data" >
    <input name="h_save" type="hidden" id="h_save" value="T" />
    <input name="hdimage" type="hidden" id="hdimage" value="<?= $row['var_photo']; ?>" />
    <input type="hidden" name="fk_modules" id="fk_modules" value="<?php echo $fk_modules ?>">
    <input name="old_displayorder" type="hidden" id="old_displayorder" value="<?= $row['var_title']; ?>" />
    <div class="web-booking-main"></div>
    <div class="grid-list-subtitle-bg" style="margin-top:10px; cursor:pointer" onClick="javascript:expandcollapsepanel('asignbanner');" >
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <?php {
                $type = 'Contact Us';
            }
            ?>
            <tr>
                <td align="left" valign="top" class="grid-td-left"><?= $type; ?></td>
            </tr>
        </table>
    </div>
    <div class="information-white-bg" id="asignbanner" >
        <div class="clear"></div>
        <div class="grid-list-inner-table-text">
            <table width="100%" border="0" cellspacing="3" cellpadding="3">

                <tr>
                    <td width="181" align="left" valign="top" class="add-new-user-text"> Title: <span>(required)</span></td>
                    <td width="724" align="left" valign="top">
                        <input name="var_title" type="text" class="add-new-user-textarea" style="width:410px" id="var_title" value="<?= $row['var_title']; ?>" maxlength="100"  />
                    </td>
                </tr>

                <tr>
                    <td width="181" align="left" valign="top" class="add-new-user-text">Telephone: <span>(required)</span></td>
                    <td align="left" valign="top">
                        <input name="var_phone" type="text" class="add-new-user-textarea fl" style="width:410px" id="var_phone" value="<?= $row['var_phone']; ?>" maxlength="20"  onkeypress="return KeycheckOnlyPhonenumber(event);" />
                        <div class="fl contact-comment-new position-relative mgl5 mgt5">
                            <span class="help-icon1"></span>
                            <div style="width: 400px; height: 30px; " class="contact-hint fl">You need to enter the Telephone No this will be displayed in front of the website.</div>
                        </div>           
                    </td>
                </tr>
                
                <tr>
                    <td width="181" align="left" valign="top" class="add-new-user-text">Cell: </td>
                    <td align="left" valign="top">
                        <input name="var_cell" type="text" class="add-new-user-textarea fl" style="width:410px" id="var_cell" value="<?= $row['var_cell']; ?>" maxlength="20"  onkeypress="return KeycheckOnlyPhonenumber(event);" />
                        <div class="fl contact-comment-new position-relative mgl5 mgt5">
                            <span class="help-icon1"></span>
                            <div style="width: 400px; height: 30px; " class="contact-hint fl">You need to enter the Cell No this will be displayed in front of the website.</div>
                        </div>           
                    </td>
                </tr>
                
                
               
                <tr>
                    <td width="181" align="left" valign="top" class="add-new-user-text"> Fax:  </td>
                    <td width="724" align="left" valign="top">
                        <input name="var_fax" type="text" style="float: left; width: 410px;" class="add-new-user-textarea" style="width:410px" id="var_fax" value="<?= $row['var_fax']; ?>" maxlength="100" onkeypress="return KeycheckOnlyPhonenumber(event);"/>
                        
                    </td>
                </tr>
                
                <tr>
                    <td width="181" align="left" valign="top" class="add-new-user-text"> Email ID:  <span>(required)</span></td>
                    <td width="724" align="left" valign="top">
                        <input name="var_email" type="text" style="float: left; width: 410px;" class="add-new-user-textarea" id="var_email" value="<?= $row['var_email']; ?>" maxlength="250"  />
                        <div class="fl contact-comment-new position-relative mgl5 mgt5">
                            <span class="help-icon1"></span>
                            <div style="width: 300px; height: 30px; " class="contact-hint fl">You need to enter the Email ID information  this will be displayed in front of the website.</div>
                        </div>
                    
                    </td>
                </tr>
                    <tr>
                       <td width="181" align="left" valign="top" colspan="2" class="add-new-user-text"> Address:   </td>
                    </tr>
                    <tr>
                        <td  align="left" valign="top"colspan="3" width="92%" colspan="2" class="add-new-user-text" >
                            <?php echo $configObj->glLibraryObj->load_ckeditor('var_address', $row['var_address']); ?> 
                        </td>
                    </tr>
                    <tr>
                    <td width="181" align="left" valign="top" class="add-new-user-text"> Open Hours: </td>
                    <td width="724" align="left" valign="top">
                        <textarea name="var_open_hour" id="var_open_hour" rows="4" cols="50"><?php echo $row['var_open_hour']; ?></textarea>
                    </td>
                    </tr>
               
            </table>
        </div>
        <div class="add-new-user-button" style="padding-bottom: 30px;">
            <input width="162" type="image" border="0" hspace="5" height="25" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('btnsaveandc','','html/images//save-keep-editing-button-hover.jpg',1)" src="http://nserver/cipil.net/powerpanel/html/images//save-keep-editing-button.jpg" alt="save-keep-editing" id="btnsaveandc" name="btnsaveandc" value="1">
        </div>
                
        <div class="clear"></div>
    </div>
</form>


