<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--jscript-->
<script language="JavaScript">
   function submitForm(){
              document.form1.mySubmit.click();
    }
</script>
<script language="JavaScript" src="../jscript/gen_validatorv4_2.js"  type="text/javascript" xml:space="preserve"></script>
<script language="JavaScript" src="../jscript/go_to_url.js"  type="text/javascript"></script>
<script language="JavaScript" src="../jscript/replace_quote.js"  type="text/javascript"></script>
<script>window.close();</script>

<?php

include('../include/session.php');	

$job_no = $_GET['job_no'];
$location = $_GET['location'];
$customer = $_GET['customer'];
?>
<style>
select.store_item_select {
	width: 230px;
}
select.store_item_select option {
	width: 220px;
}
label.label_std {
	margin-left: 5px;
	line-height: 20px;
	padding-top: 6px;
	color: #000;
	text-shadow: 1px 1px 1px #fff;
	font: bold 12px Arial;
}
input.imagebutton {
	background-color: #E1E1E1;
	width: 100px;
	height: 24px;
	border: solid;
	border-width: 1px;
	border-color: #FB6808;
	cursor: pointer;
	color: #000000;
	font: bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow: 0px 0px 0px #CCC;
	-webkit-box-shadow: 0px 0px 0px #CCC;
	box-shadow: 0px 0px 0px #CCC;
}
</style>
<style >
input.imagebutton {
	background-color: #E1E1E1;
	width: 100px;
	height: 24px;
	border: solid;
	border-width: 1px;
	border-color: #FB6808;
	cursor: pointer;
	color: #000000;
	font: bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow: 0px 0px 0px #CCC;
	-webkit-box-shadow: 0px 0px 0px #CCC;
	box-shadow: 0px 0px 0px #CCC;
}
input.imagebutton:hover {
	background-color: #E4E4E4;
	width: 100px;
	height: 24px;
	border: solid;
	border-width: 2px;
	border-color: #FB6808;
	cursor: pointer;
	color: #000000;
	font: bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow: 5px 5px 5px #666;
	-webkit-box-shadow: 5px 5px 5px #666;
	box-shadow: 5px 5px 5px #666;
}

textarea.text_box{
	font-family:Arial, Helvetica, sans-serif;
	font-size:12px;
    background:#FFF;
    border: 1px solid #E6E6E6;
	border-color:#F90;
    padding: 2px;
    color:#000;    
}
textarea.text_box:focus{
     border-color:#F90;
}
</style>

<script type="text/javascript" src="../jscript/jquery.1.4.2.js"></script>
<script>
function char_remaining() {
 var lgth = document.getElementById('note_text').value.length+1;	
 if(lgth > 150){
	   // alert('stop');
        return false;
    }
 $("#remainingC").html("Remaining characters : " +(150 - lgth));
}
</script>

</head>
<body>
<form action="note_add_save.php" method="get" name="form2" id="form2" target="_top">
  <table width="450" border="0" align="left" cellpadding="0" cellspacing="0" class="list2" id="select_table">
    <tr>
      <td height="38" align="center">
        <label class="label_std">Add a note for project<br /><?php echo $job_no ?>&nbsp;for&nbsp;<?php echo $customer ?></label> </label>
        <br />
        <br />
        <textarea name="note_text" id="note_text" cols="60" rows="5" class="text_box" onKeyPress="char_remaining();" onKeyUp="replace_quote(id);" maxlength="150"></textarea><br />
        <font size="-1"><span id='remainingC'></span></font>
        </td>
    </tr>
    
    <tr>
      <td align="center"><br />
      <input name="location_text" type="hidden" value="<?php echo $location ?>" />
      <input name="job_no_text" type="hidden" value="<?php echo $job_no ?>" />
        <input name="next_add_button" type="submit" id='next_add_button' value="Save" class="imagebutton"  />
        <input name="button" type="button" id="button" class="imagebutton" value="Cancel" onClick="MM_goToURL('parent','<?php echo $location ?>');return document.MM_returnValue"/>
        </td>
    </tr>
  </table>
</form>
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form2");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("note_text","req","Please enter a note.");
</script>
</body>
</html>