<?php
/*
File Name:		Return_Sales_Child.php

Started on:		04/12/2010
Last Modified:	

Change History:
*/
ob_start('ob_gzhandler');
include("Functions_Sales.php");
include("function.inc.php");
error_reporting(E_ERROR);
set_time_limit(0);

if($_SESSION['dbName']==""){
	header("location:../logout5.php");
}

$conn = openConnection();
$iconn = openIConnection();

$user_account = $_SESSION['useraccount'];

$txtID = $_POST["txtID"]; if ($txtID == ""){$txtID = $_GET["txtID"];}
$txtSID = $_POST["txtSID"]; if ($txtSID == ""){$txtSID = $_GET["txtSID"];}
$txtRef = $_POST["txtRef"]; if ($txtRef == ""){$txtRef = $_GET["txtRef"];}
$txtSRef = $_POST["txtSRef"]; if ($txtSRef == ""){$txtSRef = $_GET["txtSRef"];}

$message = $_GET["message"]; if ($message == ""){$message = $_POST["message"];}
//$user_level_sales = $_POST['user_level_sales']; if ($user_level_sales == ""){$user_level_sales = $_GET["user_level_sales"];} 
$user_level_sales = $_SESSION['user_level_sales'];
$warehouseQuery1 = $_SESSION['warehouseQuery1'];	
$warehouseQuery2 = $_SESSION['warehouseQuery2'];
$projectQuery = $_SESSION['projectQuery'];	
$defaultProject = $_SESSION['defaultProject'];
$defaultWarehouse = $_SESSION['defaultWarehouse'];
$txtDriverName = $_POST['txtDriverName']; if ($txtDriverName == ""){$txtDriverName = $_GET["txtDriverName"];}
$txtVehicleNumber = $_POST['txtVehicleNumber']; if ($txtVehicleNumber == ""){$txtVehicleNumber = $_GET["txtVehicleNumber"];}

$txtDriverName = str_replace("@@-@@-@@", "&", $txtDriverName);
$txtVehicleNumber = str_replace("@@-@@-@@", "&", $txtVehicleNumber);
$txtRemark = str_replace("@@-@@-@@", "&", $txtRemark);
$txtIAddress = str_replace("@@-@@-@@", "&", $txtIAddress);
$txtDAddress = str_replace("@@-@@-@@", "&", $txtDAddress);
$lstClient = str_replace("@@-@@-@@", "&", $lstClient);
$lstCurrency = str_replace("@@-@@-@@", "&", $lstCurrency);
$lstCostCentre = str_replace("@@-@@-@@", "&", $lstCostCentre);
$lstProject = str_replace("@@-@@-@@", "&", $lstProject);
$lstSalesman = str_replace("@@-@@-@@", "&", $lstSalesman);
$lstWarehouse = str_replace("@@-@@-@@", "&", $lstWarehouse);

$act = $_POST['act']; if ($act == ""){$act = $_GET["act"];}
$prints = $_POST['prints']; if ($prints == ""){$prints = $_GET["prints"];}

//if ($_SESSION["This_Page"] == "419"){$message = $_SESSION["This_Message"]; $act = "";$_SESSION["This_Page"] = "";$_SESSION["This_Message"] = "";}

