<head>
<?php 	
require_once('../include/tc_calendar.php');
$table_name = $_SESSION['db_prefix']."_quotations";
$quote_query = "SELECT  cust_id, request_date, project_no, project, project_description, project_place, company_contact, contact_phone, seller  FROM $table_name WHERE  quote_no = '".$_SESSION['quote_no']."' ";
$quote_result = mySQL_query($quote_query);
$a1 = mysql_result($quote_result, 0, "cust_id");
$a2 = mysql_result($quote_result, 0, "request_date");
$a3 = mysql_result($quote_result, 0, "project_no");
$a4 = mysql_result($quote_result, 0, "project_description");
$a5 = mysql_result($quote_result, 0, "company_contact");
$a6 = mysql_result($quote_result, 0, "contact_phone");
$a7 = mysql_result($quote_result, 0, "project_place");
$_SESSION['project'] = mysql_result($quote_result, 0, "project");
$_SESSION['seller'] = mysql_result($quote_result, 0, "seller");
$cust_id = $a1;
$quote_no = $_SESSION['quote_no'];
$job_card_no='';
$quote='yes';
$quote_value='';


$table_name = $_SESSION['db_prefix']."_presets";
$earth_loops_query = "SELECT preset_value FROM $table_name WHERE preset_name= 'Earth loops' ";
$earth_loops_result = mySQL_query($earth_loops_query);
$earth_loops_price = mysql_result($earth_loops_result, 0, "preset_value");

$table_name = $_SESSION['db_prefix']."_presets";
$outrigger_query = "SELECT preset_value FROM $table_name WHERE preset_name= 'Outrigger' ";
$outrigger_result = mySQL_query($outrigger_query);
$outrigger_price = mysql_result($outrigger_result, 0, "preset_value");

$table_name = $_SESSION['db_prefix']."_presets";
$wash_line_query = "SELECT preset_value FROM $table_name WHERE preset_name= 'Wash line' ";
$wash_line_result = mySQL_query($wash_line_query);
$wash_line_price = mysql_result($wash_line_result, 0, "preset_value");

$table_name = $_SESSION['db_prefix']."_presets";
$strobe_query = "SELECT preset_value FROM $table_name WHERE preset_name= 'Strobe' ";
$strobe_result = mySQL_query($strobe_query);
$strobe_price = mysql_result($strobe_result, 0, "preset_value");

$table_name = $_SESSION['db_prefix']."_presets";
$anti_lift_bar_query = "SELECT preset_value FROM $table_name WHERE preset_name= 'Anti lift bar' ";
$anti_lift_bar_result = mySQL_query($anti_lift_bar_query);
$anti_lift_bar_price = mysql_result($anti_lift_bar_result, 0, "preset_value");

$table_name = $_SESSION['db_prefix']."_presets";
$ace_100_query = "SELECT preset_value FROM $table_name WHERE preset_name= 'Ace 100 energizer' ";
$ace_100_result = mySQL_query($ace_100_query);
$ace_100_price = mysql_result($ace_100_result, 0, "preset_value");

?>
<!--style sheets-->



<!--jscript-->
<script language="JavaScript" src="../jscript/show_hide_layers.js"  type="text/javascript"></script>  
<script language="JavaScript" src="../jscript/numbers_only_decimal.js"  type="text/javascript"></script>  

<?php if ( ($_SESSION['project']=='Gate motor') OR ($_SESSION['project']=='Pool fence')) { ?>
<script language="javascript">
function addRow6(dataTable6) {
 
            var table = document.getElementById(dataTable6);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell61 = row.insertCell(0);
            var element61 = document.createElement("input");
            element61.type = "checkbox";
            element61.name="line_checkbox6"+line_no;
			element61.id="line_checkbox6"+line_no;
			/*element61.checked="checked";*/
			cell61.style.verticalAlign="top";
            cell61.appendChild(element61);
			 
            var cell62 = row.insertCell(1);
            var element62 = document.createElement("input");
            element62.type="text";
			element62.name = "item_text6"+line_no;
			element62.className = "text500";
			element62.value = "";
			element62.onblur = function(){document.getElementById("line_checkbox6"+line_no).checked = "checked";}
			element62.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
						
			 
			cell62.style.verticalAlign="top";
			cell62.appendChild(element62);
							
			var cell64 = row.insertCell(2);
			cell64.align="right";
			
			var element66 = document.createElement("input");
            element66.type = "text";
            element66.name = "amount_text6"+line_no;
			element66.className = "text100";
			element66.onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" 
			element66.onkeypress = function isNumberKey(evt)
       								{
          							var charCode = (evt.which) ? evt.which : event.keyCode
          							if (charCode != 46 && charCode > 31 
            						&& (charCode < 48 || charCode > 57))
             						return false;
 
          							return true;
       								}
									;
			element66.onkeyup = function() {this.value = this.value.replace (/(\...).*/, '$1');}
			element66.style = "text-align:right";		

            var element64 = document.createElement("input");
            element64.type = "hidden";
            element64.name = "line_num6";
			element64.value = rowCount;
            cell64.style.verticalAlign="top";
			
			cell64.appendChild(element66);
            cell64.appendChild(element64);
			
			var element68 = document.createElement("script");
			element68.setAttribute('type', 'text/javascript');
			element68.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text6'+i,'req','- item '+(i+1)+'.');frmvalidator.addValidation('amount_text6'+i,'req','- price '+(i+1)+'.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element68);
		
			element61.onmouseup = function() {
				 if (document.getElementById('line_checkbox6'+line_no).checked) {
                         element62.style.background = '#F0F0F0';
						 element66.style.background = '#F0F0F0';
						 element62.value = '.';
						 element66.value = '.';
						 element62.disabled = true;
						 element66.disabled = true;
						 
                } else {
                        element62.style.background = '#FFF';
						element66.style.background = '#FFF';
						element62.value = '';
						element66.value = '';
						element62.disabled = false;
						element66.disabled = false;
						 
                }
				};
			
}
</script>

