<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<link href="../css/wait.css" rel="stylesheet" type="text/css">
<link href="../css/main.css" rel="stylesheet" type="text/css" />
</head>

<body onLoad="MM_showHideLayers('wait','','hide')" onFocus="MM_showHideLayers('wait','','hide');">
<?php 
$page_name = "HR-new employee";
include ("../navigation/access.php");

if ($permission_num==1) {
include('../include/wait.php') 
?>
<div class="wizard_page_middle_frame">
<form id="form1" name="form1" method="get" action="employeeWizbase.php">
   <?php if ($_SESSION['error']==1) { ?>
        <div class="wizard_frame"> <img src="../images/exclamation_mark_green_small.png" width="20" height="32">&nbsp;&nbsp;&nbsp;&nbsp;
          <label class="label_std">An employee with the name "<?php echo $_SESSION['first_name']." ".$_SESSION['last_name']?>" allready exists, please use another name.</label>
        </div>
        <?php } ?>
		
     
        <div class="wizard_frame"><br>
<label class="label_std">What is the employee's name?</label>
            <label class="star"> *</label>
            <br />
            
            <br />
            <label class="label_std">First name:</label>
            <input name="first_name_text" type="text" class="text200" id="first_name_text" onBlur="capitalize(this)" onKeyUp="ToLower(this)" value="<?php echo $_SESSION['first_name'] ?>" maxlength="25"  autofocus  tabindex="1" onFocus="this.select();"/>
            &nbsp;&nbsp;
            <label class="label_std">Last name:</label>
            <input name="last_name_text" type="text" class="text200" id="last_name_text" onBlur="capitalize(this); " onKeyUp="ToLower(this)" value="<?php echo $_SESSION['last_name'] ?>" maxlength="25" tabindex="2" onFocus="this.select();"/>
            <br> 
  <br>
            <input name="error" type="hidden" id="error" value="0" />
        </div>
        <div class="wizard_spacer_frame" style="height:145px;"></div>
      <div class="wizard_frame">
      <table width="660" height="50" align="left"  id="table_button_bar">
          <tr>
            <td width="117">&nbsp;</td>
            <td width="115">
              <input name="p" type="hidden" id="p" value="1" />
              <input name="s" type="hidden" id="s" value="1" />
            </td>
            <td width="99">&nbsp;</td>
            <td width="125"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; cancel_confirmation(1, '../hr_module/hr_main.php?date=0');" value="Cancel" tabindex="4"/></td>
            <td width="110"><input type="submit" name="next_button" id="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; MM_showHideLayers('wait','','show');" tabindex="3" /></td>
          </tr>
      </table>
      </div>
 </form>
<!--form validation-->
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("first_name_text","req","- the first name of the employee.");
  frmvalidator.addValidation("last_name_text","req", "- the last name of the employee.");
</script>

</div>
  
<?php } else { 
    $_SESSION['denied_return'] = "hr_module/hr_main.php?date=";	?>
	<body onLoad="accessdenied(); return false">
    <script>
	needToConfirm = false; 
	</script>
</body>
<?php }
?>