if ($act == "addSerial"){
	$query_count = 0;
	$query_flag = false;
	$v_purchase_serial = "";
	$txtSerial = $_POST["txtSerial"];	
	if ($txtSerial != ""){		
		//$txtSerial = strtoupper(trim($txtSerial));
		$txtSerial = trim($txtSerial);
		//$query = "SELECT purchasesserialno.Item_Code, purchasesserialno.Warehouse_Code, purchasesserialno.SerialNo_Used, purchasesserialno.PurchaseDt_ID, purchasesserialno.Serial_id, items.item_withserialno, purchasesserialno.Journal_Type FROM purchasesserialno, items WHERE items.item_code = purchasesserialno.item_code AND SerialNo_Code = '".$txtSerial."' AND purchasesserialno.SerialNo_Used = 0 AND items.item_withserialno = 1 AND (Journal_Type = 'AI' OR Journal_Type = 'TR' OR Journal_Type = 'PI') AND purchasesserialno.Warehouse_Code = '".$defaultWarehouse."' ORDER BY purchasesserialno.Journal_Type";		
		$query = "SELECT purchasesserialno.Item_Code, purchasesserialno.Warehouse_Code, purchasesserialno.SerialNo_Used, purchasesserialno.RealPurchaseDt_ID, purchasesserialno.Serial_id, items.item_withserialno, purchasesserialno.Journal_Type FROM purchasesserialno, items WHERE items.item_code = purchasesserialno.item_code AND SerialNo_Code = '".$txtSerial."' AND items.item_withserialno = 1 AND Journal_Type = 'DI' AND purchasesserialno.DeliveryDt_id IN (SELECT DeliveryDt.DeliveryDt_id FROM DeliveryDt, Deliveries WHERE Deliveries.Delivery_Id = DeliveryDt.Delivery_Id AND Deliveries.Delivery_Reference = '".$txtSRef."') ORDER BY purchasesserialno.Serial_Id ";		
		//echo "<br><br>".$query;
		
		$result = mysql_query($query, $conn);
		while ($cur = mysql_fetch_row($result)){
			$v_purchase_serial[0] = $cur[0];
			$v_purchase_serial[1] = $cur[1];
			$v_purchase_serial[2] = $cur[2];
			$v_purchase_serial[3] = $cur[3];
			$v_purchase_serial[4] = $cur[4];
			$v_purchase_serial[5] = $cur[5];
			$v_purchase_serial[6] = $cur[6];
			$query_flag = true;
		}
		
		if ($query_flag){
			$query = "SELECT deliverydt.deliverydt_id, IFNULL((deliverydt.deliverydt_quantity - deliverydt.DeliveryDt_QuantityReturn), deliverydt.deliverydt_quantity), deliverydt.item_code, deliverydt.warehouse_code, deliverydt.deliverydt_priceTTC, deliverydt.DeliveryDt_DiscountAmount, deliverydt.delivery_id, deliverydt.deliverydt_quantity FROM deliverydt, deliveries WHERE deliverydt.delivery_id = deliveries.delivery_id AND deliveries.delivery_reference = '".$txtSRef."' AND deliverydt.item_code = '".$v_purchase_serial[0]."' ";
			//echo "<br><br>".$query;
			$sub_result = mysql_query($query, $conn);
			while ($sub_cur = mysql_fetch_row($sub_result)){
				if ($query_count == 0){
					if ($sub_cur[1] > 0){						
						$txtSerialID = get_nextsequence("Serial_id" , "",$conn);
						$query = "SELECT deliverydt.deliverydt_id FROM deliverydt WHERE deliverydt.item_code = '".$v_purchase_serial[0]."' AND Journal_Type = 'DR' AND User_Account = '".$_SESSION['userSession']."' ";
						//echo "<br><br>".$query;
						$this_sub_result = selectData($conn, $query);
						$query = "INSERT INTO purchasesserialno (Serial_ID, Journal_Type, PurchaseDt_ID, Item_Code, SerialNo_Code, SerialNo_Used, DeliveryDt_ID, Warehouse_code, RealPurchaseDt_ID, Relatedserial_id) VALUES ('".$txtSerialID."', 'DR', '".$this_sub_result[0]."', '".$v_purchase_serial[0]."', '".$txtSerial."', '0', '".$this_sub_result[0]."', '".$v_purchase_serial[1]."', '".$v_purchase_serial[3]."', '".$v_purchase_serial[4]."')";
						//echo "<br><br>".$query;
						
						//updateIData($iconn, $query, false);
						if (updateIData($iconn, $query, false)){
							$query = "UPDATE deliverydt SET deliverydt_quantity = (deliverydt_quantity+1) WHERE deliverydt.item_code = '".$v_purchase_serial[0]."' AND Journal_Type = 'DR' AND User_Account = '".$_SESSION['userSession']."' ";
							//echo "<br><br>".$query;
							
							//updateIData($iconn, $query, true);
							if (updateIData($iconn, $query, true)){
								$query_count++;
								$query_flag = false;
								$message = "Serial Number ".$txtSerial." ADDED";	
								//$act = "";										
								//$_SESSION["This_Page"] = "419";
								//$_SESSION["This_Message"] = $message;										
								//echo "<br><br>".$message;
								break;
							}else{
								$message = "Serial Number ".$txtSerial." COULD NOT be ADDED";																		
							}									
							//echo "<br><br>".$message;
						}else{
							$message = "Serial Number ".$txtSerial." ALREADY Returned";	
						}
					}else{
						$message = "ALL Serial Numbers ALREADY added for this Item";	
					}
					//echo "<br><br>".$message; 
				}
			}
			/*
			if ($query_count == 0){
				$message = $message. "<br>Serial Number ".$txtSerial." ALREADY Used/ Serial No -Warehouse Mismatch";	
			}
			*/
			//echo "<br><br>".$message;
		}else{
			if ($query_count == 0 && strlen($message) < 10){
				if ($defaultWarehouse == ""){
					$message = "Default Warehouse NOT Found";
				}else{
					$message = "Serial Number ".$txtSerial." NOT Found in Default Warehouse ".$defaultWarehouse;
				}
			}
		}
	}else{
		$message = "Serial Number NOT entered";
	}	
}else if ($act == "deleteSerial"){
	$txtSerial = $_GET["txhSerial"];
	$txtDeliveryDtIt = $_GET["txtDeliveryDtIt"];	

	$query = "DELETE FROM purchasesserialno WHERE DeliveryDt_id = '".$txtDeliveryDtIt."' AND SerialNo_Code = '".$txtSerial."' AND purchasesserialno.Journal_Type = 'DR' ";
	//echo "<br><br>".$query;	
	if (updateIData($iconn, $query, false)){		
		$query = "UPDATE deliverydt SET deliverydt_quantity = (deliverydt_quantity-1) WHERE DeliveryDt_id = '".$txtDeliveryDtIt."' AND deliverydt_quantity > 0";
		//echo "<br><br>".$query;
		if (updateIData($iconn, $query, true)){
			$message = "Serial Number DELETED";
		}else{
			$message = "Serial Number COULD NOT be DELETED";	
		}		
	}else{
		$message = "Serial Number COULD NOT be DELETED";	
	}
}else if ($act == "addQtyNoSerial"){
	$txtDeliveryDtIt = $_GET["txtDeliveryDtIt"];	
	$txtQty = $_GET["txtQty"];

	$query = "SELECT item_code FROM deliverydt WHERE DeliveryDt_id = '".$txtDeliveryDtIt."'";
	$result = selectData($conn, $query);
	$query = "SELECT SUM(deliverydt_quantity) FROM deliverydt WHERE item_code = '".$result[0]."' AND Journal_Type = 'DI' ";
	$result1 = selectData($conn, $query);
	$query = "SELECT SUM(deliverydt_quantity) FROM deliverydt WHERE item_code = '".$result[0]."' AND Journal_Type = 'DR' ";
	$result2 = selectData($conn, $query);
	if ($result1[0] > $result2[0]){
		$query = "UPDATE deliverydt SET deliverydt_quantity = ".$txtQty." WHERE DeliveryDt_id = '".$txtDeliveryDtIt."'";
		//echo "<br><br>".$query;
		if (updateIData($iconn, $query, true)){		
			$message = "Qty Edited";
		}else{
			$message = "Qty COULD NOT be Edited";
		}
	}else{
		$message = "Qty CANNOT be Edited. Insufficient Balance Qty for this Item";
	}
}