<script language="javascript">
function addRow7(dataTable7) {
 
            var table = document.getElementById(dataTable7);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell71 = row.insertCell(0);
            var element71 = document.createElement("input");
            element71.type = "checkbox";
            element71.name="line_checkbox7"+line_no;
			element71.id="line_checkbox7"+line_no;
			/*element71.checked="checked";*/
			cell71.style.verticalAlign="top";
            cell71.appendChild(element71);
			 
            var cell72 = row.insertCell(1);
            var element72 = document.createElement("input");
            element72.type="text";
			element72.name = "item_text7"+line_no;
			element72.className = "text500";
			element72.value = "";
			element72.onblur = function(){document.getElementById("line_checkbox7"+line_no).checked = "checked";}
			element72.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');} 
			cell72.style.verticalAlign="top";
			cell72.appendChild(element72);
							
			var cell74 = row.insertCell(2);
			cell74.align="right";
			
			var element76 = document.createElement("input");
            element76.type = "text";
            element76.name = "amount_text7"+line_no;
			element76.className = "text100";
			element76.onkeypress = function isNumberKey(evt)
       								{
          							var charCode = (evt.which) ? evt.which : event.keyCode
          							if (charCode != 46 && charCode > 31 
            						&& (charCode < 48 || charCode > 57))
             						return false;
 
          							return true;
       								}
									;
			element76.onkeyup = function() {this.value = this.value.replace (/(\...).*/, '$1');}
			element76.style = "text-align:right";		

            var element74 = document.createElement("input");
            element74.type = "hidden";
            element74.name = "line_num7";
			element74.value = rowCount;
            cell74.style.verticalAlign="top";
			
			cell74.appendChild(element76);
            cell74.appendChild(element74);
			
			var element78 = document.createElement("script");
			element78.setAttribute('type', 'text/javascript');
			element78.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text7'+i,'req','- item '+(i+1)+' in extra s.');frmvalidator.addValidation('amount_text7'+i,'req','- price '+(i+1)+' in extra s.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element78);
		
			element71.onmouseup = function() {
				 if (document.getElementById('line_checkbox7'+line_no).checked) {
                         element72.style.background = '#F0F0F0';
						 element76.style.background = '#F0F0F0';
						 element72.value = '.';
						 element76.value = '.';
						 element72.disabled = true;
						 element76.disabled = true;
						 
                } else {
                        element72.style.background = '#FFF';
						element76.style.background = '#FFF';
						element72.value = '';
						element76.value = '';
						element72.disabled = false;
						element76.disabled = false;
						 
                }
				};
			
}
</script>
<?php 
}
?>
<?php
if ( ($_SESSION['project']=='Manase 358') OR ($_SESSION['project']=='Gate') OR ($_SESSION['project']=='Razor wire') OR ($_SESSION['project']=='Wall spikes') OR ($_SESSION['project']=='Farm fence') OR ($_SESSION['project']=='Free standing electric fence') OR ($_SESSION['project']=='Miscelaneous') ) { ?>
<script language="javascript">
function addRow2(dataTable2) {
 
            var table = document.getElementById(dataTable2);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell21 = row.insertCell(0);
            var element21 = document.createElement("input");
            element21.type = "checkbox";
            element21.name="line_checkbox2"+line_no;
			element21.id="line_checkbox2"+line_no;
			/*element1.checked="checked";*/
			cell21.style.verticalAlign="top";
            cell21.appendChild(element21);
			 
            var cell22 = row.insertCell(1);
            var element22 = document.createElement("textarea");
            element22.cols=85;
			element22.rows=1;
            element22.name = "item_text2"+line_no;
			element22.id = "item_text2"+line_no;
			element22.className = "text_box";
			element22.value = "";
			element22.onchange = function(){document.getElementById("line_checkbox2"+line_no).checked = "checked";}
			element22.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			
			var element24 = document.createElement("input");
            element24.type = "hidden";
            element24.name = "line_num2";
			element24.value = rowCount;
           
					
			cell22.style.verticalAlign="top";
			cell22.appendChild(element22);
			cell22.appendChild(element24);				
	
			var element28 = document.createElement("script");
			element28.setAttribute('type', 'text/javascript');
			element28.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 1; i < 10; i++) {frmvalidator.addValidation('item_text2'+i,'req','-  item '+(i+1)+' in option 1.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element28);
		
			element21.onmouseup = function() { 
				 if (document.getElementById('line_checkbox2'+line_no).checked) {
                         element22.style.background = '#F0F0F0';
						 element22.value = '.';
						 element22.disabled = true;				 
                } else {
                        element22.style.background = '#FFF';
						element22.value = '';
						element22.disabled = false;						 
                }
				}
			
}
</script> 
<script language="javascript">
function addRow3(dataTable3) {
 
            var table = document.getElementById(dataTable3);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell31 = row.insertCell(0);
            var element31 = document.createElement("input");
            element31.type = "checkbox";
            element31.name="line_checkbox3"+line_no;
			element31.id="line_checkbox3"+line_no;
			/*element1.checked="checked";*/
			cell31.style.verticalAlign="top";
            cell31.appendChild(element31);
			 
            var cell32 = row.insertCell(1);
            var element32 = document.createElement("input");
			element32.type = "text";
            element32.name = "item_text3"+line_no;
			element32.id = "item_text3"+line_no;
			element32.className = "text300";
			element32.value = "";
			element32.onchange = function(){document.getElementById("line_checkbox3"+line_no).checked = "checked";}
			element32.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			cell32.style.verticalAlign="top";
			cell32.appendChild(element32);
							
			var cell34 = row.insertCell(2);
			cell34.align="right";
			
			var element36 = document.createElement("input");
            element36.type = "text";
            element36.name = "amount_text3"+line_no;
			element36.id = "amount_text3"+line_no;
			element36.className = "text100";
			element36.onkeypress = function isNumberKey(evt)
       								{
          							var charCode = (evt.which) ? evt.which : event.keyCode
          							if (charCode != 46 && charCode > 31 
            						&& (charCode < 48 || charCode > 57))
             						return false;
 
          							return true;
       								}
									;
			element36.onkeyup = function() {this.value = this.value.replace (/(\...).*/, '$1'); };
			element36.onchange = function(){document.getElementById("line_checkbox3"+line_no).checked = "checked";}
			element36.style = "text-align:right";		

            var element34 = document.createElement("input");
            element34.type = "hidden";
            element34.name = "line_num3";
			element34.value = rowCount;
            cell34.style.verticalAlign="top";
			
			cell34.appendChild(element36);
            cell34.appendChild(element34);
			
			var element38 = document.createElement("script");
			element38.setAttribute('type', 'text/javascript');
			element38.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text3'+i,'req','- price details '+(i+1)+' in option 1 .');frmvalidator.addValidation('amount_text3'+i,'req','- price '+(i+1)+' in option 1');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element38);
		
			element31.onmouseup = function() {
				 if (document.getElementById('line_checkbox3'+line_no).checked) {
                         element32.style.background = '#F0F0F0';
						 element36.style.background = '#F0F0F0';
						 element32.selectedIndex=0;
						 element36.value = '.';
						 element32.disabled = true;
						 element36.disabled = true;
						 
                } else {
                        element32.style.background = '#FFF';
						element36.style.background = '#FFF';
						element32.selected_index=0;
						element36.value = '';
						element32.disabled = false;
						element36.disabled = false;
						 
                }
				};
			
}
</script>

<script language="javascript">
function addRow4(dataTable4) {
 
            var table = document.getElementById(dataTable4);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell41 = row.insertCell(0);
            var element41 = document.createElement("input");
            element41.type = "checkbox";
            element41.name="line_checkbox4"+line_no;
			element41.id="line_checkbox4"+line_no;
			/*element1.checked="checked";*/
			cell41.style.verticalAlign="top";
            cell41.appendChild(element41);
			 
            var cell42 = row.insertCell(1);
            var element42 = document.createElement("textarea");
            element42.cols=85;
			element42.rows=1;
            element42.name = "item_text4"+line_no;
			element42.id = "item_text4"+line_no;
			element42.className = "text_box";
			element42.value = "";
			element42.onchange = function(){document.getElementById("line_checkbox4"+line_no).checked = "checked";}
			element42.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			var element44 = document.createElement("input");
            element44.type = "hidden";
            element44.name = "line_num4";
			element44.value = rowCount;
           
					
			cell42.style.verticalAlign="top";
			cell42.appendChild(element42);
			cell42.appendChild(element44);				
	
			var element48 = document.createElement("script");
			element48.setAttribute('type', 'text/javascript');
			element48.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text4'+i,'req','- item '+(i+i)+' in option 2.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element48);
		
			element41.onmouseup = function() { 
				 if (document.getElementById('line_checkbox4'+line_no).checked) {
                         element42.style.background = '#F0F0F0';
						 element42.value = '.';
						 element42.disabled = true;				 
                } else {
                        element42.style.background = '#FFF';
						element42.value = '';
						element42.disabled = false;						 
                }
				}
			
}
</script> 


<script language="javascript">
function addRow5(dataTable5) {
 
            var table = document.getElementById(dataTable5);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell51 = row.insertCell(0);
            var element51 = document.createElement("input");
            element51.type = "checkbox";
            element51.name="line_checkbox5"+line_no;
			element51.id="line_checkbox5"+line_no;
			/*element1.checked="checked";*/
			cell51.style.verticalAlign="top";
            cell51.appendChild(element51);
			 
            var cell52 = row.insertCell(1);
            var element52 = document.createElement("input");
			element52.type = "text";
            element52.name = "item_text5"+line_no;
			element52.id = "item_text5"+line_no;
			element52.className = "text300";
			element52.value = "";
			element52.onchange = function(){document.getElementById("line_checkbox5"+line_no).checked = "checked";}
			element52.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			cell52.style.verticalAlign="top";
			cell52.appendChild(element52);
							
			var cell54 = row.insertCell(2);
			cell54.align="right";
			
			var element56 = document.createElement("input");
            element56.type = "text";
            element56.name = "amount_text5"+line_no;
			element56.id = "amount_text5"+line_no;
			element56.className = "text100";
			element56.onkeypress = function isNumberKey(evt)
       								{
          							var charCode = (evt.which) ? evt.which : event.keyCode
          							if (charCode != 46 && charCode > 31 
            						&& (charCode < 48 || charCode > 57))
             						return false;
 
          							return true;
       								}
									;
			element56.onkeyup = function() {this.value = this.value.replace (/(\...).*/, '$1');}
			element56.onchange = function(){document.getElementById("line_checkbox5"+line_no).checked = "checked";}
			element56.style = "text-align:right";		

            var element54 = document.createElement("input");
            element54.type = "hidden";
            element54.name = "line_num5";
			element54.value = rowCount;
            cell54.style.verticalAlign="top";
			
			cell54.appendChild(element56);
            cell54.appendChild(element54);
			
			var element58 = document.createElement("script");
			element58.setAttribute('type', 'text/javascript');
			element58.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text5'+i,'req','- price details '+(i+1)+' in option 2.');frmvalidator.addValidation('amount_text5'+i,'req','- price '+(i+1)+' in option 2.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element58);
		
			element51.onmouseup = function() {
				 if (document.getElementById('line_checkbox5'+line_no).checked) {
                         element52.style.background = '#F0F0F0';
						 element56.style.background = '#F0F0F0';
						 element52.selectedIndex=0;
						 element56.value = '.';
						 element52.disabled = true;
						 element56.disabled = true;
						 
                } else {
                        element52.style.background = '#FFF';
						element56.style.background = '#FFF';
						element52.selected_index=0;
						element56.value = '';
						element52.disabled = false;
						element56.disabled = false;
						 
                }
				};
			
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
</script>


<?php
if (($_SESSION['project']=='Manase 358') OR ($_SESSION['project']=='Miscelaneous')) { 
?>
<script language="javascript">
function addRow_M4(dataTable_M4) {
 
            var table = document.getElementById(dataTable_M4);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell_M41 = row.insertCell(0);
            var element_M41 = document.createElement("input");
            element_M41.type = "checkbox";
            element_M41.name="line_checkbox_M4"+line_no;
			element_M41.id="line_checkbox_M4"+line_no;
			/*element1.checked="checked";*/
			cell_M41.style.verticalAlign="top";
            cell_M41.appendChild(element_M41);
			 
            var cell_M42 = row.insertCell(1);
            var element_M42 = document.createElement("textarea");
            element_M42.cols=85;
			element_M42.rows=1;
            element_M42.name = "item_text_M4"+line_no;
			element_M42.id = "item_text_M4"+line_no;
			element_M42.className = "text_box";
			element_M42.value = "";
			element_M42.onchange = function(){document.getElementById("line_checkbox_M4"+line_no).checked = "checked";}
			element_M42.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			var element_M44 = document.createElement("input");
            element_M44.type = "hidden";
            element_M44.name = "line_num_M4";
			element_M44.value = rowCount;
           
					
			cell_M42.style.verticalAlign="top";
			cell_M42.appendChild(element_M42);
			cell_M42.appendChild(element_M44);				
	
			var element_M48 = document.createElement("script");
			element_M48.setAttribute('type', 'text/javascript');
			element_M48.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text_M4'+i,'req','- item '+(i+i)+' in option 2.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element_M48);
		
			element_M41.onmouseup = function() { 
				 if (document.getElementById('line_checkbox_M4'+line_no).checked) {
                         element_M42.style.background = '#F0F0F0';
						 element_M42.value = '.';
						 element_M42.disabled = true;				 
                } else {
                        element_M42.style.background = '#FFF';
						element_M42.value = '';
						element_M42.disabled = false;						 
                }
				}
			
}
</script>


<script language="javascript">
function addRow_M5(dataTable_M5) {
 
            var table = document.getElementById(dataTable_M5);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell_M51 = row.insertCell(0);
            var element_M51 = document.createElement("input");
            element_M51.type = "checkbox";
            element_M51.name="line_checkbox_M5"+line_no;
			element_M51.id="line_checkbox_M5"+line_no;
			/*element1.checked="checked";*/
			cell_M51.style.verticalAlign="top";
            cell_M51.appendChild(element_M51);
			 
            var cell_M52 = row.insertCell(1);
            var element_M52 = document.createElement("input");
			element_M52.type = "text";
            element_M52.name = "item_text_M5"+line_no;
			element_M52.id = "item_text_M5"+line_no;
			element_M52.className = "text300";
			element_M52.value = "";
			element_M52.onchange = function(){document.getElementById("line_checkbox_M5"+line_no).checked = "checked";}
			element_M52.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			cell_M52.style.verticalAlign="top";
			
			cell_M52.appendChild(element_M52);
							
			var cell_M54 = row.insertCell(2);
			cell_M54.align="right";
			
			var element_M56 = document.createElement("input");
            element_M56.type = "text";
            element_M56.name = "amount_text_M5"+line_no;
			element_M56.id = "amount_text_M5"+line_no;
			element_M56.className = "text100";
			element_M56.onkeypress = function isNumberKey(evt)
       								{
          							var charCode = (evt.which) ? evt.which : event.keyCode
          							if (charCode != 46 && charCode > 31 
            						&& (charCode < 48 || charCode > 57))
             						return false;
 
          							return true;
       								}
									;
			element_M56.onkeyup = function() {this.value = this.value.replace (/(\...).*/, '$1');}
			element_M56.onchange = function(){document.getElementById("line_checkbox_M5"+line_no).checked = "checked";}
			element_M56.style = "text-align:right";		

            var element_M54 = document.createElement("input");
            element_M54.type = "hidden";
            element_M54.name = "line_num_M5";
			element_M54.value = rowCount;
            cell_M54.style.verticalAlign="top";
			
			cell_M54.appendChild(element_M56);
            cell_M54.appendChild(element_M54);
			
			var element_M58 = document.createElement("script");
			element_M58.setAttribute('type', 'text/javascript');
			element_M58.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text_M5'+i,'req','- price details '+(i+1)+' in option 2.');frmvalidator.addValidation('amount_text_M5'+i,'req','- price '+(i+1)+' in option 2.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element_M58);
		
			element_M51.onmouseup = function() {
				 if (document.getElementById('line_checkbox_M5'+line_no).checked) {
                         element_M52.style.background = '#F0F0F0';
						 element_M56.style.background = '#F0F0F0';
						 element_M52.selectedIndex=0;
						 element_M56.value = '.';
						 element_M52.disabled = true;
						 element_M56.disabled = true;
						 
                } else {
                        element_M52.style.background = '#FFF';
						element_M56.style.background = '#FFF';
						element_M52.selected_index=0;
						element_M56.value = '';
						element_M52.disabled = false;
						element_M56.disabled = false;
						 
                }
				};
			
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
</script>

<script language="javascript">
function addRow_K4(dataTable_K4) {
 
            var table = document.getElementById(dataTable_K4);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell_K41 = row.insertCell(0);
            var element_K41 = document.createElement("input");
            element_K41.type = "checkbox";
            element_K41.name="line_checkbox_K4"+line_no;
			element_K41.id="line_checkbox_K4"+line_no;
			/*element1.checked="checked";*/
			cell_K41.style.verticalAlign="top";
            cell_K41.appendChild(element_K41);
			 
            var cell_K42 = row.insertCell(1);
            var element_K42 = document.createElement("textarea");
            element_K42.cols=85;
			element_K42.rows=1;
            element_K42.name = "item_text_K4"+line_no;
			element_K42.id = "item_text_K4"+line_no;
			element_K42.className = "text_box";
			element_K42.value = "";
			element_K42.onchange = function(){document.getElementById("line_checkbox_K4"+line_no).checked = "checked";}
			element_K42.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			
			var element_K44 = document.createElement("input");
            element_K44.type = "hidden";
            element_K44.name = "line_num_K4";
			element_K44.value = rowCount;
           
					
			cell_K42.style.verticalAlign="top";
			cell_K42.appendChild(element_K42);
			cell_K42.appendChild(element_K44);				
	
			var element_K48 = document.createElement("script");
			element_K48.setAttribute('type', 'text/javascript');
			element_K48.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text_K4'+i,'req','- item '+(i+i)+' in option 2.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element_K48);
		
			element_K41.onmouseup = function() { 
				 if (document.getElementById('line_checkbox_K4'+line_no).checked) {
                         element_K42.style.background = '#F0F0F0';
						 element_K42.value = '.';
						 element_K42.disabled = true;				 
                } else {
                        element_K42.style.background = '#FFF';
						element_K42.value = '';
						element_K42.disabled = false;						 
                }
				}
			
}
</script>

<script language="javascript">
function addRow_K5(dataTable_K5) {
 
            var table = document.getElementById(dataTable_K5);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell_K51 = row.insertCell(0);
            var element_K51 = document.createElement("input");
            element_K51.type = "checkbox";
            element_K51.name="line_checkbox_K5"+line_no;
			element_K51.id="line_checkbox_K5"+line_no;
			/*element1.checked="checked";*/
			cell_K51.style.verticalAlign="top";
            cell_K51.appendChild(element_K51);
			 
            var cell_K52 = row.insertCell(1);
            var element_K52 = document.createElement("input");
			element_K52.type = "text";
            element_K52.name = "item_text_K5"+line_no;
			element_K52.id = "item_text_K5"+line_no;
			element_K52.className = "text300";
			element_K52.value = "";
			element_K52.onchange = function(){document.getElementById("line_checkbox_K5"+line_no).checked = "checked";}
			element_K52.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			cell_K52.style.verticalAlign="top";
			cell_K52.appendChild(element_K52);
							
			var cell_K54 = row.insertCell(2);
			cell_K54.align="right";
			
			var element_K56 = document.createElement("input");
            element_K56.type = "text";
            element_K56.name = "amount_text_K5"+line_no;
			element_K56.id = "amount_text_K5"+line_no;
			element_K56.className = "text100";
			element_K56.onkeypress = function isNumberKey(evt)
       								{
          							var charCode = (evt.which) ? evt.which : event.keyCode
          							if (charCode != 46 && charCode > 31 
            						&& (charCode < 48 || charCode > 57))
             						return false;
 
          							return true;
       								}
									;
			element_K56.onkeyup = function() {this.value = this.value.replace (/(\...).*/, '$1');}
			element_K56.onchange = function(){document.getElementById("line_checkbox_K5"+line_no).checked = "checked";}
			element_K56.style = "text-align:right";		

            var element_K54 = document.createElement("input");
            element_K54.type = "hidden";
            element_K54.name = "line_num_K5";
			element_K54.value = rowCount;
            cell_K54.style.verticalAlign="top";
			
			cell_K54.appendChild(element_K56);
            cell_K54.appendChild(element_K54);
			
			var element_K58 = document.createElement("script");
			element_K58.setAttribute('type', 'text/javascript');
			element_K58.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text_K5'+i,'req','- price details '+(i+1)+' in option 2.');frmvalidator.addValidation('amount_text_K5'+i,'req','- price '+(i+1)+' in option 2.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element_K58);
		
			element_K51.onmouseup = function() {
				 if (document.getElementById('line_checkbox_K5'+line_no).checked) {
                         element_K52.style.background = '#F0F0F0';
						 element_K56.style.background = '#F0F0F0';
						 element_K52.selectedIndex=0;
						 element_K56.value = '.';
						 element_K52.disabled = true;
						 element_K56.disabled = true;
						 
                } else {
                        element_K52.style.background = '#FFF';
						element_K56.style.background = '#FFF';
						element_K52.selected_index=0;
						element_K56.value = '';
						element_K52.disabled = false;
						element_K56.disabled = false;
						 
                }
				};
			
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
</script>