print "<html><head><title>Return Waybill</title></head>";
if ($prints == "yes"){	
	print "<body onLoad='window.print();'>";
	print "<table width='100%' border='0' align='center'>".
				"<tr>".
					"<td colspan='4'><img src='img/imgheader1.jpg' width='300' height='110'></td>".
				"</tr>".
				"<tr>".
				  "<td bgcolor='#FFFFFF' colspan='4'><font size='4'><b>RETURN WAYBILL # ".$txtRef."</b></font></td>".
				"</tr>";
				$query = "SELECT delivery_id, delivery_date, delivery_remark, Client_Code, Currency_Code, Costcent_code, Project_Code, Salesman_code, Delivery_Marks, Delivery_ShippedVia, delivery_shippedto FROM deliveries WHERE delivery_id = ".$txtID;
				//echo $query;
				$result = selectData($conn, $query);
				$txtDate = displayDate(insertParadoxDate($result[1]));	
				$txtRemark = $result[2];
				$lstClient = $result[3];
				$lstCurrency = $result[4];
				$lstCostCentre = $result[5];
				$lstProject = $result[6];
				$lstSalesman = $result[7];
				$txtVehicleNumber = $result[8];
				$txtDriverName = $result[9];	
				$txtDAddress = $result[10];	
				/*
				print "<tr bgcolor='#F7F7F7'>";
					displayTextbox("txtRef", "Reference", $txtRef, "yes", "", "15%", "35%");
					displayTextbox("txtDate", "Date", $txtDate, $prints, "10", "15%", "35%");
				print "</tr>";
				*/
				print "<tr bgcolor='#F7F7F7'>";
					$query = "SELECT Ledger_number, Ledger_name FROM Clients ORDER BY Ledger_name";
					displayList("lstClient", "Client", $lstClient, "yes", $conn, $query, "", "15%", "35%");
					displayTextbox("txtDate", "Date", $txtDate, $prints, "10", "15%", "35%");
				print "</tr>";
				print "<tr bgcolor='#F7F7F7'>";
					displayTextbox("txtRemark", "Remark", $txtRemark, $prints, "", "15%", "35%");
					displayTextbox("txtDAddress", "Delivery Address", $txtDAddress, $prints, "", "15%", "35%");
				print "</tr>";
				print "<tr bgcolor='#F7F7F7'>";
					displayTextbox("txtVehicleNumber", "Vehicle No", $txtVehicleNumber, $prints, "", "15%", "35%");
					displayTextbox("txtDriverName", "Driver's Name", $txtDriverName, $prints, "", "15%", "35%");
				print "</tr>";				
	print "</table>";
}else{	
	print "<body onLoad='loadBody()'>";	
	print "<form name='frm1' method='post' action='Return_Sales_Child.php'>";	
	if ($message != ""){print "<center><font face='Verdana' size='2' color='#FF0000'><b>".$message."</b></font></center>";}	
	print "<input type='hidden' name='txtRef' value='".$txtRef."'>";
	print "<input type='hidden' name='txtSRef' value='".$txtSRef."'>";
	//print "<input type='hidden' name='message' value='".$message."'>";
}
	
	print "<table width='100%' border='0'> <input type='hidden' name='act' value='addSerial'>";
	print "<input type='hidden' name='txtID' value='".$txtID."'>";
	print "<input type='hidden' name='txtSID' value='".$txtSID."'>";
	print "<input type='hidden' name='user_level_sales' value='".$user_level_sales."'>";
	print "<input type='hidden' name='txtVehicleNumber' value='".$txtVehicleNumber."'>";
	print "<input type='hidden' name='txtDriverName' value='".$txtDriverName."'>";
	
	print "<table width='100%' border='1' cellspacing='-1' cellpadding='-1'>";
	if ($prints != "yes"){
		print "<tr><td colspan='6'><span class='style5'>Serial No:</span>&nbsp;&nbsp;<input name='txtSerial' onFocus='document.frm1.btSubmit.disabled=false'>&nbsp;&nbsp;<input type='submit' name='btSubmit' value='Submit Serial No' onSubmit='javascript:this.disabled=true'>&nbsp;&nbsp;<input type='button' value='Save Changes' onClick='javascript:changeLocation();window.close();'></td> </tr>";
	}
	if ($prints != "yes"){
		//print "<tr><td colspan='6'><span class='style5'>Item List: [Last Balance: ".$_SESSION["BALANCE_QTY"].", Current Balance: <span id='txtBalance'></span>]</span></td> </tr>";
		print "<tr><td colspan='5'><span class='style5'>Item List:</span></td> </tr>";
		print "<tr> <td bgcolor='#E0E0E0'><span class='style5'>Item Code - Desc</span></td> <td bgcolor='#E0E0E0'><span class='style5'>Warehouse</span></td>";
	}else{
		print "<tr><td colspan='3'><span class='style5'>Item List:</span></td> </tr>";
		print "<tr> <td bgcolor='#E0E0E0'><span class='style5'>Item Code - Desc</span></td> <td bgcolor='#E0E0E0'><span class='style5'>Warehouse</span></td>";
	}
	
	if ($prints != "yes"){
		//print "<td bgcolor='#E0E0E0'><span class='style5'>Order Qty</span></td>";
		print "<td bgcolor='#E0E0E0'><span class='style5'>Return Qty</span></td>";
	}else{
		print "<td bgcolor='#E0E0E0'><span class='style5'>Qty</span></td>";
	}
	/*
	if ($prints != "yes"){
		print "<td bgcolor='#E0E0E0'><span class='style5'><font color='#FF0000'>Bal SN</font></span></td> </tr>";
	}
	
	
	if ($prints != "yes"){
		print "<tr><td colspan='3' align='right'><span class='style5'>Total Bal SN:&nbsp;</span></td> <td><font color='#FF0000'><span class='style5' id='txSBalance'></span></font></td> </tr>";
	}
	*/
	if ($txtRef == ""){	
		$query = "SELECT deliverydt.deliverydt_id, deliverydt.delivery_id, deliverydt.item_code, deliverydt.deliverydt_quantity, deliverydt.warehouse_code, items.item_description, warehouse.warehouse_name, 0, items.item_withserialno FROM deliverydt, items, warehouse WHERE deliverydt.item_code = items.item_code AND deliverydt.warehouse_code = warehouse.warehouse_code AND User_Account = '".$_SESSION['userSession']."' AND Deliverydt.Journal_type = 'DR' ";
	}else{	
		$query = "SELECT deliverydt.deliverydt_id, deliverydt.delivery_id, deliverydt.item_code, deliverydt.deliverydt_quantity, deliverydt.warehouse_code, items.item_description, warehouse.warehouse_name, 0, items.item_withserialno FROM deliverydt, items, warehouse, deliveries WHERE deliverydt.delivery_id = deliveries.delivery_id AND deliverydt.item_code = items.item_code AND deliverydt.warehouse_code = warehouse.warehouse_code AND deliveries.delivery_reference = '".$txtRef."' AND Deliverydt.Journal_type = 'DR' ";
	}
	//echo "<br><br>".$query;
	$order_qty = 0;
	$tot_qty = 0;
	$tot_sno = 0;
	//$qty_no_serial = 0;
	$pageBreak = false;
	$page_sno = 0;	
	$result = mysql_query($query, $conn);
	while ($cur = mysql_fetch_row($result)){	
		if ($cur[3] == ""){$cur[3] = "0";}
		//$qty_no_serial = $cur[3];
		$t_sno = 0;		
		print "<tr> ";
			print "<td vAlign='top'><span class='style4'>".$cur[2]." - ".$cur[5]." <font size='1'><b>";		
				$sub_query = "SELECT SerialNo_Code FROM purchasesserialno WHERE deliverydt_id = '".$cur[0]."' AND Journal_type = 'DR'";
				//echo $sub_query;
				$sub_result = mysql_query($sub_query, $conn);
				while ($sub_cur = mysql_fetch_row($sub_result)){
					if ($t_sno == 0){
						print "<br><br>";
						if ($prints != "yes"){
							print "<input type='hidden' name='txhSerial".$tot_sno."' id='txhSerial".$tot_sno."' value='".$sub_cur[0]."'><a href='#' onClick='javascript:deleteSerial(".$tot_sno.", ".$cur[0].")' style='text-decoration:none' title='Click to Delete'><u>".$sub_cur[0]."</u></a>";
						}else{
							print $sub_cur[0];
						}
					}else{
						print ", ";
						if ($prints != "yes"){
							print "<input type='hidden' name='txhSerial".$tot_sno."' id='txhSerial".$tot_sno."' value='".$sub_cur[0]."'><a href='#' onClick='javascript:deleteSerial(".$tot_sno.", ".$cur[0].")' style='text-decoration:none' title='Click to Delete'><u>".$sub_cur[0]."</u></a>";
						}else{
							print $sub_cur[0];
						}
					}
					$t_sno++;
					$tot_sno++;			
				}		
			print "</b></font></span></td> <td vAlign='top'><span class='style4'>".$cur[6]."</span></td>";
			print "<td vAlign='top'><span class='style4'>";
			if ($cur[8] == 0 && $prints != "yes"){
				print "<a href='#' onClick='javascript:addQtyNoSerial(".$cur[0].", ".$cur[7].", ".$cur[3].")' style='text-decoration:none'><u>".addComma($cur[3])."</u></a>";
				//print "<a href='#' onClick='javascript:addQtyNoSerial(".$cur[0].", ".$cur[7].", ".$t_sno.")' style='text-decoration:none'><u>".addComma($t_sno)."</u></a>";
				$t_sno = $cur[3];
			}else{
				print addComma($cur[3]);
				//print addComma($t_sno);
				$t_sno = $cur[3];
			}		
			print "</td>";			
		print "</tr>";
		$tot_qty = $tot_qty + $cur[3];
		//$tot_qty = $tot_qty + $t_sno;
		$order_qty = $order_qty + $cur[7];
		$tot_sno = $tot_sno + $t_sno;
		$page_sno = $page_sno + $cur[3];		
	}	
	if ($prints != "yes"){
		print "<tr><td bgcolor='#E0E0E0'>&nbsp;</td> <td bgcolor='#E0E0E0'><span class='style5'>Totals</span></td>";		
	}else{
		print "<tr><td bgcolor='#E0E0E0'>&nbsp;</td> <td bgcolor='#E0E0E0'><span class='style5'>Totals</span></td>";
	}
	print "<td bgcolor='#E0E0E0'><span class='style5'>".addComma($tot_qty)."</span></td>";	
	print "</tr>";
	print "</form></table>";
	if ($prints == "yes"){
		//if ($page_break == false){
			print "<div id='footer' align='center'><br><br><br>";
				footer("W");
			print "</div>";
		//}
	}