<script language="javascript">
function addRow_L4(dataTable_L4) {
 
            var table = document.getElementById(dataTable_L4);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell_L41 = row.insertCell(0);
            var element_L41 = document.createElement("input");
            element_L41.type = "checkbox";
            element_L41.name="line_checkbox_L4"+line_no;
			element_L41.id="line_checkbox_L4"+line_no;
			/*element1.checked="checked";*/
			cell_L41.style.verticalAlign="top";
            cell_L41.appendChild(element_L41);
			 
            var cell_L42 = row.insertCell(1);
            var element_L42 = document.createElement("textarea");
            element_L42.cols=85;
			element_L42.rows=1;
            element_L42.name = "item_text_L4"+line_no;
			element_L42.id = "item_text_L4"+line_no;
			element_L42.className = "text_box";
			element_L42.value = "";
			element_L42.onchange = function(){document.getElementById("line_checkbox_L4"+line_no).checked = "checked";}
			element_L42.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			
			var element_L44 = document.createElement("input");
            element_L44.type = "hidden";
            element_L44.name = "line_num_L4";
			element_L44.value = rowCount;
           
					
			cell_L42.style.verticalAlign="top";
			cell_L42.appendChild(element_L42);
			cell_L42.appendChild(element_L44);				
	
			var element_L48 = document.createElement("script");
			element_L48.setAttribute('type', 'text/javascript');
			element_L48.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text_L4'+i,'req','- item '+(i+i)+' in option 2.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element_L48);
		
			element_L41.onmouseup = function() { 
				 if (document.getElementById('line_checkbox_L4'+line_no).checked) {
                         element_L42.style.background = '#F0F0F0';
						 element_L42.value = '.';
						 element_L42.disabled = true;				 
                } else {
                        element_L42.style.background = '#FFF';
						element_L42.value = '';
						element_L42.disabled = false;						 
                }
				}
			
}
</script>

<script language="javascript">
function addRow_L5(dataTable_L5) {
 
            var table = document.getElementById(dataTable_L5);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell_L51 = row.insertCell(0);
            var element_L51 = document.createElement("input");
            element_L51.type = "checkbox";
            element_L51.name="line_checkbox_L5"+line_no;
			element_L51.id="line_checkbox_L5"+line_no;
			/*element1.checked="checked";*/
			cell_L51.style.verticalAlign="top";
            cell_L51.appendChild(element_L51);
			 
            var cell_L52 = row.insertCell(1);
            var element_L52 = document.createElement("input");
			element_L52.type = "text";
            element_L52.name = "item_text_L5"+line_no;
			element_L52.id = "item_text_L5"+line_no;
			element_L52.className = "text300";
			element_L52.value = "";
			element_L52.onchange = function(){document.getElementById("line_checkbox_L5"+line_no).checked = "checked";}
			element_L52.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			cell_L52.style.verticalAlign="top";
			cell_L52.appendChild(element_L52);
							
			var cell_L54 = row.insertCell(2);
			cell_L54.align="right";
			
			var element_L56 = document.createElement("input");
            element_L56.type = "text";
            element_L56.name = "amount_text_L5"+line_no;
			element_L56.id = "amount_text_L5"+line_no;
			element_L56.className = "text100";
			element_L56.onkeypress = function isNumberKey(evt)
       								{
          							var charCode = (evt.which) ? evt.which : event.keyCode
          							if (charCode != 46 && charCode > 31 
            						&& (charCode < 48 || charCode > 57))
             						return false;
 
          							return true;
       								}
									;
			element_L56.onkeyup = function() {this.value = this.value.replace (/(\...).*/, '$1'); }
			element_L56.onchange = function(){document.getElementById("line_checkbox_L5"+line_no).checked = "checked";}
			element_L56.style = "text-align:right";		

            var element_L54 = document.createElement("input");
            element_L54.type = "hidden";
            element_L54.name = "line_num_L5";
			element_L54.value = rowCount;
            cell_L54.style.verticalAlign="top";
			
			cell_L54.appendChild(element_L56);
            cell_L54.appendChild(element_L54);
			
			var element_L58 = document.createElement("script");
			element_L58.setAttribute('type', 'text/javascript');
			element_L58.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text_L5'+i,'req','- price details '+(i+1)+' in option 2.');frmvalidator.addValidation('amount_text_L5'+i,'req','- price '+(i+1)+' in option 2.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element_L58);
		
			element_L51.onmouseup = function() {
				 if (document.getElementById('line_checkbox_L5'+line_no).checked) {
                         element_L52.style.background = '#F0F0F0';
						 element_L56.style.background = '#F0F0F0';
						 element_L52.selectedIndex=0;
						 element_L56.value = '.';
						 element_L52.disabled = true;
						 element_L56.disabled = true;
						 
                } else {
                        element_L52.style.background = '#FFF';
						element_L56.style.background = '#FFF';
						element_L52.selected_index=0;
						element_L56.value = '';
						element_L52.disabled = false;
						element_L56.disabled = false;
						 
                }
				};
			
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
</script>

<?php } ?>

<?php } ?>

<?php
if ($_SESSION['project']=='Diamond mesh') { ?>
<script language="javascript">
function addRow9(dataTable9) {
 
            var table = document.getElementById(dataTable9);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell91 = row.insertCell(0);
            var element91 = document.createElement("input");
            element91.type = "checkbox";
            element91.name="line_checkbox9"+line_no;
			element91.id="line_checkbox9"+line_no;
			/*element91.checked="checked";*/
			cell91.style.verticalAlign="top";
            cell91.appendChild(element91);
			 
            var cell92 = row.insertCell(1);
            var element92 = document.createElement("input");
			element92.type = "text";
            element92.name = "item_text9"+line_no;
			element92.id = "item_text9"+line_no;
			element92.className = "text300";
			element92.value = "";
			element92.onchange = function(){document.getElementById("line_checkbox9"+line_no).checked = "checked";}
			element92.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			cell92.style.verticalAlign="top"; 
			cell92.appendChild(element92);
							
			var cell94 = row.insertCell(2);
			cell94.align="right";
			
			var element96 = document.createElement("input");
            element96.type = "text";
            element96.name = "amount_text9"+line_no;
			element96.id = "amount_text9"+line_no;
			element96.className = "text100";
			element96.onkeypress = function isNumberKey(evt)
       								{
          							var charCode = (evt.which) ? evt.which : event.keyCode
          							if (charCode != 46 && charCode > 31 
            						&& (charCode < 48 || charCode > 57))
             						return false;
 
          							return true;
       								}
									;
			element96.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			element96.onchange = function(){document.getElementById("line_checkbox9"+line_no).checked = "checked";}
			element96.style = "text-align:right";		

            var element94 = document.createElement("input");
            element94.type = "hidden";
            element94.name = "line_num9";
			element94.value = rowCount;
            cell94.style.verticalAlign="top";
			
			cell94.appendChild(element96);
            cell94.appendChild(element94);
			
			var element98 = document.createElement("script");
			element98.setAttribute('type', 'text/javascript');
			element98.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text9'+i,'req','- pricing text '+(i+1)+'.');frmvalidator.addValidation('amount_text9'+i,'req','- price '+(i+1)+'.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element98);
		
			element91.onmouseup = function() {
				 if (document.getElementById('line_checkbox9'+line_no).checked) {
                         element92.style.background = '#F0F0F0';
						 element96.style.background = '#F0F0F0';
						 element92.value = '.';
						 element96.value = '.';
						 element92.disabled = true;
						 element96.disabled = true;
						 
                } else {
                        element92.style.background = '#FFF';
						element96.style.background = '#FFF';
						element92.value = '';
						element96.value = '';
						element92.disabled = false;
						element96.disabled = false;
						 
                }
				};
			
}
</script>
<?php } ?>


<?php
if ($_SESSION['project']=='Palisade standard') { ?>
<script language="javascript">
function addRow9(dataTable9) {
 
            var table = document.getElementById(dataTable9);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
			var line_no = rowCount-1;
 
            var cell91 = row.insertCell(0);
            var element91 = document.createElement("input");
            element91.type = "checkbox";
            element91.name="line_checkbox9"+line_no;
			element91.id="line_checkbox9"+line_no;
			/*element1.checked="checked";*/
			cell91.style.verticalAlign="top";
            cell91.appendChild(element91);
			 
            var cell92 = row.insertCell(1);
            var element92 = document.createElement("input");
			element92.type = "text";
            element92.name = "item_text9"+line_no;
			element92.id = "item_text9"+line_no;
			element92.className = "text300";
			element92.value = "";
			element92.onchange = function(){document.getElementById("line_checkbox9"+line_no).checked = "checked";}
			element92.onkeyup = function(){this.value=this.value.replace(/[',"]/g,'`');}
			cell92.style.verticalAlign="top";
			cell92.appendChild(element92);
							
			var cell94 = row.insertCell(2);
			cell94.align="right";
			
			var element96 = document.createElement("input");
            element96.type = "text";
            element96.name = "amount_text9"+line_no;
			element96.id = "amount_text9"+line_no;
			element96.className = "text100";
			element96.onkeypress = function isNumberKey(evt)
       								{
          							var charCode = (evt.which) ? evt.which : event.keyCode
          							if (charCode != 46 && charCode > 31 
            						&& (charCode < 48 || charCode > 57))
             						return false;
 
          							return true;
       								}
									;
			element96.onkeyup = function() {this.value = this.value.replace (/(\...).*/, '$1');}
			element96.onchange = function(){document.getElementById("line_checkbox9"+line_no).checked = "checked";}
			element96.style = "text-align:right";		

            var element94 = document.createElement("input");
            element94.type = "hidden";
            element94.name = "line_num9";
			element94.value = rowCount;
            cell94.style.verticalAlign="top";
			
			cell94.appendChild(element96);
            cell94.appendChild(element94);
			
			var element98 = document.createElement("script");
			element98.setAttribute('type', 'text/javascript');
			element98.innerHTML="var frmvalidator  = new Validator('form1');frmvalidator.EnableMsgsTogether();for (i = 0; i < 10; i++) {frmvalidator.addValidation('item_text9'+i,'req','- pricing text '+(i+1)+'.');frmvalidator.addValidation('amount_text9'+i,'req','- price '+(i+1)+'.');}"; 
			document.getElementsByTagName('head').item(0).appendChild(element98);
		
			element91.onmouseup = function() {
				 if (document.getElementById('line_checkbox9'+line_no).checked) {
                         element92.style.background = '#F0F0F0';
						 element96.style.background = '#F0F0F0';
						 element92.value = '.';
						 element96.value = '.';
						 element92.disabled = true;
						 element96.disabled = true;
						 
                } else {
                        element92.style.background = '#FFF';
						element96.style.background = '#FFF';
						element92.value = '';
						element96.value = '';
						element92.disabled = false;
						element96.disabled = false;
						 
                }
				};
			
}
</script>
<?php } ?>




</head>
<?php include('../include/wait.php') ?>
<body onLoad="MM_showHideLayers('wait','','hide');<?php if ($_SESSION['option2_text']=='.') {?> document.getElementById('option2_div').hidden=true; document.getElementById('plus_div').hidden=false; document.getElementById('minus_div').hidden=true;<?php } else { ?> document.getElementById('option2_div').hidden=false; document.getElementById('plus_div').hidden=true; document.getElementById('minus_div').hidden=false; <?php } ?>
<?php if ($_SESSION['option3_text']=='.') {?> document.getElementById('option3_div').hidden=true; document.getElementById('plus_div3').hidden=false; document.getElementById('minus_div3').hidden=true;<?php } else { ?> document.getElementById('option3_div').hidden=false; document.getElementById('plus_div3').hidden=true; document.getElementById('minus_div3').hidden=false; <?php } ?>
<?php if ($_SESSION['option4_text']=='.') {?> document.getElementById('option4_div').hidden=true; document.getElementById('plus_div4').hidden=false; document.getElementById('minus_div4').hidden=true;<?php } else { ?> document.getElementById('option4_div').hidden=false; document.getElementById('plus_div4').hidden=true; document.getElementById('minus_div4').hidden=false; <?php } ?>
<?php if ($_SESSION['option5_text']=='.') {?> document.getElementById('option5_div').hidden=true; document.getElementById('plus_div5').hidden=false; document.getElementById('minus_div5').hidden=true;<?php } else { ?> document.getElementById('option5_div').hidden=false; document.getElementById('plus_div5').hidden=true; document.getElementById('minus_div5').hidden=false; <?php } ?>" 
onFocus="MM_showHideLayers('wait','','hide');" onBlur="MM_showHideLayers('wait','','hide');">
<div class="wizard_page_middle_frame">
<form id="form1" method="get" action="quoteWizbase.php">
      <div class="wizard_frame">
              <?php 
		include ('../include/customer_block.php');
		echo '<br>';
		include ('../include/job_block.php')
		?>
    </div>
            <br>

<div class="wizard_frame">
Re:&nbsp;&nbsp;
<input type="text" name="re_text" id="re_text" class="text300" value="<?php echo $_SESSION['re_text'] ?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" > 

</div>
<br>

<?php
if ($_SESSION['project']=='Electric fencing') { ?>
      <br>
      <br>
<div class="wizard_frame">
<table width="590" id="table_details_display">
  <tr>
    <td colspan="3">Options:</td>
    </tr>
  <tr>
    <td width="46"><input type="checkbox" name="option_checkbox1" id="option_checkbox1" onClick="if (document.getElementById('option_checkbox1').checked) {document.getElementById('option_text1').disabled=false; document.getElementById('option_text1').focus();} else {document.getElementById('option_text1').value=''; document.getElementById('option_text1').disabled='disabled';}" <?php if ($_SESSION['option_checkbox1']==1){?> checked="checked" <?php } ?> ;></td>
    <td width="384">Round bar, 8 line</td>
    <td width="144" align="right"><input name="option_text1" id="option_text1" type="text" <?php if ($_SESSION['option_checkbox1']!=1){?> disabled="disabled" <?php } ?> class="text60" style="text-align:right"  onKeyPress="return isNumberKey(event)"; onKeyup=" this.value = this.value.replace (/(\...).*/, '$1')" value="<?php echo $_SESSION['round_bar']?>"></td>
  </tr>
  <tr>
    <td width="46"><input type="checkbox" name="option_checkbox2" id="option_checkbox2" onClick="if (document.getElementById('option_checkbox2').checked) {document.getElementById('option_text2').disabled=false; document.getElementById('option_text2').focus();} else {document.getElementById('option_text2').value=''; document.getElementById('option_text2').disabled='disabled';}" <?php if ($_SESSION['option_checkbox2']==1){?> checked="checked" <?php } ?>></td>
    <td width="384">Flat bar, 8 line</td>
    <td width="144" align="right"><input name="option_text2" id="option_text2" type="text" <?php if ($_SESSION['option_checkbox2']!=1){?> disabled="disabled" <?php } ?> class="text60" style="text-align:right"  onKeyPress="return isNumberKey(event)"; onKeyup=" this.value = this.value.replace (/(\...).*/, '$1')" value="<?php echo $_SESSION['flat_bar']?>"></td>
  </tr>
  <tr>
    <td width="46"><input type="checkbox" name="option_checkbox3" id="option_checkbox3" onClick="if (document.getElementById('option_checkbox3').checked) {document.getElementById('option_text3').disabled=false; document.getElementById('option_text3').focus();} else {document.getElementById('option_text3').value=''; document.getElementById('option_text3').disabled='disabled';}" <?php if ($_SESSION['option_checkbox3']==1){?> checked="checked" <?php } ?>></td>
    <td width="384">Square tube, 8 line</td>
    <td width="144" align="right"><input name="option_text3" id="option_text3" type="text" <?php if ($_SESSION['option_checkbox3']!=1){?> disabled="disabled" <?php } ?> class="text60" style="text-align:right"  onKeyPress="return isNumberKey(event)"; onKeyup=" this.value = this.value.replace (/(\...).*/, '$1')" value="<?php echo $_SESSION['square_tube']?>"></td>
  </tr>
  <tr>
    <td width="46"><input type="checkbox" name="option_checkbox4" id="option_checkbox4" onClick="if (document.getElementById('option_checkbox4').checked) {document.getElementById('option_text4').disabled=false; document.getElementById('option_text4').focus();} else {document.getElementById('option_text4').value=''; document.getElementById('option_text4').disabled='disabled';}" <?php if ($_SESSION['option_checkbox4']==1){?> checked="checked" <?php } ?>></td>
    <td width="384">Heavy duty square tube brackets, 12 line</td>
    <td width="144" align="right"><input name="option_text4" id="option_text4" type="text" <?php if ($_SESSION['option_checkbox4']!=1){?> disabled="disabled" <?php } ?> class="text60" style="text-align:right"  onKeyPress="return isNumberKey(event)"; onKeyup=" this.value = this.value.replace (/(\...).*/, '$1')" value="<?php echo $_SESSION['heavy_duty']?>"></td>
  </tr>
  <tr>
    <td colspan="3">Extra options:</td>
    </tr>
  <tr>
    <td><input type="checkbox" name="option_checkbox5" id="option_checkbox5" <?php if ($_SESSION['option_checkbox5']==1){?> checked="checked" <?php } ?>></td>
    <td>Earth loops</td>
    <td align="right"><input type="hidden" name="option_text5" id="option_text5" value="<?php echo $earth_loops_price ?>"> <?php echo number_format($earth_loops_price, 2, '.', ',') ?></td>
  </tr>
  <tr>
    <td><input type="checkbox" name="option_checkbox6" id="option_checkbox6" <?php if ($_SESSION['option_checkbox6']==1){?> checked="checked" <?php } ?>></td>
    <td>Outrigger</td>
    <td align="right"><input type="hidden" name="option_text6" id="option_text6" value="<?php echo $outrigger_price ?>">      <?php echo number_format($outrigger_price, 2, '.', ',') ?></td>
  </tr>
  <tr>
    <td><input type="checkbox" name="option_checkbox7" id="option_checkbox7" <?php if ($_SESSION['option_checkbox7']==1){?> checked="checked" <?php } ?>></td>
    <td>Wash line</td>
    <td align="right"><input type="hidden" name="option_text7" id="option_text7" value="<?php echo $wash_line_price ?>">      <?php echo number_format($wash_line_price, 2, '.', ',') ?></td>
  </tr>
  <tr>
    <td><input type="checkbox" name="option_checkbox8" id="option_checkbox8" <?php if ($_SESSION['option_checkbox8']==1){?> checked="checked" <?php } ?>></td>
    <td>Strobe</td>
    <td align="right"><input type="hidden" name="option_text8" id="option_text8" value="<?php echo $strobe_price ?>">      <?php echo number_format($strobe_price, 2, '.', ',') ?></td>
  </tr>
  <tr>
    <td><input type="checkbox" name="option_checkbox9" id="option_checkbox9" <?php if ($_SESSION['option_checkbox9']==1){?> checked="checked" <?php } ?>></td>
    <td>Anti lift bar</td>
    <td align="right"><input type="hidden" name="option_text9" id="option_text9" value="<?php echo $anti_lift_bar_price ?>">      <?php echo number_format($anti_lift_bar_price, 2, '.', ',') ?></td>
  </tr>
  <tr>
    <td><input type="checkbox" name="option_checkbox10" id="option_checkbox10" <?php if ($_SESSION['option_checkbox10']==1){?> checked="checked" <?php } ?>></td>
    <td>Ace 100 energizer</td>
    <td align="right"><input type="hidden" name="option_text10" id="option_text10" value="<?php echo $ace_100_price ?>">      <?php echo number_format($ace_100_price, 2, '.', ',') ?></td>
  </tr>
</table>

</div>
<?php
}


if ( ($_SESSION['project']=='Gate motor')  OR ($_SESSION['project']=='Pool fence') ) { ?>
	<div class="wizard_frame">
    <table id="dataTable6" width="590" border="1" style="border-collapse:collapse;">
    
    <thead> 
        <tr>
          <td colspan="2"><?php if ($_SESSION['project']=='Gate motor') { echo 'Gate Automation:';} else { echo 'Quote options:';} ?></td>
          <td>Unit price</td>
        </tr>
      </thead>
        <script>
			 function check_it6() {
				 if (document.getElementById('line_checkbox60').checked) {
                         document.getElementById('item_text60').style.background = '#F0F0F0';
						 document.getElementById('amount_text60').style.background = '#F0F0F0';
						 document.getElementById('item_text60').value = '.';
						 document.getElementById('amount_text60').value = '.';
						 document.getElementById('amount_text60').disabled = true;
						 
                } else {
                        document.getElementById('item_text60').style.background = '#FFF';
						 document.getElementById('amount_text60').style.background = '#FFF';
						 document.getElementById('item_text60').value = '';
						 document.getElementById('amount_text60').value = '';
						 document.getElementById('item_text60').disabled = false;
						 document.getElementById('amount_text60').disabled = false;
                }
				}
		     </script>
        <tr>
            <td width="20" valign="top"><input type="checkbox" name="line_checkbox60" id="line_checkbox60" onMouseUp="check_it6()" <?php if ($_SESSION['line_checkbox60']==1) { ?> checked="checked" <?php } ?> /></td>
          <td width="408" valign="top"><input name="item_text60" type="text" class="text500" id="item_text60" onChange="document.getElementById('line_checkbox60').checked='checked';" value="<?php echo $_SESSION['item_text60'] ?>"  size="65" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
          <td width="140" align="right" valign="top"><input  name="amount_text60" type="text" class="text100" id="amount_text60" value="<?php if ($_SESSION['amount_text60']!='') { echo $_SESSION['amount_text60']; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" style="text-align:right"/><input type="hidden" name="line_num6" id="line_num6" value="1" >
            
            
            
          </td>    
           
        </tr>
        <?php 
		$i=1;
		while ($i<$_SESSION['line_num6']) { ?>
        <tr>
            <td width="20" valign="top"><input type="checkbox" name="line_checkbox6<?php echo $i ?>" id="line_checkbox6<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox6'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox6<?php echo $i ?>').checked) {
                         document.getElementById('item_text6<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('quantity_text6<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text6<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text6<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text6<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text6<?php echo $i ?>').value = '.';
						 document.getElementById('item_text6<?php echo $i ?>').disabled = true;
						 document.getElementById('quantity_text6<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text6<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text6<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('quantity_text6<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text6<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text6<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text6<?php echo $i ?>').value = '';
						 document.getElementById('amount_text6<?php echo $i ?>').value = '';
						 document.getElementById('item_text6<?php echo $i ?>').disabled = false;
						 document.getElementById('quantity_text6<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text6<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
          <td width="408" valign="top"><input name="item_text6<?php echo $i ?>" type="text" class="text500" id="item_text6<?php echo $i ?>" onChange="document.getElementById('line_checkbox6<?php echo $i ?>').checked='checked';" value="<?php echo $_SESSION['item_text6'.$i] ?>" size="65" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
            <td width="140" align="right" valign="top"><input  name="amount_text6<?php echo $i ?>" type="text" class="text100" id="amount_text6<?php echo $i ?>" value="<?php if ($_SESSION['amount_text6'.$i]!='') { echo $_SESSION['amount_text6'.$i]; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" style="text-align:right"/>              <input type="hidden" name="line_num6" id="line_num6" value="<?php echo $_SESSION['line_num6']?>"></td>
        </tr>
        <?php
		$i++;
		}
		?>
                
  </table>
  
    <input type="button" class="imagebutton" onClick="addRow6('dataTable6')" value="Add line" />
    <div align="right"><label class="label_small">To delete a line: uncheck line box.</label></div>
<br>
<br>
   
<table id="dataTable7" width="590" border="1" style="border-collapse:collapse;">
    
    <thead> 
        <tr>
          <td colspan="2"><?php if ($_SESSION['project']=='Gate motor') { echo 'Optional extras:';} else { echo 'Extra options:';} ?></td>
          <td>Unit price</td>
        </tr>
      </thead>
        <script>
			 function check_it7() {
				 if (document.getElementById('line_checkbox70').checked) {
                         document.getElementById('item_text70').style.background = '#F0F0F0';
						 document.getElementById('amount_text70').style.background = '#F0F0F0';
						 document.getElementById('item_text70').value = '.';
						 document.getElementById('amount_text70').value = '.';
						 document.getElementById('amount_text70').disabled = true;
						 
                } else {
                        document.getElementById('item_text70').style.background = '#FFF';
						 document.getElementById('amount_text70').style.background = '#FFF';
						 document.getElementById('item_text70').value = '';
						 document.getElementById('amount_text70').value = '';
						 document.getElementById('item_text70').disabled = false;
						 document.getElementById('amount_text70').disabled = false;
                }
				}
		     </script>
        <tr>
            <td width="20" valign="top"><input type="checkbox" name="line_checkbox70" id="line_checkbox70" onMouseUp="check_it7()" <?php if ($_SESSION['line_checkbox70']==1) { ?> checked="checked" <?php } ?> /></td>
          <td width="408" valign="top"><input name="item_text70" type="text" class="text500" id="item_text70" onChange="document.getElementById('line_checkbox70').checked='checked';" value="<?php echo $_SESSION['item_text70'] ?>" size="65" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
          <td width="140" align="right" valign="top"><input  name="amount_text70" type="text" class="text100" id="amount_text70" value="<?php if ($_SESSION['amount_text70']!='') { echo $_SESSION['amount_text70']; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" style="text-align:right"/><input type="hidden" name="line_num7" id="line_num7" value="1" >
            
            
            
          </td>    
            
        </tr>
        <?php 
		$i=1;
		while ($i<$_SESSION['line_num7']) { ?>
        <tr>
            <td width="20" valign="top"><input type="checkbox" name="line_checkbox7<?php echo $i ?>" id="line_checkbox7<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox7'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox7<?php echo $i ?>').checked) {
                         document.getElementById('item_text7<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('quantity_text7<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text7<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text7<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text7<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text7<?php echo $i ?>').value = '.';
						 document.getElementById('item_text7<?php echo $i ?>').disabled = true;
						 document.getElementById('quantity_text7<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text7<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text7<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('quantity_text7<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text7<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text7<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text7<?php echo $i ?>').value = '';
						 document.getElementById('amount_text7<?php echo $i ?>').value = '';
						 document.getElementById('item_text7<?php echo $i ?>').disabled = false;
						 document.getElementById('quantity_text7<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text7<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
          <td width="408" valign="top"><input name="item_text7<?php echo $i ?>" type="text" class="text500" id="item_text7<?php echo $i ?>" onChange="document.getElementById('line_checkbox7<?php echo $i ?>').checked='checked';" value="<?php echo $_SESSION['item_text7'.$i] ?>" size="65" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
            <td width="140" align="right" valign="top"><input  name="amount_text7<?php echo $i ?>" type="text" class="text100" id="amount_text7<?php echo $i ?>" value="<?php if ($_SESSION['amount_text7'.$i]!='') { echo $_SESSION['amount_text7'.$i]; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" style="text-align:right"/>              <input type="hidden" name="line_num7" id="line_num7" value="<?php echo $_SESSION['line_num7']?>"></td>
        </tr>
        <?php
		$i++;
		}
		?>
</table>         
      <input type="button" class="imagebutton" onClick="addRow7('dataTable7')" value="Add line" />
    <div align="right"><label class="label_small">To delete a line: uncheck line box.</label></div>     
 
  </div>
<?php
}
?>




















<?php
if ( ($_SESSION['project']=='Manase 358') OR ($_SESSION['project']=='Gate') OR ($_SESSION['project']=='Razor wire') OR ($_SESSION['project']=='Wall spikes') OR ($_SESSION['project']=='Farm fence') OR ($_SESSION['project']=='Free standing electric fence') OR ($_SESSION['project']=='Miscelaneous') ) { ?>

<!--Start option 1 ------------------------------------------------------------------------------------------------------------------------------------>
<div class="wizard_frame" id="option1_div">

      Option 1:&nbsp;&nbsp;
      <input name="option1_text" type="text" class="text300" id="option1_text" value="<?php echo $_SESSION['option1_text'] ?>" size="60" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" >
      <br>
      <br>


    <table id="dataTable2" width="590" border="1" style="border-collapse:collapse;">
    <thead> 
        <tr>
          <td colspan="2">Items</td>
        </tr>
      </thead>
        <script>
			 function check_it2() {
				 if (document.getElementById('line_checkbox20').checked) {
                         document.getElementById('item_text20').style.background = '#F0F0F0';
						 document.getElementById('item_text20').value = '.';
						 document.getElementById('item_text20').disabled = true;
						 document.getElementById('quantity_text20').disabled = true;
						 
                } else {
                        document.getElementById('item_text20').style.background = '#FFF';
						 document.getElementById('item_text20').value = '';
						 document.getElementById('item_text20').disabled = false;
                }
				}
		     </script>
        <tr>
            <td width="20" valign="top"><input type="checkbox" name="line_checkbox20" id="line_checkbox20" onMouseUp="check_it2()" <?php if ($_SESSION['line_checkbox20']==1) { ?> checked="checked" <?php } ?> /></td>
          <td width="554" valign="top"><textarea name="item_text20" id="item_text20" class="text_box" cols="85" rows="1" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox20').checked='checked';" ><?php echo $_SESSION['item_text20'] ?></textarea>
          <input type="hidden" name="line_num2" id="line_num2" value="1" ></td>
          
        </tr>
        <?php 
		$i=1;
		
		while ($i<$_SESSION['line_num2']) { ?>
        <tr>
            <td width="20" valign="top"><input type="checkbox" name="line_checkbox2<?php echo $i ?>" id="line_checkbox2<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox2'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox2<?php echo $i ?>').checked) {
                         document.getElementById('item_text2<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('quantity_text2<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text2<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text2<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text2<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text2<?php echo $i ?>').value = '.';
						 document.getElementById('item_text2<?php echo $i ?>').disabled = true;
						 document.getElementById('quantity_text2<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text2<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text2<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('quantity_text2<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text2<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text2<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text2<?php echo $i ?>').value = '';
						 document.getElementById('amount_text2<?php echo $i ?>').value = '';
						 document.getElementById('item_text2<?php echo $i ?>').disabled = false;
						 document.getElementById('quantity_text2<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text2<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
          <td width="554" valign="top"><textarea name="item_text2<?php echo $i ?>" id="item_text2<?php echo $i ?>" class="text_box" cols="85" rows="1" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox2<?php echo $i ?>').checked='checked';"><?php echo $_SESSION['item_text2'.$i] ?></textarea>
          <input type="hidden" name="line_num2" id="line_num2" value="<?php echo $_SESSION['line_num2']?>"></td>
        </tr>
        <?php
		$i++;
		}
		?>
                
  </table>
  <input type="button" class="imagebutton" onClick="addRow2('dataTable2')" value="Add line" />
  <br>
  <br>

    <table id="dataTable3" width="590" border="1" style="border-collapse:collapse;">
      <thead>
        <tr>
          <td colspan="2">Pricing</td>
          <td>Price</td>
        </tr>
      </thead>
      <script>
			 function check_it3() {
				 if (document.getElementById('line_checkbox30').checked) {
                         document.getElementById('item_text30').style.background = '#F0F0F0';
						 document.getElementById('amount_text30').style.background = '#F0F0F0';
						 document.getElementById('item_text30').value = '.';
						 document.getElementById('amount_text30').value = '.';
						 document.getElementById('item_text30').disabled = true;
						 document.getElementById('amount_text30').disabled = true;
						 
                } else {
                        document.getElementById('item_text30').style.background = '#FFF';
						 document.getElementById('amount_text30').style.background = '#FFF';
						 document.getElementById('item_text30').value = 'Total Price Supply & Install';
						 document.getElementById('amount_text30').value = '';
						 document.getElementById('item_text30').disabled = false;
						 document.getElementById('amount_text30').disabled = false;
                }
				}
		     </script>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox30" id="line_checkbox30" onMouseUp="check_it3()" <?php if ($_SESSION['line_checkbox30']==1) { ?> checked="checked" <?php } ?> /></td>
        <td width="408" valign="top"></textarea><input name="item_text30" type="text" class="text300" id="item_text30" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox30').checked='checked';" value="<?php echo $_SESSION['item_text30']?>" maxlength="100"></td>
        <td width="140" align="right" valign="top"><input  name="amount_text30" id="amount_text30" type="text" class="text100" value="<?php if ($_SESSION['amount_text30']!='') { echo $_SESSION['amount_text30']; } ?>" onKeyPress="return isNumberKey(event);" onKeyUp="this.value = this.value.replace (/(\...).*/, '$1');" onChange="document.getElementById('line_checkbox30').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num3" id="line_num3" value="1" ></td>
        
      </tr>
      <?php 
		$i=1;
		while ($i<$_SESSION['line_num3']) { ?>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox3<?php echo $i ?>" id="line_checkbox3<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox3'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox<?php echo $i ?>').checked) {
                         document.getElementById('item_text<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text<?php echo $i ?>').value = '.';
						 document.getElementById('item_text<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text<?php echo $i ?>').value = '';
						 document.getElementById('item_text<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
        <td width="408" valign="top"><input name="item_text3<?php echo $i ?>" type="text" class="text300" id="item_text3<?php echo $i ?>" onChange="document.getElementById('line_checkbox3<?php echo $i ?>').checked='checked';" maxlength="100" value="<?php echo $_SESSION['item_text3'.$i]?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" > </td>
        <td width="140" align="right" valign="top"><input  name="amount_text3<?php echo $i ?>" type="text" class="text100" id="amount_text3<?php echo $i ?>" value="<?php if ($_SESSION['amount_text3'.$i]!='') { echo $_SESSION['amount_text3'.$i]; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" onChange="document.getElementById('line_checkbox3<?php echo $i ?>').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num3" id="line_num3" value="<?php echo $_SESSION['line_num3']?>"></td>
      </tr>
      <?php
		$i++;
		}
		?>
    </table>
    <input type="button" class="imagebutton" onClick="addRow3('dataTable3')" value="Add line" />
    <div align="right"><label class="label_small">To delete a line: uncheck line box.</label></div>
 </div>

<div id='option2'> 		
<input type="hidden" name="check2" id="check2" value='2'> 
<!--End option 1----------------------------------------------------------------------------------------------------------------------------------------->


 

<!--Start option 2---------------------------------------------------------------------------------------------------------------------------------------->
<div class="wizard_frame" id="plus_div"><img src="../images/plus_green.png" width="16" height="16" style="cursor:pointer;" onClick="document.getElementById('option2_div').hidden=false; document.getElementById('check2').value='1'; document.getElementById('option2_text').value=''; document.getElementById('item_text40').value='';   document.getElementById('amount_text50').value=''; document.getElementById('minus_div').hidden=false;  document.getElementById('plus_div').hidden=true; document.getElementById('line_checkbox40').checked=false; document.getElementById('line_checkbox50').checked=false;"> &nbsp;&nbsp;&nbsp;Add option 2</div>
<div class="wizard_frame" id="minus_div" hidden="true"><img src="../images/minus_green.png" width="16" height="16" style="cursor:pointer;" onClick="document.getElementById('option2_div').hidden=true; document.getElementById('check2').value='1'; document.getElementById('option2_text').value='.'; document.getElementById('item_text40').value='.';   document.getElementById('amount_text50').value='.'; document.getElementById('plus_div').hidden=false; document.getElementById('minus_div').hidden=true;"> &nbsp;&nbsp;&nbsp;Cancel option 2</div>

<div class="wizard_frame" id="option2_div" hidden="true">  
      Option 2:&nbsp;
      <input name="option2_text" type="text" class="text300" id="option2_text" value="<?php echo $_SESSION['option2_text'] ?>" size="60" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" >
      <br>
      <br>

    <table id="dataTable4" width="590" border="1" style="border-collapse:collapse;">
    <thead> 
        <tr>
          <td colspan="2">Items</td>
        </tr>
      </thead>
        <script>
			 function check_it4() {
				 if (document.getElementById('line_checkbox40').checked) {
                         document.getElementById('item_text40').style.background = '#F0F0F0';
						 document.getElementById('item_text40').value = '.';
						 document.getElementById('item_text40').disabled = true;
						 document.getElementById('quantity_text40').disabled = true;
						 
                } else {
                        document.getElementById('item_text40').style.background = '#FFF';
						 document.getElementById('item_text40').value = '';
						 document.getElementById('item_text40').disabled = false;
                }
				}
		     </script>
        <tr>
            <td width="40" valign="top"><input type="checkbox" name="line_checkbox40" id="line_checkbox40" onMouseUp="check_it4()" <?php if ($_SESSION['line_checkbox40']==1) { ?> checked="checked" <?php } ?> /></td>
          <td width="554" valign="top"><textarea name="item_text40" id="item_text40" class="text_box" cols="85" rows="1" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox40').checked='checked';" ><?php echo $_SESSION['item_text40'] ?></textarea>
          <input type="hidden" name="line_num4" id="line_num4" value="1" ></td>
          
        </tr>
        <?php 
		$i=1;
		
		while ($i<$_SESSION['line_num4']) { ?>
        <tr>
            <td width="40" valign="top"><input type="checkbox" name="line_checkbox4<?php echo $i ?>" id="line_checkbox4<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox4'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox4<?php echo $i ?>').checked) {
                         document.getElementById('item_text4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('quantity_text4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text4<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text4<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text4<?php echo $i ?>').value = '.';
						 document.getElementById('item_text4<?php echo $i ?>').disabled = true;
						 document.getElementById('quantity_text4<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text4<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text4<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('quantity_text4<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text4<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text4<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text4<?php echo $i ?>').value = '';
						 document.getElementById('amount_text4<?php echo $i ?>').value = '';
						 document.getElementById('item_text4<?php echo $i ?>').disabled = false;
						 document.getElementById('quantity_text4<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text4<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
          <td width="554" valign="top"><textarea name="item_text4<?php echo $i ?>" id="item_text4<?php echo $i ?>" class="text_box" cols="85" rows="1" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox4<?php echo $i ?>').checked='checked';"><?php echo $_SESSION['item_text4'.$i] ?></textarea>
          <input type="hidden" name="line_num4" id="line_num4" value="<?php echo $_SESSION['line_num4']?>"></td>
        </tr>
        <?php
		$i++;
		}
		?>
                
  </table>
  <input type="button" class="imagebutton" onClick="addRow4('dataTable4')" value="Add line" />
  <br>
  <br>

    <table id="dataTable5" width="590" border="1" style="border-collapse:collapse;">
      <thead>
        <tr>
          <td colspan="2">Pricing</td>
          <td>Price</td>
        </tr>
      </thead>
      <script>
			 function check_it5() {
				 if (document.getElementById('line_checkbox50').checked) {
                         document.getElementById('item_text50').style.background = '#F0F0F0';
						 document.getElementById('amount_text50').style.background = '#F0F0F0';
						 document.getElementById('item_text50').value = '.';
						 document.getElementById('amount_text50').value = '.';
						 document.getElementById('item_text50').disabled = true;
						 document.getElementById('amount_text50').disabled = true;
						 
                } else {
                        document.getElementById('item_text50').style.background = '#FFF';
						 document.getElementById('amount_text50').style.background = '#FFF';
						 document.getElementById('item_text50').value = 'Total Price Supply & Install';
						 document.getElementById('amount_text50').value = '';
						 document.getElementById('item_text50').disabled = false;
						 document.getElementById('amount_text50').disabled = false;
                }
				}
		     </script>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox50" id="line_checkbox50" onMouseUp="check_it5()" <?php if ($_SESSION['line_checkbox50']==1) { ?> checked="checked" <?php } ?> /></td>
        <td width="408" valign="top"></textarea><input name="item_text50" id="item_text50" type="text" class="text300" value="<?php echo $_SESSION['item_text50']?>" onChange="document.getElementById('line_checkbox50').checked='checked';" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td width="140" align="right" valign="top"><input  name="amount_text50" id="amount_text50" type="text" class="text100" value="<?php if ($_SESSION['amount_text50']!='') { echo $_SESSION['amount_text50']; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')"  onChange="document.getElementById('line_checkbox50').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num5" id="line_num5" value="1" ></td>
        
      </tr>
      <?php 
		$i=1;
		while ($i<$_SESSION['line_num5']) { ?>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox5<?php echo $i ?>" id="line_checkbox5<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox5'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox5<?php echo $i ?>').checked) {
                         document.getElementById('item_text5<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text5<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text5<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text5<?php echo $i ?>').value = '.';
						 document.getElementById('item_text5<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text5<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text5<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text5<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text5<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text5<?php echo $i ?>').value = '';
						 document.getElementById('item_text5<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text5<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
        <td width="408" valign="top"><input name="item_text5<?php echo $i ?>" id="item_text5<?php echo $i ?>" type="text" class="text300" value="<?php echo $_SESSION['item_text5'.$i]?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td width="140" align="right" valign="top"><input  name="amount_text5<?php echo $i ?>" type="text" class="text100" id="amount_text5<?php echo $i ?>" value="<?php if ($_SESSION['amount_text5'.$i]!='') { echo $_SESSION['amount_text5'.$i]; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" onChange="document.getElementById('line_checkbox5<?php echo $i ?>').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num5" id="line_num5" value="<?php echo $_SESSION['line_num5']?>"></td>
      </tr>
      <?php
		$i++;
		}
		?>
    </table>
    <input type="button" class="imagebutton" onClick="addRow5('dataTable5')" value="Add line" />
    <div align="right"><label class="label_small">To delete a line: uncheck line box.</label></div>
 		
</div> 
</div>

<?php
if (($_SESSION['project']=='Manase 358') OR ($_SESSION['project']=='Miscelaneous')) { 
?>
<!--End option 2 ------------------------------------------------------------------------------------------------------------------------------------------------->

<!--Start option 3-->

<div id='option3'> 		
<input type="hidden" name="check3" id="check3" value='3'>  

<div class="wizard_frame" id="plus_div3"><img src="../images/plus_green.png" width="16" height="16" style="cursor:pointer;" onClick="document.getElementById('option3_div').hidden=false; document.getElementById('check3').value='1'; document.getElementById('option3_text').value=''; document.getElementById('item_text_M40').value='';   document.getElementById('amount_text_M50').value=''; document.getElementById('minus_div3').hidden=false;  document.getElementById('plus_div3').hidden=true; document.getElementById('line_checkbox_M40').checked=false; document.getElementById('line_checkbox_M50').checked=false;"> &nbsp;&nbsp;&nbsp;Add option 3</div>
<div class="wizard_frame" id="minus_div3" hidden="true"><img src="../images/minus_green.png" width="16" height="16" style="cursor:pointer;" onClick="document.getElementById('plus_div3').hidden=false; document.getElementById('minus_div3').hidden=true; document.getElementById('option3_div').hidden=true; document.getElementById('check3').value='1'; document.getElementById('option3_text').value='.'; document.getElementById('item_text_M3').value='.';   document.getElementById('amount_text_M50').value='.'; "> &nbsp;&nbsp;&nbsp;Cancel option 3</div>

<div class="wizard_frame" id="option3_div" hidden="true">  
      Option 3:&nbsp;
      <input name="option3_text" type="text" class="text300" id="option3_text" value="<?php echo $_SESSION['option3_text'] ?>" size="60" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" >
      <br>
      <br>

    <table id="dataTable_M4" width="590" border="1" style="border-collapse:collapse;">
    <thead> 
        <tr>
          <td colspan="2">Items</td>
        </tr>
      </thead>
        <script>
			 function check_it_M4() {
				 if (document.getElementById('line_checkbox_M40').checked) {
                         document.getElementById('item_text_M40').style.background = '#F0F0F0';
						 document.getElementById('item_text_M40').value = '.';
						 document.getElementById('item_text_M40').disabled = true;
						 document.getElementById('quantity_text_M40').disabled = true;
						 
                } else {
                        document.getElementById('item_text_M40').style.background = '#FFF';
						 document.getElementById('item_text_M40').value = '';
						 document.getElementById('item_text_M40').disabled = false;
                }
				}
		     </script>
        <tr>
            <td width="40" valign="top"><input type="checkbox" name="line_checkbox_M40" id="line_checkbox_M40" onMouseUp="check_it_M4()" <?php if ($_SESSION['line_checkbox_M40']==1) { ?> checked="checked" <?php } ?> /></td>
          <td width="554" valign="top"><textarea name="item_text_M40" id="item_text_M40" class="text_box" cols="85" rows="1" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox_M40').checked='checked';" ><?php echo $_SESSION['item_text_M40'] ?></textarea>
          <input type="hidden" name="line_num_M4" id="line_num_M4" value="1" ></td>
          
        </tr>
        <?php 
		$i=1;
		
		while ($i<$_SESSION['line_num_M4']) { ?>
        <tr>
            <td width="40" valign="top"><input type="checkbox" name="line_checkbox_M4<?php echo $i ?>" id="line_checkbox_M4<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox_M4'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox_M4<?php echo $i ?>').checked) {
                         document.getElementById('item_text_M4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('quantity_text_M4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text_M4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text_M4<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text_M4<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text_M4<?php echo $i ?>').value = '.';
						 document.getElementById('item_text_M4<?php echo $i ?>').disabled = true;
						 document.getElementById('quantity_text_M4<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text_M4<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text_M4<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('quantity_text_M4<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text_M4<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text_M4<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text_M4<?php echo $i ?>').value = '';
						 document.getElementById('amount_text_M4<?php echo $i ?>').value = '';
						 document.getElementById('item_text_M4<?php echo $i ?>').disabled = false;
						 document.getElementById('quantity_text_M4<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text_M4<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
          <td width="554" valign="top"><textarea name="item_text_M4<?php echo $i ?>" id="item_text_M4<?php echo $i ?>" class="text_box" cols="85" rows="1" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox_M4<?php echo $i ?>').checked='checked';"><?php echo $_SESSION['item_text_M4'.$i] ?></textarea>
          <input type="hidden" name="line_num_M4" id="line_num_M4" value="<?php echo $_SESSION['line_num_M4']?>"></td>
        </tr>
        <?php
		$i++;
		}
		?>
                
  </table>
  <input type="button" class="imagebutton" onClick="addRow_M4('dataTable_M4')" value="Add line" />
  <br>
  <br>

    <table id="dataTable_M5" width="590" border="1" style="border-collapse:collapse;">
      <thead>
        <tr>
          <td colspan="2">Pricing</td>
          <td>Price</td>
        </tr>
      </thead>
      <script>
			 function check_it_M5() {
				 if (document.getElementById('line_checkbox_M50').checked) {
                         document.getElementById('item_text_M50').style.background = '#F0F0F0';
						 document.getElementById('amount_text_M50').style.background = '#F0F0F0';
						 document.getElementById('item_text_M50').value = '.';
						 document.getElementById('amount_text_M50').value = '.';
						 document.getElementById('item_text_M50').disabled = true;
						 document.getElementById('amount_text_M50').disabled = true;
						 
                } else {
                        document.getElementById('item_text_M50').style.background = '#FFF';
						 document.getElementById('amount_text_M50').style.background = '#FFF';
						 document.getElementById('item_text_M50').value = 'Total Price Supply & Install';
						 document.getElementById('amount_text_M50').value = '';
						 document.getElementById('item_text_M50').disabled = false;
						 document.getElementById('amount_text_M50').disabled = false;
                }
				}
		     </script>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox_M50" id="line_checkbox_M50" onMouseUp="check_it_M5()" <?php if ($_SESSION['line_checkbox_M50']==1) { ?> checked="checked" <?php } ?> /></td>
        <td width="408" valign="top"></textarea><input name="item_text_M50" id="item_text_M50" type="text" class="text300" value="<?php echo $_SESSION['item_text_M50']?>" onChange="document.getElementById('line_checkbox_M50').checked='checked';" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td width="140" align="right" valign="top"><input  name="amount_text_M50" id="amount_text_M50" type="text" class="text100" value="<?php if ($_SESSION['amount_text_M50']!='') { echo $_SESSION['amount_text_M50']; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')"  onChange="document.getElementById('line_checkbox_M50').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num_M5" id="line_num_M5" value="1" ></td>
        
      </tr>
      <?php 
		$i=1;
		while ($i<$_SESSION['line_num_M5']) { ?>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox_M5<?php echo $i ?>" id="line_checkbox_M5<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox5'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox_M5<?php echo $i ?>').checked) {
                         document.getElementById('item_text_M5<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text_M5<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text_M5<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text_M5<?php echo $i ?>').value = '.';
						 document.getElementById('item_text_M5<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text_M5<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text_M5<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text_M5<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text_M5<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text_M5<?php echo $i ?>').value = '';
						 document.getElementById('item_text_M5<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text_M5<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
        <td width="408" valign="top"><input name="item_text_M5<?php echo $i ?>" id="item_text_M5<?php echo $i ?>" type="text" class="text300" value="<?php echo $_SESSION['item_text_M5'.$i]?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td width="140" align="right" valign="top"><input  name="amount_text_M5<?php echo $i ?>" type="text" class="text100" id="amount_text_M5<?php echo $i ?>" value="<?php if ($_SESSION['amount_text_M5'.$i]!='') { echo $_SESSION['amount_text_M5'.$i]; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" onChange="document.getElementById('line_checkbox_M5<?php echo $i ?>').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num_M5" id="line_num_M5" value="<?php echo $_SESSION['line_num_M5']?>"></td>
      </tr>
      <?php
		$i++;
		}
		?>
    </table>
    <input type="button" class="imagebutton" onClick="addRow_M5('dataTable_M5')" value="Add line" />
    <div align="right"><label class="label_small">To delete a line: uncheck line box.</label></div>
 		
</div> 
</div>
  

<!--End option 3 --------------------------------------------------------------------------------------------------------------------------------------------------------------->


<!--Start option 4-->

<div id='option4'> 		
<input type="hidden" name="check4" id="check4" value='4'>  

<div class="wizard_frame" id="plus_div4"><img src="../images/plus_green.png" width="16" height="16" style="cursor:pointer;" onClick="document.getElementById('option4_div').hidden=false; document.getElementById('check4').value='1'; document.getElementById('option4_text').value=''; document.getElementById('item_text_K40').value='';   document.getElementById('amount_text_K50').value=''; document.getElementById('minus_div4').hidden=false;  document.getElementById('plus_div4').hidden=true; document.getElementById('line_checkbox_K40').checked=false; document.getElementById('line_checkbox_K50').checked=false;"> &nbsp;&nbsp;&nbsp;Add option 4</div>
<div class="wizard_frame" id="minus_div4" hidden="true"><img src="../images/minus_green.png" width="16" height="16" style="cursor:pointer;" onClick="document.getElementById('plus_div4').hidden=false; document.getElementById('minus_div4').hidden=true; document.getElementById('option4_div').hidden=true; document.getElementById('check4').value='1'; document.getElementById('option4_text').value='.'; document.getElementById('item_text_K40').value='.';   document.getElementById('amount_text_K50').value='.'; "> &nbsp;&nbsp;&nbsp;Cancel option 4</div>

<div class="wizard_frame" id="option4_div" hidden="true">  
      Option 4:&nbsp;
      <input name="option4_text" type="text" class="text300" id="option4_text" value="<?php echo $_SESSION['option4_text'] ?>" size="60" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" >
      <br>
      <br>

    <table id="dataTable_K4" width="590" border="1" style="border-collapse:collapse;">
    <thead> 
        <tr>
          <td colspan="2">Items</td>
        </tr>
      </thead>
        <script>
			 function check_it_K4() {
				 if (document.getElementById('line_checkbox_K40').checked) {
                         document.getElementById('item_text_K40').style.background = '#F0F0F0';
						 document.getElementById('item_text_K40').value = '.';
						 document.getElementById('item_text_K40').disabled = true;
						 document.getElementById('quantity_text_K40').disabled = true;
						 
                } else {
                        document.getElementById('item_text_K40').style.background = '#FFF';
						 document.getElementById('item_text_K40').value = '';
						 document.getElementById('item_text_K40').disabled = false;
                }
				}
		     </script>
        <tr>
            <td width="40" valign="top"><input type="checkbox" name="line_checkbox_K40" id="line_checkbox_K40" onMouseUp="check_it_K4()" <?php if ($_SESSION['line_checkbox_K40']==1) { ?> checked="checked" <?php } ?> /></td>
          <td width="554" valign="top"><textarea name="item_text_K40" id="item_text_K40" class="text_box" cols="85" rows="1" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox_K40').checked='checked';" ><?php echo $_SESSION['item_text_K40'] ?></textarea>
          <input type="hidden" name="line_num_K4" id="line_num_K4" value="1" ></td>
          
        </tr>
        <?php 
		$i=1;
		
		while ($i<$_SESSION['line_num_K4']) { ?>
        <tr>
            <td width="40" valign="top"><input type="checkbox" name="line_checkbox_K4<?php echo $i ?>" id="line_checkbox_K4<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox_K4'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox_K4<?php echo $i ?>').checked) {
                         document.getElementById('item_text_K4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('quantity_text_K4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text_K4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text_K4<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text_K4<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text_K4<?php echo $i ?>').value = '.';
						 document.getElementById('item_text_K4<?php echo $i ?>').disabled = true;
						 document.getElementById('quantity_text_K4<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text_K4<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text_K4<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('quantity_text_K4<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text_K4<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text_K4<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text_K4<?php echo $i ?>').value = '';
						 document.getElementById('amount_text_K4<?php echo $i ?>').value = '';
						 document.getElementById('item_text_K4<?php echo $i ?>').disabled = false;
						 document.getElementById('quantity_text_K4<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text_K4<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
          <td width="554" valign="top"><textarea name="item_text_K4<?php echo $i ?>" id="item_text_K4<?php echo $i ?>" class="text_box" cols="85" rows="1" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox_K4<?php echo $i ?>').checked='checked';"><?php echo $_SESSION['item_text_K4'.$i] ?></textarea>
          <input type="hidden" name="line_num_K4" id="line_num_K4" value="<?php echo $_SESSION['line_num_K4']?>"></td>
        </tr>
        <?php
		$i++;
		}
		?>
                
  </table>
  <input type="button" class="imagebutton" onClick="addRow_K4('dataTable_K4')" value="Add line" />
  <br>
  <br>

    <table id="dataTable_K5" width="590" border="1" style="border-collapse:collapse;">
      <thead>
        <tr>
          <td colspan="2">Pricing</td>
          <td>Price</td>
        </tr>
      </thead>
      <script>
			 function check_it_K5() {
				 if (document.getElementById('line_checkbox_K50').checked) {
                         document.getElementById('item_text_K50').style.background = '#F0F0F0';
						 document.getElementById('amount_text_K50').style.background = '#F0F0F0';
						 document.getElementById('item_text_K50').value = '.';
						 document.getElementById('amount_text_K50').value = '.';
						 document.getElementById('item_text_K50').disabled = true;
						 document.getElementById('amount_text_K50').disabled = true;
						 
                } else {
                        document.getElementById('item_text_K50').style.background = '#FFF';
						 document.getElementById('amount_text_K50').style.background = '#FFF';
						 document.getElementById('item_text_K50').value = 'Total Price Supply & Install';
						 document.getElementById('amount_text_K50').value = '';
						 document.getElementById('item_text_K50').disabled = false;
						 document.getElementById('amount_text_K50').disabled = false;
                }
				}
		     </script>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox_K50" id="line_checkbox_K50" onMouseUp="check_it_K5()" <?php if ($_SESSION['line_checkbox_K50']==1) { ?> checked="checked" <?php } ?> /></td>
        <td width="408" valign="top"></textarea><input name="item_text_K50" id="item_text_K50" type="text" class="text300" value="<?php echo $_SESSION['item_text_K50']?>" onChange="document.getElementById('line_checkbox_K50').checked='checked';" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td width="140" align="right" valign="top"><input  name="amount_text_K50" id="amount_text_K50" type="text" class="text100" value="<?php if ($_SESSION['amount_text_K50']!='') { echo $_SESSION['amount_text_K50']; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')"  onChange="document.getElementById('line_checkbox_K50').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num_K5" id="line_num_K5" value="1" ></td>
        
      </tr>
      <?php 
		$i=1;
		while ($i<$_SESSION['line_num_K5']) { ?>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox_K5<?php echo $i ?>" id="line_checkbox_K5<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox_K5'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox_K5<?php echo $i ?>').checked) {
                         document.getElementById('item_text_K5<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text_K5<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text_K5<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text_K5<?php echo $i ?>').value = '.';
						 document.getElementById('item_text_K5<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text_K5<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text_K5<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text_K5<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text_K5<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text_K5<?php echo $i ?>').value = '';
						 document.getElementById('item_text_K5<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text_K5<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
        <td width="408" valign="top"><input name="item_text_K5<?php echo $i ?>" id="item_text_K5<?php echo $i ?>" type="text" class="text300" value="<?php echo $_SESSION['item_text_K5'.$i]?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td width="140" align="right" valign="top"><input  name="amount_text_K5<?php echo $i ?>" type="text" class="text100" id="amount_text_K5<?php echo $i ?>" value="<?php if ($_SESSION['amount_text5'.$i]!='') { echo $_SESSION['amount_text_K5'.$i]; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" onChange="document.getElementById('line_checkbox_K5<?php echo $i ?>').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num_K5" id="line_num_K5" value="<?php echo $_SESSION['line_num_K5']?>"></td>
      </tr>
      <?php
		$i++;
		}
		?>
    </table>
    <input type="button" class="imagebutton" onClick="addRow_K5('dataTable_K5')" value="Add line" />
    <div align="right"><label class="label_small">To delete a line: uncheck line box.</label></div>
 		
</div> 
</div>
  

<!--End option 4 --------------------------------------------------------------------------------------------------------------------------------------------------------------->


<!--Start option 5-->

<div id='option5'> 		
<input type="hidden" name="check5" id="check5" value='5'>  

<div class="wizard_frame" id="plus_div5"><img src="../images/plus_green.png" width="16" height="16" style="cursor:pointer;" onClick="document.getElementById('option5_div').hidden=false; document.getElementById('check5').value='1'; document.getElementById('option5_text').value=''; document.getElementById('item_text_L40').value='';   document.getElementById('amount_text_L50').value=''; document.getElementById('minus_div5').hidden=false;  document.getElementById('plus_div5').hidden=true; document.getElementById('line_checkbox_L40').checked=false; document.getElementById('line_checkbox_L50').checked=false;"> &nbsp;&nbsp;&nbsp;Add option 5</div>
<div class="wizard_frame" id="minus_div5" hidden="true"><img src="../images/minus_green.png" width="16" height="16" style="cursor:pointer;" onClick="document.getElementById('plus_div5').hidden=false; document.getElementById('minus_div5').hidden=true; document.getElementById('option5_div').hidden=true; document.getElementById('check5').value='1'; document.getElementById('option_L5_text').value='.'; document.getElementById('item_text_L4').value='.';   document.getElementById('amount_text_L50').value='.'; "> &nbsp;&nbsp;&nbsp;Cancel option 5</div>

<div class="wizard_frame" id="option5_div" hidden="true">  
      Option 5:&nbsp;
      <input name="option5_text" type="text" class="text300" id="option5_text" value="<?php echo $_SESSION['option5_text'] ?>" size="60" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" >
      <br>
      <br>

    <table id="dataTable_L4" width="590" border="1" style="border-collapse:collapse;">
    <thead> 
        <tr>
          <td colspan="2">Items</td>
        </tr>
      </thead>
        <script>
			 function check_it_L4() {
				 if (document.getElementById('line_checkbox_L40').checked) {
                         document.getElementById('item_text_L40').style.background = '#F0F0F0';
						 document.getElementById('item_text_L40').value = '.';
						 document.getElementById('item_text_L40').disabled = true;
						 document.getElementById('quantity_text_L40').disabled = true;
						 
                } else {
                        document.getElementById('item_text_L40').style.background = '#FFF';
						 document.getElementById('item_text_L40').value = '';
						 document.getElementById('item_text_L40').disabled = false;
                }
				}
		     </script>
        <tr>
            <td width="40" valign="top"><input type="checkbox" name="line_checkbox_L40" id="line_checkbox_L40" onMouseUp="check_it_L4()" <?php if ($_SESSION['line_checkbox_L40']==1) { ?> checked="checked" <?php } ?> /></td>
          <td width="554" valign="top"><textarea name="item_text_L40" id="item_text_L40" class="text_box" cols="85" rows="1" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"   onChange="document.getElementById('line_checkbox_L40').checked='checked';" ><?php echo $_SESSION['item_text_L40'] ?></textarea>
          <input type="hidden" name="line_num_L4" id="line_num_L4" value="1" ></td>
          
        </tr>
        <?php 
		$i=1;
		
		while ($i<$_SESSION['line_num_L4']) { ?>
        <tr>
            <td width="40" valign="top"><input type="checkbox" name="line_checkbox_L4<?php echo $i ?>" id="line_checkbox_L4<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox_L4'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox_L4<?php echo $i ?>').checked) {
                         document.getElementById('item_text_L4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('quantity_text_L4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text_L4<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text_L4<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text_L4<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text_L4<?php echo $i ?>').value = '.';
						 document.getElementById('item_text_L4<?php echo $i ?>').disabled = true;
						 document.getElementById('quantity_text_L4<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text_L4<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text_L4<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('quantity_text_L4<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text_L4<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text_L4<?php echo $i ?>').value = '.';
						 document.getElementById('quantity_text_L4<?php echo $i ?>').value = '';
						 document.getElementById('amount_text_L4<?php echo $i ?>').value = '';
						 document.getElementById('item_text_L4<?php echo $i ?>').disabled = false;
						 document.getElementById('quantity_text_L4<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text_L4<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
          <td width="554" valign="top"><textarea name="item_text_L4<?php echo $i ?>" id="item_text_L4<?php echo $i ?>" class="text_box" cols="85" rows="1" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox_L4<?php echo $i ?>').checked='checked';"><?php echo $_SESSION['item_text_L4'.$i] ?></textarea>
          <input type="hidden" name="line_num_L4" id="line_num_L4" value="<?php echo $_SESSION['line_num_L4']?>"></td>
        </tr>
        <?php
		$i++;
		}
		?>
                
  </table>
  <input type="button" class="imagebutton" onClick="addRow_L4('dataTable_L4')" value="Add line" />
  <br>
  <br>

    <table id="dataTable_L5" width="590" border="1" style="border-collapse:collapse;">
      <thead>
        <tr>
          <td colspan="2">Pricing</td>
          <td>Price</td>
        </tr>
      </thead>
      <script>
			 function check_it_L5() {
				 if (document.getElementById('line_checkbox_L50').checked) {
                         document.getElementById('item_text_L50').style.background = '#F0F0F0';
						 document.getElementById('amount_text_L50').style.background = '#F0F0F0';
						 document.getElementById('item_text_L50').value = '.';
						 document.getElementById('amount_text_L50').value = '.';
						 document.getElementById('item_text_L50').disabled = true;
						 document.getElementById('amount_text_L50').disabled = true;
						 
                } else {
                        document.getElementById('item_text_L50').style.background = '#FFF';
						 document.getElementById('amount_text_L50').style.background = '#FFF';
						 document.getElementById('item_text_L50').value = 'Total Price Supply & Install';
						 document.getElementById('amount_text_L50').value = '';
						 document.getElementById('item_text_L50').disabled = false;
						 document.getElementById('amount_text_L50').disabled = false;
                }
				}
		     </script>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox_L50" id="line_checkbox_L50" onMouseUp="check_it_L5()" <?php if ($_SESSION['line_checkbox_L50']==1) { ?> checked="checked" <?php } ?> /></td>
        <td width="408" valign="top"></textarea><input name="item_text_L50" id="item_text_L50" type="text" class="text300" value="<?php echo $_SESSION['item_text_L50']?>" onChange="document.getElementById('line_checkbox_L50').checked='checked';" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td width="140" align="right" valign="top"><input  name="amount_text_L50" id="amount_text_L50" type="text" class="text100" value="<?php if ($_SESSION['amount_text_L50']!='') { echo $_SESSION['amount_text_L50']; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')"  onChange="document.getElementById('line_checkbox_L50').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num_L5" id="line_num_L5" value="1" ></td>
        
      </tr>
      <?php 
		$i=1;
		while ($i<$_SESSION['line_num_L5']) { ?>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox_L5<?php echo $i ?>" id="line_checkbox_L5<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox_L5'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox_L5<?php echo $i ?>').checked) {
                         document.getElementById('item_text_L5<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text_L5<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text_L5<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text_L5<?php echo $i ?>').value = '.';
						 document.getElementById('item_text_L5<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text_L5<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text_L5<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text_L5<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text_L5<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text_L5<?php echo $i ?>').value = '';
						 document.getElementById('item_text_L5<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text_L5<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
        <td width="408" valign="top"><input name="item_text_L5<?php echo $i ?>" id="item_text_L5<?php echo $i ?>" type="text" class="text300" value="<?php echo $_SESSION['item_text_L5'.$i]?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td width="140" align="right" valign="top"><input  name="amount_text_L5<?php echo $i ?>" type="text" class="text100" id="amount_text_L5<?php echo $i ?>" value="<?php if ($_SESSION['amount_text5'.$i]!='') { echo $_SESSION['amount_text_L5'.$i]; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" onChange="document.getElementById('line_checkbox_L5<?php echo $i ?>').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num_L5" id="line_num_L5" value="<?php echo $_SESSION['line_num_L5']?>"></td>
      </tr>
      <?php
		$i++;
		}
		?>
    </table>
    <input type="button" class="imagebutton" onClick="addRow_L5('dataTable_L5')" value="Add line" />
    <div align="right"><label class="label_small">To delete a line: uncheck line box.</label></div>
 		
</div> 
</div>
  
<?php
}

}
?>
<!--End option 5 --------------------------------------------------------------------------------------------------------------------------------------------------------------->








<?php
if ($_SESSION['project']=='Diamond mesh') { ?>
<div class="wizard_frame" id="option1_div">

      Option 1:&nbsp;&nbsp;
      <input name="option8_text" type="text" class="text300" id="option1_text" value="<?php echo $_SESSION['option8_text'] ?>" size="60" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" >
      <br>
      <br>


    <table id="dataTable2" width="590" border="1" style="border-collapse:collapse;">
    <thead> 
        <tr>
          <td colspan="2">Items</td>
        </tr>
      </thead>
      <script>
			 function check_it8() {
				 if (document.getElementById('line_checkbox8<?php echo $i ?>').checked) {
                         document.getElementById('item_text8<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text8<?php echo $i ?>').disabled = true;
				 } else {
                        document.getElementById('item_text8<?php echo $i ?>').style.background = '#FFF';
						document.getElementById('item_text8<?php echo $i ?>').disabled = false;
                }
				}
		     </script>
             
        <?php 
		$i=0;
		while ($i<6) { ?> 
        
        <tr>
            <td width="20" valign="top"><input type="checkbox" name="line_checkbox8<?php echo $i ?>" id="line_checkbox8<?php echo $i ?>" onMouseUp="
            		 if (document.getElementById('line_checkbox8<?php echo $i ?>').checked) {
                         document.getElementById('item_text8<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text8<?php echo $i ?>').disabled = true;
				 } else {
                        document.getElementById('item_text8<?php echo $i ?>').style.background = '#FFF';
						document.getElementById('item_text8<?php echo $i ?>').disabled = false;
                }
				
            " <?php if ($_SESSION['line_checkbox8'.$i]==1) { ?> checked="checked" <?php } ?> /></td>
          <td width="554" valign="top"><input name="item_text8<?php echo $i ?>" type="text" class="text_box" id="item_text8<?php echo $i ?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox8<?php echo $i ?>').checked='checked';" value="<?php echo $_SESSION['item_text8'.$i] ?>" size="85">
          <input type="hidden" name="line_num2" id="line_num2" value="1" ></td>
          
        </tr>
        <?php
		$i++;
		}
		?>
                
  </table>
    <input type="checkbox" name="picture_checkbox" id="picture_checkbox" <?php if ($_SESSION['picture']=='yes') { ?> checked='checked' <?php } ?>>Print picture on quotation. 
    <br>
  <br>

    <table id="dataTable9" width="590" border="1" style="border-collapse:collapse;">
      <thead>
        <tr>
          <td colspan="2">Pricing</td>
          <td>Price</td>
        </tr>
      </thead>
      
      <script>
			 function check_it9() {
				 if (document.getElementById('line_checkbox90').checked) {
                         document.getElementById('item_text90').style.background = '#F0F0F0';
						 document.getElementById('amount_text90').style.background = '#F0F0F0';
						 document.getElementById('item_text90').value = '.';
						 document.getElementById('amount_text90').value = '.';
						 document.getElementById('item_text90').disabled = true;
						 document.getElementById('amount_text90').disabled = true;
						 
                } else {
                        document.getElementById('item_text90').style.background = '#FFF';
						document.getElementById('amount_text90').style.background = '#FFF';
						document.getElementById('item_text90').value = 'Total Price Supply & Install';
						document.getElementById('amount_text90').value = '';
						document.getElementById('item_text90').disabled = false;
						document.getElementById('amount_text90').disabled = false;
                }
				}
		     </script>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox90" id="line_checkbox90" onMouseUp="check_it9()" <?php if ($_SESSION['line_checkbox90']==1) { ?> checked="checked" <?php } ?> /> </td>
        <td width="408" valign="top"></textarea><input name="item_text90" type="text" class="text300" id="item_text90" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox90').checked='checked';" value="<?php echo $_SESSION['item_text90']?>" maxlength="100"> </td>
        <td width="140" align="right" valign="top"><input  name="amount_text90" id="amount_text90" type="text" class="text100" value="<?php if ($_SESSION['amount_text90']!='') { echo $_SESSION['amount_text90']; } ?>" onKeyPress="return isNumberKey(event);" onKeyUp="this.value = this.value.replace (/(\...).*/, '$1');" onChange="document.getElementById('line_checkbox90').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num9" id="line_num9" value="1" > </td>
     
      </tr>
      <?php 
		$i=1;
		while ($i<$_SESSION['line_num9']) { ?>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox9<?php echo $i ?>" id="line_checkbox9<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox9'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox9<?php echo $i ?>').checked) {
                         document.getElementById('item_text9<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text9<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text9<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text9<?php echo $i ?>').value = '.';
						 document.getElementById('item_text9<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text9<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text9<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text9<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text9<?php echo $i ?>').value = '.';
						 document.getElementById('amount_tex9t<?php echo $i ?>').value = '';
						 document.getElementById('item_tex9t<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text9<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
        <td width="408" valign="top"><input name="item_text9<?php echo $i ?>" type="text" class="text300" id="item_text9<?php echo $i ?>" onChange="document.getElementById('line_checkbox9<?php echo $i ?>').checked='checked';" maxlength="100" value="<?php echo $_SESSION['item_text9'.$i]?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td width="140" align="right" valign="top"><input  name="amount_text9<?php echo $i ?>" type="text" class="text100" id="amount_text9<?php echo $i ?>" value="<?php if ($_SESSION['amount_text9'.$i]!='') { echo $_SESSION['amount_text9'.$i]; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" onChange="document.getElementById('line_checkbox9<?php echo $i ?>').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num9" id="line_num9" value="<?php echo $_SESSION['line_num9']?>"></td>
      </tr>
      <?php
		$i++;
		}
		?>
    </table>
    <input type="button" class="imagebutton" onClick="addRow9('dataTable9')" value="Add line" />
    
 </div>
<?php
}
?>

<?php
if ($_SESSION['project']=='Palisade standard') { ?>
<div class="wizard_frame" id="option1_div">

Select height:&nbsp;&nbsp;
    <input type="radio" name="height_radio_group" value="1200" id="height_radio_group_0" <?php if ($_SESSION['fence_height']== "1200") { ?> checked="checked" <?php } ?>>1200
    <input type="radio" name="height_radio_group" value="1500" id="height_radio_group_1" <?php if ($_SESSION['fence_height']== "1500") { ?> checked="checked" <?php } ?>>1500
    <input type="radio" name="height_radio_group" value="1800" id="height_radio_group_2" <?php if ($_SESSION['fence_height']== "1800") { ?> checked="checked" <?php } ?>>1800
    <input type="radio" name="height_radio_group" value="2100" id="height_radio_group_3" <?php if ($_SESSION['fence_height']== "2100") { ?> checked="checked" <?php } ?>>2100
    <input type="radio" name="height_radio_group" value="2400" id="height_radio_group_4" <?php if ($_SESSION['fence_height']== "2400") { ?> checked="checked" <?php } ?>>2400
  <br>
</p><br>
     

<table id="dataTable9" width="590" border="1" style="border-collapse:collapse;">
      <thead>
        <tr>
          <td colspan="2">Pricing</td>
          <td>Price</td>
        </tr>
      </thead>
      
      <script>
			 function check_it9() {
				 if (document.getElementById('line_checkbox90').checked) {
                         document.getElementById('item_text90').style.background = '#F0F0F0';
						 document.getElementById('amount_text90').style.background = '#F0F0F0';
						 document.getElementById('item_text90').value = '.';
						 document.getElementById('amount_text90').value = '.';
						 document.getElementById('item_text90').disabled = true;
						 document.getElementById('amount_text90').disabled = true;
						 
                } else {
                        document.getElementById('item_text90').style.background = '#FFF';
						document.getElementById('amount_text90').style.background = '#FFF';
						document.getElementById('item_text90').value = 'Total Price Supply & Install';
						document.getElementById('amount_text90').value = '';
						document.getElementById('item_text90').disabled = false;
						document.getElementById('amount_text90').disabled = false;
                }
				}
		     </script>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox90" id="line_checkbox90" onMouseUp="check_it9()" <?php if ($_SESSION['line_checkbox90']==1) { ?> checked="checked" <?php } ?> /> </td>
        <td width="408" valign="top"></textarea><input name="item_text90" type="text" class="text300" id="item_text90" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox90').checked='checked';" value="<?php echo $_SESSION['item_text90']?>" maxlength="100"> </td>
        <td width="140" align="right" valign="top"><input  name="amount_text90" id="amount_text90" type="text" class="text100" value="<?php if ($_SESSION['amount_text90']!='') { echo $_SESSION['amount_text90']; } ?>" onKeyPress="return isNumberKey(event);" onKeyUp="this.value = this.value.replace (/(\...).*/, '$1');" onChange="document.getElementById('line_checkbox90').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num9" id="line_num9" value="1" > </td>
     
      </tr>
      <?php 
		$i=1;
		while ($i<$_SESSION['line_num9']) { ?>
      <tr>
        <td width="20" valign="top"><input type="checkbox" name="line_checkbox9<?php echo $i ?>" id="line_checkbox9<?php echo $i ?>"  <?php if ($_SESSION['line_checkbox9'.$i]==1) { ?> checked="checked" <?php } ?> onMouseUp="{
				 if (document.getElementById('line_checkbox9<?php echo $i ?>').checked) {
                         document.getElementById('item_text9<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('amount_text9<?php echo $i ?>').style.background = '#F0F0F0';
						 document.getElementById('item_text9<?php echo $i ?>').value = '.';
						 document.getElementById('amount_text9<?php echo $i ?>').value = '.';
						 document.getElementById('item_text9<?php echo $i ?>').disabled = true;
						 document.getElementById('amount_text9<?php echo $i ?>').disabled = true;
						 
                } else {
                        document.getElementById('item_text9<?php echo $i ?>').style.background = '#FFF';
						 document.getElementById('amount_text9<?php echo $i ?>').style.background = '#FFF';
                         document.getElementById('item_text9<?php echo $i ?>').value = '.';
						 document.getElementById('amount_tex9t<?php echo $i ?>').value = '';
						 document.getElementById('item_tex9t<?php echo $i ?>').disabled = false;
						 document.getElementById('amount_text9<?php echo $i ?>').disabled = false;
                }
				}
                "/></td>
        <td width="408" valign="top"><input name="item_text9<?php echo $i ?>" type="text" class="text300" id="item_text9<?php echo $i ?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');"  onChange="document.getElementById('line_checkbox9<?php echo $i ?>').checked='checked';" maxlength="100" value="<?php echo $_SESSION['item_text9'.$i]?>"></td>
        <td width="140" align="right" valign="top"><input  name="amount_text9<?php echo $i ?>" type="text" class="text100" id="amount_text9<?php echo $i ?>" value="<?php if ($_SESSION['amount_text9'.$i]!='') { echo $_SESSION['amount_text9'.$i]; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')" onChange="document.getElementById('line_checkbox9<?php echo $i ?>').checked='checked';" style="text-align:right"/>
          <input type="hidden" name="line_num9" id="line_num9" value="<?php echo $_SESSION['line_num9']?>"></td>
      </tr>
      <?php
		$i++;
		}
		?>
    </table>
<p>
  <input type="button" class="imagebutton" onClick="addRow9('dataTable9')" value="Add line" />
</p>    
 </div>
<?php
}
?>

<?php 

if ($_SESSION['project']=='Palisade fencing') { ?>
  		
<div class="wizard_frame" id="palisade_option2_div" ><br>
      <table id="dataTable5" width="590" border="1" style="border-collapse:collapse;">
        <tr>
          <td width="408" valign="middle"></textarea>Devils fork</td>
          <td width="140" align="right" valign="middle"><input  name="palisade_text1" id="palisade_text1" type="text" class="text100" value="<?php if ($_SESSION['palisade_text']!='') { echo $_SESSION['palisade_text']; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')"   style="text-align:right"/>
          </td>
          
        </tr>
</table>
</div> 



<div class="wizard_frame" id="palisade_gate_div" >  
      Gates:&nbsp;<br>
      <table id="dataTable5" width="590" border="1" style="border-collapse:collapse;">
        <tr>
          <td width="408" valign="middle"><input type="text" name="gate_text0" id="gate_text0" class="text400" value="<?php if ($_SESSION['gate_text0']!='') { echo $_SESSION['gate_text0']; } ?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
          <td width="140" align="right" valign="middle"><input  name="palisade_text6" id="palisade_text6" type="text" class="text100" value="<?php if ($_SESSION['palisade_text6']!='') { echo $_SESSION['palisade_text6']; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')"   style="text-align:right"/>
          </td>
          
        </tr>
      <tr>
        <td valign="middle"><input type="text" name="gate_text1" id="gate_text1" class="text400" value="<?php if ($_SESSION['gate_text1']!='') { echo $_SESSION['gate_text1']; } ?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td align="right" valign="middle"><input  name="palisade_text7" id="palisade_text7" type="text" class="text100" value="<?php if ($_SESSION['palisade_text7']!='') { echo $_SESSION['palisade_text7']; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')"   style="text-align:right"/></td>
      </tr>
      <tr>
        <td valign="middle"><input type="text" name="gate_text2" id="gate_text2" class="text400" value="<?php if ($_SESSION['gate_text2']!='') { echo $_SESSION['gate_text2']; } ?>" onKeyUp="this.value=this.value.replace(/[',&quot;]/g,'`');" ></td>
        <td align="right" valign="middle"><input  name="palisade_text8" id="palisade_text8" type="text" class="text100" value="<?php if ($_SESSION['palisade_text8']!='') { echo $_SESSION['palisade_text8']; } ?>" onKeyPress="return isNumberKey(event)" onKeyUp=" this.value = this.value.replace (/(\...).*/, '$1')"   style="text-align:right"/></td>
      </tr>
      </table>
</div> 
  
<?php
}
?>















<div class="wizard_frame">
<table width="675" height="50" align="center" id="table_button_bar">
              <tr>
                  <td width="117"><input type="button" name="lastprev_button" class="imagebutton" value="Prev" onClick="needToConfirm = false;MM_goToURL('parent','quoteWizbase.php?s=&p=1');return document.MM_returnValue; MM_showHideLayers('wait','','show');" tabindex="8"/></td>
                  <td width="115">&nbsp;</td>
                  <td width="99"><input name="p" type="hidden" id="p" value="2" />
                    <input name="s" type="hidden" id="s" value="2" />
                  </span></td>
                  <td width="125" align="right"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; cancel_confirmation(1, '../sales/sales_main.php?date=');" value="Cancel" tabindex="9"/></td>
                  <td width="110" align="right"><input type="submit" name="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; MM_showHideLayers('wait','','show');" tabindex="7"/></td>
        </tr>
    </table>
</div>
</form>
</div>
</div>
<!--form validation-->
  <script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("re_text","req","- subject text");
  
  <?php
  if ( ($_SESSION['project']=='Manase 358') OR ($_SESSION['project']=='Palisade fencing') OR ($_SESSION['project']=='Gate') OR ($_SESSION['project']=='Razor wire') OR ($_SESSION['project']=='Wall spikes') OR ($_SESSION['project']=='Farm fence') OR ($_SESSION['project']=='Free standing electric fence') OR ($_SESSION['project']=='Miscelaneous') ) { ?>
  frmvalidator.addValidation("option1_text","req","- option 1.");
  frmvalidator.addValidation("item_text20","req","- item 1 in option 1.");
  frmvalidator.addValidation("item_text30","req","- price details 1 in option 1.");
  frmvalidator.addValidation("amount_text30","req","- price 1 in option 1.");
   
  frmvalidator.addValidation("option2_text","req","- option 2.");
  frmvalidator.addValidation("item_text40","req","- item 1 in option 2.");
  frmvalidator.addValidation("item_text50","req","- price details 1 in option 2.");
  frmvalidator.addValidation("amount_text50","req","- price 1 in option 2.");
  
  <?php
  if (($_SESSION['project']=='Manase 358') OR ($_SESSION['project']=='Miscelaneous')) {
	  ?>
  frmvalidator.addValidation("option3_text","req","- option 3.");
  frmvalidator.addValidation("item_text_M40","req","- item 1 in option 3.");
  frmvalidator.addValidation("item_text_M50","req","- price details 1 in option 3.");
  frmvalidator.addValidation("amount_text_M50","req","- price 1 in option 3.");
  
  frmvalidator.addValidation("option4_text","req","- option 4.");
  frmvalidator.addValidation("item_text_K40","req","- item 1 in option 4.");
  frmvalidator.addValidation("item_text_K50","req","- price details 1 in option 4.");
  frmvalidator.addValidation("amount_text_K50","req","- price 1 in option 4.");
  
  frmvalidator.addValidation("option5_text","req","- option 5.");
  frmvalidator.addValidation("item_text_L40","req","- item 1 in option 5.");
  frmvalidator.addValidation("item_text_L50","req","- price details 1 in option 5.");
  frmvalidator.addValidation("amount_text_L50","req","- price 1 in option 5.");
  <?php }
  ?>	  
  
  
  <?php } ?>
  <?php
  if ( ($_SESSION['project']=='Gate motor')  OR ($_SESSION['project']=='Pool fence') ) { ?>
  frmvalidator.addValidation("item_text60","req","- item 1.");
  frmvalidator.addValidation("amount_text60","req","- price 1.");
  frmvalidator.addValidation("item_text70","req","- item 1 in extra's.");
  frmvalidator.addValidation("amount_text70","req","- price 1 in extra's.");
  <?php } ?>
  <?php
  if ($_SESSION['project']=='Diamond mesh') { ?>
  frmvalidator.addValidation("item_text90","req","- pricing text");
  frmvalidator.addValidation("amount_text90","req","- price.");
  <?php } ?>
  <?php
  if ($_SESSION['project']=='Palisade standard') { ?>
  frmvalidator.addValidation("height_radio_group","selone","- fence height.");
  frmvalidator.addValidation("item_text90","req","- pricing text");
  frmvalidator.addValidation("amount_text90","req","- price.");
  
  <?php } ?>
  
  </script>
</body>