?>
<script>
	var isSubmitted = false;
	function checkSubmit(){
		x = document.frm1;
		x.btSubmit.disabled = true;
		if (!isSubmitted){
			isSubmitted=true;
			x.submit();
		}else{
			return false;
		}
	}

	function getQtyAndWarehouse(){
		x = document.frm1;
		y = x.lstItem[x.lstItem.selectedIndex].text;		
		x.txtMaxQty.value = y.substring(y.indexOf('[')+1, y.indexOf(']'));
		x.lstWarehouse.value = y.substring(y.indexOf('(')+1, y.indexOf(')'));
		x.submit();
	}

	function changeLocation(){
		x = document.frm1;
		var loc = 'salesreturn_form.php?act=viewRecord&txtRef='+x.txtRef.value+'&txtSRef='+x.txtSRef.value+'&txtID='+x.txtID.value+'&txtSID='+x.txtSID.value+'&user_level_sales='+x.user_level_sales.value+'&txtVehicleNumber='+x.txtVehicleNumber.value.replace('&', '@@-@@-@@')+'&txtDriverName='+x.txtDriverName.value.replace('&', '@@-@@-@@');			
		if (!opener){
			win.creator.location = loc;
		}else{
			opener.location = loc;
		}
		//window.close();
	}

	function deleteSerial(a, b){
		x = document.frm1;
		y = document.getElementById("txhSerial"+a);
		z = y.value;
		if (confirm('Delete Serial No: '+z)){
			window.location.href =  'Return_Sales_Child.php?act=deleteSerial&txtDeliveryDtIt='+b+'&txtRef='+x.txtRef.value+'&txtSRef='+x.txtSRef.value+'&txtID='+x.txtID.value+'&txtSID='+x.txtSID.value+'&user_level_sales='+x.user_level_sales.value+'&txhSerial='+z;
		}
	}

	function addQtyNoSerial(a, b, c){
		x = document.frm1;
		var y = prompt("Please enter the Qty to be Returned", "");
		if (y*1 != y/1 || y <= 0){
			alert("Invalid Qty Value");
			return;
		//}else if (y > (b - c)){
		}else{			
			window.location.href =  'Return_Sales_Child.php?act=addQtyNoSerial&txtDeliveryDtIt='+a+'&txtQty='+y+'&txtRef='+x.txtRef.value+'&txtSRef='+x.txtSRef.value+'&txtID='+x.txtID.value+'&txtSID='+x.txtSID.value+'&user_level_sales='+x.user_level_sales.value;			
		}		
	}

	function loadBody(){
		document.frm1.txtSerial.focus();
		document.getElementById("txSBalance").innerHTML = document.getElementById("txhBalance").value;
	}
</script>
<style>input{background-color:'#FDFDFD';font-family:'Verdana';font-size:'10';}</style>
<style>
.style1 {color: #000000;font-weight: bold;font-family:"Verdana";}
.style4 {color: #999999;font-size: 12px;font-family:"Verdana";}
.style5 {color: #000000;font-weight: bold;font-family:"Verdana";font-size: 13px;}
.style12 {color: #666666; font-weight: bold; font-size: 12; }
.style13 {font-size: 12px;}
.style14 {color: #FF0000;font-weight: bold;}
#footer {position: relative; bottom: 0; left: 0; width: 600px; height: 50px;}
</style>
</center></body></html>
