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


include("config.inc.php");
include("function.inc.php");

require_once('SqlFormatter.php');
// usage  echo  SqlFormatter::format($query);
$connection = mysql_connect($config['dbServer'],$config['dbUser'],$config['dbPass']) or die("Could not connect to DB");
mysql_select_db($_SESSION['dbName'],$connection) or die("Could not find DB");



class tabs {
	var $name;
	var $tabs;
	var $active;
	var $current;
function start($name){
		if (empty($this->active)){ $this->active = $name; }
		$this->current = $name;
		ob_start();
	}
	function end(){
		$this->tabs[$this->current] = ob_get_contents();
		ob_end_clean();
	}
	function run(){
	
		if (count($this->tabs) > 0){
			echo "<DIV CLASS='tabs'>\n";
			$jsClear = "";
			foreach($this->tabs as $tabname => $tabcontent){
				$tabid = "tab_".$this->name."_$tabname";
				$contentid = "tabcontent_".$this->name."_$tabname";
				$jsClear .= "\tdocument.getElementById('$tabid').className = 'tab_inactive';\n";
				$jsClear .= "\tdocument.getElementById('$contentid').style.display = 'none';\n";
			}
			echo "<script type=\"text/javascript\">\n";
			echo "function tab_".$this->name."(id,fieldname){\n";
			
			
			
			echo "$jsClear";
			echo "\tdocument.getElementById('tab_".$this->name."_'+id).className = 'tab_active';\n";
			echo "\tdocument.getElementById('tabcontent_".$this->name."_'+id).style.display = '';\n";
			echo"	
				//alert(fieldname);
				if(fieldname!='' && fieldname!=undefined)
					
					document.useraccess[fieldname].focus();
				";
			echo "}\n";
			echo "</script>\n";
			foreach($this->tabs as $tabname => $tabcontent){
				$tabid = "tab_".$this->name."_$tabname";
				$contentid = "tabcontent_".$this->name."_$tabname";
				echo "<DIV CLASS='";
				if ($this->active == $tabname){ echo "tab_active"; }else{ echo "tab_inactive"; }
				echo "' ID='$tabid' ";
				echo "onClick=\"tab_".$this->name."('$tabname');\">$tabname</DIV>\n";
			}
			echo "<DIV STYLE='float: center; clear:both;'></DIV>\n";
			foreach($this->tabs as $tabname => $tabcontent){
				$contentid = "tabcontent_".$this->name."_$tabname";
				echo "<DIV ID = '$contentid' CLASS='tab_content' STYLE='display: ";
				if ($this->active == $tabname){ echo "block"; }else{ echo "none"; }
				echo ";'>$tabcontent</DIV>\n";
			}
			echo "</DIV>\n";
			echo "<DIV STYLE='clear: both;'></DIV>\n";
		}}
}	


if($user_code!='' && $mode=='editmode' && $actionmode!='refresh'){
	$query="Select User_account,User_name,FullName,Description,User_IsGroup,User_Group,DefaultComp,DefaultYear,";
	
	if ($config['EncryptPassMod'] == 1)
		$query=$query." ".$_SESSION['dbLabel'].".encryptpassword(User_Password) as  user_password2";
	else
		$query=$query."User_Password as user_password2";
		
	$query=$query." ,deliverystatus_level, user_deactivate, user_expirydate, user_deactivate_date, user_complex_password, user_expiry, user_first_login, user_engineer, user_engineerqc from ".$_SESSION['dbLabel'].".users where user_account='".$user_code."'";
	//echo$query;exit;
	$result=mysql_query($query, $connection);
	$row=mysql_fetch_row($result);
	
	$user_name=$row[1];
	$full_name=$row[2];
	$user_description=$row[3];
	$user_isgroup=$row[4];
	$user_group=$row[5];
	$user_password2=$row[8];
	$user_password_confirm=$row[8];
	$user_codePrv=$user_code;
	$default_company=$row[6];
	$default_year=$row[7];
	$deliverystatus_level=$row[9];
	$user_deactivate=$row[10];
    $user_expirydate=$row[11];
	$user_deactivate_date=$row[12];
	$user_complex_password=$row[13];
	$user_expiry=$row[14];
	$user_first_login = $row[15];
	$user_engineer = $row[16];
	$user_engineerqc = $row[17];
	$mode='edit';
	
	if($txtSchemaAssigned != ''){
		$query = "select language from ".$_SESSION['dbLabel'].".login where upper(login_schema)=upper('".$txtSchemaAssigned."') and user_account='".$user_code."' ";//echo $query;exit;
		$result = mysql_query($query,$connection);
		$row = mysql_fetch_row($result);
		$login_language = $row[0];
	}
}

if($Companies!='' && $actionmode!='error' && $checkduplicate!=1){
	
	$query="select ifnull(AllowLockedPeriod,0) as AllowLockedPeriod,date_Format(LockedPeriod,'%d-%m-%Y'),LockedPeriodDays,LockViewPeriod
	,date_Format(ViewPeriodDate,'%d-%m-%Y'),ViewLockDaily,ViewNumberOfDays,companyname,Diryear ".
		   " ,FI_Slippass as FI_Slippass,FU_Setup as FU_Setup,FI_StockTake as FI_StockTake,FI_StockTake_App as FI_StockTake_App,FI_StockTake_Mod as FI_StockTake_Mod,FI_StockTake_Del as FI_StockTake_Del  ".
		   " from ".$_SESSION['dbLabel'].".listuserdir ".
		   " where usercode='".$user_code."' and concat(CompanyName,Diryear)=upper('".$Companies."')";
	//echo$query;exit;
		   
	$result=mysql_query($query, $connection);
	$row=mysql_fetch_row($result);
	
	$AllowLockedPeriod=$row[0];
	$uptodate=$row[1];
	$onlyallowed=$row[2];
	$LockViewPeriod=$row[3];
	$viewperioddate=$row[4];
	$ViewLockDaily=$row[5];
	$viewnumberdays=$row[6];
	$companyname=$row[7];
	$companyyear=$row[8];
}

if($ledgerstkid!='' && $actionmode!='error' && $checkduplicate!=1){
	
	$query="select  ledgerstk.ledger_number,ledger_include,ledger_name ".
			" from ".$_SESSION['dbLabel'].".ledgerstk ".
			" left join ".$_SESSION['dbName'].".ledger on ".$_SESSION['dbName'].".ledger.ledger_number=ledgerstk.ledger_number ".
		   " where id='".$ledgerstkid."' ";
	//echo$query;
		   
	$result=mysql_query($query, $connection);
	$row=mysql_fetch_row($result);
	
	$ledger_code=$row[0];
	$LedgerIncluded=$row[1];
	$ledger_name=$row[2];
}

if($ledgerrepstkid!='' && $actionmode!='error' && $checkduplicate!=1){
	
	$query="select  ledgerrepstk.ledger_number,ledger_include,ledger_name ".
			" from ".$_SESSION['dbLabel'].".ledgerrepstk ".
			" left join ".$_SESSION['dbName'].".ledger on ".$_SESSION['dbName'].".ledger.ledger_number=ledgerrepstk.ledger_number ".
		   " where id='".$ledgerrepstkid."' ";
	//echo$query;
		   
	$result=mysql_query($query, $connection);
	$row=mysql_fetch_row($result);
	
	$ledgerrep_code=$row[0];
	$LedgerReportIncluded=$row[1];
	$ledgerrep_name=$row[2];
}

if($loginstkid!='' && $actionmode!='error' && $checkduplicate!=1){
	
	$query=" select loginstk.project_code,project_name,loginstk.costcent_code,costcent_name, ".
		   " loginstk.group_code,group_name,loginstk.subGroup_code,subGroup_name, ".
		   " loginstk.warehouse_code,warehouse.warehouse_name,Default_Project,Default_Costcenter,default_warehouse,ClientSalesmen,MasterProject,MasterCostCenter, ".
		   " loginstk.towarehouse_code, warehouse1.warehouse_name as towarehouse_name  ".
		   " from ".$_SESSION['dbLabel'].".loginstk ".
		   " left join ".$_SESSION['dbName'].".project on ".$_SESSION['dbName'].".project.project_code=loginstk.project_code ".
		   " left join ".$_SESSION['dbName'].".costcent on ".$_SESSION['dbName'].".costcent.costcent_code=loginstk.costcent_code ".
		   " left join ".$_SESSION['dbName'].".grouping on ".$_SESSION['dbName'].".grouping.group_code=loginstk.group_code ".
		   " left join ".$_SESSION['dbName'].".subgroup on ".$_SESSION['dbName'].".subgroup.subgroup_code=loginstk.subgroup_code ".
		   " left join ".$_SESSION['dbName'].".warehouse on ".$_SESSION['dbName'].".warehouse.warehouse_code=loginstk.warehouse_code ".
		   " left join ".$_SESSION['dbName'].".warehouse as warehouse1 on ".$_SESSION['dbName'].".warehouse1.warehouse_code=loginstk.towarehouse_code ".
		   " where loginstk.id='".$loginstkid."'";
	//echo$query;
		   
	$result=mysql_query($query, $connection);
	$row=mysql_fetch_row($result);
	
	$project_code=$row[0];
	$project_name=$row[1];
	$costcenter_code=$row[2];
	$costcenter_name=$row[3];
	$group_code=$row[4];
	$group_name=$row[5];
	$subgroup_code=$row[6];
	$subgroup_name=$row[7];
	$warehouse_code=$row[8];
	$warehouse_name=$row[9];
	$DefaultProject=$row[10];
	$DefaultCost=$row[11];
	$DefaultWarehouse=$row[12];
	$clientsalesmen=$row[13];
	$master_project=$row[14];
	$master_costcent=$row[15];
	$towarehouse_code=$row[16];
	$towarehouse_name=$row[17];
}


//Read From Setup Table							
$querysetup= " select grid_color1, grid_color2,maxperpage,base1,base2,DecimalBase,DecimalBase1,DecimalBase2,maxperpage from ".$_SESSION['dbName'].".setup ";
$resultsetup=mysql_query($querysetup,$connection) or die(mysql_error());
while($rowsetup=mysql_fetch_array($resultsetup)){
	extract($rowsetup);
}

//Read From module Table							
$querysetup= " select ifnull(module_project,0) as module_project,ifnull(module_projectdt,0) as module_projectdt,
					  ifnull(module_costcenter,0) as module_costcenter,ifnull(module_costcenterdt,0) as module_costcenterdt,
					  ifnull(module_referencebycostcenter, 0 ) as module_referencebycostcenter , 
					  ifnull(Module_Delivery,0) as Module_Delivery,ifnull(Module_production,0) as Module_production,
					  ifnull(Module_Pack,0) as Module_Pack,ifnull(Module_SalesJV,0) as Module_SalesJV1,  
					  ifnull(Module_PurchaseJv,0) as Module_PurchaseJv, ifnull(Module_fixedassets,0) as Module_fixedassets,
					  ifnull(Module_charging,0) as Module_charging,ifnull(Module_bill,0) as Module_bill,ifnull(Module_budget,0) as Module_budget,
					  ifnull(Module_Accounting ,0) as Module_Accounting,ifnull(Module_Inventory,0) as Module_Inventory,
					  ifnull(Module_ItemAging,0) as Module_ItemAging,ifnull(Module_ipaddress,0) as Module_ipaddress,
					  ifnull(Module_PaymentRqst,0) as Module_PaymentRqst,ifnull(Module_YearlyReport,0) as Module_YearlyReport,
					  ifnull(Module_TransferItem,0) as Module_TransferItem,ifnull(module_budgetinv,0) as module_budgetinv,
					  ifnull(Module_RMA,0) as Module_RMA, ifnull(Module_Grn,0) as Module_Grn, ifNull(Module_LimitProject,0) As Module_LimitProject, 
					  ifNull(Module_Purchase_Pending,0) As Module_Purchase_Pending,ifNull(module_locationGrn,0) As module_locationGrn,
					  ifNull(module_locationPurchases,0) As module_locationPurchases,ifNull(module_locationDelivery,0) As module_locationDelivery,
					  ifNull(module_locationadjustment,0) As module_locationadjustment,ifNull(module_locationTransfer,0) As module_locationTransfer,
					  ifNull(module_locationproduction,0) As module_locationproduction, ifnull(Module_BelongsToGroup,0) as Module_BelongsToGroup
					  from ".$_SESSION['dbName'].".module ";
$resultsetup=mysql_query($querysetup,$connection) or die(mysql_error());
while($rowsetup=mysql_fetch_array($resultsetup)){
	extract($rowsetup);
}





if($user_isgroup=='')
	$user_isgroup=0;

if($user_deactivate == '')
   $user_deactivate=0;

if($user_complex_password == '')
   $user_complex_password=0; 

IF($super_user_checked == '')
	$super_user_checked = 0;
if($mode==''){
$status='disabled';
$dis='disabled';

}
	
print <<<HERE

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
		<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<LINK REL="stylesheet" TYPE="text/css" MEDIA="all" HREF="css/tabs.css">

<link rel="stylesheet" type="text/css" media="all" href="css-v2/style.css">
<script type="text/javascript" language="javascript">

function PrintPreview()
{
    var user_code = document.useraccess.user_codePrv.value;
    window.open('Rep_UserAccess_Print.php?user_code='+user_code);
}

function PrintPreviewAll()
{
    window.open('Rep_UserAccess_PrintAll.php');
}

function PrintExcel()
{
    var user_code = document.useraccess.user_codePrv.value;
    document.location.href = 'Rep_UserAccess_Excel.php?user_code='+user_code+'&export=1';
}

function PrintExcelAll()
{
    document.location.href = 'Rep_UserAccess_ExcelAll.php?export=1';
}

function SubmitRecord(option) { 
	x=document.useraccess;
	var like_user= document.useraccess.like_user.value;
	if(x.user_code.value==''){
		alert('Unable to save : check missing field User Code in Access Page');
		tab_('Access','user_code');
	}
	else if(x.user_password2.value!=x.user_password_confirm.value){
		alert('Unable to save : Please confirm password !');
		//alert(x.user_password.value);
		//alert(x.user_password_confirm.value);
		tab_('Access','user_password_confirm');
	
	}
	
	
	else if(x.ledger_code.value=='' && option==3){
		alert('Unable to save : check missing field Ledger Code in Ledger Access ');
		tab_('Ledger Access','ledger_code');
	}
	else if(x.ledgerrep_code.value=='' && option==4){
		alert('Unable to save : check missing field Ledger Code in Report Ledger Access ');
		tab_('Report Ledger Access','ledgerrep_code');
	}

	else { 
		if(option==2)
			x.actionmode.value='SubmitLocked';
		if(option==3)
			x.actionmode.value='SubmitLedgerStk';	
			
		if(option==4)
			x.actionmode.value='SubmitLedgerRepStk';

		if(option==5)
			x.actionmode.value='SubmitLoginStk';		
		
		if(option==13)
			x.actionmode.value='SubmitProjectLimit';		
		
		x.checkduplicate.value=1;
		if(like_user!=''){
		x.action="Form_UserManager_actions.php?like_user="+like_user;
		}else{
		x.action="Form_UserManager_actions.php";
		}
		x.submit();

	}
}

function ClearPage(){
	 x = document.useraccess;
	if (confirm ( "Are you sure you want to Clear Page?"))
	{
		ClearForm();
		cleardetail();
		cleardetailledgerstk();
		cleardetailledgerrepstk(); 
		cleardetailloginstk();
		x.mode.value='';
		x.action='Form_UserManager.php';
		x.submit();
	}	
}

function ClearForm(){
    x = document.useraccess;
	x.user_code.value='';
	x.user_name.value='';
	x.user_codePrv.value='';
	x.full_name.value='';
	x.user_description.value='';
	x.user_isgroup.value='';
	if(x.super_user_checked)
		x.super_user_checked.value='';
	x.deliverystatus_level.value='';
	x.user_group.value='';
	x.user_password2.value='';
	x.user_password_confirm.value='';
	x.txtApplication.value='';
	x.txtSchemaAssigned.value='';
	
	x.FI_SalebelowLandedCost.value='';
	x.fastprinttransaction.value='';
	x.Posted.value='';
	
	x.ExporttoExcel.value='';
	x.FI_ShowCostPrice.value='';
	x.Unmodify_SellingPrice.value='';
	x.FA_LedgerAccess.value='';
	x.DailyInvoiceModification.value='';
	x.FixJVofSales.value='';
	x.ShowTransaction.value='';
	x.ModifyingOldTransactions.value='';
	x.ShowDepositJVBtn.value='';
	x.FA_ManagingRequiredCost.value='';
	x.AskBeforeCloseAcc.value='';
	x.Show_group.value='';
	x.RA_RequiredCostcenter.value='';
	x.Login_negativeQty.value='';
	x.AskBeforeCloseInv.value='';
	x.ModifyVAT.value='';
	x.RI_OpInvForNewYear.value='';
	x.Login_ModifyAllPending.value='';
	x.Login_modAdjIsInvoice.value='';
	x.FI_PricePerUnit.value='';
	x.Login_ShowLoggedUser.value='';
	x.Login_ModifyDiscount.value='';
	x.FI_RepRestrictProject.value='';
	x.FI_RepRestrictCostcenter.value='';
	x.FI_RepRestrictWarehouse.value='';
	x.login_maturitydate.value='';
	x.RMA_In.value='';
	x.RMA_Out.value='';
	x.Login_Decimal.value='';
	x.FI_PurchaseCategory1.value='';
	x.default_company.value='';
	x.default_year.value='';
	x.fullaccess.value='';
	x.approved_level1.value='';
	x.Perc_creditlimit.value='';
	x.belongtogrp.value = '';
	x.message.value = '';
}	
	
function chkIsGroup(){
	x = document.useraccess;

	if(x.chk_isgroup.checked)
		x.user_isgroup.value=1;
	else x.user_isgroup.value=0;	

}

function chkIsDeactivate() {
	x = document.useraccess;
    var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();

if(dd<10) {
    dd='0'+dd
} 

if(mm<10) {
    mm='0'+mm
} 

today = yyyy+'-'+mm+'-'+dd;
	if(x.chk_isdeactivate.checked)
	{
		x.user_deactivate.value=1;
		x.user_deactivate_date.value=today;
	}
	else 
	{
	x.user_deactivate.value=0;
	x.user_deactivate_date.value=null;
    }	
	

}
function chkIsExpiry(){
     x = document.useraccess;
	 if(x.chk_isexpiry.checked)
	{
		x.user_expiry.value=1;
	}
	else 
	{
	x.user_expiry.value=0;
    }	
	 
}
function chkIsLogin(){
    x = document.useraccess;
	if(x.chk_isfirstlogin.checked)
	{
		x.user_first_login.value=1;
	}
	else 
	{
	x.user_first_login.value=0;
    }
}
function chkIsComplex(){
   x = document.useraccess;

	if(x.chk_iscomplex.checked)
		x.user_complex_password.value=1;
	else x.user_complex_password.value=0;
}
function chkisSuperUser(){
	x = document.useraccess;

	if(x.chk_isSuperUser.checked)
		x.super_user_checked.value=1;
	else x.super_user_checked.value=0;
}
function AddUser() {

	document.useraccess.mode.value='insert';
	document.useraccess.action="Form_UserManager.php";
	document.useraccess.submit();
}
	
function SetUser(usercode){
	clearfields();
	document.useraccess.user_code.value=usercode;
	document.useraccess.message.value='';
	document.useraccess.actionmode.value='';
	
	document.useraccess.mode.value='editmode';
	document.useraccess.action="Form_UserManager.php?vTabFocus=Access";
	document.useraccess.submit();
}

function SetNextPage(startrange,perpage){
	document.useraccess.action='Form_UserManager.php?startrange='+startrange+'&perpage='+perpage;
	document.useraccess.submit();
}

function SetPrvPage(startrange,perpage){
	document.useraccess.action='Form_UserManager.php?startrange='+startrange+'&perpage='+perpage;
	document.useraccess.submit();
}

function SearchForSup(){
	x = document.useraccess;
	document.useraccess.action='Form_UserManager.php?vTabFocus=Access&startrange=0';
	document.useraccess.submit();
}

function ClearKeyword(){
	x = document.useraccess;
	x.txtKeyword.value='';
	document.useraccess.action='Form_UserManager.php?startrange=0';
	document.useraccess.submit();
}

function submitenter(myfield,e){
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;

if (keycode == 13)
   {
   	document.useraccess.action='Form_UserManager.php?startrange=0';
	document.useraccess.submit();
  
   return false;
   }
else
   return true;
}

function confirm_delete(Code) {
	var strReplaceAll = Code;
	var intIndexOfMatch = strReplaceAll.indexOf( "%20" );

while (intIndexOfMatch != -1){
strReplaceAll = strReplaceAll.replace( "%20", " " )
intIndexOfMatch = strReplaceAll.indexOf( "%20" );
}
	Code= strReplaceAll;
	window.event.returnValue = false;
				
	if (confirm ( "Are you sure you want to Delete this Record " + "?")) {
		window.event.returnValue = true;
		document.useraccess.mode.value='deleteuser';	
		
		document.useraccess.action='Form_UserManager_Actions.php?usercode='+Code;
		document.useraccess.submit();
	}
					
}

function set_limit(){

	perpage=document.useraccess.perpage.value;
	document.useraccess.action='Form_UserManager.php?perpage='+perpage+'&startrange=0';
	document.useraccess.submit();
}

function FilterBySchema(){
	
	clearfields();
	document.useraccess.action='Form_UserManager.php?vTabFocus=Company/Year';
	document.useraccess.actionmode.value='';
	document.useraccess.submit();
}

function FilterByUserSchema(){
	document.useraccess.action='Form_UserManager.php';
	document.useraccess.submit();
}


function FilterSchemas(){
	document.useraccess.action='Form_UserManager.php';
	
	document.useraccess.submit();
}

function SetApplication(){

	document.useraccess.action='Form_UserManager.php?vTabFocus=Company/Year';
	document.useraccess.actionmode.value='refresh';
	document.useraccess.submit();
}


function clearfields(){
	x=document.useraccess;
	
	x.Accounting1.value='';
	x.Inventory1.value='';
	x.FA_AccountType1.value='';
	x.FA_FixedAssets1.value='';
	x.FI_Area1.value='';
	x.FA_Banks1.value='';
	x.FA_Budget1.value='';
	x.FA_Charging1.value='';
	x.FA_Contra1.value='';
	x.FA_Costcenter1.value='';
	x.FA_CreditNote1.value='';
	x.FA_DebitNote1.value='';
	x.FA_Currency1.value='';
	x.RA_FinancialAccounts1.value='';
	x.FA_InvoicesAllocation1.value='';
	x.FA_Journal1.value='';
	x.FA_Ledger1.value='';
	x.FA_Payment1.value='';
	x.FA_PaymentRqst1.value='';
	x.FA_Project1.value='';
	x.FA_PurchaseJV1.value='';
	x.FA_Receipt1.value='';
	x.FA_ReportOptions1.value='';
	x.FA_SalesJV1.value='';
	x.FA_transactionpaymnetrqst1.value='';
	x.FI_Adjustment1.value='';
	x.FI_IN1.value='';
	x.FI_OUT1.value='';
	x.FI_Adjustment1.value='';
	x.FI_BudgetInv1.value='';
	x.FI_FBudgetInvAmendment1.value='';
	x.FI_FBudgetInvSetup1.value='';
	x.FI_Category1.value='';
	x.FI_CEPtable1.value='';
	x.FI_Charges1.value='';
	x.Clients1.value='';
	x.FI_ClientGrp1.value='';
	x.FI_RENTINVOICE.value = '';
	x.FI_RENTINVOICEApp.value='';
	x.FI_RENTINVOICEMod.value='';
	x.FI_RENTINVOICEDel.value='';
	x.FI_Delivery1.value='';
	x.FI_Grouping1.value='';
	x.FI_Items1.value='';
	x.FI_Production1.value='';
	x.FI_ProductionReq1.value='';
	x.FI_ProductionTemp1.value='';
	x.FI_Purchases1.value='';
	x.FI_Grn1.value='';
	x.FI_ReportOptions1.value='';
	x.FI_PurchaseOrder1.value='';
	x.FI_PurchaseRequest1.value='';
	x.FI_ReturnDelivery1.value='';
	x.FI_ReturnPurchase1.value='';
	x.FI_ReturnGrn1.value='';
	x.FI_ReturnRma1.value='';
	x.FI_ReturnSales1.value='';
	x.FI_RRmTransfer1.value='';
	x.FI_Rma1.value='';
	x.FI_Sales1.value='';
	x.FI_SalesOrder1.value='';
	x.FI_Salesmen1.value='';
	x.FI_Shipment1.value='';
	x.FI_stockeval1.value='';
	x.FI_SubGrouping1.value='';
	x.FI_Suppliers1.value='';
	x.FI_Suppliers1.value='';
	x.FI_SupplierGrp1.value='';
	x.FI_Transfer1.value='';
	x.FI_ITransfer1.value='';
	x.FI_Transportation1.value='';
	x.FI_Warehouse1.value='';
	x.FI_WayBill1.value='';
	x.FP_Attendance1.value='';
	x.payroll1.value='';
	x.FP_Bonus1.value='';
	x.FP_Dept1.value='';
	x.FP_Employee1.value='';
	x.FP_Generate1.value='';
	x.FP_Grades1.value='';
	x.FP_Insurance1.value='';
	x.FP_Loan1.value='';
	x.FP_Parameters1.value='';
	x.FP_Fpreemp1.value='';
	x.FP_Project1.value='';
	x.FP_ReportOptions1.value='';
	x.FP_Vacation1.value='';
	x.Access_UserManager1.value='';
	x.Access1.value='';
	x.RA_StatementofAccount1.value='';
	x.RA_Trialbalance1.value='';
	x.RA_StatementofProject1.value='';
	x.RA_StatmentofCostcenter1.value='';
	x.RA_Aging1.value='';
	x.RA_AgingOfSupplierInvoices1.value='';
	x.RA_AgingOfClientInvoices1.value='';
	x.RA_FinancialAccounts1.value='';
	x.FA_DailyReport1.value='';
	x.RA_StatisticsReport1.value='';
	x.RA_SalesJV1.value='';
	x.RA_TransactionJV1.value='';
	x.RA_PurchasesJV1.value='';
	x.RA_GeneralLedger1.value='';
	x.RI_ListTransaction1.value='';
	x.RI_Inventory1.value='';
	x.RI_SalesReports1.value='';
	x.FI_PorderPurRequest1.value='';
	x.RI_SatementofItems1.value='';
	x.RI_YearlySales1.value='';
	x.RI_TrackingRMA1.value='';
	x.RI_Aging1.value='';
	x.RI_InvComparisonReport1.value='';
	x.RI_TargetRebateReport1.value='';
	x.RI_PorderReport1.value='';
	x.RI_PurchaseReports1.value='';
	x.RI_SalesOrderReport1.value='';
	x.RI_GrnReports1.value='';
	x.Edatacom1.value='';
	x.RI_ListofProduction1.value='';
	x.FA_AccountTypeApp.value='';
	x.FA_AccountTypeMod.value='';
	x.FA_AccountTypeDel.value='';
	x.FA_FixedAssetsApp1.value='';
	x.FA_FixedAssetsMod.value='';
	x.FA_FixedAssetsDel.value='';
	x.FI_AreaApp.value='';
	x.FI_AreaMod.value='';
	x.FI_AreaDel.value='';
	x.FA_BankApp.value='';
	x.FA_BankMod.value='';
	x.FA_BankDel.value='';
	x.FA_BudgetApp.value='';
	x.FA_BudgetMod.value='';
	x.FA_BudgetDel.value='';
	x.FA_ChargingApp.value='';
	x.FA_ChargingMod.value='';
	x.FA_ChargingDel.value='';
	x.FA_ContraApp.value='';
	x.FA_ContraMod.value='';
	x.FA_ContraDel.value='';
	x.FA_CostcenterApp.value='';
	x.FA_CostcenterMod.value='';
	x.FA_CostcenterDel.value='';
	x.FA_CreditNoteApp.value='';
	x.FA_CreditNoteMod.value='';
	x.FA_CreditNoteDel.value='';
	x.FA_CurrencyApp.value='';
	x.FA_CurrencyMod.value='';
	x.FA_CurrencyDel.value='';
	x.FA_DebitNoteApp.value='';
	x.FA_DebitNoteMod.value='';
	x.FA_DebitNoteDel.value='';
	x.FA_JournalApp.value='';
	x.FA_JournalMod.value='';
	x.FA_JournalDel.value='';
	x.FA_LedgerApp.value='';
	x.FA_LedgerMod.value='';
	x.FA_LedgerDel.value='';
	x.FA_PaymentApp.value='';
	x.FA_PaymentMod.value='';
	x.FA_PaymentRqstApp.value='';
	x.FA_PurchaseOrderJVApp.value='';
	x.FA_PurchaseOrderJVMod.value='';
	x.FA_PurchaseOrderJVDel.value='';
	x.FA_PaymentRqstMod.value='';
	x.FA_PaymentRqstDel.value='';
	x.FA_ProjectApp.value='';
	x.FA_ProjectMod.value='';
	x.FA_ProjectDel.value='';
	x.FA_PurchaseJVApp.value='';
	x.FA_PurchaseJVMod.value='';
	x.FA_PurchaseJVDel.value='';
	x.FA_ReceiptApp.value='';
	x.FA_ReceiptMod.value='';
	x.FA_ReceiptDel.value='';
	x.FA_SalesJVApp.value='';
	x.FA_SalesJVMod.value='';
	x.FA_SalesJVDel.value='';
	x.FA_transactionpaymnetrqstApp.value='';
	x.FA_transactionpaymnetrqstMod.value='';
	x.FA_transactionpaymnetrqstDel.value='';
	x.FI_AdjustmentApp.value='';
	x.FI_AdjustmentMod.value='';
	x.FI_AdjustmentDel.value='';
	
	x.FI_INapp.value='';
	x.FI_INMod.value='';
	x.FI_INDel.value='';
	x.FI_Outapp.value='';
	x.FI_OUTMod.value='';
	x.FI_OUTDel.value='';
	
	
	x.FI_BudgetInvApp.value='';
	x.FI_BudgetInvMod.value='';
	x.FI_BudgetInvDel.value='';
	x.FI_BudgetInvAmendmentApp.value='';
	x.FI_BudgetInvAmendmentMod.value='';
	x.FI_BudgetInvAmendmentDel.value='';
	x.FI_BudgetInvSetupApp.value='';
	x.FI_BudgetInvSetupMod.value='';
	x.FI_BudgetInvSetupDel.value='';
	x.FI_CategoryApp.value='';
	x.FI_CategoryMod.value='';
	x.FI_CategoryDel.value='';
	x.FI_CEPtableApp.value='';
	x.FI_CEPtableMod.value='';
	x.FI_CEPtableDel.value='';
	x.FI_ChargesApp.value='';
	x.FI_ChargesMod.value='';
	x.FI_ChargesDel.value='';
	x.ClientApp.value='';
	x.ClientMod.value='';
	x.ClientDel.value='';
	x.FI_ClientGrpApp.value='';
	x.FI_ClientGrpMod.value='';
	x.FI_ClientGrpDel.value='';
	x.FI_DeliveryApp.value='';
	x.FI_DeliveryMod.value='';
	x.FI_DeliveryDel.value='';
	x.FI_GroupingApp.value='';
	x.FI_GroupingMod.value='';
	x.FI_GroupingDel.value='';
	x.FI_ItemsApp.value='';
	x.FI_ItemsMod.value='';
	x.FI_ItemsDel.value='';
	x.FI_ProductionMod.value='';
	x.FI_ProductionApp.value='';
	x.FI_ProductionDel.value='';
	x.FI_ProductionReqApp.value='';
	x.FI_ProductionReqMod.value='';
	x.FI_ProductionReqDel.value='';
	x.FI_ProductionTempApp.value='';
	x.FI_ProductionTempMod.value='';
	x.FI_ProductionTempDel.value='';
	x.FI_PurchasesApp.value='';
	x.FI_PurchasesMod.value='';
	x.FI_PurchasesDel.value='';
	x.FI_PurchaseOrderApp.value='';
	x.FI_PurchaseOrderMod.value='';
	x.FI_PurchaseOrderDel.value='';
	x.FI_PurchaseRequestApp.value='';
	x.FI_PurchaseRequestMod.value='';
	x.FI_PRequestConfirmed.value='';
	x.FI_PurchaseRequestDel.value='';
	x.FI_ReturnDeliveryApp.value='';
	x.FI_ReturnDeliveryMod.value='';
	x.FI_ReturnDeliveryDel.value='';
	x.FI_ReturnPurchaseApp.value='';
	x.FI_ReturnPurchaseMod.value='';
	x.FI_ReturnPurchaseDel.value='';
	x.FI_ReturnRmaApp.value='';
	x.FI_ReturnRmaMod.value='';
	x.FI_ReturnRmaDel.value='';
	x.FI_ReturnSalesApp.value='';
	x.FI_ReturnSalesMod.value='';
	x.FI_ReturnSalesDel.value='';
	x.FI_RmTransferApp.value='';
	x.FI_RmTransferMod.value='';
	x.FI_IRmTransferDel.value='';
	x.FI_RmaApp.value='';
	x.FI_RmaMod.value='';
	x.FI_RmaDel.value='';
	x.FI_SalesApp.value='';
	x.FI_SalesMod.value='';
	x.FI_SalesDel.value='';
	x.FI_SalesOrderApp.value='';
	x.FI_SalesOrderMod.value='';
	x.FI_SalesOrderDel.value='';
	x.FI_SalesmenApp.value='';
	x.FI_SalesmenMod.value='';
	x.FI_SalesmenDel.value='';
	x.FI_ShipmentMod.value='';
	x.FI_ShipmentDel.value='';
	x.FI_stockevalApp.value='';
	x.FI_stockevalMod.value='';
	x.FI_stockevalDel.value='';
	x.FI_SubGroupingApp.value='';
	x.FI_SubGroupingMod.value='';
	x.FI_SubGroupingDel.value='';
	x.FI_SuppliersApp.value='';
	x.FI_SuppliersMod.value='';
	x.FI_SuppliersDel.value='';
	x.FI_SupplierGrpApp.value='';
	x.FI_SupplierGrpMod.value='';
	x.FI_SupplierGrpDel.value='';
	x.FI_TransferApp.value='';
	x.FI_TransferMod.value='';
	x.FI_TransferDel.value='';
	x.FI_ITransferApp.value='';
	x.FI_ITransferMod.value='';
	x.FI_ITransferDel.value='';
	x.FI_TransportationApp.value='';
	x.FI_TransportationMod.value='';
	x.FI_TransportationDel.value='';
	x.FI_WarehouseApp.value='';
	x.FI_WarehouseMod.value='';
	x.FI_WarehouseDel.value='';
	x.FI_WayBillApp.value='';
	x.FI_WayBillMod.value='';
	x.FI_WayBillDel.value='';
	x.FP_AttendanceApp.value='';
	x.FP_AttendanceMod.value='';
	x.FP_AttendanceDel.value='';
	x.FP_BonusApp.value='';
	x.FP_BonusMod.value='';
	x.FP_BonusDel.value='';
	x.FP_DeptApp.value='';
	x.FP_DeptMod.value='';
	x.FP_DeptDel.value='';
	x.FP_EmployeeApp.value='';
	x.FP_EmployeeMod.value='';
	x.FP_EmployeeDel.value='';
	x.FP_GenerateApp.value='';
	x.FP_GenerateMod.value='';
	x.FP_GenerateDel.value='';
	x.FP_GradesApp.value='';
	x.FP_GradesMod.value='';
	x.FP_GradesDel.value='';
	x.FP_InsuranceApp.value='';
	x.FP_InsuranceMod.value='';
	x.FP_InsuranceDel.value='';
	x.FP_LoanApp.value='';
	x.FP_LoanMod.value='';
	x.FP_LoanDel.value='';
	x.FP_ParametersApp.value='';
	x.FP_ParametersMod.value='';
	x.FP_ParametersDel.value='';
	x.FP_preempApp.value='';
	x.FP_preempMod.value='';
	x.FP_preempDel.value='';
	x.FP_ProjectApp.value='';
	x.FP_ProjectMod.value='';
	x.FP_ProjectDel.value='';
	x.FP_VacationApp.value='';
	x.FP_VacationMod.value='';
	x.FP_VacationDel.value='';
	
	x.Access_UserManager1.value='';
	x.RA_StatementofAccount1.value='';
	x.RA_Trialbalance1.value='';
	x.RA_StatementofProject1.value='';
	x.RA_StatmentofCostcenter1.value='';
	x.RA_Aging1.value='';
	x.RA_AgingOfSupplierInvoices1.value='';
	x.RA_AgingOfClientInvoices1.value='';
	x.RA_FinancialAccounts1.value='';
	x.FA_DailyReport1.value='';
	x.RA_StatisticsReport1.value='';
	x.RA_SalesJV1.value='';
	x.RA_TransactionJV1.value='';
	x.RA_PurchasesJV1.value='';
	x.RA_GeneralLedger1.value='';
	x.RI_ListTransaction1.value='';
	x.RI_Inventory1.value='';
	x.RI_SalesReports1.value='';
	x.FI_PorderPurRequest1.value='';
	x.RI_SatementofItems1.value='';
	x.RI_YearlySales1.value='';
	x.RI_TrackingRMA1.value='';
	x.RI_Aging1.value='';
	x.RI_InvComparisonReport1.value='';
	x.RI_TargetRebateReport1.value='';
	x.RI_PorderReport1.value='';
	x.RI_PurchaseReports1.value='';
	x.RI_SalesOrderReport1.value='';
	x.RI_GrnReports1.value='';
	x.RI_ListofProduction1.value='';
	x.Edatacom1.value='';
	x.Accounting1.value='';
	x.Inventory1.value='';
	x.FA_ExceedBudgetLimit1.value='';
	x.FI_RVPostTransaction1.value='';
	x.FI_RepostAdjustment1.value='';
	x.ClientsCreditLimit1.value='';
	x.FI_DeliverySalesPrice1.value='';
	x.FI_SellingPriceInItems1.value='';
	x.FI_CostPriceInItems1.value='';
	x.FI_ItemSelling1.value='';
	x.FI_ItemSelling2.value='';
	x.FI_ItemSelling3.value='';
	x.FI_ItemSelling4.value='';
	x.FI_ItemSelling5.value='';
	x.FI_ItemSelling6.value='';
	//x.FI_PurchaseCategory1.value='';
	x.FI_PurchasesVATMod1.value='';
	x.FI_RepostPurchase1.value='';
	x.FI_PorderConfirmed1.value='';
	x.FI_DelConfirmedPO1.value='';
	x.FI_ModConfirmedPO1.value='';
	x.FI_RepostPorder1.value='';
	x.PRqst_Approvedby1.value='';
	
	x.FI_ReturnPurchasesVAT1.value='';
	x.FI_RepostPReturn1.value='';
	x.FI_RMAReturnSheetRMA1.value='';
	x.FI_RMAReturnSheetReturnRMA1.value='';
	x.FI_RSalesCheckSalesman1.value='';
	x.FI_ReturnSalesVAT1.value='';
	x.FI_ReturnSalesPrintPay1.value='';
	x.FI_RepostSReturn1.value='';
	x.FI_RMASheetPending1.value='';
	x.FI_RMASheetRMA1.value='';
	x.FI_SalesCheckSalesman1.value='';
	x.FI_SalesVAT1.value='';
	x.FI_SalesWithPrice1.value='';
	x.FI_SalesPrintReceipt1.value='';
	x.FI_RepostSales1.value='';
	x.FI_SOrderWithPrice1.value='';
	x.FI_SorderCanceledQty1.value='';
	x.FI_SorderConfirmed1.value='';
	x.login_disapprovesorder1.value='';
	x.Unmodify_SorderPrice1.value='';
	x.Login_AllowPrice1.value='';
	x.FI_SorderRejectUnconfirmed1.value='';
	x.FI_RepostSorder1.value='';
	x.FI_SorderPosQty1.value='';
	x.FI_SorderAllowConfirmCash.value='';
	x.FP_DetailGenerateDel1.value='';
	x.FP_AnalysisReport1.value='';
	x.FP_ArabicReports1.value='';
	x.RP_BankStatement1.value='';
	x.RP_CollectionofRepPay1.value='';
	x.RP_Employee1.value='';
	x.RP_Evaluation1.value='';
	x.FP_Overtime1.value='';
	x.RP_Query1.value='';
	x.RP_TimeSheet1.value='';
	x.Rep_Accounting1.value='';
	x.Rep_General1.value='';
	x.Rep_Inventory1.value='';
	x.RA_Amortization1.value='';
	x.RA_AvgDays1.value='';
	x.RA_TabSheetBudget1.value='';
	x.RA_CreditLimitRoster1.value='';
	x.RA_IncomeStmt1.value='';
	x.RA_IncomeStatBalanceSheet1.value='';
	x.FA_InterrestRate1.value='';
	x.RA_ListofCheckBills1.value='';
	x.RA_ListofDueInvoices1.value='';
	x.RA_ListofRecPayDebCred1.value='';
	x.RA_MonthDistBudgetForCast1.value='';
	x.RA_TabSheetPaymentRqst1.value='';
	x.RA_PrePayment1.value='';
	
	x.RA_Query1.value='';
	x.RA_AccountReconciliation1.value='';
	x.RA_SalesmanComm1.value='';
	x.RA_unmovedAcounts1.value='';
	x.RI_tabsheetbooksbalance1.value='';
	x.RI_BudgetInvTabSheet1.value='';
	x.RI_TabSheetexport1.value='';
	x.RI_InvByEntryNo1.value='';
	x.RI_InvoiceProject1.value='';
	x.RI_Invoices1.value='';
	x.RI_ItemsPerWarehouseSize1.value='';
	x.RI_ListOfDeliveryQty1.value='';
	x.RI_LISTOFDUEITEMS1.value='';
	x.RI_ListofItems1.value='';
	x.RI_listofPICharges1.value='';
	x.RI_ListofRMA1.value='';
	x.RI_Packing1.value='';
	x.RI_ProfitperItems1.value='';
	x.RI_Query1.value='';
	x.RI_SalesStatistics1.value='';
	x.RI_SoldbySalesman1.value='';
	x.RI_StkMovement1.value='';
	x.RI_TranspPage1.value='';
	x.RI_CltSaleR_ShowSalesman1.value='';
	x.FC_CashRegister1.value='';
	x.FC_CashRegisterApp.value='';
	x.FC_CashRegisterMod.value='';
	x.FC_CashRegisterMod.value='';
	x.FC_CashRegisterDel.value='';
	x.FC_AddClient1.value='';
	x.FC_CashRegisterCoupon1.value='';
	x.FC_CashRegisterCustomer1.value='';
	x.FC_CashRegisterCancel1.value='';
	x.FC_CashRegisterCheck1.value='';
	x.FC_ConfirmCustomer1.value='';
	x.FC_CashRegisterCredit1.value='';
	x.FC_CashRegisterDisc1.value='';
	x.Fc_forcingvendor1.value='';
	x.FC_PermToCancelCash1.value='';
	x.FC_PostingByCashRegister1.value='';
	x.Promotion1.value='';
	x.ReturnQuantity1.value='';
	x.FC_CashRegisterScroll1.value='';
	x.FC_CashRegScrollOk1.value='';
	x.FC_CashRegScrollPrint1.value='';
	x.FC_CashRegisterSearch1.value='';
	x.FC_ShowBtnOpenDrawer1.value='';
	x.Rc_cashFlow1.value='';
	x.Closing_RetailReport1.value='';
	x.RC_ForcingUserAccount1.value='';
	x.RC_ItemsSizes1.value='';
	x.RC_ListOfInvoices1.value='';
	x.RC_SalesmenCommission1.value='';
	x.RI_InvoiceProject1.value='';
	x.FI_Shipmentconfirmed1.value='';
	x.RA_TabSheetMonthlyAmount1.value='';
	x.RI_SaleR_ShowSalesman1.value='';
	x.RI_TabSheetrma1.value='';
	x.Costcenter1.value='';
	x.CostcenterApp.value='';
	x.CostcenterMod.value='';
	x.CostcenterDel.value='';
	x.Currency1.value='';
	x.CurrencyMod.value='';
	x.CurrencyDel.value='';
	x.CurrencyApp.value='';
	x.CurrencyMod.value='';
	x.CurrencyDel.value='';
	x.U_BackupFile1.value='';
	x.U_CashRegister1.value='';
	x.U_CloseCompany1.value='';
	x.U_CloseYear1.value='';
	x.FU_ClosingPeriod1.value='';
	x.U_DeleteCompany1.value='';
	x.U_DeleteYear1.value='';
	x.U_DistributingCostcenter1.value='';
	x.U_FillSetupFile1.value='';
	x.U_MergerDataBase1.value='';
	x.U_NewCompany1.value='';
	x.U_NewYear1.value='';
	x.U_Ports1.value='';
	x.U_PostToChecksAndBills1value='';
	x.U_PostToItems1.value='';
	x.U_PostToLedger1.value='';
	x.U_ReNumberJV1.value='';
	x.U_TransferAccount1.value='';
	x.U_TransferItem1.value='';
	
	x.RI_Adjustment.value = '';
	x.RI_Transfer.value = '';
	
	x.FA_FIPAddress1.value='';
	x.FA_IPAddressApp.value='';
	x.FA_IPAddressMod.value='';
	x.FA_IPAddressDel.value='';
	x.approved_level1.value='';
	x.Perc_creditlimit.value='';
	x.FI_PurchaseRequestItems1.value='';
	x.fi_pendingpurchaserequest1.value='';
	x.fi_pendingtransferrequest1.value='';
	x.fi_pendingadjustmentrequest1.value='';
}

function AddSchema(like_user){
	x=document.useraccess;

	if(x.txtSchema.value==''){
		alert('Please Choose Company/Year !');
		x.txtSchema.focus();
	
	}
	else if(like_user!=''){
	
		if (confirm ( "Are you sure you want it like a user "+like_user))
			{
				
				x.fullaccess.value=2;
				
				x.actionmode.value='AddSchema';
				x.action='Form_UserManager_Actions.php';
				x.submit();
			}
	}
	else if (confirm ( "Are you sure you want to Add This Company/Year?"))
		{
			if (confirm ( "Full Access?")){
				x.fullaccess.value=1;
			
			}
			
			x.actionmode.value='AddSchema';
			x.action='Form_UserManager_Actions.php';
			x.submit();
		}
	
}

function BorrowUser(){
	x=document.useraccess;

	if(x.UserList.value==''){
		alert('Unable to save : check missing field User in  Borrow  ');
		tab_('Borrow','UserList');
	}
	
	else{
		if (confirm ( "Are you sure you want to Borrow Access from this User ?"))
		{
			
			x.actionmode.value='BorrowFrom';
			x.action='Form_UserManager_Actions.php';
			x.submit();
		}
	}
}




function RemoveSchema(){
	x=document.useraccess;

	if(x.txtSchemaAssigned.value==''){
		alert('Please Choose Company/Year !');
		x.txtSchemaAssigned.focus();
	
	}
	else{
	if (confirm ( "Are you sure you want to Remove This Company/Year?"))
	{
	x.actionmode.value='RemoveSchema';
	x.action='Form_UserManager_Actions.php';
	x.submit();
	}
	}
}

function SetView(FormName,FieldName){
 
   
	
	if(document.useraccess['Chk_'+FormName+'View'].checked)
		document.useraccess[FieldName].value=1;
	else document.useraccess[FieldName].value=0; 	
}

function SetApp(FormName,FieldName){
	
	if(document.useraccess['Chk_'+FormName+'App'].checked)
		document.useraccess[FieldName].value=1;
	else document.useraccess[FieldName].value=0; 	
}

function SetMod(FormName,FieldName){
	
	if(document.useraccess['Chk_'+FormName+'Mod'].checked)
		document.useraccess[FieldName].value=1;
	else document.useraccess[FieldName].value=0; 	
}

function SetDel(FormName,FieldName){
	
	if(document.useraccess['Chk_'+FormName+'Del'].checked)
		document.useraccess[FieldName].value=1;
	else document.useraccess[FieldName].value=0; 	
}

function ChkAllowLockedPeriod(){
	x=document.useraccess;
	if(x.Chk_AllowLockedPeriod.checked)
		x.AllowLockedPeriod.value=1;
	else x.AllowLockedPeriod.value=0;	

}

function ChkLockViewPeriod(){
	x=document.useraccess;
	if(x.Chk_LockViewPeriod.checked)
		x.LockViewPeriod.value=1;
	else x.LockViewPeriod.value=0;	
}

function ChkViewLockDaily(){
	x=document.useraccess;
	if(x.Chk_ViewLockDaily.checked)
		x.ViewLockDaily.value=1;
	else x.ViewLockDaily.value=0;	
}

function ChkLedgerIncluded(){
	x=document.useraccess;
	if(x.Chk_LedgerIncluded.checked)
		x.LedgerIncluded.value=1;
	else x.LedgerIncluded.value=0;	
}

function ChkLedgerReportIncluded(){
	x=document.useraccess;
	if(x.Chk_LedgerReportIncluded.checked)
		x.LedgerReportIncluded.value=1;
	else x.LedgerReportIncluded.value=0;	
}

function ChkDefaultProject(){
	x=document.useraccess;
	if(x.Chk_DefaultProject.checked)
		x.DefaultProject.value=1;
	else x.DefaultProject.value=0;	
}

function ChkDefaultCost(){
	x=document.useraccess;
	if(x.Chk_DefaultCost.checked)
		x.DefaultCost.value=1;
	else x.DefaultCost.value=0;	
}

function ChkDefaultWarehouse(){
	x=document.useraccess;
	if(x.Chk_DefaultWarehouse.checked)
		x.DefaultWarehouse.value=1;
	else x.DefaultWarehouse.value=0;	
}


function UpdateDetail(CompanyYear){
	 x = document.useraccess;
	
	x.Companies.value=CompanyYear;
	x.actionmode.value='refresh';
	x.action='Form_UserManager.php?vTabFocus=Locked Period';
	x.submit();
}

function DeleteDetail(CompanyYear){

	if (confirm ( "Are you sure you want to Delete record?"))
	{
		
		document.useraccess.CompaniesYear.value = CompanyYear;
		document.useraccess.actionmode.value = 'deleteLocked';
		
		document.useraccess.action="Form_UserManager_Actions.php";
		document.useraccess.submit();
	}	
}

function DeleteDetailLedger(ledgerstkid){

	if (confirm ( "Are you sure you want to Delete record?"))
	{
		
		//document.useraccess.ledgerstkid.value = ledgerstkid;
		document.useraccess.actionmode.value = 'deleteLedgerstk';
		
		document.useraccess.action="Form_UserManager_Actions.php?ledgerstk_id="+ledgerstkid;
		document.useraccess.submit();
	}	
}

function DeleteProjectLimit(projectlimit_id){

	if (confirm ( "Are you sure you want to Delete record?"))
	{
		document.useraccess.actionmode.value = 'deleteProjectLimit';
		
		document.useraccess.action="Form_UserManager_Actions.php?projectlimitid="+projectlimit_id;
		document.useraccess.submit();
	}	
}

function DeleteDetailLedgerRep(ledgerstkrepid){

	if (confirm ( "Are you sure you want to Delete record?"))
	{
		
		
		document.useraccess.actionmode.value = 'deleteLedgerrepstk';
		
		document.useraccess.action="Form_UserManager_Actions.php?ledgerstkrep_id="+ledgerstkrepid;
		document.useraccess.submit();
	}	
}

function DeleteDetailLoginStk(loginstkid){

	if (confirm ( "Are you sure you want to Delete record?"))
	{
		
		
		document.useraccess.actionmode.value = 'deleteLoginStk';
		
		document.useraccess.action="Form_UserManager_Actions.php?loginstk_id="+loginstkid;
		document.useraccess.submit();
	}	
}


function UpdateDetailLedger(ledgerstkid){
	 x = document.useraccess;
	
	x.ledgerstkid.value=ledgerstkid;
	x.actionmode.value='refresh';
	x.action='Form_UserManager.php?vTabFocus=Ledger Access';
	x.submit();
}
function UpdateProjectLimit(projectcode){
	 x = document.useraccess;
	
	x.projectcode.value=projectcode;
	x.actionmode.value='refresh';
	x.action='Form_UserManager.php?vTabFocus=Project Limit';
	x.submit();
}

function UpdateDetailLedgerRep(ledgerrepstkid){
	 x = document.useraccess;
	
	x.ledgerrepstkid.value=ledgerrepstkid;
	x.actionmode.value='refresh';
	x.action='Form_UserManager.php?vTabFocus=Report Ledger Access';
	x.submit();
}

function UpdateDetailLoginStk(loginstkid){
	 x = document.useraccess;
	
	x.loginstkid.value=loginstkid;
	x.actionmode.value='refresh';
	x.action='Form_UserManager.php?vTabFocus=Item Access';
	x.submit();
}

function RefreshPage(){
 x = document.useraccess;
	
	
	x.actionmode.value='refresh';
	x.action='Form_UserManager.php?vTabFocus=Access';
	x.submit();



}

function cleardetail(){

	x = document.useraccess;
	x.AllowLockedPeriod.value='';
	x.uptodate.value='';
	x.onlyallowed.value='';
	x.LockViewPeriod.value='';
	x.viewperioddate.value='';
	x.ViewLockDaily.value='';
	x.viewnumberdays.value='';
	x.companyname.value='';
	x.companyyear.value='';
	x.actionmode.value='refresh';
	x.action='Form_UserManager.php?vTabFocus=Locked Period';
	x.submit();
}

function cleardetailledgerstk(){

	x = document.useraccess;
	x.ledger_code.value='';
	x.LedgerIncluded.value='';
	x.ledger_name.value='';
	x.ledgerstkid.value='';
	
	x.action='Form_UserManager.php?vTabFocus=Ledger Access';
	x.submit();
}

function cleardetailledgerrepstk(){

	x = document.useraccess;
	x.ledgerrep_code.value='';
	x.LedgerReportIncluded.value='';
	x.ledgerrep_name.value='';
	x.ledgerrepstkid.value='';
	
	x.action='Form_UserManager.php?vTabFocus=Report Ledger Access';
	x.submit();
}

function cleardetailloginstk(){

	x = document.useraccess;
	x.loginstkid.value='';
	
	x.project_code.value='';
	x.project_name.value='';
	x.costcenter_code.value='';
	x.costcenter_name.value='';
	x.group_code.value='';
	x.group_name.value='';
	x.subgroup_code.value='';
	x.subgroup_name.value='';
	x.warehouse_code.value='';
	x.warehouse_name.value='';
	x.DefaultProject.value='';
	x.DefaultCost.value='';
	x.DefaultWarehouse.value='';
	x.clientsalesmen.value='';
	x.master_project.value='';
	x.master_costcent.value='';
	
	x.action='Form_UserManager.php?vTabFocus=Item Access';
	x.submit();
}


function showlistledger(str){
	window.open('List_Agents_orderbycode.php?str='+str,'List_Salesmen','width=850,height=400,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}

function showlistprojects(str){

  window.open('List_Project_orderbycode.php?str='+str,'List_Project_orderbycode','width=850,height=400,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}

function showlistcostcenter(str){

  window.open('List_CostCenter_orderbycode.php?str='+str,'List_CostCenter','width=850,height=400,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}

function showlistgroups(str){

  window.open('List_Grouping.php?str='+str,'List_CostCenter','width=850,height=400,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}

function showlistsubgroups(str){

  window.open('List_SubGroup.php?str='+str,'List_CostCenter','width=850,height=400,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}

function showlistwarehouse(str){

  window.open('List_Warehouses.php?str='+str,'List_CostCenter','width=850,height=400,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}


function ChkMultiForms(option){
	if(document.useraccess['Chk_'+option].checked)
		document.useraccess[option].value=1;	
	else document.useraccess[option].value=0;	
}


function setNotification(index){
	var x=document.useraccess;
	var view_access = 'notification_view'+index;
	var notification_type = 'notification_type'+index;
	var vAccessCode=x.user_code.value;
	var notification_daysno = 'notification_daysno'+index;
	
	notification_type = document.getElementById(notification_type).value;
	notification_daysno = document.getElementById(notification_daysno).value;
	
	if(document.getElementById(view_access).checked){
		document.getElementById(view_access).value = 1;
		view_access = 1;
	} else {
		document.getElementById(view_access).value = 0;
		view_access = 0;
	}
	
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp5=new XMLHttpRequest();
		}
		else{//code for IE6, IE5
			xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
		}
		xmlhttp5.onreadystatechange=function()
		{
			if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
			{
				var data = xmlhttp5.responseText;
				
			}			
		}
		
		xmlhttp5.open("GET","Form_UserManager_Actions.php?mode=notify&actionmode=setNotification&user_code="+vAccessCode+"&notification_daysno="+notification_daysno
						+"&notification_type="+notification_type+"&view_access="+view_access);
		xmlhttp5.send();
}

function saveEmail(email_id){
	var x=document.useraccess;
	var user_code = x.user_code.value;
	
	if(x.user_emails.value != ''){
		if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp5=new XMLHttpRequest();
		}
		else{//code for IE6, IE5
			xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
		}
		xmlhttp5.onreadystatechange=function()
		{
			if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
			{
				var data = xmlhttp5.responseText.split('[BRK]');
				document.getElementById('submitEmail').innerHTML = '';
				document.getElementById('submitEmail').innerHTML = data[1];
				
				document.getElementById('showEmails').innerHTML = '';
				document.getElementById('showEmails').innerHTML = data[2];
			}			
		}
		
		xmlhttp5.open("GET","Form_UserManager_Actions.php?mode=Emails&actionmode=saveEmail&email_id="+email_id+"&user_code="+user_code+"&emailaddr="+encodeURIComponent(x.user_emails.value));
		xmlhttp5.send();
		
	}
}

function DeleteEmail (email_id){
	var x=document.useraccess;
	var user_code = x.user_code.value;
	
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp5=new XMLHttpRequest();
		}
		else{//code for IE6, IE5
			xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
		}
		xmlhttp5.onreadystatechange=function()
		{
			if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
			{
				var data = xmlhttp5.responseText.split('[BRK]');
				document.getElementById('submitEmail').innerHTML = '';
				document.getElementById('submitEmail').innerHTML = data[1];
				
				document.getElementById('showEmails').innerHTML = '';
				document.getElementById('showEmails').innerHTML = data[2];
			}			
		}
		
		xmlhttp5.open("GET","Form_UserManager_Actions.php?mode=Emails&actionmode=deleteEmail&email_id="+email_id+"&user_code="+user_code);
		xmlhttp5.send();
}

function editEmail(email_id){
	var x=document.useraccess;
	var user_code = x.user_code.value;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp5=new XMLHttpRequest();
		}
		else{//code for IE6, IE5
			xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
		}
		xmlhttp5.onreadystatechange=function()
		{
			if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
			{
				var data = xmlhttp5.responseText.split('[BRK]');
				document.getElementById('submitEmail').innerHTML = '';
				document.getElementById('submitEmail').innerHTML = data[1];
				
				document.getElementById('showEmails').innerHTML = '';
				document.getElementById('showEmails').innerHTML = data[2];
			}			
		}
		
		xmlhttp5.open("GET","Form_UserManager_Actions.php?mode=Emails&actionmode=editEmail&email_id="+email_id+"&user_code="+user_code);
		xmlhttp5.send();
}

function updateHOD(index, user_code){
	var hod_id = document.getElementById('hodid'+index).value;
	var hodusercode = document.getElementById('hodusercode'+index).value;
	
	if (hod_id == '')
		var vmode = 'insertHOD';
	else
		var vmode = 'updateHOD';
	if (hodusercode == ''){
		alert('Please Select a User!');
		document.getElementById('hodusercode'+index).focus();
		return 0;
	} else {
		if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp5=new XMLHttpRequest();
		}
		else{//code for IE6, IE5
			xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
		}
		xmlhttp5.onreadystatechange=function()
		{
			if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
			{
				var data = xmlhttp5.responseText.split('[BRK]');
				if (data[1] != '') alert(data[1]);
				document.getElementById('submitusers').innerHTML = '';
				document.getElementById('submitusers').innerHTML = data[2];
			}			
		}
		
		xmlhttp5.open("GET","Form_UserManager_Actions.php?mode="+vmode+"&hod_id="+hod_id+"&user_code="+user_code+"&hodusercode="+hodusercode);
		xmlhttp5.send();
	}
}
function deleteHOD(index, user_code){
	var hod_id = document.getElementById('hodid'+index).value;
	
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp5=new XMLHttpRequest();
	}
	else{//code for IE6, IE5
		xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
	}
	xmlhttp5.onreadystatechange=function()
	{
		if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
		{
			var data = xmlhttp5.responseText.split('[BRK]');
			if (data[1] != '') alert(data[1]);
			document.getElementById('submitusers').innerHTML = '';
			document.getElementById('submitusers').innerHTML = data[2];
		}			
	}
	
	xmlhttp5.open("GET","Form_UserManager_Actions.php?mode=deleteHOD&hod_id="+hod_id+"&user_code="+user_code);
	xmlhttp5.send();
}
function clearHOD(index, user_code){
	var hod_id = document.getElementById('hodid'+index).value;
	
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp5=new XMLHttpRequest();
	}
	else{//code for IE6, IE5
		xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
	}
	xmlhttp5.onreadystatechange=function()
	{
		if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
		{
			var data = xmlhttp5.responseText.split('[BRK]');
			if (data[1] != '') alert(data[1]);
			document.getElementById('submitusers').innerHTML = '';
			document.getElementById('submitusers').innerHTML = data[2];
		}			
	}
	
	xmlhttp5.open("GET","Form_UserManager_Actions.php?mode=clearHOD&hod_id="+hod_id+"&user_code="+user_code);
	xmlhttp5.send();
}
function showlistUsers(index){
	window.open('list_users.php?frm=3&index='+index,'mywindow','width=850,height=550,,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}
function chkUserEngineerQc(){
	if(document.getElementById('chk_user_engineerqc').checked){
		document.getElementById('user_engineerqc').value = 1;
	}
	else{
		document.getElementById('user_engineerqc').value = 0;
	}
}

function saveCostcentAccess(acc_type, id, user_code){
	
	if (acc_type == 1){
		var cpcode = document.getElementById('acostcent_code').value;
		var cpincluded = 0;
		if (document.getElementById('costcentincluded').checked)
			cpincluded = 1;
		var vmode = 'saveCostcentAcc';
	}
	else if (acc_type == 2){
		var cpcode = document.getElementById('aproject_code').value;
		var cpincluded = 0;
		if (document.getElementById('projectincluded').checked)
			cpincluded = 1;
		var vmode = 'saveProjectAcc';
	}
	
	if (cpcode == ''){
		if (acc_type == 1)
			alert('Please Select a Costcenter!');
		else if (acc_type == 2)
			alert('Please Select a Project!');
		return 0;
	} else {
		if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp5=new XMLHttpRequest();
		}
		else{//code for IE6, IE5
			xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
		}
		xmlhttp5.onreadystatechange=function()
		{
			if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
			{
				var data = xmlhttp5.responseText.split('[BRK]');
				if (data[1] != '') alert(data[1]);
				if (acc_type == 1){
					document.getElementById('costcentAcc').innerHTML = '';
					document.getElementById('costcentAcc').innerHTML = data[2];
				} else if (acc_type == 2){
					document.getElementById('projectAcc').innerHTML = '';
					document.getElementById('projectAcc').innerHTML = data[2];
				}
			}			
		}
		
		xmlhttp5.open("GET","Form_UserManager_Actions.php?mode="+vmode+"&cAccid="+id+"&user_code="+user_code+"&cpcode="+cpcode+"&cpincluded="+cpincluded);
		xmlhttp5.send();
	}
}

function editCostcentAcc(acc_type, id, user_code){
	if (acc_type == 1)
		var vmode = 'editCostcentAcc';
	else if (acc_type == 2)
		var vmode = 'editProjectAcc';
	
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp5=new XMLHttpRequest();
		}
		else{//code for IE6, IE5
			xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
		}
		xmlhttp5.onreadystatechange=function()
		{
			if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
			{
				var data = xmlhttp5.responseText.split('[BRK]');
				if (data[1] != '') alert(data[1]);
				if (acc_type == 1) {
					document.getElementById('costcentAcc').innerHTML = '';
					document.getElementById('costcentAcc').innerHTML = data[2];
				} else if (acc_type == 2){
					document.getElementById('projectAcc').innerHTML = '';
					document.getElementById('projectAcc').innerHTML = data[2];
				}
			}			
		}
		
		xmlhttp5.open("GET","Form_UserManager_Actions.php?mode="+vmode+"&cAccid="+id+"&user_code="+user_code);
		xmlhttp5.send();
}

function deleteCostcentAcc(acc_type,id, user_code){
	if (acc_type == 1)
		var vmode = 'deleteCostcentAcc';
	else if (acc_type == 2)
		var vmode = 'deleteProjectAcc';
	
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp5=new XMLHttpRequest();
		}
		else{//code for IE6, IE5
			xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
		}
		xmlhttp5.onreadystatechange=function()
		{
			if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
			{
				var data = xmlhttp5.responseText.split('[BRK]');
				if (data[1] != '') alert(data[1]);
				if (acc_type == 1) {
					document.getElementById('costcentAcc').innerHTML = '';
					document.getElementById('costcentAcc').innerHTML = data[2];
				} else if (acc_type == 2){
					document.getElementById('projectAcc').innerHTML = '';
					document.getElementById('projectAcc').innerHTML = data[2];
				}
			}			
		}
		
		xmlhttp5.open("GET","Form_UserManager_Actions.php?mode="+vmode+"&cAccid="+id+"&user_code="+user_code);
		xmlhttp5.send();
}

function clearCostcentAccess(acc_type, user_code){
	if (acc_type == 1)
		var vmode = 'clearCostcentAcc';
	else if (acc_type == 2)
		var vmode = 'clearProjectAcc';
	
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp5=new XMLHttpRequest();
		}
		else{//code for IE6, IE5
			xmlhttp5=new ActiveXObject("Microsoft.xmlhttp");
		}
		xmlhttp5.onreadystatechange=function()
		{
			if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
			{
				var data = xmlhttp5.responseText.split('[BRK]');
				if (data[1] != '') alert(data[1]);
				if (acc_type == 1) {
					document.getElementById('costcentAcc').innerHTML = '';
					document.getElementById('costcentAcc').innerHTML = data[2];
				} else if (acc_type == 2){
					document.getElementById('projectAcc').innerHTML = '';
					document.getElementById('projectAcc').innerHTML = data[2];
				}
			}			
		}
		
		xmlhttp5.open("GET","Form_UserManager_Actions.php?mode="+vmode+"&user_code="+user_code);
		xmlhttp5.send();
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>USERACCESS</title>

<style type="text/css">

body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
}
body {
	margin-top: 2px;
	margin-left: 1px;
}
a:link {
	text-decoration: none;
	color: #0000FF;
}
a:visited {
	text-decoration: none;
	color: #0000FF;
}
a:hover {
	text-decoration: none;
	color: #0000FF;
}
a:active {
	text-decoration: none;
	color: #0000FF;
}

.style12 {
	font-size: 9px;
	color: #999999;
	font-weight: bold;
}
.style15 {color: #5151FF; font-size: 10px;}
.style16 {
	font-size: 16px;
	color: #FF0000;
	font-weight: bold;
	font-family: "Times New Roman", Times, serif;
}
.style17 {font-size: 9px}
.style25 {color: #999999; font-weight: bold; font-size: 10px; }
.style26 {color: #FF0000}
.style27 {color: #999999 ;font-size: 10px;}
.style28 {color: #FFFFFF ;font-size: 10px;}

</style>

<link type="text/css" rel="stylesheet" href="dhtmlgoodies_calendar.css?random=20051112" media="screen"></LINK>
<SCRIPT type="text/javascript" src="dhtmlgoodies_calendar.js?random=20060118"></script>

</head>
<body >
<form name='useraccess' method='post'>
<input type='hidden' name='mode' value='$mode'>
<input type=hidden name='actionmode' value='$actionmode'>
<input type=hidden name='message' value='$message'>
<input type='hidden' name='checkduplicate' value='$checkduplicate'>
<input type='hidden' name='user_codePrv' value='$user_codePrv'>
<input type='hidden' name='Companies' value='$Companies'>
<input type='hidden' name='companyname' value='$companyname'>
<input type='hidden' name='companyyear' value='$companyyear'>
<input type='hidden' name='CompaniesYear' value='$CompaniesYear'>
<input type='hidden' name='ledgerstkid' value='$ledgerstkid'>
<input type='hidden' name='projectcode' value='$projectcode'>
<input type='hidden' name='ledgerrepstkid' value='$ledgerrepstkid'>
<input type='hidden' name='loginstkid' value='$loginstkid'>
<input type='hidden' name='fullaccess' value='$fullaccess'>

HERE;

//$style= "style=' background-color:#4069A7; color:#FFFFFF;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;'";

echo"<table cellpadding='0' cellspacing='0' border='0'  align='center' class='layout-width'>";
include_once("header.php");
echo" <tr><td  valign='top'>";

include_once("sidemenu.php");
echo"  </td></tr>";


echo" <tr style='height:26px;'>
		<td  valign='top' id='content-top'>
			<table border='0' cellpadding='0' cellspacing='0' style='table-layout:fixed; height:26px;' class='layout-width'>
			<tr style='height:26px;'>
				<td style='width:38px; height:26px;'>&nbsp;</td>
				<td valign='middle' style='width:300px; height:26px;'><span class='title'>USER ACCESS</span></td>
				<td class='message' valign='middle' style='height:26px;'>".htmlspecialchars($message, ENT_QUOTES)."</td>
			</tr></table>
		</td>
	  </tr>";


echo"<tr>
		<td  height='34'  valign='top' id='content-top2'>
			<table border='0' cellpadding='0' cellspacing='0' class='layout-width'>
			<tr>
				<td width='38'  height='34'>&nbsp;</td>
				<td valign='middle' height='34' width='720px'>";
echo"		<button type='button' id='btnClear' name='btnClear' onclick='ClearPage(); return false;' title='Clear Page'><span><span>Clear Page</span></span></button>";


echo"		<button type='button' id='btnPost' name='btnPost' onclick='SubmitRecord(); return false;' title='Save Changes' $Insmode><span><span>Save</span></span></button>";
echo"		<button type='button' id='btnPrt' name='btnPrt' onclick='";
if($user_codePrv!=''){
echo "PrintPreview(); ";
}
echo "return false;' title='Print' ><span><span>Print</span></span></button>";

echo"		<button type='button' id='btnPrt' name='btnPrt' onclick='";
if($user_codePrv!=''){
echo "PrintExcel(); ";
}
echo "return false;' title='Print' ><span><span>Export to Excel</span></span></button>";
echo"		<button type='button' id='btnPrt' name='btnPrt' onclick='";
echo "PrintPreviewAll(); ";
echo "return false;' title='Print' ><span><span>Print All</span></span></button>";

echo"		<button type='button' id='btnPrt' name='btnPrt' onclick='";
echo "PrintExcelAll(); ";
echo "return false;' title='Print' ><span><span>Export to Excel All</span></span></button>";

				
echo"   </td><td align='left' width='250px'>
	
	<input type='text' name='txtKeyword' value='$txtKeyword' style='width:100px;' onKeyPress='return submitenter(this,event)'>&nbsp;
	<button type='button' id='btnSearch' name='btnSearch' onclick='SearchForSup(); return false;' title='Search Supplier'><span><span>Find</span></span></button>
	<button type='button' id='btnClear' name='btnClear' onclick='ClearKeyword(); return false;' title='Clear Keyword'><span><span>Clear</span></span></button>
	
	</td><td align='left'><span class='style1'><b>Results/page</b></span>
	 <span class='style1'><select name='perpage' id='perpage' value='$perpage' onchange=set_limit();>";
	 
	if ($startrange=='')
		$startrange = 0;
	if ($perpage=='')
		$perpage = 20;
		
	for($i=10;$i<=$maxperpage;$i=$i+10){
		if($i==$perpage)
			echo "<option value='$i'  selected>$i</option>";
		else echo "<option value='$i'>$i</option>";
		
	} 
	 echo"</td></tr>";
echo"	</table>";
echo"</td></tr>";
echo"<tr><td id='content-body'>";

$tabs = new tabs("useraccess");	

// Richard
$tabs->start("Access");

echo"<table border='0'  align='center' valign='top' width=100% class='tablecontent'>
	<col width=65%>";

echo"   <tr bgcolor='#F7F7F7' height='25' ><td valign='top'>";	 

	  
echo" <table border='0' style='table-layout:fixed' align='left' valign='top'><col width=120>";
echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>User Code <span class='style26'>*</span></span>";
echo"<td><input type='text' name='user_code'  value='".htmlspecialchars($user_code, ENT_QUOTES)."' style='font-size:12px; width:150px; height:18px;'  maxlength='10' /></td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>User Name <span class='style26'>*</span></span>";
echo"<td><input type='text' name='user_name'  value='".htmlspecialchars($user_name, ENT_QUOTES)."' style='font-size:12px; width:350px; height:18px;'    maxlength='30' /></td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Full Name </span>";
echo"<td><input type='text' name='full_name'  value='".htmlspecialchars($full_name, ENT_QUOTES)."' style='font-size:12px; width:350px; height:18px;'   maxlength='30' /></td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Position</span>";
echo"<td><input type='text' name='user_description'  value='".htmlspecialchars($user_description, ENT_QUOTES)."' style='font-size:12px; width:350px; height:18px;'    maxlength='50' /></td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Password <span class='style26'>*</span></span>";
echo"<td><input type='password' name='user_password2' id='user_password' maxlength='15' value='".htmlspecialchars($user_password2, ENT_QUOTES)."'  style='font-size:12px; width:150px; height:18px;'    maxlength='15' /></td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Confirm Password<span class='style26'>*</span></span>";
echo"<td><input type='password' name='user_password_confirm' maxlength='15'  value='".htmlspecialchars($user_password_confirm, ENT_QUOTES)."' style='font-size:12px; width:150px; height:18px;'   maxlength='15' /></td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Complex Password<span class='style26'></span></span>";
echo"<td><input type='checkbox' name='chk_iscomplex'";
if($user_complex_password == 1)
echo "checked";
echo" onclick='chkIsComplex();' /><input type='hidden' name='user_complex_password' value='$user_complex_password'></td></tr>";

$query = "select Lang_Code, ifnull(Lang_Default,0) from ".$_SESSION['dbLabel'].".system_language order by Lang_Code";
$result = mysql_query($query,$connection);
echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Language<span class='style26'></span></span>";
echo"<td><select name='login_language' id='login_language' style='width:150px;'>";
while($row = mysql_fetch_row($result)){
	echo "<option value='$row[0]' ";
	if(($login_language == $row[0]) || ($login_language == '' && $row[1]==1)) echo "selected";
	echo " >$row[0]</option>";
}
echo "</select></td></tr>";
echo "<tr>
<td><span class='style1'>User Type</span></td>
<td><select name='user_engineer' id='user_engineer' style='width: 150px'>
<option value=''></option>
<option value='0' "; if($user_engineer == 0 && $user_engineer != '') echo "selected"; echo">Admin</option>
<option value='1' "; if($user_engineer == 1) echo "selected"; echo">Engineer</option>
<option value='2' "; if($user_engineer == 2) echo "selected"; echo">Operator</option>
<option value='3' "; if($user_engineer == 3) echo "selected"; echo">Quality Control</option>
</select></td>
</tr>";
if($user_engineerqc == 1){
	$checked = "checked";
}
else{
	$checked = "";
}
echo "<tr>
<td><span class='style1'>Engineer & Q.C.</span></td>
<td><input type='checkbox' id='chk_user_engineerqc' name='chk_user_engineerqc' onclick=\"chkUserEngineerQc()\" $checked /><input type='hidden' name='user_engineerqc' id='user_engineerqc' value='$user_engineerqc' /></td>
</tr>";
$query_groups="select user_account from ".$_SESSION['dbLabel'].".users where User_IsGroup=1";
$result_groups=mysql_query($query_groups,$connection);

echo "</table></td>";
echo" <td><table border='0' style='table-layout:fixed' align='left' valign='top'><col width=120>";
echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Group </span>";
echo"<td><select name='user_group'  style='font-size:12px; width:150px; height:18px;'  $dis  />";

echo"<option>&nbsp;</option>";
		while ($row_group=mysql_fetch_row($result_groups)){
			if($row_group[0]==$user_group)
				echo "<option value='$row_group[0]'  selected>$row_group[0]</option>";
			else echo "<option value='$row_group[0]'>$row_group[0]</option>";
		}
	echo"</select>";


echo"</td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Default Company</span>";

$query="select distinct CompanyName from ".$_SESSION['dbLabel'].".directories ";
$result_companies=mysql_query($query,$connection);
	
echo"<td><select name='default_company'  style='font-size:12px; width:150px; height:18px;'  $dis  onchange='RefreshPage();'/>";

echo"<option>&nbsp;</option>";
		while ($row_com=mysql_fetch_row($result_companies)){
			if($row_com[0]==$default_company)
				echo "<option value='$row_com[0]'  selected>$row_com[0]</option>";
			else echo "<option value='$row_com[0]'>$row_com[0]</option>";
		}
	echo"</select>";
echo"</td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Default Year</span>";

$query="select DirYear from ".$_SESSION['dbLabel'].".directories  where upper(CompanyName)=Upper('".$default_company."')";
$result_year=mysql_query($query,$connection);
	
echo"<td><select name='default_year'  style='font-size:12px; width:150px; height:18px;'  $dis  />";

echo"<option>&nbsp;</option>";
		while ($row_com=mysql_fetch_row($result_year)){
			if($row_com[0]==$default_year)
				echo "<option value='$row_com[0]'  selected>$row_com[0]</option>";
			else echo "<option value='$row_com[0]'>$row_com[0]</option>";
		}
	echo"</select>";
echo"</td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Borrow From: </span>";

$query="select DirYear from ".$_SESSION['dbLabel'].".directories  where upper(CompanyName)=Upper('Junal')";
//echo $query;
$result_year=mysql_query($query,$connection);

$queryuser="select User_account from ".$_SESSION['dbLabel'].".users";		
$result_user=mysql_query($queryuser,$connection);

echo"<td><select name='UserList' onchange='FilterSchemas();' style='width:150px; height:18px;' ";
if($_POST['mode'] == 'editmode')
{
	echo "disabled";
}
echo ">
<option value=''>&nbsp;</option> ";
while ($row_user=mysql_fetch_row($result_user)){
			if($row_user[0]==$UserList)
				echo "<option value='$row_user[0]'  selected>$row_user[0]</option>";
			else echo "<option value='$row_user[0]'>$row_user[0]</option>";
	}
	echo"</select>";
	$queryschema="select concat(CompanyName,'_',Diryear) from ".$_SESSION['dbLabel'].".listuserdir where usercode='".$UserList."' order by concat(CompanyName,Diryear)";
	//echo $queryschema; exit;
	$result_userschema=mysql_query($queryschema,$connection);
	
	echo"&nbsp;&nbsp;<select name='txtUserSchema'  style='width:150px; height: 18px;'  onchange=FilterByUserSchema(''); ";
	if(!isset($_POST['UserList']) || $_POST['mode'] == 'editmode')
	{
		echo "disabled";
	}
	echo ">";
			echo"<option value=''>&nbsp;</option>";
		while($row=mysql_fetch_row($result_userschema)){
			echo"<option value=$row[0]"; if($txtUserSchema==$row[0]) echo ' selected '; echo">$row[0] </option>";
		}
	echo"</select>";
echo"</td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Is Group</span>";
echo"<td><input type='checkbox'  $dis name='chk_isgroup'  onclick='chkIsGroup();'";if($user_isgroup==1) echo " checked ";echo" $dis/><input type='hidden' name='user_isgroup' value='$user_isgroup'></td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Deactivate Account</span>";
echo"<td><input type='checkbox'  name='chk_isdeactivate'  onclick='chkIsDeactivate();'";if($user_deactivate==1) echo " checked ";echo" /><input type='hidden' name='user_deactivate' value='$user_deactivate'><input type='date' name='user_deactivate_date'  value='$user_deactivate_date' style='font-size:12px; width:150px; height:18px;' disabled /></td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>Expiry Date</span>";
echo"<td><input type='checkbox'  name='chk_isexpiry'  onclick='chkIsExpiry();'";if($user_expiry==1) echo " checked ";echo" /><input type='hidden' name='user_expiry' value='$user_expiry'><input type='date' name='user_expirydate'  value='$user_expirydate' style='font-size:12px; width:150px; height:18px;' disabled /></td></tr>";

echo"<tr bgcolor='#F7F7F7' height='25px'><td valign='center' align='left' ><span class='style1'>User Like </span>";

$queryuser="select distinct User_account from ".$_SESSION['dbLabel'].".users ";
$result_users=mysql_query($queryuser,$connection);
	
echo"<td><select id='like_user' name='like_user'  style='font-size:12px; width:150px; height:18px;'  onchange='RefreshPage();'/>";

echo"<option value=''>&nbsp;</option> ";
		while ($row_user=mysql_fetch_row($result_users)){
			if($row_user[0]==$like_user)
				echo "<option value='$row_user[0]'  selected>$row_user[0]</option>";
			else
			echo "<option value='$row_user[0]'>$row_user[0]</option>";
		}
	echo"</select>";
echo"</td></tr>";
echo"</table></td></tr>

<tr>";

echo"<td  valign='top'>";

// richard
 // Richard
echo"</td></tr>";			
echo"</table>";
				
$tabs->end();
$tabs->start("Company/Year");

echo"<table border='0'  align='left' valign='top' class='tablecontent' ><col width=180><col width=40><col width=180>";

echo"   <tr bgcolor='#d0d0d0' height='25' ><td valign='top' align='center'><span class='style1'>Not Assigned Company/Year</span></td><td></td><td valign='top' align='center'><span class='style1'>Assigned Company/Year</span></td>
		<td align='center' ><span class='style1'><b>Applications/Forms</span></td></tr>";

$queryschema="select concat(CompanyName,'_',Diryear) from ".$_SESSION['dbLabel'].".directories where concat(CompanyName,'_',Diryear) 
			not in (select concat(companyname,'_',diryear) from ".$_SESSION['dbLabel'].".listuserdir where usercode='".$user_code."')";
//echo$queryschema;
$result_schemas=mysql_query($queryschema,$connection);

echo"<tr><td valign='top'><select name='txtSchema'  style='width:160px;height:350px;' multiple='multiple'>";
			echo"<option>&nbsp;</option>";
		while($row=mysql_fetch_row($result_schemas)){
			echo"<option value=$row[0]"; if($txtSchema==$row[0]) echo ' selected '; echo">$row[0]</option>";
		}
	echo"</select></td>
	<td valign='middle'>
	<button type='button' id='btnAdd' name='btnAdd' onclick=\"AddSchema('$like_user'); return false;\" title='Add Company/Year' $Insmode><span><span>=></span></span></button>
	<button type='button' id='btnAdd' name='btnAdd' onclick='RemoveSchema(); return false;' title='Remove Company/Year' $Insmode><span><span><=</span></span></button>

<br>";
	echo"</td>";
	
	$queryschema="select concat(CompanyName,'_',Diryear) from ".$_SESSION['dbLabel'].".listuserdir where usercode='".$user_code."' order by concat(CompanyName,Diryear)";
	//echo$queryschema;
	$result_Assignedschemas=mysql_query($queryschema,$connection);
	
	echo"<td  align='left' valign='top'><select name='txtSchemaAssigned'  style='width:160px;height:365px;' multiple='multiple' onchange=FilterBySchema('');>";
			echo"<option value=''>&nbsp;</option>";
		while($row=mysql_fetch_row($result_Assignedschemas)){
			echo"<option value=$row[0]"; if($txtSchemaAssigned==$row[0]) echo ' selected '; echo">$row[0] </option>";
		}
	echo"</select></td><td valign='top'><table border=0 width='700px' style='table-layout:fixed;'><col width=100px>
	<td><b>Applications</td><td><select name='txtApplication' onchange='SetApplication();' $dis><option value=''>&nbsp;</option>";
	
	if($Module_Accounting==1)
	echo"<option value='Accounting'";	if($txtApplication=='Accounting')   echo " selected ";echo">Accounting</option>";
		
	if($Module_Inventory==1)	
	echo"<option value='Inventory'";	if($txtApplication=='Inventory') 	echo " selected ";echo">Inventory</option>";
		
	echo"<option value='Payroll'";		if($txtApplication=='Payroll') 		echo " selected ";echo">Payroll</option>
		<option value='Access'";		if($txtApplication=='Access') 		echo " selected ";echo">Access</option>
		<option value='AccReports'";	if($txtApplication=='AccReports') 	echo " selected ";echo">Accounting Reports</option>
		<option value='InvReports'";	if($txtApplication=='InvReports') 	echo " selected ";echo">Inventory Reports</option>
		<option value='PayReports'";	if($txtApplication=='PayReports') 	echo " selected ";echo">Payroll Reports</option>
		<option value='Reports'";		if($txtApplication=='Reports') 		echo " selected ";echo">Reports</option>
	
		<option value='Utilities'";		if($txtApplication=='Utilities') 	echo " selected ";echo">Utilities</option>
		<option value='Edatacom'";		if($txtApplication=='Edatacom') 	echo " selected ";echo">Edatacom</option>
		<option value='POS'";			if($txtApplication=='POS') 			echo " selected ";echo">POS</option>
		<option value='Logistics'";		if($txtApplication=='Logistics') 	echo " selected ";echo">Logistics</option>
		<option value='HR'";			if($txtApplication=='HR') 			echo " selected ";echo">HR</option>
		<option value='CRM'";			if($txtApplication=='CRM') 			echo " selected ";echo">CRM</option></select>
	</td></tr>
	<tr><td colspan=2><table width='700px' border='0'>  <col width=250><col width=100><col width=100><col width=100><col width=100></table></td></tr>";
	
	echo"<tr><td colspan=2>
	<div style='overflow:scroll;height:320px;width:690px;border:0px solid #000000;'>
		<table  border='0' width='870px' style='table-layout:fixed'><col width=250><col width=100><col width=100><col width=100><col width=100>
		<col width=100><col width=100><col width=100><col width=100><col width=100><col width=100><col width=100><col width=100><col width=100>
		<col width=100><col width=100><col width=100><col width=100>
		<tr bgcolor='#d0d0d0' height=25px>
			<td align='center'><b>Form</b></td><td align='center'><b>View</b></td><td align='center'><b>Insert</b></td><td align='center'><b>Edit</b></td><td align='center'><b>Delete</b></td><td align='left' colspan=8><b>Others</b></td></tr>";

	
	//if($txtSchemaAssigned!='' && $checkduplicate!=1 && $actionmode!='refresh'){
	if($txtSchemaAssigned!='' && $checkduplicate!=1){
		$query="select  FA_AccountType as FA_AccountType1,FA_AccountTypeApp as FA_AccountTypeApp,FA_AccountTypeMod as FA_AccountTypeMod,FA_AccountTypeDel as FA_AccountTypeDel,".
		" FA_FixedAssets as FA_FixedAssets1,FA_FixedAssetsApp as FA_FixedAssetsApp1,FA_FixedAssetsMod as FA_FixedAssetsMod,FA_FixedAssetsDel as FA_FixedAssetsDel,".
		" FI_Area as FI_Area1,FI_AreaApp as FI_AreaApp,FI_AreaMod as FI_AreaMod,FI_AreaDel as FI_AreaDel,".
		" FA_Banks as FA_Banks1,FA_BankApp as FA_BankApp,FA_BankMod as FA_BankMod,FA_BankDel as FA_BankDel,".
		" FA_Budget as FA_Budget1,FA_BudgetApp as FA_BudgetApp,FA_BudgetMod as FA_BudgetMod,FA_BudgetDel as FA_BudgetDel,".
		" FA_Charging as FA_Charging1,FA_ChargingApp as FA_ChargingApp,FA_ChargingMod as FA_ChargingMod,FA_ChargingDel as FA_ChargingDel,".
		" FA_Contra as FA_Contra1,FA_ContraApp as FA_ContraApp,FA_ContraMod as FA_ContraMod,FA_ContraDel as FA_ContraDel,".
		" FA_Costcenter as FA_Costcenter1,FA_CostcenterApp as FA_CostcenterApp,FA_CostcenterMod  as FA_CostcenterMod,FA_CostcenterDel  as FA_CostcenterDel,".
		" FA_CreditNote as FA_CreditNote1,FA_CreditNoteApp as FA_CreditNoteApp,FA_CreditNoteMod as FA_CreditNoteMod,FA_CreditNoteDel as FA_CreditNoteDel,".
		" FA_Currency as FA_Currency1,FA_CurrencyApp as FA_CurrencyApp,FA_CurrencyMod as FA_CurrencyMod,FA_CurrencyDel as FA_CurrencyDel,".
		" FA_DebitNote  as FA_DebitNote1,FA_DebitNoteApp as FA_DebitNoteApp,FA_DebitNoteMod as FA_DebitNoteMod,FA_DebitNoteDel as FA_DebitNoteDel,".
		" RA_FinancialAccounts as RA_FinancialAccounts1,".
		" FA_Journal as FA_Journal1,FA_JournalApp as FA_JournalApp,FA_JournalMod as FA_JournalMod,FA_JournalDel as FA_JournalDel,".
		" FA_InvoicesAllocation as FA_InvoicesAllocation1,".
		" FA_Ledger as FA_Ledger1,FA_LedgerApp as FA_LedgerApp,FA_LedgerMod as FA_LedgerMod,FA_LedgerDel as FA_LedgerDel,".
		" FA_Payment as FA_Payment1,FA_PaymentApp as FA_PaymentApp,FA_PaymentMod as FA_PaymentMod,FA_PaymentDel as FA_PaymentDel,".
		" FA_PaymentRqst as FA_PaymentRqst1,FA_PurchaseOrderJV as FA_PurchaseOrderJV1,FA_PurchaseOrderJVMod as FA_PurchaseOrderJVApp,FA_PurchaseOrderJVApp as FA_PurchaseOrderJVMod,".
		" FA_PurchaseOrderJVDel as FA_PurchaseOrderJVDel,FA_PaymentRqstApp as FA_PaymentRqstApp,FA_PaymentRqstMod as FA_PaymentRqstMod,FA_PaymentRqstDel as FA_PaymentRqstDel,".
		" FA_Project as FA_Project1,FA_ProjectApp as FA_ProjectApp,FA_ProjectMod as FA_ProjectMod,FA_ProjectDel as FA_ProjectDel,".
		" FA_PurchaseJV as FA_PurchaseJV1,FA_PurchaseJVApp as FA_PurchaseJVApp,FA_PurchaseJVMod as FA_PurchaseJVMod,FA_PurchaseJVDel as FA_PurchaseJVDel,".
		" FA_Receipt as FA_Receipt1,FA_ReceiptApp as FA_ReceiptApp,FA_ReceiptMod as FA_ReceiptMod,FA_ReceiptDel as FA_ReceiptDel,".
		" FA_ReportOptions as FA_ReportOptions1,".
		" FA_SalesJV as FA_SalesJV1,FA_SalesJVApp as FA_SalesJVApp,FA_SalesJVMod as FA_SalesJVMod,FA_SalesJVDel as FA_SalesJVDel,".
		" FA_transactionpaymnetrqst as FA_transactionpaymnetrqst1,FA_transactionpaymnetrqstApp as FA_transactionpaymnetrqstApp,FA_transactionpaymnetrqstMod as FA_transactionpaymnetrqstMod,FA_transactionpaymnetrqstDel as FA_transactionpaymnetrqstDel,".
		" FI_PurchaseRequestItemTR as FI_PurchaseRequestItemTR,FI_Adjustment as FI_Adjustment1,FI_AdjustmentApp as FI_AdjustmentApp,FI_AdjustmentMod as FI_AdjustmentMod,FI_AdjustmentDel as FI_AdjustmentDel,".
		" FI_FBudgetInv as FI_BudgetInv1,FI_BudgetInvApp as FI_BudgetInvApp,FI_BudgetInvMod as FI_BudgetInvMod,FI_BudgetInvDel as FI_BudgetInvDel,".
		" FI_FBudgetInvAmendment as FI_FBudgetInvAmendment1,FI_BudgetInvAmendmentApp as FI_BudgetInvAmendmentApp,FI_BudgetInvAmendmentMod as FI_BudgetInvAmendmentMod,FI_BudgetInvAmendmentDel as FI_BudgetInvAmendmentDel,".
		" FI_FBudgetInvSetup as FI_FBudgetInvSetup1,FI_BudgetInvSetupApp as FI_BudgetInvSetupApp,FI_BudgetInvSetupMod as FI_BudgetInvSetupMod,FI_BudgetInvSetupDel as FI_BudgetInvSetupDel,".
		" FI_Category as FI_Category1,FI_CategoryApp as FI_CategoryApp,FI_CategoryMod as FI_CategoryMod,FI_CategoryDel as FI_CategoryDel,".
		" FI_CEPtable as FI_CEPtable1,FI_CEPtableApp as FI_CEPtableApp,FI_CEPtableMod as FI_CEPtableMod,FI_CEPtableDel as FI_CEPtableDel,".
		" FI_Charges as FI_Charges1,FI_ChargesApp as FI_ChargesApp,FI_ChargesMod as FI_ChargesMod,FI_ChargesDel as FI_ChargesDel,".
		" Clients as Clients1,ClientsApp as ClientApp,ClientsMod as ClientMod,ClientsDel as ClientDel,".
		" FI_ClientGrp as FI_ClientGrp1,FI_ClientGrpApp as FI_ClientGrpApp,FI_ClientGrpMod as FI_ClientGrpMod,FI_ClientGrpDel as FI_ClientGrpDel,".
		" FI_Delivery as FI_Delivery1,FI_DeliveryApp as FI_DeliveryApp,FI_DeliveryMod as FI_DeliveryMod,FI_DeliveryDel as FI_DeliveryDel,".
		" FI_Grouping as FI_Grouping1,FI_GroupingApp as FI_GroupingApp,FI_GroupingMod as FI_GroupingMod,FI_GroupingDel as FI_GroupingDel,".
		" FI_Items as FI_Items1,FI_ItemsApp as FI_ItemsApp,FI_ItemsMod as FI_ItemsMod,FI_ItemsDel as FI_ItemsDel,".
		" FI_itemlocation as FI_itemlocation,FI_Production as FI_Production1,FI_ProductionApp as FI_ProductionApp,FI_ProductionMod as FI_ProductionMod,FI_ProductionDel as FI_ProductionDel,".
		" FI_ProductionReq as FI_ProductionReq1,FI_ProductionReqApp as FI_ProductionReqApp,FI_ProductionReqMod as FI_ProductionReqMod,FI_ProductionReqDel as FI_ProductionReqDel,".
		" FI_ProductionTemp as FI_ProductionTemp1,FI_ProductionTempApp as FI_ProductionTempApp,FI_ProductionTempMod as FI_ProductionTempMod,FI_ProductionTempDel as FI_ProductionTempDel,".
		" FI_Purchases as FI_Purchases1,FI_PurchasesApp as FI_PurchasesApp,FI_PurchasesMod as FI_PurchasesMod,FI_PurchasesDel as FI_PurchasesDel,".
		" FI_Grn as FI_Grn1,FI_GrnApp as FI_GrnApp,FI_GrnMod as FI_GrnMod,FI_GrnDel as FI_GrnDel,".
		" FI_ReturnGrn as FI_ReturnGrn1,FI_ReturnGrnApp as FI_ReturnGrnApp,FI_ReturnGrnMod as FI_ReturnGrnMod,FI_ReturnGrnDel as FI_ReturnGrnDel,".
		" FI_ReportOptions as FI_ReportOptions1,".
		" FI_PurchaseOrder as FI_PurchaseOrder1,FI_PurchaseOrderApp as FI_PurchaseOrderApp,FI_PurchaseOrderMod as FI_PurchaseOrderMod,FI_PurchaseOrderDel as FI_PurchaseOrderDel,".
		" FI_PurchaseRequest as FI_PurchaseRequest1,FI_PurchaseRequestApp as FI_PurchaseRequestApp,FI_PurchaseRequestMod as FI_PurchaseRequestMod,FI_PurchaseRequestDel as FI_PurchaseRequestDel,".
		" FI_ReturnDelivery as FI_ReturnDelivery1,FI_ReturnDeliveryApp as FI_ReturnDeliveryApp,FI_ReturnDeliveryMod as FI_ReturnDeliveryMod,FI_ReturnDeliveryDel as FI_ReturnDeliveryDel,".
		" FI_ReturnPurchase as FI_ReturnPurchase1,FI_ReturnPurchaseApp as FI_ReturnPurchaseApp,FI_ReturnPurchaseMod as FI_ReturnPurchaseMod,FI_ReturnPurchaseDel as FI_ReturnPurchaseDel,".
		" FI_ReturnRma as FI_ReturnRma1,FI_ReturnRmaApp as FI_ReturnRmaApp,FI_ReturnRmaMod as FI_ReturnRmaMod,FI_ReturnRmaDel as FI_ReturnRmaDel,".
		" FI_ReturnSales as FI_ReturnSales1,FI_ReturnSalesApp as FI_ReturnSalesApp,FI_ReturnSalesMod as FI_ReturnSalesMod,FI_ReturnSalesDel as FI_ReturnSalesDel,".
		" FI_RmTransfer as FI_RRmTransfer1,FI_RmTransferApp as FI_RmTransferApp,FI_RmTransferMod as FI_RmTransferMod,FI_IRmTransferDel as FI_IRmTransferDel,".
		" FI_Rma as FI_Rma1,FI_RmaApp as FI_RmaApp,FI_RmaMod as FI_RmaMod,FI_RmaDel as FI_RmaDel,".
		" FI_Sales as FI_Sales1,FI_SalesApp as FI_SalesApp,FI_SalesMod as FI_SalesMod,FI_SalesDel as FI_SalesDel,".
		" FI_SalesOrder as FI_SalesOrder1,FI_SalesOrderApp as FI_SalesOrderApp,FI_SalesOrderMod as FI_SalesOrderMod,FI_SalesOrderDel as FI_SalesOrderDel,".
		" FI_Salesmen as FI_Salesmen1,FI_SalesmenApp as FI_SalesmenApp,FI_SalesmenMod as FI_SalesmenMod,FI_SalesmenDel as FI_SalesmenDel,".
		" FI_Shipment as FI_Shipment1,FI_ShipmentMod as FI_ShipmentMod,FI_ShipmentDel as FI_ShipmentDel,".
		" FI_stockeval as FI_stockeval1,FI_stockevalApp as FI_stockevalApp,FI_stockevalMod as FI_stockevalMod,FI_stockevalDel as FI_stockevalDel,".
		" FI_SubGrouping as FI_SubGrouping1,FI_SubGroupingApp as FI_SubGroupingApp,FI_SubGroupingMod as FI_SubGroupingMod,FI_SubGroupingDel as FI_SubGroupingDel,".
		" FI_Suppliers as FI_Suppliers1,FI_SuppliersApp as FI_SuppliersApp,FI_SuppliersMod as FI_SuppliersMod,FI_SuppliersDel as FI_SuppliersDel,".
		" FI_SupplierGrp as FI_SupplierGrp1,FI_SupplierGrpApp as FI_SupplierGrpApp,FI_SupplierGrpMod as FI_SupplierGrpMod,FI_SupplierGrpDel as FI_SupplierGrpDel,".
		" FI_Transfer as FI_Transfer1,FI_TransferApp as FI_TransferApp,FI_TransferMod as FI_TransferMod,FI_TransferDel as FI_TransferDel,".
		" FI_ITransfer as FI_ITransfer1,FI_ITransferApp as FI_ITransferApp,FI_ITransferMod as FI_ITransferMod,FI_ITransferDel as FI_ITransferDel,".
		" FI_Transportation as FI_Transportation1,FI_TransportationApp as FI_TransportationApp,FI_TransportationMod as FI_TransportationMod,FI_TransportationDel as FI_TransportationDel,".
		" FI_Warehouse as FI_Warehouse1,FI_WarehouseApp as FI_WarehouseApp,FI_WarehouseMod as FI_WarehouseMod,FI_WarehouseDel as FI_WarehouseDel,".
		" FI_WayBill as FI_WayBill1,FI_WayBillApp as FI_WayBillApp,FI_WayBillMod as FI_WayBillMod,FI_WayBillDel as FI_WayBillDel,".
		" FP_Attendance as FP_Attendance1,payroll as payroll1,FP_AttendanceApp as FP_AttendanceApp,FP_AttendanceMod as FP_AttendanceMod,FP_AttendanceDel as FP_AttendanceDel,".
		" FP_Bonus as FP_Bonus1,FP_BonusApp as FP_BonusApp,FP_BonusMod as FP_BonusMod,FP_BonusDel as FP_BonusDel,".
		" FP_Dept as FP_Dept1,FP_DeptApp as FP_DeptApp,FP_DeptMod as FP_DeptMod,FP_DeptDel as FP_DeptDel,".
		" FP_Employee as FP_Employee1,FP_EmployeeApp as FP_EmployeeApp,FP_EmployeeMod as FP_EmployeeMod,FP_EmployeeDel as FP_EmployeeDel,".
		" FP_Generate as FP_Generate1,FP_GenerateApp as FP_GenerateApp,FP_GenerateMod as FP_GenerateMod,FP_GenerateDel as FP_GenerateDel,".
		" FP_Grades as FP_Grades1,FP_GradesApp as FP_GradesApp,FP_GradesMod as FP_GradesMod,FP_GradesDel as FP_GradesDel,".
		" FP_Insurance as FP_Insurance1,FP_InsuranceApp as FP_InsuranceApp,FP_InsuranceMod as FP_InsuranceMod,FP_InsuranceDel as FP_InsuranceDel,".
		" FP_Loan as FP_Loan1,FP_LoanApp as FP_LoanApp,FP_LoanMod as FP_LoanMod,FP_LoanDel as FP_LoanDel,".
		" FP_Parameters as FP_Parameters1,FP_ParametersApp as FP_ParametersApp,FP_ParametersMod as FP_ParametersMod,FP_ParametersDel as FP_ParametersDel,".
		" FP_Fpreemp as FP_Fpreemp1,FP_preempApp as FP_preempApp,FP_preempMod as FP_preempMod,FP_preempDel as FP_preempDel,".
		" FP_Project as FP_Project1,FP_ProjectApp as FP_ProjectApp,FP_ProjectMod as FP_ProjectMod,FP_ProjectDel as FP_ProjectDel,".
		" FP_ReportOptions as FP_ReportOptions1,".
		" FP_Vacation as FP_Vacation1,FP_VacationApp as FP_VacationApp,FP_VacationMod as FP_VacationMod,FP_VacationDel as FP_VacationDel,".
		" FI_IN as FI_IN1,FI_INDel,FI_INMod,FI_OUT as FI_OUT1,FI_OUTDel,FI_OUTMod,FI_INapp,FI_Outapp,".
		" RA_StatementofAccount as RA_StatementofAccount1,".
		" RA_Trialbalance as RA_Trialbalance1,".
		" RA_StatementofProject as RA_StatementofProject1,".
		" RA_StatmentofCostcenter as RA_StatmentofCostcenter1,".
		" RA_Aging as RA_Aging1,".
		" RA_AgingOfSupplierInvoices as RA_AgingOfSupplierInvoices1,".
		" RA_AgingOfClientInvoices as RA_AgingOfClientInvoices1,".
		" RA_FinancialAccounts as RA_FinancialAccounts1,".
		" FA_DailyReport as FA_DailyReport1,".
		" RA_StatisticsReport as RA_StatisticsReport1,".
		" RA_SalesJV as RA_SalesJV1,".
		" RA_TransactionJV as RA_TransactionJV1,".
		" RA_PurchasesJV as RA_PurchasesJV1,".
		" RA_GeneralLedger as RA_GeneralLedger1,".
		" RI_ListTransaction as RI_ListTransaction1,".
		" RI_Inventory as RI_Inventory1,".
		" RI_SalesReports as RI_SalesReports1,".
		" FI_PorderPurRequest as FI_PorderPurRequest1,".
		" RI_SatementofItems as RI_SatementofItems1,".
		" RI_YearlySales as RI_YearlySales1,".
		" RI_TrackingRMA as RI_TrackingRMA1,".
		" RI_Aging as RI_Aging1,".
		" RI_InvComparisonReport as RI_InvComparisonReport1,".
		" RI_TargetRebateReport as RI_TargetRebateReport1,".
		" RI_PorderReport as RI_PorderReport1,".
		" RI_PurchaseReports as RI_PurchaseReports1,".
		" RI_SalesOrderReport as RI_SalesOrderReport1, RI_ExpiryDate, RI_GrnReports as RI_GrnReports1,RI_ListofProduction as RI_ListofProduction1,U_RePostTransaction as U_RePostTransaction,Utilities as Utilities,Edatacom as Edatacom1, ".
		" Accounting as Accounting1,Inventory as Inventory1,FA_ExceedBudgetLimit as FA_ExceedBudgetLimit1,FI_RVPostTransaction as FI_RVPostTransaction1,FI_RepostAdjustment as FI_RepostAdjustment1,
		ClientsCreditLimit as ClientsCreditLimit1 ,FI_DeliverySalesPrice as FI_DeliverySalesPrice1,FI_SellingPriceInItems as FI_SellingPriceInItems1,FI_CostPriceInItems as FI_CostPriceInItems1,
		FI_ItemSelling1 as FI_ItemSelling1,FI_ItemSelling2 as FI_ItemSelling2,FI_ItemSelling3 as FI_ItemSelling3,FI_ItemSelling4 as FI_ItemSelling4,FI_ItemSelling5 as FI_ItemSelling5,
		FI_ItemSelling6 as FI_ItemSelling6,FI_PurchaseCategory as FI_PurchaseCategory1,FI_PurchasesVATMod as FI_PurchasesVATMod1,FI_RepostPurchase as FI_RepostPurchase1,
		FI_PorderConfirmed as FI_PorderConfirmed1,FI_DelConfirmedPO as FI_DelConfirmedPO1,FI_ModConfirmedPO as FI_ModConfirmedPO1,FI_RepostPorder as FI_RepostPorder1,PRqst_Approvedby as PRqst_Approvedby1,".
		"FI_ReturnPurchasesVAT as FI_ReturnPurchasesVAT1,FI_RepostPReturn as FI_RepostPReturn1,FI_RMAReturnSheetRMA as FI_RMAReturnSheetRMA1,FI_RMAReturnSheetReturnRMA as FI_RMAReturnSheetReturnRMA1,
		FI_RSalesCheckSalesman as FI_RSalesCheckSalesman1,FI_ReturnSalesVAT as FI_ReturnSalesVAT1,FI_ReturnSalesPrintPay as FI_ReturnSalesPrintPay1,FI_RepostSReturn as FI_RepostSReturn1 ,".
		"  FI_RMASheetPending as FI_RMASheetPending1,FI_RMASheetRMA as FI_RMASheetRMA1,FI_SalesCheckSalesman as FI_SalesCheckSalesman1,FI_SalesVAT as FI_SalesVAT1,FI_SalesWithPrice as FI_SalesWithPrice1, ".
		"  FI_SalesPrintReceipt as FI_SalesPrintReceipt1,FI_RepostSales as FI_RepostSales1,FI_SOrderWithPrice as FI_SOrderWithPrice1,FI_SorderCanceledQty as FI_SorderCanceledQty1,FI_SorderConfirmed as FI_SorderConfirmed1,  ".
		"  login_disapprovesorder as login_disapprovesorder1 ,Unmodify_SorderPrice as Unmodify_SorderPrice1,Login_AllowPrice as Login_AllowPrice1,FI_SorderRejectUnconfirmed as FI_SorderRejectUnconfirmed1,FI_RepostSorder as FI_RepostSorder1, ".
		"  FI_SorderPosQty as FI_SorderPosQty1,FP_DetailGenerateDel as FP_DetailGenerateDel1,FP_AnalysisReport as FP_AnalysisReport1,FP_ArabicReports as FP_ArabicReports1,RP_BankStatement as RP_BankStatement1,RP_CollectionofRepPay as RP_CollectionofRepPay1, ".
		"  RP_Employee as RP_Employee1,RP_Evaluation as RP_Evaluation1,FP_Overtime as FP_Overtime1,RP_Query as RP_Query1,RP_TimeSheet as RP_TimeSheet1,Rep_Accounting as Rep_Accounting1,Rep_General as Rep_General1,Rep_Inventory as Rep_Inventory1, ".
		"  RA_Amortization as RA_Amortization1,RA_AvgDays as RA_AvgDays1,RA_TabSheetBudget as RA_TabSheetBudget1,RA_CreditLimitRoster as RA_CreditLimitRoster1,RA_IncomeStmt as RA_IncomeStmt1,RA_IncomeStatBalanceSheet as RA_IncomeStatBalanceSheet1, ".
		"  FA_InterrestRate as FA_InterrestRate1,RA_ListofCheckBills as RA_ListofCheckBills1,RA_ListofDueInvoices as RA_ListofDueInvoices1,RA_ListofRecPayDebCred as RA_ListofRecPayDebCred1,RA_MonthDistBudgetForCast as RA_MonthDistBudgetForCast1, ".
		"  RA_TabSheetPaymentRqst as RA_TabSheetPaymentRqst1,RA_PrePayment as RA_PrePayment1,RA_Query as RA_Query1,RA_AccountReconciliation as RA_AccountReconciliation1,RA_SalesmanComm as RA_SalesmanComm1, ".
		"  RA_unmovedAcounts as RA_unmovedAcounts1,RI_tabsheetbooksbalance as RI_tabsheetbooksbalance1,RI_BudgetInvTabSheet as RI_BudgetInvTabSheet1,RI_TabSheetexport as RI_TabSheetexport1,RI_InvByEntryNo as RI_InvByEntryNo1, ".
		"  RI_InvoiceProject as RI_InvoiceProject1,RI_Invoices as RI_Invoices1,RI_ItemsPerWarehouseSize as RI_ItemsPerWarehouseSize1,RI_ListOfDeliveryQty as RI_ListOfDeliveryQty1,RI_LISTOFDUEITEMS as RI_LISTOFDUEITEMS1,RI_ListofItems as RI_ListofItems1, ".
		"  RI_listofPICharges as RI_listofPICharges1,RI_ListofRMA as RI_ListofRMA1,RI_Packing as RI_Packing1,RI_ProfitperItems as RI_ProfitperItems1,RI_Query as RI_Query1,RI_SalesStatistics as RI_SalesStatistics1,RI_SoldbySalesman as RI_SoldbySalesman1,RI_StkMovement as RI_StkMovement1, ".
		"  RI_TranspPage as RI_TranspPage1,RI_CltSaleR_ShowSalesman as RI_CltSaleR_ShowSalesman1,FC_CashRegister as FC_CashRegister1,FC_CashRegisterApp as FC_CashRegisterApp,FC_CashRegisterMod as FC_CashRegisterMod, ".
		"  FC_CashRegisterMod  as FC_CashRegisterMod,FC_CashRegisterDel as FC_CashRegisterDel,FC_AddClient as FC_AddClient1,FC_CashRegisterCoupon as FC_CashRegisterCoupon1,FC_CashRegisterCustomer as FC_CashRegisterCustomer1, ".
		"  FC_CashRegisterCancel as FC_CashRegisterCancel1,FC_CashRegisterCheck as FC_CashRegisterCheck1,FC_ConfirmCustomer as FC_ConfirmCustomer1,FC_CashRegisterCredit as FC_CashRegisterCredit1,FC_CashRegisterDisc as FC_CashRegisterDisc1, ".
		"  Fc_forcingvendor as Fc_forcingvendor1,FC_PermToCancelCash as FC_PermToCancelCash1,FC_CashRegisterPosting as FC_PostingByCashRegister1,Promotion as Promotion1,ReturnQuantity as ReturnQuantity1,FC_CashRegisterScroll as FC_CashRegisterScroll1, ".
		"  FC_CashRegScrollOk as FC_CashRegScrollOk1,FC_CashRegScrollPrint as FC_CashRegScrollPrint1,FC_CashRegisterSearch as FC_CashRegisterSearch1,FC_ShowBtnOpenDrawer as FC_ShowBtnOpenDrawer1,Rc_cashFlow as Rc_cashFlow1, ".
		"  Closing_RetailReport as Closing_RetailReport1,RC_ForcingUserAccount as RC_ForcingUserAccount1,RC_ItemsSizes as RC_ItemsSizes1,RC_ListOfInvoices as RC_ListOfInvoices1,RC_SalesmenCommission as RC_SalesmenCommission1,  ".
		"  FI_Shipmentconfirmed as FI_Shipmentconfirmed1,RA_TabSheetMonthlyAmount as RA_TabSheetMonthlyAmount1,RI_SaleR_ShowSalesman as RI_SaleR_ShowSalesman1,Costcenter as Costcenter1,CostcenterApp as CostcenterApp, ".
		"  CostcenterMod as CostcenterMod,CostcenterDel as CostcenterDel,Currency as Currency1,CurrencyApp as CurrencyApp,CurrencyMod as CurrencyMod,CurrencyDel as CurrencyDel,U_BackupFile as U_BackupFile1,U_CashRegister as U_CashRegister1, ".
		"  U_CloseCompany as U_CloseCompany1,U_CloseYear as U_CloseYear1,FU_ClosingPeriod as FU_ClosingPeriod1,U_DeleteCompany as U_DeleteCompany1,U_DeleteYear as U_DeleteYear1,U_DistributingCostcenter as U_DistributingCostcenter1,U_FillSetupFile as U_FillSetupFile1, ".
		"  U_MergerDataBase as U_MergerDataBase1,U_NewCompany as U_NewCompany1,U_NewYear as U_NewYear1,U_Ports as U_Ports1,U_PostToChecksAndBills as U_PostToChecksAndBills1,U_PostToItems as U_PostToItems1,U_PostToLedger as U_PostToLedger1,U_ReNumberJV as U_ReNumberJV1, ".
		"  U_TransferAccount as U_TransferAccount1,U_TransferItem as U_TransferItem1,FA_FIPAddress as FA_FIPAddress1,FA_IPAddressApp as FA_IPAddressApp,FA_IPAddressMod as FA_IPAddressMod,FA_IPAddressDel as FA_IPAddressDel,approved_level as approved_level1,FI_PurchaseRequestItems as FI_PurchaseRequestItems1, ".
		"  fi_pendingpurchaserequest as fi_pendingpurchaserequest1,fi_pendingtransferrequest as fi_pendingtransferrequest1,fi_pendingadjustmentrequest as fi_pendingadjustmentrequest1,Perc_creditlimit,Fi_POS,RI_Statistics,FI_Statistics,RA_Statistics, FI_SorderAllowConfirmCash, FI_PRequestConfirmed, ".
		"  prequestapproved_level,porderapproved_level,approved_level,transferrequestapproved_level,adjustmentrequestapproved_level,login_preqapprove,login_preqreject,login_prequndproc,login_pordapprove,login_pordreject, ".
		"  login_treqapprove,login_treqreject,login_areqapprove,login_areqreject, FI_SetDeliveryStatus, FI_DeliveryStatusFrom, FI_DeliveryStatusTo, FI_DeliveryStatus, Login_Purchase_Pending, Login_location, ifnull(FI_Visit,0) as FI_Visit,".
		"  FI_ReportsOptions as FI_ReportsOptions, language as login_language, FI_RMAPendingItems, FI_RMALocations, ifNull(FA_PrePayment, 0) as FA_PrePayment, ifNull(FA_JournalPrintingAsk, 0) as FA_JournalPrintingAsk, ".
		" ifnull(RI_Transfer,0) as RI_Transfer, ifnull(RI_Adjustment,0) as RI_Adjustment , FI_RENTINVOICE  as  FI_RENTINVOICE , FI_RENTINVOICEApp ,FI_RENTINVOICEMod , FI_RENTINVOICEDel ".
		"  from ".$_SESSION['dbLabel'].".login where upper(login_schema)=upper('".$txtSchemaAssigned."') and user_account='".$user_code."'";
	 
	
	 //  echo $query; exit;
	  
	
		 
		 
		 
		 
		$result=mysql_query($query,$connection);
		$rows=mysql_fetch_array($result);
			extract($rows);
			
		$query="select  Access_UserManager as Access_UserManager1,Access as Access1
					from ".$_SESSION['dbLabel'].".users where  user_account='".$user_code."'";
		$result=mysql_query($query,$connection);
		$rows=mysql_fetch_array($result);
			extract($rows);	
			
		$query="select Access as Access1
					from ".$_SESSION['dbLabel'].".login where upper(login_schema)=upper('".$txtSchemaAssigned."') and user_account='".$user_code."'";
		$result=mysql_query($query,$connection);
		$rows=mysql_fetch_array($result);
			extract($rows);		
		
	}
	

	
	if($Accounting1=='') 			$Accounting1=0;				echo"<input type='hidden' name='Accounting1' value='$Accounting1'>";
	if($FA_AccountType1=='') 		$FA_AccountType1=0;			echo"<input type='hidden' name='FA_AccountType1' value='$FA_AccountType1'>";
	if($FA_AccountTypeApp=='') 		$FA_AccountTypeApp=0;		echo"<input type='hidden' name='FA_AccountTypeApp' value='$FA_AccountTypeApp'>";
	if($FA_AccountTypeMod=='') 		$FA_AccountTypeMod=0;		echo"<input type='hidden' name='FA_AccountTypeMod' value='$FA_AccountTypeMod'>";
	if($FA_AccountTypeDel=='') 		$FA_AccountTypeDel=0;		echo"<input type='hidden' name='FA_AccountTypeDel' value='$FA_AccountTypeDel'>";
	if($FA_FixedAssets1=='') 		$FA_FixedAssets1=0;			echo"<input type='hidden' name='FA_FixedAssets1' value='$FA_FixedAssets1'>";
	if($FA_FixedAssetsApp1=='') 	$FA_FixedAssetsApp1=0;		echo"<input type='hidden' name='FA_FixedAssetsApp1' value='$FA_FixedAssetsApp1'>";
	if($FA_FixedAssetsMod=='') 		$FA_FixedAssetsMod=0;		echo"<input type='hidden' name='FA_FixedAssetsMod' value='$FA_FixedAssetsMod'>";
	if($FA_FixedAssetsDel=='') 		$FA_FixedAssetsDel=0;		echo"<input type='hidden' name='FA_FixedAssetsDel' value='$FA_FixedAssetsDel'>";
	if($FI_Area1=='') 				$FI_Area1=0;				echo"<input type='hidden' name='FI_Area1' value='$FI_Area1'>";
	if($FI_AreaApp=='') 			$FI_AreaApp=0;				echo"<input type='hidden' name='FI_AreaApp' value='$FI_AreaApp'>";
	if($FI_AreaMod=='') 			$FI_AreaMod=0;				echo"<input type='hidden' name='FI_AreaMod' value='$FI_AreaMod'>";
	if($FI_AreaDel=='') 			$FI_AreaDel=0;				echo"<input type='hidden' name='FI_AreaDel' value='$FI_AreaDel'>";
	if($FA_Banks1=='') 				$FA_Banks1=0;				echo"<input type='hidden' name='FA_Banks1' value='$FA_Banks1'>";
	if($FA_BankApp=='') 			$FA_BankApp=0;				echo"<input type='hidden' name='FA_BankApp' value='$FA_BankApp'>";
	if($FA_BankMod=='') 			$FA_BankMod=0;				echo"<input type='hidden' name='FA_BankMod' value='$FA_BankMod'>";
	if($FA_BankDel=='') 			$FA_BankDel=0;				echo"<input type='hidden' name='FA_BankDel' value='$FA_BankDel'>";
	if($FA_Budget1=='') 			$FA_Budget1=0;				echo"<input type='hidden' name='FA_Budget1' value='$FA_Budget1'>";
	if($FA_BudgetApp=='') 			$FA_BudgetApp=0;			echo"<input type='hidden' name='FA_BudgetApp' value='$FA_BudgetApp'>";
	if($FA_BudgetMod=='') 			$FA_BudgetMod=0;			echo"<input type='hidden' name='FA_BudgetMod' value='$FA_BudgetMod'>";
	if($FA_BudgetDel=='') 			$FA_BudgetDel=0;			echo"<input type='hidden' name='FA_BudgetDel' value='$FA_BudgetDel'>";
	if($FA_Charging1=='') 			$FA_Charging1=0;			echo"<input type='hidden' name='FA_Charging1' value='$FA_Charging1'>";
	if($FA_ChargingApp=='')			$FA_ChargingApp=0;			echo"<input type='hidden' name='FA_ChargingApp' value='$FA_ChargingApp'>";
	if($FA_ChargingMod=='') 		$FA_ChargingMod=0;			echo"<input type='hidden' name='FA_ChargingMod' value='$FA_ChargingMod'>";
	if($FA_ChargingDel=='') 		$FA_ChargingDel=0;			echo"<input type='hidden' name='FA_ChargingDel' value='$FA_ChargingDel'>";
	if($FA_Contra1=='')	 			$FA_Contra1=0;				echo"<input type='hidden' name='FA_Contra1' value='$FA_Contra1'>";
	if($FA_ContraApp=='') 			$FA_ContraApp=0;			echo"<input type='hidden' name='FA_ContraApp' value='$FA_ContraApp'>";
	if($FA_ContraMod=='') 			$FA_ContraMod=0;			echo"<input type='hidden' name='FA_ContraMod' value='$FA_ContraMod'>";
	if($FA_ContraDel=='') 			$FA_ContraDel=0;			echo"<input type='hidden' name='FA_ContraDel' value='$FA_ContraDel'>";
	if($FA_Costcenter1=='') 		$FA_Costcenter1=0;			echo"<input type='hidden' name='FA_Costcenter1' value='$FA_Costcenter1'>";
	if($FA_CostcenterApp=='') 		$FA_CostcenterApp=0;		echo"<input type='hidden' name='FA_CostcenterApp' value='$FA_CostcenterApp'>";
	if($FA_CostcenterMod=='') 		$FA_CostcenterMod=0;		echo"<input type='hidden' name='FA_CostcenterMod' value='$FA_CostcenterMod'>";
	if($FA_CostcenterDel=='') 		$FA_CostcenterDel=0;		echo"<input type='hidden' name='FA_CostcenterDel' value='$FA_CostcenterDel'>";
	if($FA_CreditNote1=='') 		$FA_CreditNote1=0;			echo"<input type='hidden' name='FA_CreditNote1' value='$FA_CreditNote1'>";
	if($FA_CreditNoteApp=='') 		$FA_CreditNoteApp=0;		echo"<input type='hidden' name='FA_CreditNoteApp' value='$FA_CreditNoteApp'>";
	if($FA_CreditNoteMod=='') 		$FA_CreditNoteMod=0;		echo"<input type='hidden' name='FA_CreditNoteMod' value='$FA_CreditNoteMod'>";
	if($FA_CreditNoteDel=='') 		$FA_CreditNoteDel=0;		echo"<input type='hidden' name='FA_CreditNoteDel' value='$FA_CreditNoteDel'>";
	if($FA_Currency1=='') 			$FA_Currency1=0;			echo"<input type='hidden' name='FA_Currency1' value='$FA_Currency1'>";
	if($FA_CurrencyApp=='') 		$FA_CurrencyApp=0;			echo"<input type='hidden' name='FA_CurrencyApp' value='$FA_CurrencyApp'>";
	if($FA_CurrencyMod=='') 		$FA_CurrencyMod=0;			echo"<input type='hidden' name='FA_CurrencyMod' value='$FA_CurrencyMod'>";
	if($FA_CurrencyDel=='') 		$FA_CurrencyDel=0;			echo"<input type='hidden' name='FA_CurrencyDel' value='$FA_CurrencyDel'>";
	if($FA_DebitNote1=='') 			$FA_DebitNote1=0;			echo"<input type='hidden' name='FA_DebitNote1' value='$FA_DebitNote1'>";
	if($FA_DebitNoteApp=='') 		$FA_DebitNoteApp=0;			echo"<input type='hidden' name='FA_DebitNoteApp' value='$FA_DebitNoteApp'>";
	if($FA_DebitNoteMod=='') 		$FA_DebitNoteMod=0;			echo"<input type='hidden' name='FA_DebitNoteMod' value='$FA_DebitNoteMod'>";
	if($FA_DebitNoteDel=='') 		$FA_DebitNoteDel=0;			echo"<input type='hidden' name='FA_DebitNoteDel' value='$FA_DebitNoteDel'>";
	if($RA_FinancialAccounts1=='') 	$RA_FinancialAccounts1=0;	echo"<input type='hidden' name='RA_FinancialAccounts1' value='$RA_FinancialAccounts1'>";
	if($FA_InvoicesAllocation1=='') $FA_InvoicesAllocation1=0;	echo"<input type='hidden' name='FA_InvoicesAllocation1' value='$FA_InvoicesAllocation1'>";
	if($FA_Journal1=='') 			$FA_Journal1=0;				echo"<input type='hidden' name='FA_Journal1' value='$FA_Journal1'>";
	if($FA_JournalApp=='') 			$FA_JournalApp=0;			echo"<input type='hidden' name='FA_JournalApp' value='$FA_JournalApp'>";
	if($FA_JournalMod=='') 			$FA_JournalMod=0;			echo"<input type='hidden' name='FA_JournalMod' value='$FA_JournalMod'>";
	if($FA_JournalDel=='') 			$FA_JournalDel=0;			echo"<input type='hidden' name='FA_JournalDel' value='$FA_JournalDel'>";
	if($FA_Ledger1=='') 			$FA_Ledger1=0;				echo"<input type='hidden' name='FA_Ledger1' value='$FA_Ledger1'>";
	if($FA_LedgerApp=='') 			$FA_LedgerApp=0;			echo"<input type='hidden' name='FA_LedgerApp' value='$FA_LedgerApp'>";
	if($FA_LedgerMod=='') 			$FA_LedgerMod=0;			echo"<input type='hidden' name='FA_LedgerMod' value='$FA_LedgerMod'>";
	if($FA_LedgerDel=='') 			$FA_LedgerDel=0;			echo"<input type='hidden' name='FA_LedgerDel' value='$FA_LedgerDel'>";
	if($FA_Payment1=='') 			$FA_Payment1=0;				echo"<input type='hidden' name='FA_Payment1' value='$FA_Payment1'>";
	if($FA_PaymentApp=='') 			$FA_PaymentApp=0;			echo"<input type='hidden' name='FA_PaymentApp' value='$FA_PaymentApp'>";
	if($FA_PaymentMod=='') 			$FA_PaymentMod=0;			echo"<input type='hidden' name='FA_PaymentMod' value='$FA_PaymentMod'>";
	if($FA_PaymentDel=='') 			$FA_PaymentDel=0;			echo"<input type='hidden' name='FA_PaymentDel' value='$FA_PaymentDel'>";
	if($FA_PurchaseOrderJV1=='') 	$FA_PurchaseOrderJV1=0;		echo"<input type='hidden' name='FA_PurchaseOrderJV1' value='$FA_PurchaseOrderJV1'>";
	if($FA_PurchaseOrderJVApp=='') 		$FA_PurchaseOrderJVApp=0;		echo"<input type='hidden' name='FA_PurchaseOrderJVApp' value='$FA_PurchaseOrderJVApp'>";
	if($FA_PurchaseOrderJVMod=='') 		$FA_PurchaseOrderJVMod=0;		echo"<input type='hidden' name='FA_PurchaseOrderJVMod' value='$FA_PurchaseOrderJVMod'>";
	if($FA_PurchaseOrderJVDel=='') 		$FA_PurchaseOrderJVDel=0;		echo"<input type='hidden' name='FA_PurchaseOrderJVDel' value='$FA_PurchaseOrderJVDel'>";
	if($FA_PaymentRqst1=='') 		$FA_PaymentRqst1=0;			echo"<input type='hidden' name='FA_PaymentRqst1' value='$FA_PaymentRqst1'>";
	if($FA_PaymentRqstApp=='') 		$FA_PaymentRqstApp=0;		echo"<input type='hidden' name='FA_PaymentRqstApp' value='$FA_PaymentRqstApp'>";
	if($FA_PaymentRqstMod=='') 		$FA_PaymentRqstMod=0;		echo"<input type='hidden' name='FA_PaymentRqstMod' value='$FA_PaymentRqstMod'>";
	if($FA_PaymentRqstDel=='') 		$FA_PaymentRqstDel=0;		echo"<input type='hidden' name='FA_PaymentRqstDel' value='$FA_PaymentRqstDel'>";
	if($FA_Project1=='')	 		$FA_Project1=0;				echo"<input type='hidden' name='FA_Project1' value='$FA_Project1'>";
	if($FA_ProjectApp=='') 			$FA_ProjectApp=0;			echo"<input type='hidden' name='FA_ProjectApp' value='$FA_ProjectApp'>";
	if($FA_ProjectMod=='') 			$FA_ProjectMod=0;			echo"<input type='hidden' name='FA_ProjectMod' value='$FA_ProjectMod'>";
	if($FA_ProjectDel=='') 			$FA_ProjectDel=0;			echo"<input type='hidden' name='FA_ProjectDel' value='$FA_ProjectDel'>";
	if($FA_PurchaseJV1=='') 		$FA_PurchaseJV1=0;			echo"<input type='hidden' name='FA_PurchaseJV1' value='$FA_PurchaseJV1'>";
	if($FA_PurchaseJVApp=='') 		$FA_PurchaseJVApp=0;		echo"<input type='hidden' name='FA_PurchaseJVApp' value='$FA_PurchaseJVApp'>";
	if($FA_PurchaseJVMod=='') 		$FA_PurchaseJVMod=0;		echo"<input type='hidden' name='FA_PurchaseJVMod' value='$FA_PurchaseJVMod'>";
	if($FA_PurchaseJVDel=='') 		$FA_PurchaseJVDel=0;		echo"<input type='hidden' name='FA_PurchaseJVDel' value='$FA_PurchaseJVDel'>";
	if($FA_Receipt1=='') 			$FA_Receipt1=0;				echo"<input type='hidden' name='FA_Receipt1' value='$FA_Receipt1'>";
	if($FA_ReceiptApp=='') 			$FA_ReceiptApp=0;			echo"<input type='hidden' name='FA_ReceiptApp' value='$FA_ReceiptApp'>";
	if($FA_ReceiptMod=='') 			$FA_ReceiptMod=0;			echo"<input type='hidden' name='FA_ReceiptMod' value='$FA_ReceiptMod'>";
	if($FA_ReceiptDel=='') 			$FA_ReceiptDel=0;			echo"<input type='hidden' name='FA_ReceiptDel' value='$FA_ReceiptDel'>";
	if($FA_ReportOptions1=='') 		$FA_ReportOptions1=0;		echo"<input type='hidden' name='FA_ReportOptions1' value='$FA_ReportOptions1'>";
	if($FA_SalesJV1=='') 			$FA_SalesJV1=0;				echo"<input type='hidden' name='FA_SalesJV1' value='$FA_SalesJV1'>	";
	if($FA_SalesJVApp=='') 			$FA_SalesJVApp=0;			echo"<input type='hidden' name='FA_SalesJVApp' value='$FA_SalesJVApp'>";
	if($FA_SalesJVMod=='') 			$FA_SalesJVMod=0;			echo"<input type='hidden' name='FA_SalesJVMod' value='$FA_SalesJVMod'>";
	if($FA_SalesJVDel=='') 			$FA_SalesJVDel=0;			echo"<input type='hidden' name='FA_SalesJVDel' value='$FA_SalesJVDel'>";
	
	if($FA_transactionpaymnetrqst1=='') 	$FA_transactionpaymnetrqst1=0;		echo"<input type='hidden' name='FA_transactionpaymnetrqst1' value='$FA_transactionpaymnetrqst1'>";
	if($FA_transactionpaymnetrqstApp=='') 	$FA_transactionpaymnetrqstApp=0;	echo"<input type='hidden' name='FA_transactionpaymnetrqstApp' value='$FA_transactionpaymnetrqstApp'>";
	if($FA_transactionpaymnetrqstMod=='') 	$FA_transactionpaymnetrqstMod=0;	echo"<input type='hidden' name='FA_transactionpaymnetrqstMod' value='$FA_transactionpaymnetrqstMod'>";
	if($FA_transactionpaymnetrqstDel=='') 	$FA_transactionpaymnetrqstDel=0;	echo"<input type='hidden' name='FA_transactionpaymnetrqstDel' value='$FA_transactionpaymnetrqstDel'>";
	if($Budget=='') 						$Budget=0;							echo"<input type='hidden' name='Budget' value='$Budget'>";
	if($Inventory1=='') 					$Inventory1=0;						echo"<input type='hidden' name='Inventory1' value='$Inventory1'>";
	if($FI_PurchaseRequestItemTR=='')		$FI_PurchaseRequestItemTR=0;		echo"<input type='hidden' name='FI_PurchaseRequestItemTR' value='$FI_PurchaseRequestItemTR'>";
	if($FI_Adjustment1=='')		 			$FI_Adjustment1=0;					echo"<input type='hidden' name='FI_Adjustment1' value='$FI_Adjustment1'>";
	if($FI_AdjustmentApp=='') 				$FI_AdjustmentApp=0;				echo"<input type='hidden' name='FI_AdjustmentApp' value='$FI_AdjustmentApp'>";
	if($FI_AdjustmentMod=='') 				$FI_AdjustmentMod=0;				echo"<input type='hidden' name='FI_AdjustmentMod' value='$FI_AdjustmentMod'>";
	if($FI_AdjustmentDel=='') 				$FI_AdjustmentDel=0;				echo"<input type='hidden' name='FI_AdjustmentDel' value='$FI_AdjustmentDel'>";
	
	
	if($FI_IN1=='') 						$FI_IN1=0;							echo"<input type='hidden' name='FI_IN1' value='$FI_IN1'>";
	if($FI_INapp=='') 						$FI_INapp=0;						echo"<input type='hidden' name='FI_INapp' value='$FI_INapp'>";
	if($FI_INMod=='')						$FI_INMod=0;						echo"<input type='hidden' name='FI_INMod' value='$FI_INMod'>";
	if($FI_INDel=='') 						$FI_INDel=0;						echo"<input type='hidden' name='FI_INDel' value='$FI_INDel'>";
	if($FI_OUT1=='') 						$FI_OUT1=0;							echo"<input type='hidden' name='FI_OUT1' value='$FI_OUT1'>";
	if($FI_Outapp=='') 						$FI_Outapp=0;						echo"<input type='hidden' name='FI_Outapp' value='$FI_Outapp'>";
	if($FI_OUTMod=='') 						$FI_OUTMod=0;						echo"<input type='hidden' name='FI_OUTMod' value='$FI_OUTMod'>";
	if($FI_OUTDel=='') 						$FI_OUTDel=0;						echo"<input type='hidden' name='FI_OUTDel' value='$FI_OUTDel'>";
	

	
	if($FI_BudgetInv1=='') 					$FI_BudgetInv1=0;					echo"<input type='hidden' name='FI_BudgetInv1' value='$FI_BudgetInv1'>";
	if($FI_BudgetInvApp=='')			 	$FI_BudgetInvApp=0;					echo"<input type='hidden' name='FI_BudgetInvApp' value='$FI_BudgetInvApp'>";
	if($FI_BudgetInvMod=='') 				$FI_BudgetInvMod=0;					echo"<input type='hidden' name='FI_BudgetInvMod' value='$FI_BudgetInvMod'>";
	if($FI_BudgetInvDel=='') 				$FI_BudgetInvDel=0;					echo"<input type='hidden' name='FI_BudgetInvDel' value='$FI_BudgetInvDel'>";
	if($FI_FBudgetInvAmendment1=='') 		$FI_FBudgetInvAmendment1=0;			echo"<input type='hidden' name='FI_FBudgetInvAmendment1' value='$FI_FBudgetInvAmendment1'>";
	if($FI_BudgetInvAmendmentApp=='') 		$FI_BudgetInvAmendmentApp=0;		echo"<input type='hidden' name='FI_BudgetInvAmendmentApp' value='$FI_BudgetInvAmendmentApp'>";
	if($FI_BudgetInvAmendmentMod=='') 		$FI_BudgetInvAmendmentMod=0;		echo"<input type='hidden' name='FI_BudgetInvAmendmentMod' value='$FI_BudgetInvAmendmentMod'>";
	if($FI_BudgetInvAmendmentDel=='') 		$FI_BudgetInvAmendmentDel=0;		echo"<input type='hidden' name='FI_BudgetInvAmendmentDel' value='$FI_BudgetInvAmendmentDel'>";
	if($FI_FBudgetInvSetup1=='') 			$FI_FBudgetInvSetup1=0;				echo"<input type='hidden' name='FI_FBudgetInvSetup1' value='$FI_FBudgetInvSetup1'>";
	if($FI_BudgetInvSetupApp=='') 			$FI_BudgetInvSetupApp=0;			echo"<input type='hidden' name='FI_BudgetInvSetupApp' value='$FI_BudgetInvSetupApp'>";
	if($FI_BudgetInvSetupMod=='')	 		$FI_BudgetInvSetupMod=0;			echo"<input type='hidden' name='FI_BudgetInvSetupMod' value='$FI_BudgetInvSetupMod'>";
	if($FI_BudgetInvSetupDel=='') 			$FI_BudgetInvSetupDel=0;			echo"<input type='hidden' name='FI_BudgetInvSetupDel' value='$FI_BudgetInvSetupDel'>";
	if($FI_Category1=='') 					$FI_Category1=0;					echo"<input type='hidden' name='FI_Category1' value='$FI_Category1'>";
	if($FI_CategoryApp=='') 				$FI_CategoryApp=0;					echo"<input type='hidden' name='FI_CategoryApp' value='$FI_CategoryApp'>";
	if($FI_CategoryMod=='') 				$FI_CategoryMod=0;					echo"<input type='hidden' name='FI_CategoryMod' value='$FI_CategoryMod'>";
	if($FI_CategoryDel=='') 				$FI_CategoryDel=0;					echo"<input type='hidden' name='FI_CategoryDel' value='$FI_CategoryDel'>";
	if($FI_CEPtable1=='') 					$FI_CEPtable1=0;					echo"<input type='hidden' name='FI_CEPtable1' value='$FI_CEPtable1'>";
	if($FI_CEPtableApp=='') 				$FI_CEPtableApp=0;					echo"<input type='hidden' name='FI_CEPtableApp' value='$FI_CEPtableApp'>";
	if($FI_CEPtableMod=='')			 		$FI_CEPtableMod=0;					echo"<input type='hidden' name='FI_CEPtableMod' value='$FI_CEPtableMod'>";
	if($FI_CEPtableDel=='') 				$FI_CEPtableDel=0;					echo"<input type='hidden' name='FI_CEPtableDel' value='$FI_CEPtableDel'>";
	if($FI_Charges1=='') 					$FI_Charges1=0;						echo"<input type='hidden' name='FI_Charges1' value='$FI_Charges1'>";
	if($FI_ChargesApp=='') 					$FI_ChargesApp=0;					echo"<input type='hidden' name='FI_ChargesApp' value='$FI_ChargesApp'>";
	if($FI_ChargesMod=='') 					$FI_ChargesMod=0;					echo"<input type='hidden' name='FI_ChargesMod' value='$FI_ChargesMod'>";
	if($FI_ChargesDel=='') 					$FI_ChargesDel=0;					echo"<input type='hidden' name='FI_ChargesDel' value='$FI_ChargesDel'>";
	if($Clients1=='') 						$Clients1=0;						echo"<input type='hidden' name='Clients1' value='$Clients1'>";
	if($ClientApp=='') 						$ClientApp=0;						echo"<input type='hidden' name='ClientApp' value='$ClientApp'>";
	if($ClientMod=='') 						$ClientMod=0;						echo"<input type='hidden' name='ClientMod' value='$ClientMod'>";
	if($ClientDel=='') 						$ClientDel=0;						echo"<input type='hidden' name='ClientDel' value='$ClientDel'>";
	
	if($FI_ClientGrp1=='') 					$FI_ClientGrp1=0;			echo"<input type='hidden' name='FI_ClientGrp1' value='$FI_ClientGrp1'>";
	if($FI_ClientGrpApp=='') 				$FI_ClientGrpApp=0;			echo"<input type='hidden' name='FI_ClientGrpApp' value='$FI_ClientGrpApp'>";
	if($FI_ClientGrpMod=='') 				$FI_ClientGrpMod=0;			echo"<input type='hidden' name='FI_ClientGrpMod' value='$FI_ClientGrpMod'>";
	if($FI_ClientGrpDel=='') 				$FI_ClientGrpDel=0;			echo"<input type='hidden' name='FI_ClientGrpDel' value='$FI_ClientGrpDel'>";
	if($FI_Delivery1=='') 					$FI_Delivery1=0;			echo"<input type='hidden' name='FI_Delivery1' value='$FI_Delivery1'>";
	if($FI_DeliveryApp=='') 				$FI_DeliveryApp=0;			echo"<input type='hidden' name='FI_DeliveryApp' value='$FI_DeliveryApp'>";
	if($FI_DeliveryMod=='') 				$FI_DeliveryMod=0;			echo"<input type='hidden' name='FI_DeliveryMod' value='$FI_DeliveryMod'>";
	if($FI_DeliveryDel=='') 				$FI_DeliveryDel=0;			echo"<input type='hidden' name='FI_DeliveryDel' value='$FI_DeliveryDel'>";
	if($FI_Grouping1=='') 					$FI_Grouping1=0;			echo"<input type='hidden' name='FI_Grouping1' value='$FI_Grouping1'>";
	if($FI_GroupingApp=='') 				$FI_GroupingApp=0;			echo"<input type='hidden' name='FI_GroupingApp' value='$FI_GroupingApp'>";
	if($FI_GroupingMod=='')					$FI_GroupingMod=0;			echo"<input type='hidden' name='FI_GroupingMod' value='$FI_GroupingMod'>";
	if($FI_GroupingDel=='') 				$FI_GroupingDel=0;			echo"<input type='hidden' name='FI_GroupingDel' value='$FI_GroupingDel'>";
	if($FI_Items1=='') 						$FI_Items1=0;				echo"<input type='hidden' name='FI_Items1' value='$FI_Items1'>";
	if($FI_ItemsApp=='') 					$FI_ItemsApp=0;				echo"<input type='hidden' name='FI_ItemsApp' value='$FI_ItemsApp'>";
	if($FI_ItemsMod=='') 					$FI_ItemsMod=0;				echo"<input type='hidden' name='FI_ItemsMod' value='$FI_ItemsMod'>";
	if($FI_ItemsDel=='') 					$FI_ItemsDel=0;				echo"<input type='hidden' name='FI_ItemsDel' value='$FI_ItemsDel'>";
	if($FI_Production1=='') 				$FI_Production1=0;			echo"<input type='hidden' name='FI_Production1' value='$FI_Production1'>";
	if($FI_itemlocation=='') 				$FI_itemlocation=0;			echo"<input type='hidden' name='FI_itemlocation' value='$FI_itemlocation'>";
	if($FI_ProductionApp=='') 				$FI_ProductionApp=0;		echo"<input type='hidden' name='FI_ProductionApp' value='$FI_ProductionApp'>";
	if($FI_ProductionMod=='') 				$FI_ProductionMod=0;		echo"<input type='hidden' name='FI_ProductionMod' value='$FI_ProductionMod'>";
	if($FI_ProductionDel=='') 				$FI_ProductionDel=0;		echo"<input type='hidden' name='FI_ProductionDel' value='$FI_ProductionDel'>";
	if($FI_ProductionReq1=='') 				$FI_ProductionReq1=0;		echo"<input type='hidden' name='FI_ProductionReq1' value='$FI_ProductionReq1'>";
	if($FI_ProductionReqApp=='') 			$FI_ProductionReqApp=0;		echo"<input type='hidden' name='FI_ProductionReqApp' value='$FI_ProductionReqApp'>";
	if($FI_ProductionReqMod=='') 			$FI_ProductionReqMod=0;		echo"<input type='hidden' name='FI_ProductionReqMod' value='$FI_ProductionReqMod'>";
	if($FI_ProductionReqDel=='') 			$FI_ProductionReqDel=0;		echo"<input type='hidden' name='FI_ProductionReqDel' value='$FI_ProductionReqDel'>";
	if($FI_ProductionTemp1=='') 			$FI_ProductionTemp1=0;		echo"<input type='hidden' name='FI_ProductionTemp1' value='$FI_ProductionTemp1'>";
	if($FI_ProductionTempApp=='') 			$FI_ProductionTempApp=0;	echo"<input type='hidden' name='FI_ProductionTempApp' value='$FI_ProductionTempApp'>";
	if($FI_ProductionTempMod=='') 			$FI_ProductionTempMod=0;	echo"<input type='hidden' name='FI_ProductionTempMod' value='$FI_ProductionTempMod'>";
	if($FI_ProductionTempDel=='') 			$FI_ProductionTempDel=0;	echo"<input type='hidden' name='FI_ProductionTempDel' value='$FI_ProductionTempDel'>";
	if($FI_Purchases1=='') 					$FI_Purchases1=0;			echo"<input type='hidden' name='FI_Purchases1' value='$FI_Purchases1'>";
	if($FI_PurchasesApp=='') 				$FI_PurchasesApp=0;			echo"<input type='hidden' name='FI_PurchasesApp' value='$FI_PurchasesApp'>";
	if($FI_PurchasesMod=='') 				$FI_PurchasesMod=0;			echo"<input type='hidden' name='FI_PurchasesMod' value='$FI_PurchasesMod'>";
	if($FI_PurchasesDel=='') 				$FI_PurchasesDel=0;			echo"<input type='hidden' name='FI_PurchasesDel' value='$FI_PurchasesDel'>";
	if($FI_Grn1=='') 						$FI_Grn1=0;					echo"<input type='hidden' name='FI_Grn1' value='$FI_Grn1'>";
	if($FI_GrnApp=='') 						$FI_GrnApp=0;				echo"<input type='hidden' name='FI_GrnApp' value='$FI_GrnApp'>";
	if($FI_GrnMod=='') 						$FI_GrnMod=0;				echo"<input type='hidden' name='FI_GrnMod' value='$FI_GrnMod'>";
	if($FI_GrnDel=='') 						$FI_GrnDel=0;				echo"<input type='hidden' name='FI_GrnDel' value='$FI_GrnDel'>";
	if($FI_PurchaseOrder1=='') 				$FI_PurchaseOrder1=0;		echo"<input type='hidden' name='FI_PurchaseOrder1' value='$FI_PurchaseOrder1'>";
	if($FI_PurchaseOrderApp=='') 			$FI_PurchaseOrderApp=0;		echo"<input type='hidden' name='FI_PurchaseOrderApp' value='$FI_PurchaseOrderApp'>";
	if($FI_PurchaseOrderMod=='') 			$FI_PurchaseOrderMod=0;		echo"<input type='hidden' name='FI_PurchaseOrderMod' value='$FI_PurchaseOrderMod'>";
	if($FI_PurchaseOrderDel=='') 			$FI_PurchaseOrderDel=0;		echo"<input type='hidden' name='FI_PurchaseOrderDel' value='$FI_PurchaseOrderDel'>";
	if($FI_PurchaseRequest1=='') 			$FI_PurchaseRequest1=0;		echo"<input type='hidden' name='FI_PurchaseRequest1' value='$FI_PurchaseRequest1'>";
	if($FI_PurchaseRequestApp=='') 			$FI_PurchaseRequestApp=0;	echo"<input type='hidden' name='FI_PurchaseRequestApp' value='$FI_PurchaseRequestApp'>";
	if($FI_PurchaseRequestMod=='') 			$FI_PurchaseRequestMod=0;	echo"<input type='hidden' name='FI_PurchaseRequestMod' value='$FI_PurchaseRequestMod'>";
	if($FI_PRequestConfirmed=='') 			$FI_PRequestConfirmed=0;	echo"<input type='hidden' name='FI_PRequestConfirmed' value='$FI_PRequestConfirmed'>";
	if($FI_PurchaseRequestDel=='') 			$FI_PurchaseRequestDel=0;	echo"<input type='hidden' name='FI_PurchaseRequestDel' value='$FI_PurchaseRequestDel'>";
	if($FI_ReportOptions1=='')			 	$FI_ReportOptions1=0;		echo"<input type='hidden' name='FI_ReportOptions1' value='$FI_ReportOptions1'>";
	if($FI_ReturnDelivery1=='') 			$FI_ReturnDelivery1=0;		echo"<input type='hidden' name='FI_ReturnDelivery1' value='$FI_ReturnDelivery1'>";
	if($FI_ReturnDeliveryApp=='') 			$FI_ReturnDeliveryApp=0;	echo"<input type='hidden' name='FI_ReturnDeliveryApp' value='$FI_ReturnDeliveryApp'>";
	if($FI_ReturnDeliveryMod=='') 			$FI_ReturnDeliveryMod=0;	echo"<input type='hidden' name='FI_ReturnDeliveryMod' value='$FI_ReturnDeliveryMod'>";
	if($FI_ReturnDeliveryDel=='') 			$FI_ReturnDeliveryDel=0;	echo"<input type='hidden' name='FI_ReturnDeliveryDel' value='$FI_ReturnDeliveryDel'>";
	if($FI_ReturnPurchase1=='') 			$FI_ReturnPurchase1=0;		echo"<input type='hidden' name='FI_ReturnPurchase1' value='$FI_ReturnPurchase1'>";
	if($FI_ReturnPurchaseApp=='') 			$FI_ReturnPurchaseApp=0;	echo"<input type='hidden' name='FI_ReturnPurchaseApp' value='$FI_ReturnPurchaseApp'>";
	if($FI_ReturnPurchaseMod=='') 			$FI_ReturnPurchaseMod=0;	echo"<input type='hidden' name='FI_ReturnPurchaseMod' value='$FI_ReturnPurchaseMod'>";
	if($FI_ReturnPurchaseDel=='') 			$FI_ReturnPurchaseDel=0;	echo"<input type='hidden' name='FI_ReturnPurchaseDel' value='$FI_ReturnPurchaseDel'>";
	if($FI_ReturnGrn1=='') 					$FI_ReturnGrn1=0;			echo"<input type='hidden' name='FI_ReturnGrn1' value='$FI_ReturnGrn1'>";
	if($FI_ReturnGrnApp=='') 				$FI_ReturnGrnApp=0;			echo"<input type='hidden' name='FI_ReturnGrnApp' value='$FI_ReturnGrnApp'>";
	if($FI_ReturnGrnMod=='') 				$FI_ReturnGrnMod=0;			echo"<input type='hidden' name='FI_ReturnGrnMod' value='$FI_ReturnGrnMod'>";
	if($FI_ReturnGrnDel=='') 				$FI_ReturnGrnDel=0;			echo"<input type='hidden' name='FI_ReturnGrnDel' value='$FI_ReturnGrnDel'>";
	if($FI_ReturnRma1=='') 					$FI_ReturnRma1=0;			echo"<input type='hidden' name='FI_ReturnRma1' value='$FI_ReturnRma1'>";
	if($FI_ReturnRmaApp=='')		 		$FI_ReturnRmaApp=0;			echo"<input type='hidden' name='FI_ReturnRmaApp' value='$FI_ReturnRmaApp'>";
	if($FI_ReturnRmaMod=='') 				$FI_ReturnRmaMod=0;			echo"<input type='hidden' name='FI_ReturnRmaMod' value='$FI_ReturnRmaMod'>";
	
	if($FI_ReturnRmaDel=='') 				$FI_ReturnRmaDel=0;			echo"<input type='hidden' name='FI_ReturnRmaDel' value='$FI_ReturnRmaDel'>";
	if($FI_ReturnSales1=='') 				$FI_ReturnSales1=0;			echo"<input type='hidden' name='FI_ReturnSales1' value='$FI_ReturnSales1'>";
	if($FI_ReturnSalesApp=='') 				$FI_ReturnSalesApp=0;		echo"<input type='hidden' name='FI_ReturnSalesApp' value='$FI_ReturnSalesApp'>";
	if($FI_ReturnSalesMod=='') 				$FI_ReturnSalesMod=0;		echo"<input type='hidden' name='FI_ReturnSalesMod' value='$FI_ReturnSalesMod'>";
	if($FI_ReturnSalesDel=='') 				$FI_ReturnSalesDel=0;		echo"<input type='hidden' name='FI_ReturnSalesDel' value='$FI_ReturnSalesDel'>";
	if($FI_RRmTransfer1=='') 				$FI_RRmTransfer1=0;			echo"<input type='hidden' name='FI_RRmTransfer1' value='$FI_RRmTransfer1'>";
	if($FI_RmTransferApp=='')				$FI_RmTransferApp=0;		echo"<input type='hidden' name='FI_RmTransferApp' value='$FI_RmTransferApp'>";
	if($FI_RmTransferMod=='') 				$FI_RmTransferMod=0;		echo"<input type='hidden' name='FI_RmTransferMod' value='$FI_RmTransferMod'>";
	if($FI_IRmTransferDel=='') 				$FI_IRmTransferDel=0;		echo"<input type='hidden' name='FI_IRmTransferDel' value='$FI_IRmTransferDel'>";
	if($FI_Rma1=='') 						$FI_Rma1=0;					echo"<input type='hidden' name='FI_Rma1' value='$FI_Rma1'>";
	if($FI_RmaApp=='') 						$FI_RmaApp=0;				echo"<input type='hidden' name='FI_RmaApp' value='$FI_RmaApp'>";
	if($FI_RmaMod=='') 						$FI_RmaMod=0;				echo"<input type='hidden' name='FI_RmaMod' value='$FI_RmaMod'>";
	if($FI_RmaDel=='') 						$FI_RmaDel=0;				echo"<input type='hidden' name='FI_RmaDel' value='$FI_RmaDel'>";
	if($FI_Sales1=='') 						$FI_Sales1=0;				echo"<input type='hidden' name='FI_Sales1' value='$FI_Sales1'>";
	if($FI_SalesApp=='') 					$FI_SalesApp=0;				echo"<input type='hidden' name='FI_SalesApp' value='$FI_SalesApp'>";
	if($FI_SalesMod=='') 					$FI_SalesMod=0;				echo"<input type='hidden' name='FI_SalesMod' value='$FI_SalesMod'>";
	if($FI_SalesDel=='') 					$FI_SalesDel=0;				echo"<input type='hidden' name='FI_SalesDel' value='$FI_SalesDel'>";
	if($FI_SalesOrder1=='') 				$FI_SalesOrder1=0;			echo"<input type='hidden' name='FI_SalesOrder1' value='$FI_SalesOrder1'>";
	if($FI_SalesOrderApp=='') 				$FI_SalesOrderApp=0;		echo"<input type='hidden' name='FI_SalesOrderApp' value='$FI_SalesOrderApp'>";
	if($FI_SalesOrderMod=='') 				$FI_SalesOrderMod=0;		echo"<input type='hidden' name='FI_SalesOrderMod' value='$FI_SalesOrderMod'>";
	if($FI_SalesOrderDel=='') 				$FI_SalesOrderDel=0;		echo"<input type='hidden' name='FI_SalesOrderDel' value='$FI_SalesOrderDel'>";
	if($FI_Salesmen1=='') 					$FI_Salesmen1=0;			echo"<input type='hidden' name='FI_Salesmen1' value='$FI_Salesmen1'>";
	if($FI_SalesmenApp=='') 				$FI_SalesmenApp=0;			echo"<input type='hidden' name='FI_SalesmenApp' value='$FI_SalesmenApp'>";
	if($FI_SalesmenMod=='') 				$FI_SalesmenMod=0;			echo"<input type='hidden' name='FI_SalesmenMod' value='$FI_SalesmenMod'>";
	if($FI_SalesmenDel=='') 				$FI_SalesmenDel=0;			echo"<input type='hidden' name='FI_SalesmenDel' value='$FI_SalesmenDel'>";
	if($FI_Shipment1=='') 					$FI_Shipment1=0;			echo"<input type='hidden' name='FI_Shipment1' value='$FI_Shipment1'>";
	
//	if($FI_ShipmentApp=='') $FI_ShipmentApp=0;echo"<input type='hidden' name='FI_ShipmentApp' value='$FI_ShipmentApp'>";
	if($FI_ShipmentMod=='') $FI_ShipmentMod=0;echo"<input type='hidden' name='FI_ShipmentMod' value='$FI_ShipmentMod'>";
	if($FI_ShipmentDel=='') $FI_ShipmentDel=0;echo"<input type='hidden' name='FI_ShipmentDel' value='$FI_ShipmentDel'>";
	if($FI_stockeval1=='') $FI_stockeval1=0;echo"<input type='hidden' name='FI_stockeval1' value='$FI_stockeval1'>";
	if($FI_stockevalApp=='') $FI_stockevalApp=0;echo"<input type='hidden' name='FI_stockevalApp' value='$FI_stockevalApp'>";
	if($FI_stockevalMod=='') $FI_stockevalMod=0;echo"<input type='hidden' name='FI_stockevalMod' value='$FI_stockevalMod'>";
	if($FI_stockevalDel=='') $FI_stockevalDel=0;echo"<input type='hidden' name='FI_stockevalDel' value='$FI_stockevalDel'>";
	if($FI_SubGrouping1=='') $FI_SubGrouping1=0;echo"<input type='hidden' name='FI_SubGrouping1' value='$FI_SubGrouping1'>";
	if($FI_SubGroupingApp=='') $FI_SubGroupingApp=0;echo"<input type='hidden' name='FI_SubGroupingApp' value='$FI_SubGroupingApp'>";
	if($FI_SubGroupingMod=='') $FI_SubGroupingMod=0;echo"<input type='hidden' name='FI_SubGroupingMod' value='$FI_SubGroupingMod'>";
	if($FI_SubGroupingDel=='') $FI_SubGroupingDel=0;echo"<input type='hidden' name='FI_SubGroupingDel' value='$FI_SubGroupingDel'>";
	if($FI_Suppliers1=='') $FI_Suppliers1=0;echo"<input type='hidden' name='FI_Suppliers1' value='$FI_Suppliers1'>";
	if($FI_SuppliersApp=='') $FI_SuppliersApp=0;echo"<input type='hidden' name='FI_SuppliersApp' value='$FI_SuppliersApp'>";
	if($FI_SuppliersMod=='') $FI_SuppliersMod=0;echo"<input type='hidden' name='FI_SuppliersMod' value='$FI_SuppliersMod'>";
	if($FI_SuppliersDel=='') $FI_SuppliersDel=0;echo"<input type='hidden' name='FI_SuppliersDel' value='$FI_SuppliersDel'>";
	if($FI_SupplierGrp1=='') $FI_SupplierGrp1=0;echo"<input type='hidden' name='FI_SupplierGrp1' value='$FI_SupplierGrp1'>";
	if($FI_SupplierGrpApp=='') $FI_SupplierGrpApp=0;echo"<input type='hidden' name='FI_SupplierGrpApp' value='$FI_SupplierGrpApp'>";
	if($FI_SupplierGrpMod=='') $FI_SupplierGrpMod=0;echo"<input type='hidden' name='FI_SupplierGrpMod' value='$FI_SupplierGrpMod'>";
	if($FI_SupplierGrpDel=='') $FI_SupplierGrpDel=0;echo"<input type='hidden' name='FI_SupplierGrpDel' value='$FI_SupplierGrpDel'>";
	if($FI_Transfer1=='') $FI_Transfer1=0;echo"<input type='hidden' name='FI_Transfer1' value='$FI_Transfer1'>";
	if($FI_TransferApp=='') $FI_TransferApp=0;echo"<input type='hidden' name='FI_TransferApp' value='$FI_TransferApp'>";
	if($FI_TransferMod=='') $FI_TransferMod=0;echo"<input type='hidden' name='FI_TransferMod' value='$FI_TransferMod'>";
	if($FI_TransferDel=='') $FI_TransferDel=0;echo"<input type='hidden' name='FI_TransferDel' value='$FI_TransferDel'>";
	if($FI_ITransfer1=='') $FI_ITransfer1=0;echo"<input type='hidden' name='FI_ITransfer1' value='$FI_ITransfer1'>";
	if($FI_ITransferApp=='') $FI_ITransferApp=0;echo"<input type='hidden' name='FI_ITransferApp' value='$FI_ITransferApp'>";
	if($FI_ITransferMod=='') $FI_ITransferMod=0;echo"<input type='hidden' name='FI_ITransferMod' value='$FI_ITransferMod'>";
	if($FI_ITransferDel=='') $FI_ITransferDel=0;echo"<input type='hidden' name='FI_ITransferDel' value='$FI_ITransferDel'>";
	if($FI_Transportation1=='') $FI_Transportation1=0;echo"<input type='hidden' name='FI_Transportation1' value='$FI_Transportation1'>";
	if($FI_TransportationApp=='') $FI_TransportationApp=0;echo"<input type='hidden' name='FI_TransportationApp' value='$FI_TransportationApp'>";
	if($FI_TransportationMod=='') $FI_TransportationMod=0;echo"<input type='hidden' name='FI_TransportationMod' value='$FI_TransportationMod'>";
	if($FI_TransportationDel=='') $FI_TransportationDel=0;echo"<input type='hidden' name='FI_TransportationDel' value='$FI_TransportationDel'>";
	if($FI_Warehouse1=='') $FI_Warehouse1=0;echo"<input type='hidden' name='FI_Warehouse1' value='$FI_Warehouse1'>";
	if($FI_WarehouseApp=='') $FI_WarehouseApp=0;echo"<input type='hidden' name='FI_WarehouseApp' value='$FI_WarehouseApp'>";
	if($FI_WarehouseMod=='') $FI_WarehouseMod=0;echo"<input type='hidden' name='FI_WarehouseMod' value='$FI_WarehouseMod'>";
	if($FI_WarehouseDel=='') $FI_WarehouseDel=0;echo"<input type='hidden' name='FI_WarehouseDel' value='$FI_WarehouseDel'>";
	if($FI_WayBill1=='') $FI_WayBill1=0;echo"<input type='hidden' name='FI_WayBill1' value='$FI_WayBill1'>";
	if($FI_WayBillApp=='') $FI_WayBillApp=0;echo"<input type='hidden' name='FI_WayBillApp' value='$FI_WayBillApp'>";
	if($FI_WayBillMod=='') $FI_WayBillMod=0;echo"<input type='hidden' name='FI_WayBillMod' value='$FI_WayBillMod'>";
	if($FI_WayBillDel=='') $FI_WayBillDel=0;echo"<input type='hidden' name='FI_WayBillDel' value='$FI_WayBillDel'>";
	if($FP_Attendance1=='') $FP_Attendance1=0;echo"<input type='hidden' name='FP_Attendance1' value='$FP_Attendance1'>";
	if($payroll1=='') $payroll1=0;echo"<input type='hidden' name='payroll1' value='$payroll1'>";
	if($FP_AttendanceApp=='') $FP_AttendanceApp=0;echo"<input type='hidden' name='FP_AttendanceApp' value='$FP_AttendanceApp'>";
	if($FP_AttendanceMod=='') $FP_AttendanceMod=0;echo"<input type='hidden' name='FP_AttendanceMod' value='$FP_AttendanceMod'>";
	if($FP_AttendanceDel=='') $FP_AttendanceDel=0;echo"<input type='hidden' name='FP_AttendanceDel' value='$FP_AttendanceDel'>";
	if($FP_Bonus1=='') $FP_Bonus1=0;echo"<input type='hidden' name='FP_Bonus1' value='$FP_Bonus1'>";
	if($FP_BonusApp=='') $FP_BonusApp=0;echo"<input type='hidden' name='FP_BonusApp' value='$FP_BonusApp'>";
	if($FP_BonusMod=='') $FP_BonusMod=0;echo"<input type='hidden' name='FP_BonusMod' value='$FP_BonusMod'>";
	if($FP_BonusDel=='') $FP_BonusDel=0;echo"<input type='hidden' name='FP_BonusDel' value='$FP_BonusDel'>";
	if($FP_Dept1=='') $FP_Dept1=0;echo"<input type='hidden' name='FP_Dept1' value='$FP_Dept1'>";
	if($FP_DeptApp=='') $FP_DeptApp=0;echo"<input type='hidden' name='FP_DeptApp' value='$FP_DeptApp'>";
	if($FP_DeptMod=='') $FP_DeptMod=0;echo"<input type='hidden' name='FP_DeptMod' value='$FP_DeptMod'>";
	if($FP_DeptDel=='') $FP_DeptDel=0;echo"<input type='hidden' name='FP_DeptDel' value='$FP_DeptDel'>";
	if($FP_Employee1=='') $FP_Employee1=0;echo"<input type='hidden' name='FP_Employee1' value='$FP_Employee1'>";
	if($FP_EmployeeApp=='') $FP_EmployeeApp=0;echo"<input type='hidden' name='FP_EmployeeApp' value='$FP_EmployeeApp'>";
	if($FP_EmployeeMod=='') $FP_EmployeeMod=0;echo"<input type='hidden' name='FP_EmployeeMod' value='$FP_EmployeeMod'>";
	if($FP_EmployeeDel=='') $FP_EmployeeDel=0;echo"<input type='hidden' name='FP_EmployeeDel' value='$FP_EmployeeDel'>";
	if($FP_Generate1=='') $FP_Generate1=0;echo"<input type='hidden' name='FP_Generate1' value='$FP_Generate1'>";
	if($FP_GenerateApp=='') $FP_GenerateApp=0;echo"<input type='hidden' name='FP_GenerateApp' value='$FP_GenerateApp'>";
	if($FP_GenerateMod=='') $FP_GenerateMod=0;echo"<input type='hidden' name='FP_GenerateMod' value='$FP_GenerateMod'>";
	if($FP_GenerateDel=='') $FP_GenerateDel=0;echo"<input type='hidden' name='FP_GenerateDel' value='$FP_GenerateDel'>";
	if($FP_Grades1=='') $FP_Grades1=0;echo"<input type='hidden' name='FP_Grades1' value='$FP_Grades1'>";
	if($FP_GradesApp=='') $FP_GradesApp=0;echo"<input type='hidden' name='FP_GradesApp' value='$FP_GradesApp'>";
	if($FP_GradesMod=='') $FP_GradesMod=0;echo"<input type='hidden' name='FP_GradesMod' value='$FP_GradesMod'>";
	if($FP_GradesDel=='') $FP_GradesDel=0;echo"<input type='hidden' name='FP_GradesDel' value='$FP_GradesDel'>";
	if($FP_Insurance1=='') $FP_Insurance1=0;echo"<input type='hidden' name='FP_Insurance1' value='$FP_Insurance1'>";
	if($FP_InsuranceApp=='') $FP_InsuranceApp=0;echo"<input type='hidden' name='FP_InsuranceApp' value='$FP_InsuranceApp'>";
	if($FP_InsuranceMod=='') $FP_InsuranceMod=0;echo"<input type='hidden' name='FP_InsuranceMod' value='$FP_InsuranceMod'>";
	if($FP_InsuranceDel=='') $FP_InsuranceDel=0;echo"<input type='hidden' name='FP_InsuranceDel' value='$FP_InsuranceDel'>";
	if($FP_Loan1=='') $FP_Loan1=0;echo"<input type='hidden' name='FP_Loan1' value='$FP_Loan1'>";
	if($FP_LoanApp=='') $FP_LoanApp=0;echo"<input type='hidden' name='FP_LoanApp' value='$FP_LoanApp'>";
	if($FP_LoanMod=='') $FP_LoanMod=0;echo"<input type='hidden' name='FP_LoanMod' value='$FP_LoanMod'>";
	if($FP_LoanDel=='') $FP_LoanDel=0;echo"<input type='hidden' name='FP_LoanDel' value='$FP_LoanDel'>";
	if($FP_Parameters1=='') $FP_Parameters1=0;echo"<input type='hidden' name='FP_Parameters1' value='$FP_Parameters1'>";
	if($FP_ParametersApp=='') $FP_ParametersApp=0;echo"<input type='hidden' name='FP_ParametersApp' value='$FP_ParametersApp'>";
	if($FP_ParametersMod=='') $FP_ParametersMod=0;echo"<input type='hidden' name='FP_ParametersMod' value='$FP_ParametersMod'>";
	if($FP_ParametersDel=='') $FP_ParametersDel=0;echo"<input type='hidden' name='FP_ParametersDel' value='$FP_ParametersDel'>";
	if($FP_Fpreemp1=='') $FP_Fpreemp1=0;echo"<input type='hidden' name='FP_Fpreemp1' value='$FP_Fpreemp1'>";
	if($FP_preempApp=='') $FP_preempApp=0;echo"<input type='hidden' name='FP_preempApp' value='$FP_preempApp'>";
	if($FP_preempMod=='') $FP_preempMod=0;echo"<input type='hidden' name='FP_preempMod' value='$FP_preempMod'>";
	if($FP_preempDel=='') $FP_preempDel=0;echo"<input type='hidden' name='FP_preempDel' value='$FP_preempDel'>";
	if($FP_Project1=='') $FP_Project1=0;echo"<input type='hidden' name='FP_Project1' value='$FP_Project1'>";
	if($FP_ProjectApp=='') $FP_ProjectApp=0;echo"<input type='hidden' name='FP_ProjectApp' value='$FP_ProjectApp'>";
	if($FP_ProjectMod=='') $FP_ProjectMod=0;echo"<input type='hidden' name='FP_ProjectMod' value='$FP_ProjectMod'>";
	if($FP_ProjectDel=='') $FP_ProjectDel=0;echo"<input type='hidden' name='FP_ProjectDel' value='$FP_ProjectDel'>";
	if($FP_ReportOptions1=='') $FP_ReportOptions1=0;echo"<input type='hidden' name='FP_ReportOptions1' value='$FP_ReportOptions1'>";
	if($FP_Vacation1=='') $FP_Vacation1=0;echo"<input type='hidden' name='FP_Vacation1' value='$FP_Vacation1'>";
	if($FP_VacationApp=='') $FP_VacationApp=0;echo"<input type='hidden' name='FP_VacationApp' value='$FP_VacationApp'>";
	if($FP_VacationMod=='') $FP_VacationMod=0;echo"<input type='hidden' name='FP_VacationMod' value='$FP_VacationMod'>";
	if($FP_VacationDel=='') $FP_VacationDel=0;echo"<input type='hidden' name='FP_VacationDel' value='$FP_VacationDel'>";
	if($Access_UserManager1=='') $Access_UserManager1=0;echo"<input type='hidden' name='Access_UserManager1' value='$Access_UserManager1'>";
	if($Access1=='') $Access1=0;echo"<input type='hidden' name='Access1' value='$Access1'>";
	if($RA_StatementofAccount1=='') $RA_StatementofAccount1=0;echo"<input type='hidden' name='RA_StatementofAccount1' value='$RA_StatementofAccount1'>";
	if($RA_Trialbalance1=='') $RA_Trialbalance1=0;echo"<input type='hidden' name='RA_Trialbalance1' value='$RA_Trialbalance1'>";
	if($RA_StatementofProject1=='') $RA_StatementofProject1=0;echo"<input type='hidden' name='RA_StatementofProject1' value='$RA_StatementofProject1'>";
	if($RA_StatmentofCostcenter1=='') $RA_StatmentofCostcenter1=0;echo"<input type='hidden' name='RA_StatmentofCostcenter1' value='$RA_StatmentofCostcenter1'>";
	if($RA_Aging1=='') $RA_Aging1=0;echo"<input type='hidden' name='RA_Aging1' value='$RA_Aging1'>";
	if($RA_AgingOfSupplierInvoices1=='') $RA_AgingOfSupplierInvoices1=0;echo"<input type='hidden' name='RA_AgingOfSupplierInvoices1' value='$RA_AgingOfSupplierInvoices1'>";
	if($RA_AgingOfClientInvoices1=='') $RA_AgingOfClientInvoices1=0;echo"<input type='hidden' name='RA_AgingOfClientInvoices1' value='$RA_AgingOfClientInvoices1'>";
//	if($RA_FinancialAccounts=='') $RA_FinancialAccounts=0;echo"<input type='hidden' name='RA_FinancialAccounts' value='$RA_FinancialAccounts'>";
	if($FA_DailyReport1=='') $FA_DailyReport1=0;echo"<input type='hidden' name='FA_DailyReport1' value='$FA_DailyReport1'>";
	if($RA_StatisticsReport1=='') $RA_StatisticsReport1=0;echo"<input type='hidden' name='RA_StatisticsReport1' value='$RA_StatisticsReport1'>";
	if($RA_TransactionJV1=='') $RA_TransactionJV1=0;echo"<input type='hidden' name='RA_TransactionJV1' value='$RA_TransactionJV1'>";
	if($RA_SalesJV1=='') $RA_SalesJV1=0;echo"<input type='hidden' name='RA_SalesJV1' value='$RA_SalesJV1'>";
	if($RA_PurchasesJV1=='') $RA_PurchasesJV1=0;echo"<input type='hidden' name='RA_PurchasesJV1' value='$RA_PurchasesJV1'>";
	if($RA_GeneralLedger1=='') $RA_GeneralLedger1=0;echo"<input type='hidden' name='RA_GeneralLedger1' value='$RA_GeneralLedger1'>";
	if($RI_ListTransaction1=='') $RI_ListTransaction1=0;echo"<input type='hidden' name='RI_ListTransaction1' value='$RI_ListTransaction1'>";
	if($RI_Inventory1=='') $RI_Inventory1=0;echo"<input type='hidden' name='RI_Inventory1' value='$RI_Inventory1'>";
	if($RI_SalesReports1=='') $RI_SalesReports1=0;echo"<input type='hidden' name='RI_SalesReports1' value='$RI_SalesReports1'>";
	if($FI_PorderPurRequest1=='') $FI_PorderPurRequest1=0;echo"<input type='hidden' name='FI_PorderPurRequest1' value='$FI_PorderPurRequest1'>";
	if($RI_ListofProduction1=='') $RI_ListofProduction1=0;echo"<input type='hidden' name='RI_ListofProduction1' value='$RI_ListofProduction1'>";
	if($RI_SatementofItems1=='') $RI_SatementofItems1=0;echo"<input type='hidden' name='RI_SatementofItems1' value='$RI_SatementofItems1'>";
	if($RI_YearlySales1=='') $RI_YearlySales1=0;echo"<input type='hidden' name='RI_YearlySales1' value='$RI_YearlySales1'>";
	if($RI_TrackingRMA1=='') $RI_TrackingRMA1=0;echo"<input type='hidden' name='RI_TrackingRMA1' value='$RI_TrackingRMA1'>";
	if($RI_Aging1=='') $RI_Aging1=0;echo"<input type='hidden' name='RI_Aging1' value='$RI_Aging1'>";
	if($RI_InvComparisonReport1=='') $RI_InvComparisonReport1=0;echo"<input type='hidden' name='RI_InvComparisonReport1' value='$RI_InvComparisonReport1'>";
	if($RI_TargetRebateReport1=='') $RI_TargetRebateReport1=0;echo"<input type='hidden' name='RI_TargetRebateReport1' value='$RI_TargetRebateReport1'>";
	if($RI_PorderReport1=='') $RI_PorderReport1=0;echo"<input type='hidden' name='RI_PorderReport1' value='$RI_PorderReport1'>";
	if($RI_PurchaseReports1=='') $RI_PurchaseReports1=0;echo"<input type='hidden' name='RI_PurchaseReports1' value='$RI_PurchaseReports1'>";
	if($RI_SalesOrderReport1=='') $RI_SalesOrderReport1=0;echo"<input type='hidden' name='RI_SalesOrderReport1' value='$RI_SalesOrderReport1'>";
	if($RI_GrnReports1=='') $RI_GrnReports1=0;echo"<input type='hidden' name='RI_GrnReports1' value='$RI_GrnReports1'>";
	if($Edatacom1=='') $Edatacom1=0;echo"<input type='hidden' name='Edatacom1' value='$Edatacom1'>";
	if($Utilities=='') $Utilities=0;echo"<input type='hidden' name='Utilities' value='$Utilities'>";
	if($U_RePostTransaction=='') $U_RePostTransaction=0;echo"<input type='hidden' name='U_RePostTransaction' value='$U_RePostTransaction'>";
	if($FA_ExceedBudgetLimit1=='') $FA_ExceedBudgetLimit1=0;echo"<input type='hidden' name='FA_ExceedBudgetLimit1' value='$FA_ExceedBudgetLimit1'>";
	if($FI_RVPostTransaction1=='') $FI_RVPostTransaction1=0;echo"<input type='hidden' name='FI_RVPostTransaction1' value='$FI_RVPostTransaction1'>";
	if($FI_RepostAdjustment1=='') $FI_RepostAdjustment1=0;echo"<input type='hidden' name='FI_RepostAdjustment1' value='$FI_RepostAdjustment1'>";
	if($ClientsCreditLimit1=='') $ClientsCreditLimit1=0;echo"<input type='hidden' name='ClientsCreditLimit1' value='$ClientsCreditLimit1'>";
	if($FI_DeliverySalesPrice1=='') $FI_DeliverySalesPrice1=0;echo"<input type='hidden' name='FI_DeliverySalesPrice1' value='$FI_DeliverySalesPrice1'>";
	if($FI_SellingPriceInItems1=='') $FI_SellingPriceInItems1=0;echo"<input type='hidden' name='FI_SellingPriceInItems1' value='$FI_SellingPriceInItems1'>";
	if($FI_CostPriceInItems1=='') $FI_CostPriceInItems1=0;echo"<input type='hidden' name='FI_CostPriceInItems1' value='$FI_CostPriceInItems1'>";
	if($FI_ItemSelling1=='') $FI_ItemSelling1=0;echo"<input type='hidden' name='FI_ItemSelling1' value='$FI_ItemSelling1'>";
	if($FI_ItemSelling2=='') $FI_ItemSelling2=0;echo"<input type='hidden' name='FI_ItemSelling2' value='$FI_ItemSelling2'>";
	if($FI_ItemSelling3=='') $FI_ItemSelling3=0;echo"<input type='hidden' name='FI_ItemSelling3' value='$FI_ItemSelling3'>";
	if($FI_ItemSelling4=='') $FI_ItemSelling4=0;echo"<input type='hidden' name='FI_ItemSelling4' value='$FI_ItemSelling4'>";
	if($FI_ItemSelling5=='') $FI_ItemSelling5=0;echo"<input type='hidden' name='FI_ItemSelling5' value='$FI_ItemSelling5'>";
	if($FI_ItemSelling6=='') $FI_ItemSelling6=0;echo"<input type='hidden' name='FI_ItemSelling6' value='$FI_ItemSelling6'>";
//	if($FI_PurchaseCategory1=='') $FI_PurchaseCategory1=0;echo"<input type='hidden' name='FI_PurchaseCategory1' value='$FI_PurchaseCategory1'>";
	if($FI_PurchasesVATMod1=='') $FI_PurchasesVATMod1=0;echo"<input type='hidden' name='FI_PurchasesVATMod1' value='$FI_PurchasesVATMod1'>";
	if($FI_RepostPurchase1=='') $FI_RepostPurchase1=0;echo"<input type='hidden' name='FI_RepostPurchase1' value='$FI_RepostPurchase1'>";
	if($FI_PorderConfirmed1=='') $FI_PorderConfirmed1=0;echo"<input type='hidden' name='FI_PorderConfirmed1' value='$FI_PorderConfirmed1'>";
	if($FI_DelConfirmedPO1=='') $FI_DelConfirmedPO1=0;echo"<input type='hidden' name='FI_DelConfirmedPO1' value='$FI_DelConfirmedPO1'>";
	if($FI_ModConfirmedPO1=='') $FI_ModConfirmedPO1=0;echo"<input type='hidden' name='FI_ModConfirmedPO1' value='$FI_ModConfirmedPO1'>";
	if($FI_RepostPorder1=='') $FI_RepostPorder1=0;echo"<input type='hidden' name='FI_RepostPorder1' value='$FI_RepostPorder1'>";
	if($PRqst_Approvedby1=='') $PRqst_Approvedby1=0;echo"<input type='hidden' name='PRqst_Approvedby1' value='$PRqst_Approvedby1'>";
	if($FI_ReturnPurchasesVAT1=='') $FI_ReturnPurchasesVAT1=0;echo"<input type='hidden' name='FI_ReturnPurchasesVAT1' value='$FI_ReturnPurchasesVAT1'>";
	if($FI_RepostPReturn1=='') $FI_RepostPReturn1=0;echo"<input type='hidden' name='FI_RepostPReturn1' value='$FI_RepostPReturn1'>";
	if($FI_RMAReturnSheetRMA1=='') $FI_RMAReturnSheetRMA1=0;echo"<input type='hidden' name='FI_RMAReturnSheetRMA1' value='$FI_RMAReturnSheetRMA1'>";
	if($FI_RMAReturnSheetReturnRMA1=='') $FI_RMAReturnSheetReturnRMA1=0;echo"<input type='hidden' name='FI_RMAReturnSheetReturnRMA1' value='$FI_RMAReturnSheetReturnRMA1'>";
	if($FI_RSalesCheckSalesman1=='') $FI_RSalesCheckSalesman1=0;echo"<input type='hidden' name='FI_RSalesCheckSalesman1' value='$FI_RSalesCheckSalesman1'>";
	if($FI_ReturnSalesVAT1=='') $FI_ReturnSalesVAT1=0;echo"<input type='hidden' name='FI_ReturnSalesVAT1' value='$FI_ReturnSalesVAT1'>";
	if($FI_ReturnSalesPrintPay1=='') $FI_ReturnSalesPrintPay1=0;echo"<input type='hidden' name='FI_ReturnSalesPrintPay1' value='$FI_ReturnSalesPrintPay1'>";
	if($FI_RepostSReturn1=='') $FI_RepostSReturn1=0;echo"<input type='hidden' name='FI_RepostSReturn1' value='$FI_RepostSReturn1'>";
	if($FI_RMASheetPending1=='') $FI_RMASheetPending1=0;echo"<input type='hidden' name='FI_RMASheetPending1' value='$FI_RMASheetPending1'>";
	if($FI_RMASheetRMA1=='') $FI_RMASheetRMA1=0;echo"<input type='hidden' name='FI_RMASheetRMA1' value='$FI_RMASheetRMA1'>";
	if($FI_SalesCheckSalesman1=='') $FI_SalesCheckSalesman1=0;echo"<input type='hidden' name='FI_SalesCheckSalesman1' value='$FI_SalesCheckSalesman1'>";
	if($FI_SalesVAT1=='') $FI_SalesVAT1=0;echo"<input type='hidden' name='FI_SalesVAT1' value='$FI_SalesVAT1'>";
	if($FI_SalesWithPrice1=='') $FI_SalesWithPrice1=0;echo"<input type='hidden' name='FI_SalesWithPrice1' value='$FI_SalesWithPrice1'>";
	if($FI_SalesPrintReceipt1=='') $FI_SalesPrintReceipt1=0;echo"<input type='hidden' name='FI_SalesPrintReceipt1' value='$FI_SalesPrintReceipt1'>";
	if($FI_RepostSales1=='') $FI_RepostSales1=0;echo"<input type='hidden' name='FI_RepostSales1' value='$FI_RepostSales1'>";
	if($FI_SOrderWithPrice1=='') $FI_SOrderWithPrice1=0;echo"<input type='hidden' name='FI_SOrderWithPrice1' value='$FI_SOrderWithPrice1'>";
	if($Login_AllowPrice1=='') $Login_AllowPrice1=0;echo"<input type='hidden' name='Login_AllowPrice1' value='$Login_AllowPrice1'>";
	if($FI_SorderCanceledQty1=='') $FI_SorderCanceledQty1=0;echo"<input type='hidden' name='FI_SorderCanceledQty1' value='$FI_SorderCanceledQty1'>";
	if($FI_SorderConfirmed1=='') $FI_SorderConfirmed1=0;echo"<input type='hidden' name='FI_SorderConfirmed1' value='$FI_SorderConfirmed1'>";
	if($login_disapprovesorder1=='') $login_disapprovesorder1=0;echo"<input type='hidden' name='login_disapprovesorder1' value='$login_disapprovesorder1'>";
	if($Unmodify_SorderPrice1=='') $Unmodify_SorderPrice1=0;echo"<input type='hidden' name='Unmodify_SorderPrice1' value='$Unmodify_SorderPrice1'>";
	if($FI_SorderRejectUnconfirmed1=='') $FI_SorderRejectUnconfirmed1=0;echo"<input type='hidden' name='FI_SorderRejectUnconfirmed1' value='$FI_SorderRejectUnconfirmed1'>";
	if($FI_RepostSorder1=='') $FI_RepostSorder1=0;echo"<input type='hidden' name='FI_RepostSorder1' value='$FI_RepostSorder1'>";
	if($FI_SorderPosQty1=='') $FI_SorderPosQty1=0;echo"<input type='hidden' name='FI_SorderPosQty1' value='$FI_SorderPosQty1'>";
	if($FI_SorderAllowConfirmCash=='') $FI_SorderAllowConfirmCash=0;echo"<input type='hidden' name='FI_SorderAllowConfirmCash' value='$FI_SorderAllowConfirmCash'>";
	if($FP_DetailGenerateDel1=='') $FP_DetailGenerateDel1=0;echo"<input type='hidden' name='FP_DetailGenerateDel1' value='$FP_DetailGenerateDel1'>";
	if($FP_AnalysisReport1=='') $FP_AnalysisReport1=0;echo"<input type='hidden' name='FP_AnalysisReport1' value='$FP_AnalysisReport1'>";
	if($FP_ArabicReports1=='') $FP_ArabicReports1=0;echo"<input type='hidden' name='FP_ArabicReports1' value='$FP_ArabicReports1'>";
	if($RP_BankStatement1=='') $RP_BankStatement1=0;echo"<input type='hidden' name='RP_BankStatement1' value='$RP_BankStatement1'>";
	if($RP_CollectionofRepPay1=='') $RP_CollectionofRepPay1=0;echo"<input type='hidden' name='RP_CollectionofRepPay1' value='$RP_CollectionofRepPay1'>";
	if($RP_Employee1=='') $RP_Employee1=0;echo"<input type='hidden' name='RP_Employee1' value='$RP_Employee1'>";
	if($RP_Evaluation1=='') $RP_Evaluation1=0;echo"<input type='hidden' name='RP_Evaluation1' value='$RP_Evaluation1'>";
	if($FP_Overtime1=='') $FP_Overtime1=0;echo"<input type='hidden' name='FP_Overtime1' value='$FP_Overtime1'>";
	if($RP_Query1=='') $RP_Query1=0;echo"<input type='hidden' name='RP_Query1' value='$RP_Query1'>";
	if($RP_TimeSheet1=='') $RP_TimeSheet1=0;echo"<input type='hidden' name='RP_TimeSheet1' value='$RP_TimeSheet1'>";
	if($Rep_Accounting1=='') $Rep_Accounting1=0;echo"<input type='hidden' name='Rep_Accounting1' value='$Rep_Accounting1'>";
	if($Rep_General1=='') $Rep_General1=0;echo"<input type='hidden' name='Rep_General1' value='$Rep_General1'>";
	if($Rep_Inventory1=='') $Rep_Inventory1=0;echo"<input type='hidden' name='Rep_Inventory1' value='$Rep_Inventory1'>";
	if($RA_Amortization1=='') $RA_Amortization1=0;echo"<input type='hidden' name='RA_Amortization1' value='$RA_Amortization1'>";
	if($RA_AvgDays1=='') $RA_AvgDays1=0;echo"<input type='hidden' name='RA_AvgDays1' value='$RA_AvgDays1'>";
	if($RA_TabSheetBudget1=='') $RA_TabSheetBudget1=0;echo"<input type='hidden' name='RA_TabSheetBudget1' value='$RA_TabSheetBudget1'>";
	if($RA_CreditLimitRoster1=='') $RA_CreditLimitRoster1=0;echo"<input type='hidden' name='RA_CreditLimitRoster1' value='$RA_CreditLimitRoster1'>";
	if($RA_IncomeStmt1=='') $RA_IncomeStmt1=0;echo"<input type='hidden' name='RA_IncomeStmt1' value='$RA_IncomeStmt1'>";
	if($RA_IncomeStatBalanceSheet1=='') $RA_IncomeStatBalanceSheet1=0;echo"<input type='hidden' name='RA_IncomeStatBalanceSheet1' value='$RA_IncomeStatBalanceSheet1'>";
	if($FA_InterrestRate1=='') $FA_InterrestRate1=0;echo"<input type='hidden' name='FA_InterrestRate1' value='$FA_InterrestRate1'>";
	if($RA_ListofCheckBills1=='') $RA_ListofCheckBills1=0;echo"<input type='hidden' name='RA_ListofCheckBills1' value='$RA_ListofCheckBills1'>";
	if($RA_ListofDueInvoices1=='') $RA_ListofDueInvoices1=0;echo"<input type='hidden' name='RA_ListofDueInvoices1' value='$RA_ListofDueInvoices1'>";
	if($RA_ListofRecPayDebCred1=='') $RA_ListofRecPayDebCred1=0;echo"<input type='hidden' name='RA_ListofRecPayDebCred1' value='$RA_ListofRecPayDebCred1'>";
	if($RA_MonthDistBudgetForCast1=='') $RA_MonthDistBudgetForCast1=0;echo"<input type='hidden' name='RA_MonthDistBudgetForCast1' value='$RA_MonthDistBudgetForCast1'>";
	if($RA_TabSheetPaymentRqst1=='') $RA_TabSheetPaymentRqst1=0;echo"<input type='hidden' name='RA_TabSheetPaymentRqst1' value='$RA_TabSheetPaymentRqst1'>";
	if($RA_PrePayment1=='') $RA_PrePayment1=0;echo"<input type='hidden' name='RA_PrePayment1' value='$RA_PrePayment1'>";
	
	if($RA_Query1=='') 					$RA_Query1=0;					echo"<input type='hidden' name='RA_Query1' value='$RA_Query1'>";
	if($RA_AccountReconciliation1=='') 	$RA_AccountReconciliation1=0;	echo"<input type='hidden' name='RA_AccountReconciliation1' value='$RA_AccountReconciliation1'>";
	if($RA_SalesmanComm1=='') 			$RA_SalesmanComm1=0;			echo"<input type='hidden' name='RA_SalesmanComm1' value='$RA_SalesmanComm1'>";
	if($RA_unmovedAcounts1=='') 		$RA_unmovedAcounts1=0;			echo"<input type='hidden' name='RA_unmovedAcounts1' value='$RA_unmovedAcounts1'>";
	if($RI_tabsheetbooksbalance1=='') 	$RI_tabsheetbooksbalance1=0;	echo"<input type='hidden' name='RI_tabsheetbooksbalance1' value='$RI_tabsheetbooksbalance1'>";
	if($RI_BudgetInvTabSheet1=='') 		$RI_BudgetInvTabSheet1=0;		echo"<input type='hidden' name='RI_BudgetInvTabSheet1' value='$RI_BudgetInvTabSheet1'>";
	if($RI_TabSheetexport1=='') 		$RI_TabSheetexport1=0;			echo"<input type='hidden' name='RI_TabSheetexport1' value='$RI_TabSheetexport1'>";
	if($RI_InvByEntryNo1=='') 			$RI_InvByEntryNo1=0;			echo"<input type='hidden' name='RI_InvByEntryNo1' value='$RI_InvByEntryNo1'>";
	if($RI_InvoiceProject1=='') 		$RI_InvoiceProject1=0;			echo"<input type='hidden' name='RI_InvoiceProject1' value='$RI_InvoiceProject1'>";
	if($RI_Invoices1=='') 				$RI_Invoices1=0;				echo"<input type='hidden' name='RI_Invoices1' value='$RI_Invoices1'>";
	if($RI_ItemsPerWarehouseSize1=='') 	$RI_ItemsPerWarehouseSize1=0;	echo"<input type='hidden' name='RI_ItemsPerWarehouseSize1' value='$RI_ItemsPerWarehouseSize1'>";
	if($RI_ListOfDeliveryQty1=='') 		$RI_ListOfDeliveryQty1=0;		echo"<input type='hidden' name='RI_ListOfDeliveryQty1' value='$RI_ListOfDeliveryQty1'>";
	if($RI_LISTOFDUEITEMS1=='') 		$RI_LISTOFDUEITEMS1=0;			echo"<input type='hidden' name='RI_LISTOFDUEITEMS1' value='$RI_LISTOFDUEITEMS1'>";
	if($RI_ListofItems1=='') 			$RI_ListofItems1=0;				echo"<input type='hidden' name='RI_ListofItems1' value='$RI_ListofItems1'>";
	if($RI_listofPICharges1=='') 		$RI_listofPICharges1=0;			echo"<input type='hidden' name='RI_listofPICharges1' value='$RI_listofPICharges1'>";
	if($RI_ListofRMA1=='') 				$RI_ListofRMA1=0;				echo"<input type='hidden' name='RI_ListofRMA1' value='$RI_ListofRMA1'>";
	if($RI_Packing1=='') 				$RI_Packing1=0;					echo"<input type='hidden' name='RI_Packing1' value='$RI_Packing1'>";
	if($RI_ProfitperItems1=='') 		$RI_ProfitperItems1=0;			echo"<input type='hidden' name='RI_ProfitperItems1' value='$RI_ProfitperItems1'>";
	if($RI_Query1=='') 					$RI_Query1=0;					echo"<input type='hidden' name='RI_Query1' value='$RI_Query1'>";
	if($RI_SalesStatistics1=='') 		$RI_SalesStatistics1=0;			echo"<input type='hidden' name='RI_SalesStatistics1' value='$RI_SalesStatistics1'>";
	if($RI_SoldbySalesman1=='') 		$RI_SoldbySalesman1=0;			echo"<input type='hidden' name='RI_SoldbySalesman1' value='$RI_SoldbySalesman1'>";
	if($RI_StkMovement1=='') 			$RI_StkMovement1=0;				echo"<input type='hidden' name='RI_StkMovement1' value='$RI_StkMovement1'>";
	if($RI_TranspPage1=='') 			$RI_TranspPage1=0;				echo"<input type='hidden' name='RI_TranspPage1' value='$RI_TranspPage1'>";
	if($RI_CltSaleR_ShowSalesman1=='') 	$RI_CltSaleR_ShowSalesman1=0;	echo"<input type='hidden' name='RI_CltSaleR_ShowSalesman1' value='$RI_CltSaleR_ShowSalesman1'>";
	
	if ($RI_Adjustment == '') 			$RI_Adjustment = 0;				echo"<input type='hidden' name='RI_Adjustment' value='$RI_Adjustment'>";
	if ($RI_Transfer == '') 			$RI_Transfer = 0;				echo"<input type='hidden' name='RI_Transfer' value='$RI_Transfer'>";
	if($FC_CashRegister1=='') 			$FC_CashRegister1=0;			echo"<input type='hidden' name='FC_CashRegister1' value='$FC_CashRegister1'>";
	if($FC_CashRegisterApp=='') 		$FC_CashRegisterApp=0;			echo"<input type='hidden' name='FC_CashRegisterApp' value='$FC_CashRegisterApp'>";
	if($FC_CashRegisterMod=='') 		$FC_CashRegisterMod=0;			echo"<input type='hidden' name='FC_CashRegisterMod' value='$FC_CashRegisterMod'>";
	if($FC_CashRegisterDel=='') 		$FC_CashRegisterDel=0;			echo"<input type='hidden' name='FC_CashRegisterDel' value='$FC_CashRegisterDel'>";

	if($FC_RetailReport=='') 			$FC_RetailReport=0;				echo"<input type='hidden' name='FC_RetailReport' value='$FC_RetailReport'>";
	if($FC_RetailStatistics=='') 		$FC_RetailStatistics=0;			echo"<input type='hidden' name='FC_RetailStatistics' value='$FC_RetailStatistics'>";
	if($FC_SalesAnalysis=='') 			$FC_SalesAnalysis=0;			echo"<input type='hidden' name='FC_SalesAnalysis' value='$FC_SalesAnalysis'>";
	if($FC_RetailViewer=='') 			$FC_RetailViewer=0;				echo"<input type='hidden' name='FC_RetailViewer' value='$FC_RetailViewer'>";
	if($FC_SalesStatistic=='') 			$FC_SalesStatistic=0;			echo"<input type='hidden' name='FC_SalesStatistic' value='$FC_SalesStatistic'>";
	if($FI_Slippass=='') 				$FI_Slippass=0;					echo"<input type='hidden' name='FI_Slippass' value='$FI_Slippass'>";
	if($FU_Setup=='') 					$FU_Setup=0;					echo"<input type='hidden' name='FU_Setup' value='$FU_Setup'>";
	
	if($FC_AddClient1=='') 				$FC_AddClient1=0;				echo"<input type='hidden' name='FC_AddClient1' value='$FC_AddClient1'>";
	if($FC_CashRegisterCoupon1=='') 	$FC_CashRegisterCoupon1=0;		echo"<input type='hidden' name='FC_CashRegisterCoupon1' value='$FC_CashRegisterCoupon1'>";
	if($FC_CashRegisterCustomer1=='') 	$FC_CashRegisterCustomer1=0;	echo"<input type='hidden' name='FC_CashRegisterCustomer1' value='$FC_CashRegisterCustomer1'>";
	if($FC_CashRegisterCancel1=='') 	$FC_CashRegisterCancel1=0;		echo"<input type='hidden' name='FC_CashRegisterCancel1' value='$FC_CashRegisterCancel1'>";
	if($FC_CashRegisterCheck1=='') 		$FC_CashRegisterCheck1=0;		echo"<input type='hidden' name='FC_CashRegisterCheck1' value='$FC_CashRegisterCheck1'>";
	if($FC_ConfirmCustomer1=='') 		$FC_ConfirmCustomer1=0;			echo"<input type='hidden' name='FC_ConfirmCustomer1' value='$FC_ConfirmCustomer1'>";
	if($FC_CashRegisterCredit1=='') 	$FC_CashRegisterCredit1=0;		echo"<input type='hidden' name='FC_CashRegisterCredit1' value='$FC_CashRegisterCredit1'>";
	if($FC_CashRegisterDisc1=='') 		$FC_CashRegisterDisc1=0;		echo"<input type='hidden' name='FC_CashRegisterDisc1' value='$FC_CashRegisterDisc1'>";
	if($Fc_forcingvendor1=='') 			$Fc_forcingvendor1=0;			echo"<input type='hidden' name='Fc_forcingvendor1' value='$Fc_forcingvendor1'>";
	if($FC_PermToCancelCash1=='') 		$FC_PermToCancelCash1=0;		echo"<input type='hidden' name='FC_PermToCancelCash1' value='$FC_PermToCancelCash1'>";
	if($FC_PostingByCashRegister1=='') 	$FC_PostingByCashRegister1=0;	echo"<input type='hidden' name='FC_PostingByCashRegister1' value='$FC_PostingByCashRegister1'>";
	if($Promotion1=='') 				$Promotion1=0;					echo"<input type='hidden' name='Promotion1' value='$Promotion1'>";
	
	if($ReturnQuantity1=='') 			$ReturnQuantity1=0;				echo"<input type='hidden' name='ReturnQuantity1' value='$ReturnQuantity1'>";
	if($FC_CashRegisterScroll1=='') 	$FC_CashRegisterScroll1=0;		echo"<input type='hidden' name='FC_CashRegisterScroll1' value='$FC_CashRegisterScroll1'>";
	if($FC_CashRegScrollOk1=='') 		$FC_CashRegScrollOk1=0;			echo"<input type='hidden' name='FC_CashRegScrollOk1' value='$FC_CashRegScrollOk1'>";
	if($FC_CashRegScrollPrint1=='') 	$FC_CashRegScrollPrint1=0;		echo"<input type='hidden' name='FC_CashRegScrollPrint1' value='$FC_CashRegScrollPrint1'>";
	if($FC_CashRegisterSearch1=='') 	$FC_CashRegisterSearch1=0;		echo"<input type='hidden' name='FC_CashRegisterSearch1' value='$FC_CashRegisterSearch1'>";
	if($FC_ShowBtnOpenDrawer1=='') 		$FC_ShowBtnOpenDrawer1=0;		echo"<input type='hidden' name='FC_ShowBtnOpenDrawer1' value='$FC_ShowBtnOpenDrawer1'>";
	if($Rc_cashFlow1=='') 				$Rc_cashFlow1=0;				echo"<input type='hidden' name='Rc_cashFlow1' value='$Rc_cashFlow1'>";
	if($Closing_RetailReport1=='') 		$Closing_RetailReport1=0;		echo"<input type='hidden' name='Closing_RetailReport1' value='$Closing_RetailReport1'>";
	if($RC_ForcingUserAccount1=='') 	$RC_ForcingUserAccount1=0;		echo"<input type='hidden' name='RC_ForcingUserAccount1' value='$RC_ForcingUserAccount1'>";
	if($RC_ItemsSizes1=='') 			$RC_ItemsSizes1=0;				echo"<input type='hidden' name='RC_ItemsSizes1' value='$RC_ItemsSizes1'>";
	if($RC_ListOfInvoices1=='') 		$RC_ListOfInvoices1=0;			echo"<input type='hidden' name='RC_ListOfInvoices1' value='$RC_ListOfInvoices1'>";
	if($RC_SalesmenCommission1=='') 	$RC_SalesmenCommission1=0;		echo"<input type='hidden' name='RC_SalesmenCommission1' value='$RC_SalesmenCommission1'>";
	if($FI_Shipmentconfirmed1=='') 		$FI_Shipmentconfirmed1=0;		echo"<input type='hidden' name='FI_Shipmentconfirmed1' value='$FI_Shipmentconfirmed1'>";
	if($RA_TabSheetMonthlyAmount1=='') 	$RA_TabSheetMonthlyAmount1=0;	echo"<input type='hidden' name='RA_TabSheetMonthlyAmount1' value='$RA_TabSheetMonthlyAmount1'>";
	if($RI_SaleR_ShowSalesman1=='') 	$RI_SaleR_ShowSalesman1=0;		echo"<input type='hidden' name='RI_SaleR_ShowSalesman1' value='$RI_SaleR_ShowSalesman1'>";
	
	if($RI_TabSheetrma1=='')	$RI_TabSheetrma1=0;	echo"<input type='hidden' name='RI_TabSheetrma1' value='$RI_TabSheetrma1'>";
	if($RI_ExpiryDate=='') 		$RI_ExpiryDate=0;	echo"<input type='hidden' name='RI_ExpiryDate' value='$RI_ExpiryDate'>";
	if($Costcenter1=='') 		$Costcenter1=0;		echo"<input type='hidden' name='Costcenter1' value='$Costcenter1'>";
	if($CostcenterApp=='') 		$CostcenterApp=0;	echo"<input type='hidden' name='CostcenterApp' value='$CostcenterApp'>";
	if($CostcenterMod=='') 		$CostcenterMod=0;	echo"<input type='hidden' name='CostcenterMod' value='$CostcenterMod'>";
	if($CostcenterDel=='') 		$CostcenterDel=0;	echo"<input type='hidden' name='CostcenterDel' value='$CostcenterDel'>";
	
	if($Currency1=='') 			$Currency1=0;		echo"<input type='hidden' name='Currency1' value='$Currency1'>";
	if($CurrencyApp=='')	 	$CurrencyApp=0;		echo"<input type='hidden' name='CurrencyApp' value='$CurrencyApp'>";
	if($CurrencyMod=='') 		$CurrencyMod=0;		echo"<input type='hidden' name='CurrencyMod' value='$CurrencyMod'>";
	if($CurrencyDel=='') 		$CurrencyDel=0;		echo"<input type='hidden' name='CurrencyDel' value='$CurrencyDel'>";
	
	if($U_BackupFile1=='')				 $U_BackupFile1=0;				echo"<input type='hidden' name='U_BackupFile1' value='$U_BackupFile1'>";
	if($U_CashRegister1=='') 			$U_CashRegister1=0;				echo"<input type='hidden' name='U_CashRegister1' value='$U_CashRegister1'>";
	if($U_CloseCompany1=='') 			$U_CloseCompany1=0;				echo"<input type='hidden' name='U_CloseCompany1' value='$U_CloseCompany1'>";
	if($U_CloseYear1=='') 				$U_CloseYear1=0;				echo"<input type='hidden' name='U_CloseYear1' value='$U_CloseYear1'>";
	if($FU_ClosingPeriod1=='') 			$FU_ClosingPeriod1=0;			echo"<input type='hidden' name='FU_ClosingPeriod1' value='$FU_ClosingPeriod1'>";
	if($U_DeleteCompany1=='') 			$U_DeleteCompany1=0;			echo"<input type='hidden' name='U_DeleteCompany1' value='$U_DeleteCompany1'>";
	if($U_DeleteYear1=='') 				$U_DeleteYear1=0;				echo"<input type='hidden' name='U_DeleteYear1' value='$U_DeleteYear1'>";
	if($U_DistributingCostcenter1=='') 	$U_DistributingCostcenter1=0;	echo"<input type='hidden' name='U_DistributingCostcenter1' value='$U_DistributingCostcenter1'>";
	if($U_FillSetupFile1=='') 			$U_FillSetupFile1=0;			echo"<input type='hidden' name='U_FillSetupFile1' value='$U_FillSetupFile1'>";
	if($U_MergerDataBase1=='') 			$U_MergerDataBase1=0;			echo"<input type='hidden' name='U_MergerDataBase1' value='$U_MergerDataBase1'>";
	if($U_NewCompany1=='') 				$U_NewCompany1=0;				echo"<input type='hidden' name='U_NewCompany1' value='$U_NewCompany1'>";
	if($U_NewYear1=='') 				$U_NewYear1=0;					echo"<input type='hidden' name='U_NewYear1' value='$U_NewYear1'>";
	if($U_Ports1=='') 					$U_Ports1=0;					echo"<input type='hidden' name='U_Ports1' value='$U_Ports1'>";
	if($U_PostToChecksAndBills1=='') 	$U_PostToChecksAndBills1=0;		echo"<input type='hidden' name='U_PostToChecksAndBills1' value='$U_PostToChecksAndBills1'>";
	
	if($U_PostToItems1=='') 		$U_PostToItems1=0;		echo"<input type='hidden' name='U_PostToItems1' value='$U_PostToItems1'>";
	if($U_PostToLedger1=='') 		$U_PostToLedger1=0;		echo"<input type='hidden' name='U_PostToLedger1' value='$U_PostToLedger1'>";
	if($U_ReNumberJV1=='') 			$U_ReNumberJV1=0;		echo"<input type='hidden' name='U_ReNumberJV1' value='$U_ReNumberJV1'>";
	if($U_TransferAccount1=='') 	$U_TransferAccount1=0;	echo"<input type='hidden' name='U_TransferAccount1' value='$U_TransferAccount1'>";
	if($U_TransferItem1=='') 		$U_TransferItem1=0;		echo"<input type='hidden' name='U_TransferItem1' value='$U_TransferItem1'>";
	
	if($FA_FIPAddress1=='') 		$FA_FIPAddress1=0;		echo"<input type='hidden' name='FA_FIPAddress1' value='$FA_FIPAddress1'>";
	if($FA_IPAddressApp=='') 		$FA_IPAddressApp=0;		echo"<input type='hidden' name='FA_IPAddressApp' value='$FA_IPAddressApp'>";
	if($FA_IPAddressMod=='') 		$FA_IPAddressMod=0;		echo"<input type='hidden' name='FA_IPAddressMod' value='$FA_IPAddressMod'>";
	if($FA_IPAddressDel=='') 		$FA_IPAddressDel=0;		echo"<input type='hidden' name='FA_IPAddressDel' value='$FA_IPAddressDel'>";

	if($FI_TransferRequest=='') 			$FI_TransferRequest=0;				echo"<input type='hidden' name='FI_TransferRequest' value='$FI_TransferRequest'>";
	if($FI_PurchaseRequestItems1=='') 		$FI_PurchaseRequestItems1=0;		echo"<input type='hidden' name='FI_PurchaseRequestItems1' value='$FI_PurchaseRequestItems1'>";
	if($fi_pendingpurchaserequest1=='') 	$fi_pendingpurchaserequest1=0;		echo"<input type='hidden' name='fi_pendingpurchaserequest1' value='$fi_pendingpurchaserequest1'>";
	if($fi_pendingtransferrequest1=='') 	$fi_pendingtransferrequest1=0;		echo"<input type='hidden' name='fi_pendingtransferrequest1' value='$fi_pendingtransferrequest1'>";
	if($fi_pendingadjustmentrequest1=='') 	$fi_pendingadjustmentrequest1=0;	echo"<input type='hidden' name='fi_pendingadjustmentrequest1' value='$fi_pendingadjustmentrequest1'>";
	
	if($FI_StockTake=='') 			    $FI_StockTake=0;			echo"<input type='hidden' name='FI_StockTake' value='$FI_StockTake'>";
	if($FI_StockTake_App=='') 			$FI_StockTake_App=0;		echo"<input type='hidden' name='FI_StockTake_App' value='$FI_StockTake_App'>";
	if($FI_StockTake_Mod=='') 			$FI_StockTake_Mod=0;		echo"<input type='hidden' name='FI_StockTake_Mod' value='$FI_StockTake_Mod'>";
	if($FI_StockTake_Del=='') 			$FI_StockTake_Del=0;		echo"<input type='hidden' name='FI_StockTake_Del' value='$FI_StockTake_Del'>";
	
	
	if($Perc_creditlimit=='') 			$Perc_creditlimit=0;		echo"<input type='hidden' name='Perc_creditlimit' value='$Perc_creditlimit'>";
	if($Fi_POS=='') 					$Fi_POS=0;					echo"<input type='hidden' name='Fi_POS' value='$Fi_POS'>";
	if($RI_Statistics=='') 				$RI_Statistics=0;			echo"<input type='hidden' name='RI_Statistics' value='$RI_Statistics'>";
	if($FI_Statistics=='') 				$FI_Statistics=0;			echo"<input type='hidden' name='FI_Statistics' value='$FI_Statistics'>";
	if($RA_Statistics=='') 				$RA_Statistics=0;			echo"<input type='hidden' name='RA_Statistics' value='$RA_Statistics'>";
	
	if($login_preqapprove=='') 			$login_preqapprove=0;		echo"<input type='hidden' name='login_preqapprove' value='$login_preqapprove'>";
	if($login_preqreject=='') 			$login_preqreject=0;		echo"<input type='hidden' name='login_preqreject' value='$login_preqreject'>";
	if($login_prequndproc=='') 			$login_prequndproc=0;		echo"<input type='hidden' name='login_prequndproc' value='$login_prequndproc'>";
	if($login_pordapprove=='') 			$login_pordapprove=0;		echo"<input type='hidden' name='login_pordapprove' value='$login_pordapprove'>";
	if($login_pordreject=='') 			$login_pordreject=0;		echo"<input type='hidden' name='login_pordreject' value='$login_pordreject'>";
	if($login_treqapprove=='') 			$login_treqapprove=0;		echo"<input type='hidden' name='login_treqapprove' value='$login_treqapprove'>";
	if($login_treqreject=='') 			$login_treqreject=0;		echo"<input type='hidden' name='login_treqreject' value='$login_treqreject'>";
	if($login_areqapprove=='') 			$login_areqapprove=0;		echo"<input type='hidden' name='login_areqapprove' value='$login_areqapprove'>";
	if($login_areqreject=='') 			$login_areqreject=0;		echo"<input type='hidden' name='login_areqreject' value='$login_areqreject '>";
	if($FI_SetDeliveryStatus=='') 		$FI_SetDeliveryStatus=0;	echo"<input type='hidden' name='FI_SetDeliveryStatus' value='$FI_SetDeliveryStatus '>";
	if($FI_DeliveryStatus=='') 			$FI_DeliveryStatus=0;		echo"<input type='hidden' name='FI_DeliveryStatus' value='$FI_DeliveryStatus '>";
	if($Login_Purchase_Pending=='') 	$Login_Purchase_Pending=0;	echo"<input type='hidden' name='Login_Purchase_Pending' value='$Login_Purchase_Pending '>";
	if($Login_location=='') 			$Login_location=0;			echo"<input type='hidden' name='Login_location' value='$Login_location '>";
	if($FI_Visit=='') 					$FI_Visit=0;				echo"<input type='hidden' name='FI_Visit' value='$FI_Visit '>";
    if($FI_ReportsOptions=='') 			$FI_ReportsOptions=0;		echo"<input type='hidden' name='FI_ReportsOptions' value='$FI_ReportsOptions '>";
    if($FA_PrePayment=='') 				$FA_PrePayment=0;			echo"<input type='hidden' name='FA_PrePayment' value='$FA_PrePayment '>";
	if($FI_RMAPendingItems=='') 		$FI_RMAPendingItems=0;		echo"<input type='hidden' name='FI_RMAPendingItems' value='$FI_RMAPendingItems '>";
    if($FI_RMALocations=='') 			$FI_RMALocations=0;			echo"<input type='hidden' name='FI_RMALocations' value='$FI_RMALocations '>";
    if($FA_JournalPrintingAsk=='') 		$FA_JournalPrintingAsk=0;	echo"<input type='hidden' name='FA_JournalPrintingAsk' value='$FA_JournalPrintingAsk '>";
// new
    if($FI_RENTINVOICE == '')           $FI_RENTINVOICE = 0;       	echo"<input type='hidden' name='FI_RENTINVOICE' value='$FI_RENTINVOICE '>";
    if($FI_RENTINVOICEApp=='') 				$FI_RENTINVOICEApp=0;			echo"<input type='hidden' name='FI_RENTINVOICEApp' value='$FI_RENTINVOICEApp'>";
	if($FI_RENTINVOICEMod=='') 				$FI_RENTINVOICEMod=0;			echo"<input type='hidden' name='FI_RENTINVOICEMod' value='$FI_RENTINVOICEMod'>";
	if($FI_RENTINVOICEDel=='') 				$FI_RENTINVOICEDel=0;			echo"<input type='hidden' name='FI_RENTINVOICEDel' value='$FI_RENTINVOICEDel'>";



	

	if($txtApplication=='Accounting' && $txtSchemaAssigned!=''){

		echo"<tr bgcolor='$grid_color2' height='20px'><td>Accounting</td><td align='center'><input type='checkbox'  $dis name='Chk_AccountingView' onclick=SetView('Accounting','Accounting1');";if($Accounting1==1) echo " checked ";echo" $dis></td>
		<td colspan=3>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Account Type</td>
		<td align='center'><input type='checkbox'  $dis  $dis name='Chk_AccountTypeView' onclick=SetView('AccountType','FA_AccountType1');";if($FA_AccountType1==1) echo " checked ";echo" $dis></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AccountTypeApp' onclick=SetApp('AccountType','FA_AccountTypeApp');";if($FA_AccountTypeApp==1) echo " checked ";echo" $dis></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AccountTypeMod' onclick=SetMod('AccountType','FA_AccountTypeMod');";if($FA_AccountTypeMod==1) echo " checked ";echo" $dis></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AccountTypeDel' onclick=SetDel('AccountType','FA_AccountTypeDel');";if($FA_AccountTypeDel==1) echo " checked ";echo" $dis></td></tr>";
		
		if($Module_fixedassets==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Amortization</td><td align='center'><input type='checkbox'  $dis name='Chk_FixedAssetsView' onclick=SetView('FixedAssets','FA_FixedAssets1');";if($FA_FixedAssets1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_FixedAssetsApp' onclick=SetApp('FixedAssets','FA_FixedAssetsApp1');";if($FA_FixedAssetsApp1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_FixedAssetsMod' onclick=SetMod('FixedAssets','FA_FixedAssetsMod');";if($FA_FixedAssetsMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_FixedAssetsDel' onclick=SetDel('FixedAssets','FA_FixedAssetsDel');";if($FA_FixedAssetsDel==1) echo " checked ";echo"></td></tr>";
		}
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Area</td><td align='center'><input type='checkbox'  $dis name='Chk_AreaView' onclick=SetView('Area','FI_Area1');";if($FI_Area1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AreaApp' onclick=SetApp('Area','FI_AreaApp');";if($FI_AreaApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AreaMod' onclick=SetMod('Area','FI_AreaMod');";if($FI_AreaMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AreaDel' onclick=SetDel('Area','FI_AreaDel');";if($FI_AreaDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Banks</td><td align='center'><input type='checkbox'  $dis name='Chk_BankView' onclick=SetView('Bank','FA_Banks1');";if($FA_Banks1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_BankApp' onclick=SetApp('Bank','FA_BankApp');";if($FA_BankApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_BankMod' onclick=SetMod('Bank','FA_BankMod');";if($FA_BankMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_BankDel' onclick=SetDel('Bank','FA_BankDel');";if($FA_BankDel==1) echo " checked ";echo"></td></tr>";
		
		if($Module_budget==1){
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Budget</td><td align='center'><input type='checkbox'  $dis name='Chk_BudgetView' onclick=SetView('Budget','FA_Budget1');";if($FA_Budget1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetApp' onclick=SetApp('Budget','FA_BudgetApp');";if($FA_BudgetApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetMod' onclick=SetMod('Budget','FA_BudgetMod');";if($FA_BudgetMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetDel' onclick=SetDel('Budget','FA_BudgetDel');";if($FA_BudgetDel==1) echo " checked ";echo"></td></tr>";
		}
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Clients</td><td align='center'><input type='checkbox'  $dis name='Chk_ClientsView' onclick=SetView('Clients','Clients1');";if($Clients1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ClientsApp' onclick=SetApp('Clients','ClientsApp');";if($ClientsApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ClientsMod' onclick=SetMod('Clients','ClientsMod');";if($ClientsMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ClientsDel' onclick=SetDel('Clients','ClientsDel');";if($ClientsDel==1) echo " checked ";echo"></td></tr>";

		if($Module_charging==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Charging</td><td align='center'><input type='checkbox'  $dis name='Chk_ChargingView' onclick=SetView('Charging','FA_Charging1');";if($FA_Charging1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ChargingApp' onclick=SetApp('Charging','FA_ChargingApp');";if($FA_ChargingApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ChargingMod' onclick=SetMod('Charging','FA_ChargingMod');";if($FA_ChargingMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ChargingDel' onclick=SetDel('Charging','FA_ChargingDel');";if($FA_ChargingDel==1) echo " checked ";echo"></td></tr>";
		}
		//echo"<tr bgcolor='$grid_color1' height='20px'><td>ClientsA</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Contra</td><td align='center'><input type='checkbox'  $dis name='Chk_ContraView' onclick=SetView('Contra','FA_Contra1');";if($FA_Contra1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ContraApp' onclick=SetApp('Contra','FA_ContraApp');";if($FA_ContraApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ContraMod' onclick=SetMod('Contra','FA_ContraMod');";if($FA_ContraMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ContraDel' onclick=SetDel('Contra','FA_ContraDel');";if($FA_ContraDel==1) echo " checked ";echo"></td></tr>";
		
		
		
		// rodolphe 07-06-18
		
	// select module_costcenter , module_costcenterdt , module_referencebycostcenter from module;	
		
		if (  $module_costcenter ==1|| $module_costcenterdt ==1 || $module_referencebycostcenter ==1)
		{
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Costcenter</td><td align='center'><input type='checkbox'  $dis name='Chk_CostcenterView' onclick=SetView('Costcenter','FA_Costcenter1');";if($FA_Costcenter1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CostcenterApp' onclick=SetApp('Costcenter','FA_CostcenterApp');";if($FA_CostcenterApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CostcenterMod' onclick=SetMod('Costcenter','FA_CostcenterMod');";if($FA_CostcenterMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CostcenterDel' onclick=SetDel('Costcenter','FA_CostcenterDel');";if($FA_CostcenterDel==1) echo " checked ";echo"></td></tr>"; }
		
		
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Credit Note</td><td align='center'><input type='checkbox'  $dis name='Chk_CreditNoteView' onclick=SetView('CreditNote','FA_CreditNote1');";if($FA_CreditNote1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CreditNoteApp' onclick=SetApp('CreditNote','FA_CreditNoteApp');";if($FA_CreditNoteApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CreditNoteMod' onclick=SetMod('CreditNote','FA_CreditNoteMod');";if($FA_CreditNoteMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CreditNoteDel' onclick=SetDel('CreditNote','FA_CreditNoteDel');";if($FA_CreditNoteDel==1) echo " checked ";echo"></td></tr>";
		
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Currency</td><td align='center'><input type='checkbox'  $dis name='Chk_CurrencyView' onclick=SetView('Currency','FA_Currency1');";if($FA_Currency1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CurrencyApp' onclick=SetApp('Currency','FA_CurrencyApp');";if($FA_CurrencyApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CurrencyMod' onclick=SetMod('Currency','FA_CurrencyMod');";if($FA_CurrencyMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CurrencyDel' onclick=SetDel('Currency','FA_CurrencyDel');";if($FA_CurrencyDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Debit Note</td><td align='center'><input type='checkbox'  $dis name='Chk_DebitNoteView' onclick=SetView('DebitNote','FA_DebitNote1');";if($FA_DebitNote1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_DebitNoteApp' onclick=SetApp('DebitNote','FA_DebitNoteApp');";if($FA_DebitNoteApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_DebitNoteMod' onclick=SetMod('DebitNote','FA_DebitNoteMod');";if($FA_DebitNoteMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_DebitNoteDel' onclick=SetDel('DebitNote','FA_DebitNoteDel');";if($FA_DebitNoteDel==1) echo " checked ";echo"></td></tr>";
		
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Financial Accounts</td><td align='center'><input type='checkbox'  $dis name='Chk_FinancialAccountsView' onclick=SetView('FinancialAccounts','RA_FinancialAccounts1');";if($RA_FinancialAccounts1==1) echo " checked ";echo"></td><td colspan=3>&nbsp;</td></tr>";
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Invoices Allocation</td><td align='center'><input type='checkbox'  $dis name='Chk_InvoicesAllocationView' onclick=SetView('InvoicesAllocation','FA_InvoicesAllocation1');";if($FA_InvoicesAllocation1==1) echo " checked ";echo"></td><td colspan=3>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Journal</td><td align='center'><input type='checkbox'  $dis name='Chk_JournalView' onclick=SetView('Journal','FA_Journal1');";if($FA_Journal1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_JournalApp' onclick=SetApp('Journal','FA_JournalApp');";if($FA_JournalApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_JournalMod' onclick=SetMod('Journal','FA_JournalMod');";if($FA_JournalMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_JournalDel' onclick=SetDel('Journal','FA_JournalDel');";if($FA_JournalDel==1) echo " checked ";echo"></td></tr>";

		echo"<tr bgcolor='$grid_color1' height='20px'><td>Ledger</td><td align='center'><input type='checkbox'  $dis name='Chk_LedgerView' onclick=SetView('Ledger','FA_Ledger1');";if($FA_Ledger1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_LedgerApp' onclick=SetApp('Ledger','FA_LedgerApp');";if($FA_LedgerApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_LedgerMod' onclick=SetMod('Ledger','FA_LedgerMod');";if($FA_LedgerMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_LedgerDel' onclick=SetDel('Ledger','FA_LedgerDel');";if($FA_LedgerDel==1) echo " checked ";echo"></td>
		<td align='left'><input type='checkbox'  $dis name='Chk_LedgerBudgetView' onclick=SetView('LedgerBudget','FA_ExceedBudgetLimit1');";if($FA_ExceedBudgetLimit1==1) echo " checked ";echo">Budget Limit</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Payment</td><td align='center'><input type='checkbox'  $dis name='Chk_PaymentView' onclick=SetView('Payment','FA_Payment1');";if($FA_Payment1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PaymentApp' onclick=SetApp('Payment','FA_PaymentApp');";if($FA_PaymentApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PaymentMod' onclick=SetMod('Payment','FA_PaymentMod');";if($FA_PaymentMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PaymentDel' onclick=SetDel('Payment','FA_PaymentDel');";if($FA_PaymentDel==1) echo " checked ";echo"></td></tr>";
		
	//	if($Module_PaymentRqst==1)
	{
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Payment Request</td><td align='center'><input type='checkbox'  $dis name='Chk_PaymentRqstView' onclick=SetView('PaymentRqst','FA_PaymentRqst1');";if($FA_PaymentRqst1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_PaymentRqstApp' onclick=SetApp('PaymentRqst','FA_PaymentRqstApp');";if($FA_PaymentRqstApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_PaymentRqstMod' onclick=SetMod('PaymentRqst','FA_PaymentRqstMod');";if($FA_PaymentRqstMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_PaymentRqstDel' onclick=SetDel('PaymentRqst','FA_PaymentRqstDel');";if($FA_PaymentRqstDel==1) echo " checked ";echo"></td></tr>";
		}

		echo"<tr bgcolor='$grid_color1' height='20px'><td>Purchases Order JV</td><td align='center'><input type='checkbox'  $dis name='Chk_PurchaseOrderJVView' onclick=SetView('PurchaseOrderJV','FA_PurchaseOrderJV1');";if($FA_PurchaseOrderJV1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseOrderJVApp' onclick=SetApp('PurchaseOrderJV','FA_PurchaseOrderJVApp');";if($FA_PurchaseOrderJVApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseOrderJVMod' onclick=SetMod('PurchaseOrderJV','FA_PurchaseOrderJVMod');";if($FA_PurchaseOrderJVMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseOrderJVDel' onclick=SetDel('PurchaseOrderJV','FA_PurchaseOrderJVDel');";if($FA_PurchaseOrderJVDel==1) echo " checked ";echo"></td></tr>";
	
		
		if($module_project==1 || $module_projectdt==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Project A</td><td align='center'><input type='checkbox'  $dis name='Chk_ProjectView' onclick=SetView('Project','FA_Project1');";if($FA_Project1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProjectApp' onclick=SetApp('Project','FA_ProjectApp');";if($FA_ProjectApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProjectMod' onclick=SetMod('Project','FA_ProjectMod');";if($FA_ProjectMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProjectDel' onclick=SetDel('Project','FA_ProjectDel');";if($FA_ProjectDel==1) echo " checked ";echo"></td></tr>";
		}	
	
	   
		if($Module_PurchaseJv==1 && $FA_PurchaseJV1 ==1){
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Purchases JV</td><td align='center'><input type='checkbox'  $dis name='Chk_PurchaseJVView' onclick=SetView('PurchaseJV','FA_PurchaseJV1');";if($FA_PurchaseJV1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseJVApp' onclick=SetApp('PurchaseJV','FA_PurchaseJVApp');";if($FA_PurchaseJVApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseJVMod' onclick=SetMod('PurchaseJV','FA_PurchaseJVMod');";if($FA_PurchaseJVMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseJVDel' onclick=SetDel('PurchaseJV','FA_PurchaseJVDel');";if($FA_PurchaseJVDel==1) echo " checked ";echo"></td></tr>";
		}
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Receipt</td><td align='center'><input type='checkbox'  $dis name='Chk_ReceiptView' onclick=SetView('Receipt','FA_Receipt1');";if($FA_Receipt1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReceiptApp' onclick=SetApp('Receipt','FA_ReceiptApp');";if($FA_ReceiptApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReceiptMod' onclick=SetMod('Receipt','FA_ReceiptMod');";if($FA_ReceiptMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReceiptDel' onclick=SetDel('Receipt','FA_ReceiptDel');";if($FA_ReceiptDel==1) echo " checked ";echo"></td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_RVPostTransactionView' onclick=SetView('RVPostTransaction','FI_RVPostTransaction1');";if($FI_RVPostTransaction1==1) echo " checked ";echo">Post Transaction</td>
		
		</tr>";


		echo"<tr bgcolor='$grid_color2' height='20px'><td>Reconsiliation</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_AccountReconciliationView' onclick=SetView('RA_AccountReconciliation','RA_AccountReconciliation1');";if($RA_AccountReconciliation1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Report Options in Accounting</td><td align='center'><input type='checkbox'  $dis name='Chk_ReportOptionsAccountingView' onclick=SetView('ReportOptionsAccounting','FA_ReportOptions1');";if($FA_ReportOptions1==1) echo " checked ";echo"></td><td colspan=3>&nbsp;</td></tr>";
	
			if($Module_SalesJV1==1){
				echo"<tr bgcolor='$grid_color2' height='20px'><td>Sales JV</td><td align='center'><input type='checkbox'  $dis name='Chk_SalesJVView' onclick=SetView('SalesJV','FA_SalesJV1');";if($FA_SalesJV1==1) echo " checked ";echo"></td>
				<td align='center'><input type='checkbox'  $dis name='Chk_SalesJVApp' onclick=SetApp('SalesJV','FA_SalesJVApp');";if($FA_SalesJVApp==1) echo " checked ";echo"></td>
				<td align='center'><input type='checkbox'  $dis name='Chk_SalesJVMod' onclick=SetMod('SalesJV','FA_SalesJVMod');";if($FA_SalesJVMod==1) echo " checked ";echo"></td>
				<td align='center'><input type='checkbox'  $dis name='Chk_SalesJVDel' onclick=SetDel('SalesJV','FA_SalesJVDel');";if($FA_SalesJVDel==1) echo " checked ";echo"></td></tr>";
			}

		echo"<tr bgcolor='$grid_color2' height='20px'><td>Salesmen</td><td align='center'><input type='checkbox'  $dis name='Chk_SalesmenView' onclick=SetView('Salesmen','FI_Salesmen1');";if($FI_Salesmen1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SalesmenApp' onclick=SetApp('Salesmen','FI_SalesmenApp');";if($FI_SalesmenApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SalesmenMod' onclick=SetMod('Salesmen','FI_SalesmenMod');";if($FI_SalesmenMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SalesmenDel' onclick=SetDel('Salesmen','FI_SalesmenDel');";if($FI_SalesmenDel==1) echo " checked ";echo"></td></tr>";	
			
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Suppliers</td><td align='center'><input type='checkbox'  $dis name='Chk_SuppliersView' onclick=SetView('Suppliers','FI_Suppliers1');";if($FI_Suppliers1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SuppliersApp' onclick=SetApp('Suppliers','FI_SuppliersApp');";if($FI_SuppliersApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SuppliersMod' onclick=SetMod('Suppliers','FI_SuppliersMod');";if($FI_SuppliersMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SuppliersDel' onclick=SetDel('Suppliers','FI_SuppliersDel');";if($FI_SuppliersDel==1) echo " checked ";echo"></td></tr>";

		echo"<tr bgcolor='$grid_color1' height='20px'><td>TransactionPayRqst</td><td align='center'><input type='checkbox'  $dis name='Chk_transactionpaymnetrqstView' onclick=SetView('transactionpaymnetrqst','FA_transactionpaymnetrqst1');";if($FA_transactionpaymnetrqst1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_transactionpaymnetrqstApp' onclick=SetApp('transactionpaymnetrqst','FA_transactionpaymnetrqstApp');";if($FA_transactionpaymnetrqstApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_transactionpaymnetrqstMod' onclick=SetMod('transactionpaymnetrqst','FA_transactionpaymnetrqstMod');";if($FA_transactionpaymnetrqstMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_transactionpaymnetrqstDel' onclick=SetDel('transactionpaymnetrqst','FA_transactionpaymnetrqstDel');";if($FA_transactionpaymnetrqstDel==1) echo " checked ";echo"></td></tr>";
	
	
	    		
		
	    echo"<tr bgcolor='$grid_color1' height='20px'><td>Checks to be Deposited</td><td align='center'><input type='checkbox'  $dis name='Chk_ListofCheckBillsView' onclick=SetView('ListofCheckBills','RA_ListofCheckBills1');";if($RA_ListofCheckBills1==1) echo " checked ";echo"></td>
        </tr>";
	
	
	   echo"<tr bgcolor='$grid_color1' height='20px'><td>Budget</td><td align='center'><input type='checkbox'  $dis name='Chk_BudgetView' onclick=SetView('Budget','Budget');";if($Budget==1) echo " checked ";echo"></td>
		<td align='center'></td>
		<td align='center'></td>
		<td align='center'></td></tr>";
		if($Module_ipaddress==1){
			echo"<tr bgcolor='$grid_color1' height='20px'><td>IP Address</td><td align='center'><input type='checkbox'  $dis name='Chk_IPAddressView' onclick=SetView('IPAddress','FA_FIPAddress1');";if($FA_FIPAddress1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_IPAddressApp' onclick=SetApp('IPAddress','FA_IPAddressApp');";if($FA_IPAddressApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_IPAddressMod' onclick=SetMod('IPAddress','FA_IPAddressMod');";if($FA_IPAddressMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_IPAddressDel' onclick=SetDel('IPAddress','FA_IPAddressDel');";if($FA_IPAddressDel==1) echo " checked ";echo"></td></tr>";
		}
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Report Options</td><td align='center'><input type='checkbox'  $dis name='Chk_FI_ReportsOptionsView' onclick=SetView('FI_ReportsOptions','FI_ReportsOptions');";if($FI_ReportsOptions==1) echo " checked ";echo"></td>		
	<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Pre-Payment</td><td align='center'><input type='checkbox'  $dis name='Chk_FA_PrePaymentView' onclick=SetView('FA_PrePayment','FA_PrePayment');";if($FA_PrePayment==1) echo " checked ";echo"></td>		
	<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Locked Period</td><td align='center'><input type='checkbox'  $dis name='Chk_AllowLockedPeriodView' onclick=SetView('AllowLockedPeriod','AllowLockedPeriod');";if($AllowLockedPeriod==1) echo " checked ";echo"></td>		
	<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color2' height='20px'><td>Journal Printing Asking After Save</td><td align='center'><input type='checkbox'  $dis name='Chk_FA_JournalPrintingAskView' onclick=SetView('FA_JournalPrintingAsk','FA_JournalPrintingAsk');";if($FA_JournalPrintingAsk==1) echo " checked ";echo"></td>		
	<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";
	}
	else if($txtApplication=='Inventory' && $txtSchemaAssigned!=''){
	
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Inventory</td><td align='center'><input type='checkbox'  $dis name='Chk_InventoryView' onclick=SetView('Inventory','Inventory1');";if($Inventory1==1) echo " checked ";echo" $dis></td>
		<td colspan=3>&nbsp;</td></tr>";
		
		
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Adjustment</td><td align='center'><input type='checkbox'  $dis name='Chk_AdjustmentView' onclick=SetView('Adjustment','FI_Adjustment1');";if($FI_Adjustment1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AdjustmentApp' onclick=SetApp('Adjustment','FI_AdjustmentApp');";if($FI_AdjustmentApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AdjustmentMod' onclick=SetMod('Adjustment','FI_AdjustmentMod');";if($FI_AdjustmentMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AdjustmentDel' onclick=SetDel('Adjustment','FI_AdjustmentDel');";if($FI_AdjustmentDel==1) echo " checked ";echo"></td>
		<td align='left' colspan=6><input type='checkbox'  $dis name='Chk_AdjustmentReportView' onclick=SetView('AdjustmentReport','FI_RepostAdjustment1');";if($FI_RepostAdjustment1==1) echo " checked ";echo">Repost Transaction</td>	
		</tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Approval Transfers</td><td align='center'><input type='checkbox'  $dis name='Chk_PurchaseRequestItemTRView' onclick=SetView('PurchaseRequestItemTR','FI_PurchaseRequestItemTR');";if($FI_PurchaseRequestItemTR==1) echo " checked ";echo" $dis></td>
		<td colspan=3>&nbsp;</td></tr>";
		//echo"<tr bgcolor='$grid_color1' height='20px'><td>Assemble</td></tr>";
			
		if($module_budgetinv==1){	
			echo"<tr bgcolor='$grid_color2' height='20px'><td>BudgetInv</td><td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvView' onclick=SetView('BudgetInv','FI_BudgetInv1');";if($FI_BudgetInv1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvApp' onclick=SetApp('BudgetInv','FI_BudgetInvApp');";if($FI_BudgetInvApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvMod' onclick=SetMod('BudgetInv','FI_BudgetInvMod');";if($FI_BudgetInvMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvDel' onclick=SetDel('BudgetInv','FI_BudgetInvDel');";if($FI_BudgetInvDel==1) echo " checked ";echo"></td></tr>";
			
			echo"<tr bgcolor='$grid_color1' height='20px'><td>BudgetInvAmendment</td><td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvAmendmentView' onclick=SetView('BudgetInvAmendment','FI_FBudgetInvAmendment1');";if($FI_FBudgetInvAmendment1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvAmendmentApp' onclick=SetApp('BudgetInvAmendment','FI_BudgetInvAmendmentApp');";if($FI_BudgetInvAmendmentApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvAmendmentMod' onclick=SetMod('BudgetInvAmendment','FI_BudgetInvAmendmentMod');";if($FI_BudgetInvAmendmentMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvAmendmentDel' onclick=SetDel('BudgetInvAmendment','FI_BudgetInvAmendmentDel');";if($FI_BudgetInvAmendmentDel==1) echo " checked ";echo"></td></tr>";
		
			echo"<tr bgcolor='$grid_color2' height='20px'><td>BudgetInvSetup</td><td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvSetupView' onclick=SetView('BudgetInvSetup','FI_FBudgetInvSetup1');";if($FI_FBudgetInvSetup1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvSetupApp' onclick=SetApp('BudgetInvSetup','FI_BudgetInvSetupApp');";if($FI_BudgetInvSetupApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvSetupMod' onclick=SetMod('BudgetInvSetup','FI_BudgetInvSetupMod');";if($FI_BudgetInvSetupMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_BudgetInvSetupDel' onclick=SetDel('BudgetInvSetup','FI_BudgetInvSetupDel');";if($FI_BudgetInvSetupDel==1) echo " checked ";echo"></td></tr>";
		}
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Category</td><td align='center'><input type='checkbox'  $dis name='Chk_CategoryView' onclick=SetView('Category','FI_Category1');";if($FI_Category1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CategoryApp' onclick=SetApp('Category','FI_CategoryApp');";if($FI_CategoryApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CategoryMod' onclick=SetMod('Category','FI_CategoryMod');";if($FI_CategoryMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CategoryDel' onclick=SetDel('Category','FI_CategoryDel');";if($FI_CategoryDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>CEP Table</td><td align='center'><input type='checkbox'  $dis name='Chk_CEPtableView' onclick=SetView('CEPtable','FI_CEPtable1');";if($FI_CEPtable1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CEPtableApp' onclick=SetApp('CEPtable','FI_CEPtableApp');";if($FI_CEPtableApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CEPtableMod' onclick=SetMod('CEPtable','FI_CEPtableMod');";if($FI_CEPtableMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CEPtableDel' onclick=SetDel('CEPtable','FI_CEPtableDel');";if($FI_CEPtableDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Charges</td><td align='center'><input type='checkbox'  $dis name='Chk_ChargesView' onclick=SetView('Charges','FI_Charges1');";if($FI_Charges1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ChargesApp' onclick=SetApp('Charges','FI_ChargesApp');";if($FI_ChargesApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ChargesMod' onclick=SetMod('Charges','FI_ChargesMod');";if($FI_ChargesMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ChargesDel' onclick=SetDel('Charges','FI_ChargesDel');";if($FI_ChargesDel==1) echo " checked ";echo"></td></tr>";
		
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Clients</td><td align='center'><input type='checkbox'  $dis name='Chk_ClientView' onclick=SetView('Client','Clients1');";if($Clients1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ClientApp' onclick=SetApp('Client','ClientApp');";if($ClientApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ClientMod' onclick=SetMod('Client','ClientMod');";if($ClientMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ClientDel' onclick=SetDel('Client','ClientDel');";if($ClientDel==1) echo " checked ";echo"></td>
		<td align='left'><input type='checkbox'  $dis name='Chk_ClientsCreditLimitView' onclick=SetView('ClientsCreditLimit','ClientsCreditLimit1');";if($ClientsCreditLimit1==1) echo " checked ";echo">Credit Limit</td></tr>";

	
				echo"<tr bgcolor='$grid_color1' height='20px'><td>Client Group </td><td align='center'><input type='checkbox'  $dis name='Chk_ClientGrpView' onclick=SetView('ClientGrp','FI_ClientGrp1');";if($FI_ClientGrp1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ClientGrpApp' onclick=SetApp('ClientGrp','FI_ClientGrpApp');";if($FI_ClientGrpApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ClientGrpMod' onclick=SetMod('ClientGrp','FI_ClientGrpMod');";if($FI_ClientGrpMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ClientGrpDel' onclick=SetDel('ClientGrp','FI_ClientGrpDel');";if($FI_ClientGrpDel==1) echo " checked ";echo"></td>
		</tr>";
	
				
		
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>";
		
		if($Module_Delivery==1) echo " Delivery ";
		else echo " Sales ";
	
		echo"</td><td align='center'><input type='checkbox'  $dis name='Chk_DeliveryView' onclick=SetView('Delivery','FI_Delivery1');";if($FI_Delivery1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_DeliveryApp' onclick=SetApp('Delivery','FI_DeliveryApp');";if($FI_DeliveryApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_DeliveryMod' onclick=SetMod('Delivery','FI_DeliveryMod');";if($FI_DeliveryMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_DeliveryDel' onclick=SetDel('Delivery','FI_DeliveryDel');";if($FI_DeliveryDel==1) echo " checked ";echo"></td>
		<td align='left'><input type='checkbox'  $dis name='Chk_DeliverySalesPriceView' onclick=SetView('DeliverySalesPrice','FI_DeliverySalesPrice1');";if($FI_DeliverySalesPrice1==1) echo " checked ";echo">Sales Price</td>
		</tr>"; 

		echo"<tr bgcolor='$grid_color1' height='20px'><td>Grouping</td><td align='center'><input type='checkbox'  $dis name='Chk_GroupingView' onclick=SetView('Grouping','FI_Grouping1');";if($FI_Grouping1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_GroupingApp' onclick=SetApp('Grouping','FI_GroupingApp');";if($FI_GroupingApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_GroupingMod' onclick=SetMod('Grouping','FI_GroupingMod');";if($FI_GroupingMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_GroupingDel' onclick=SetDel('Grouping','FI_GroupingDel');";if($FI_GroupingDel==1) echo " checked ";echo"></td></tr>";
		
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Items</td><td align='center'><input type='checkbox'  $dis name='Chk_ItemsView' onclick=SetView('Items','FI_Items1');";if($FI_Items1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ItemsApp' onclick=SetApp('Items','FI_ItemsApp');";if($FI_ItemsApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ItemsMod' onclick=SetMod('Items','FI_ItemsMod');";if($FI_ItemsMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ItemsDel' onclick=SetDel('Items','FI_ItemsDel');";if($FI_ItemsDel==1) echo " checked ";echo"></td>
		<td align='left'><input type='checkbox'  $dis name='Chk_SellingPriceInItemsView' onclick=SetView('SellingPriceInItems','FI_SellingPriceInItems1');";if($FI_SellingPriceInItems1==1) echo " checked ";echo">Selling Price Tab Sheet</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_CostPriceInItemsView' onclick=SetView('CostPriceInItems','FI_CostPriceInItems1');";if($FI_CostPriceInItems1==1) echo " checked ";echo">Cost Price</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_ItemSellingView' onclick=SetView('ItemSelling','FI_ItemSelling1');";if($FI_ItemSelling1==1) echo " checked ";echo">Selling I</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_ItemSelling2View' onclick=SetView('ItemSelling2','FI_ItemSelling2');";if($FI_ItemSelling2==1) echo " checked ";echo">Selling II</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_ItemSelling3View' onclick=SetView('ItemSelling3','FI_ItemSelling3');";if($FI_ItemSelling3==1) echo " checked ";echo">Selling III</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_ItemSelling4View' onclick=SetView('ItemSelling4','FI_ItemSelling4');";if($FI_ItemSelling4==1) echo " checked ";echo">Selling IV</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_ItemSelling5View' onclick=SetView('ItemSelling5','FI_ItemSelling5');";if($FI_ItemSelling5==1) echo " checked ";echo">Selling V</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_ItemSelling6View' onclick=SetView('ItemSelling6','FI_ItemSelling6');";if($FI_ItemSelling6==1) echo " checked ";echo">Selling VI</td>
		</tr>";

		echo"<tr bgcolor='$grid_color1' height='20px'><td>Item Location</td><td align='center'><input type='checkbox'  $dis name='Chk_itemlocationView' onclick=SetView('itemlocation','FI_itemlocation');";if($FI_itemlocation==1) echo " checked ";echo"></td>	
		<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";
	
		
		if($Module_production==1){
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Production</td><td align='center'><input type='checkbox'  $dis name='Chk_ProductionView' onclick=SetView('Production','FI_Production1');";if($FI_Production1==1) echo " checked ";echo"></td>
				<td align='center'><input type='checkbox'  $dis name='Chk_ProductionApp' onclick=SetApp('Production','FI_ProductionApp');";if($FI_ProductionApp==1) echo " checked ";echo"></td>
				<td align='center'><input type='checkbox'  $dis name='Chk_ProductionMod' onclick=SetMod('Production','FI_ProductionMod');";if($FI_ProductionMod==1) echo " checked ";echo"></td>
				<td align='center'><input type='checkbox'  $dis name='Chk_ProductionDel' onclick=SetDel('Production','FI_ProductionDel');";if($FI_ProductionDel==1) echo " checked ";echo"></td></tr>";
			
			
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Production Request</td><td align='center'><input type='checkbox'  $dis name='Chk_ProductionReqView' onclick=SetView('ProductionReq','FI_ProductionReq1');";if($FI_ProductionReq1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProductionReqApp' onclick=SetApp('ProductionReq','FI_ProductionReqApp');";if($FI_ProductionReqApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProductionReqMod' onclick=SetMod('ProductionReq','FI_ProductionReqMod');";if($FI_ProductionReqMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProductionReqDel' onclick=SetDel('ProductionReq','FI_ProductionReqDel');";if($FI_ProductionReqDel==1) echo " checked ";echo"></td></tr>";
			
			
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Production Template</td><td align='center'><input type='checkbox'  $dis name='Chk_ProductionTempView' onclick=SetView('ProductionTemp','FI_ProductionTemp1');";if($FI_ProductionTemp1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProductionTempApp' onclick=SetApp('ProductionTemp','FI_ProductionTempApp');";if($FI_ProductionTempApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProductionTempMod' onclick=SetMod('ProductionTemp','FI_ProductionTempMod');";if($FI_ProductionTempMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProductionTempDel' onclick=SetDel('ProductionTemp','FI_ProductionTempDel');";if($FI_ProductionTempDel==1) echo " checked ";echo"></td></tr>";
		}
			
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Purchases</td><td align='center'><input type='checkbox'  $dis name='Chk_PurchasesView' onclick=SetView('Purchases','FI_Purchases1');";if($FI_Purchases1==1) echo " checked ";echo"></td>
				<td align='center'><input type='checkbox'  $dis name='Chk_PurchasesApp' onclick=SetApp('Purchases','FI_PurchasesApp');";if($FI_PurchasesApp==1) echo " checked ";echo"></td>
				<td align='center'><input type='checkbox'  $dis name='Chk_PurchasesMod' onclick=SetMod('Purchases','FI_PurchasesMod');";if($FI_PurchasesMod==1) echo " checked ";echo"></td>
				<td align='center'><input type='checkbox'  $dis name='Chk_PurchasesDel' onclick=SetDel('Purchases','FI_PurchasesDel');";if($FI_PurchasesDel==1) echo " checked ";echo"></td>
				<td align='left'><input type='checkbox'  $dis name='Chk_FI_PurchasesVATModView' onclick=SetView('FI_PurchasesVATMod','FI_PurchasesVATMod1');";if($FI_PurchasesVATMod1==1) echo " checked ";echo">Modify VAT</td>
				<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_FI_RepostPurchaseView' onclick=SetView('FI_RepostPurchase','FI_RepostPurchase1');";if($FI_RepostPurchase1==1) echo " checked ";echo">Repost Transaction</td>
			</tr>";
			
		if ($Module_Grn == 1) {
			echo"<tr bgcolor='$grid_color2' height='20px'><td>GRN</td><td align='center'><input type='checkbox'  $dis name='Chk_GRNView' onclick=SetView('GRN','FI_Grn1');";if($FI_Grn1==1) echo " checked ";echo"></td>
					<td align='center'><input type='checkbox'  $dis name='Chk_GRNApp' onclick=SetApp('GRN','FI_GrnApp');";if($FI_GrnApp==1) echo " checked ";echo"></td>
					<td align='center'><input type='checkbox'  $dis name='Chk_GRNMod' onclick=SetMod('GRN','FI_GrnMod');";if($FI_GrnMod==1) echo " checked ";echo"></td>
					<td align='center'><input type='checkbox'  $dis name='Chk_GRNDel' onclick=SetDel('GRN','FI_GrnDel');";if($FI_GrnDel==1) echo " checked ";echo"></td>
				</tr>";
		}		
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Purchases Order</td><td align='center'><input type='checkbox'  $dis name='Chk_PurchaseOrderView' onclick=SetView('PurchaseOrder','FI_PurchaseOrder1');";if($FI_PurchaseOrder1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseOrderApp' onclick=SetApp('PurchaseOrder','FI_PurchaseOrderApp');";if($FI_PurchaseOrderApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseOrderMod' onclick=SetMod('PurchaseOrder','FI_PurchaseOrderMod');";if($FI_PurchaseOrderMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseOrderDel' onclick=SetDel('PurchaseOrder','FI_PurchaseOrderDel');";if($FI_PurchaseOrderDel==1) echo " checked ";echo"></td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_PorderConfirmedView' onclick=SetView('PorderConfirmed','FI_PorderConfirmed1');";if($FI_PorderConfirmed1==1) echo " checked ";echo">Confirm Purchase Order</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_DelConfirmedPOView' onclick=SetView('DelConfirmedPO','FI_DelConfirmedPO1');";if($FI_DelConfirmedPO1==1) echo " checked ";echo">Delete Purchase Order</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_ModConfirmedPOView' onclick=SetView('ModConfirmedPO','FI_ModConfirmedPO1');";if($FI_ModConfirmedPO1==1) echo " checked ";echo">Modify Purchase Order</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_RepostPorderView' onclick=SetView('RepostPorder','FI_RepostPorder1');";if($FI_RepostPorder1==1) echo " checked ";echo">Report Transaction</td>
		
		
		
		</tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Purchases Request</td><td align='center'><input type='checkbox'  $dis name='Chk_PurchaseRequestView' onclick=SetView('PurchaseRequest','FI_PurchaseRequest1');";if($FI_PurchaseRequest1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseRequestApp' onclick=SetApp('PurchaseRequest','FI_PurchaseRequestApp');";if($FI_PurchaseRequestApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseRequestMod' onclick=SetMod('PurchaseRequest','FI_PurchaseRequestMod');";if($FI_PurchaseRequestMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseRequestDel' onclick=SetDel('PurchaseRequest','FI_PurchaseRequestDel');";if($FI_PurchaseRequestDel==1) echo " checked ";echo"></td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_PRqst_ApprovedbyView' onclick=SetView('PRqst_Approvedby','PRqst_Approvedby1');";if($PRqst_Approvedby1==1) echo " checked ";echo">Pur Request Approved By</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_PRqst_ConfirmedView' onclick=SetView('PRqst_Confirmed','FI_PRequestConfirmed');";if($FI_PRequestConfirmed==1) echo " checked ";echo">Pur Request Confirmed</td>
		
		</tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Report Options in Inventory</td><td align='center'><input type='checkbox'  $dis name='Chk_ReportOptionsInventoryView' onclick=SetView('ReportOptionsInventory','FI_ReportOptions1');";if($FI_ReportOptions1==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Return Delivery</td><td align='center'><input type='checkbox'  $dis name='Chk_ReturnDeliveryView' onclick=SetView('ReturnDelivery','FI_ReturnDelivery1');";if($FI_ReturnDelivery1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReturnDeliveryApp' onclick=SetApp('ReturnDelivery','FI_ReturnDeliveryApp');";if($FI_ReturnDeliveryApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReturnDeliveryMod' onclick=SetMod('ReturnDelivery','FI_ReturnDeliveryMod');";if($FI_ReturnDeliveryMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReturnDeliveryDel' onclick=SetDel('ReturnDelivery','FI_ReturnDeliveryDel');";if($FI_ReturnDeliveryDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Return Purchases</td><td align='center'><input type='checkbox'  $dis name='Chk_ReturnPurchaseView' onclick=SetView('ReturnPurchase','FI_ReturnPurchase1');";if($FI_ReturnPurchase1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReturnPurchaseApp' onclick=SetApp('ReturnPurchase','FI_ReturnPurchaseApp');";if($FI_ReturnPurchaseApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReturnPurchaseMod' onclick=SetMod('ReturnPurchase','FI_ReturnPurchaseMod');";if($FI_ReturnPurchaseMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReturnPurchaseDel' onclick=SetDel('ReturnPurchase','FI_ReturnPurchaseDel');";if($FI_ReturnPurchaseDel==1) echo " checked ";echo"></td>
		<td align='left'><input type='checkbox'  $dis name='Chk_ReturnPurchaseVatView' onclick=SetView('ReturnPurchaseVat','FI_ReturnPurchasesVAT1');";if($FI_ReturnPurchasesVAT1==1) echo " checked ";echo">Modify Vat</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_FI_RepostPReturnView' onclick=SetView('FI_RepostPReturn','FI_RepostPReturn1');";if($FI_RepostPReturn1==1) echo " checked ";echo">Repost Transaction</td>
		
		</tr>";
		
		if ($Module_Grn == 1) {
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Return GRN</td><td align='center'><input type='checkbox'  $dis name='Chk_ReturnGRNView' onclick=SetView('ReturnGRN','FI_ReturnGrn1');";if($FI_ReturnGrn1==1) echo " checked ";echo"></td>
					<td align='center'><input type='checkbox'  $dis name='Chk_ReturnGRNApp' onclick=SetApp('ReturnGRN','FI_ReturnGrnApp');";if($FI_ReturnGrnApp==1) echo " checked ";echo"></td>
					<td align='center'><input type='checkbox'  $dis name='Chk_ReturnGRNMod' onclick=SetMod('ReturnGRN','FI_ReturnGrnMod');";if($FI_ReturnGrnMod==1) echo " checked ";echo"></td>
					<td align='center'><input type='checkbox'  $dis name='Chk_ReturnGRNDel' onclick=SetDel('ReturnGRN','FI_ReturnGrnDel');";if($FI_ReturnGrnDel==1) echo " checked ";echo"></td>
				</tr>";
		}	
		
		if($Module_RMA==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Return RMA</td><td align='center'><input type='checkbox'  $dis name='Chk_ReturnRmaView' onclick=SetView('ReturnRma','FI_ReturnRma1');";if($FI_ReturnRma1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ReturnRmaApp' onclick=SetApp('ReturnRma','FI_ReturnRmaApp');";if($FI_ReturnRmaApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ReturnRmaMod' onclick=SetMod('ReturnRma','FI_ReturnRmaMod');";if($FI_ReturnRmaMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ReturnRmaDel' onclick=SetDel('ReturnRma','FI_ReturnRmaDel');";if($FI_ReturnRmaDel==1) echo " checked ";echo"></td>
			<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_RMAReturnSheetRMAView' onclick=SetView('RMAReturnSheetRMA','FI_RMAReturnSheetRMA1');";if($FI_RMAReturnSheetRMA1==1) echo " checked ";echo">List of items Rma Sheet</td>
			<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_ReturnSheetRMAView' onclick=SetView('ReturnSheetRMA','FI_RMAReturnSheetReturnRMA1');";if($FI_RMAReturnSheetReturnRMA1==1) echo " checked ";echo">Return Rma Sheet</td>
			<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_ReturnSheetRMAView' onclick=SetView('ReturnSheetRMA','FI_RMAReturnSheetReturnRMA1');";if($FI_RMAReturnSheetReturnRMA1==1) echo " checked ";echo">List of Pending Items</td>
			<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_ReturnSheetRMAView' onclick=SetView('ReturnSheetRMA','FI_RMAReturnSheetReturnRMA1');";if($FI_RMAReturnSheetReturnRMA1==1) echo " checked ";echo">Return RMA Locations</td>
			<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_ReturnSheetRMAView' onclick=SetView('ReturnSheetRMA','FI_RMAReturnSheetReturnRMA1');";if($FI_RMAReturnSheetReturnRMA1==1) echo " checked ";echo">RMA Reception</td>
			</tr>";
		}
		
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Return Sales</td><td align='center'><input type='checkbox'  $dis name='Chk_ReturnSalesView' onclick=SetView('ReturnSales','FI_ReturnSales1');";if($FI_ReturnSales1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReturnSalesApp' onclick=SetApp('ReturnSales','FI_ReturnSalesApp');";if($FI_ReturnSalesApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReturnSalesMod' onclick=SetMod('ReturnSales','FI_ReturnSalesMod');";if($FI_ReturnSalesMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ReturnSalesDel' onclick=SetDel('ReturnSales','FI_ReturnSalesDel');";if($FI_ReturnSalesDel==1) echo " checked ";echo"></td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_RSalesCheckSalesmanView' onclick=SetView('RSalesCheckSalesman','FI_RSalesCheckSalesman1');";if($FI_RSalesCheckSalesman1==1) echo " checked ";echo">Check Salesman</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_FI_ReturnSalesVATView' onclick=SetView('FI_ReturnSalesVAT','FI_ReturnSalesVAT1');";if($FI_ReturnSalesVAT1==1) echo " checked ";echo">Modify Vat</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_ReturnSalesPrintPayView' onclick=SetView('ReturnSalesPrintPay','FI_ReturnSalesPrintPay1');";if($FI_ReturnSalesPrintPay1==1) echo " checked ";echo">Print Payment</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_RepostSReturnView' onclick=SetView('RepostSReturn','FI_RepostSReturn1');";if($FI_RepostSReturn1==1) echo " checked ";echo">Repost Transaction</td>
	
		</tr>";
		
		
			//new
		echo"<tr bgcolor='$grid_color1' height='20px'>
		<td>Rent Invoice </td><td align='center'><input type='checkbox'  $dis name='Chk_RENTINVOICEView' onclick=SetView('RENTINVOICE','FI_RENTINVOICE');";if($FI_RENTINVOICE==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_RENTINVOICEApp' onclick=SetApp('RENTINVOICE','FI_RENTINVOICEApp');";if($FI_RENTINVOICEApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_RENTINVOICEMod' onclick=SetMod('RENTINVOICE','FI_RENTINVOICEMod');";if($FI_RENTINVOICEMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_RENTINVOICEDel' onclick=SetDel('RENTINVOICE','FI_RENTINVOICEDel');";if($FI_RENTINVOICEDel==1) echo " checked ";echo"></td>
		</tr>";
			// end new
			
			
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Rm Transfer</td><td align='center'><input type='checkbox'  $dis name='Chk_RmTransferView' onclick=SetView('RmTransfer','FI_RRmTransfer1');";if($FI_RRmTransfer1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_RmTransferApp' onclick=SetApp('RmTransfer','FI_RmTransferApp');";if($FI_RmTransferApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_RmTransferMod' onclick=SetMod('RmTransfer','FI_RmTransferMod');";if($FI_RmTransferMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_RmTransferDel' onclick=SetDel('RmTransfer','FI_IRmTransferDel');";if($FI_IRmTransferDel==1) echo " checked ";echo"></td></tr>";
		
		if($Module_RMA==1){
			echo"<tr bgcolor='$grid_color1' height='20px'><td>RMA</td><td align='center'><input type='checkbox'  $dis name='Chk_RmaView' onclick=SetView('Rma','FI_Rma1');";if($FI_Rma1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_RmaApp' onclick=SetApp('Rma','FI_RmaApp');";if($FI_RmaApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_RmaMod' onclick=SetMod('Rma','FI_RmaMod');";if($FI_RmaMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_RmaDel' onclick=SetDel('Rma','FI_RmaDel');";if($FI_RmaDel==1) echo " checked ";echo"></td>
			<td align='left' colspan='2'><input type='checkbox'  $dis name='Chk_RMASheetPendingView' onclick=SetView('RMASheetPending','FI_RMASheetPending1');";if($FI_RMASheetPending1==1) echo " checked ";echo">RMA Pending Sheet</td>
			<td align='left' colspan='2'><input type='checkbox'  $dis name='Chk_RMASheetRMAView' onclick=SetView('RMASheetRMA','FI_RMASheetRMA1');";if($FI_RMASheetRMA1==1) echo " checked ";echo">RMA Sheet</td>
			<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_FI_RMAPendingItemsView' onclick=SetView('FI_RMAPendingItems','FI_RMAPendingItems');";if($FI_RMAPendingItems==1) echo " checked ";echo">List of Pending Items</td>
			<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_FI_RMALocationsView' onclick=SetView('FI_RMALocations','FI_RMALocations');";if($FI_RMALocations==1) echo " checked ";echo">RMA Locations</td>
			</tr>";
		}
		
		if($Module_Delivery==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Sales</td><td align='center'><input type='checkbox'  $dis name='Chk_SalesView' onclick=SetView('Sales','FI_Sales1');";if($FI_Sales1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_SalesApp' onclick=SetApp('Sales','FI_SalesApp');";if($FI_SalesApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_SalesMod' onclick=SetMod('Sales','FI_SalesMod');";if($FI_SalesMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_SalesDel' onclick=SetDel('Sales','FI_SalesDel');";if($FI_SalesDel==1) echo " checked ";echo"></td>
			<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_SalesCheckSalesmanView' onclick=SetView('SalesCheckSalesman','FI_SalesCheckSalesman1');";if($FI_SalesCheckSalesman1==1) echo " checked ";echo">Check Salesmen in Sales</td>
			<td align='left'><input type='checkbox'  $dis name='Chk_FI_SalesVATView' onclick=SetView('FI_SalesVAT','FI_SalesVAT1');";if($FI_SalesVAT1==1) echo " checked ";echo">Modify Vat</td>
			<td align='left' ><input type='checkbox'  $dis name='Chk_FI_SalesWithPriceView' onclick=SetView('FI_SalesWithPrice','FI_SalesWithPrice1');";if($FI_SalesWithPrice1==1) echo " checked ";echo">Print Prices</td>
			<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_FI_SalesPrintReceiptView' onclick=SetView('FI_SalesPrintReceipt','FI_SalesPrintReceipt1');";if($FI_SalesPrintReceipt1==1) echo " checked ";echo">Print Receipts</td>
			<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_FI_RepostSalesView' onclick=SetView('FI_RepostSales','FI_RepostSales1');";if($FI_RepostSales1==1) echo " checked ";echo">Repost Transaction</td>
			</tr>";
		}
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Sales Order</td><td align='center'><input type='checkbox'  $dis name='Chk_SalesOrderView' onclick=SetView('SalesOrder','FI_SalesOrder1');";if($FI_SalesOrder1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SalesOrderApp' onclick=SetApp('SalesOrder','FI_SalesOrderApp');";if($FI_SalesOrderApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SalesOrderMod' onclick=SetMod('SalesOrder','FI_SalesOrderMod');";if($FI_SalesOrderMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SalesOrderDel' onclick=SetDel('SalesOrder','FI_SalesOrderDel');";if($FI_SalesOrderDel==1) echo " checked ";echo"></td>
		<td align='left' colspan='15'>
			<input type='checkbox'  $dis name='Chk_Login_AllowPriceView' onclick=SetView('Login_AllowPrice','Login_AllowPrice1');";if($Login_AllowPrice1==1) echo " checked ";echo">Allow Zero Price
			<input type='checkbox'  $dis name='Chk_FI_SorderCanceledQtyView' onclick=SetView('FI_SorderCanceledQty','FI_SorderCanceledQty1');";if($FI_SorderCanceledQty1==1) echo " checked ";echo">Canceled Quantity
			<input type='checkbox'  $dis name='Chk_FI_SorderConfirmedView' onclick=SetView('FI_SorderConfirmed','FI_SorderConfirmed1');";if($FI_SorderConfirmed1==1) echo " checked ";echo">Confirm
			<input type='checkbox'  $dis name='Chk_login_disapprovesorderView' onclick=SetView('login_disapprovesorder','login_disapprovesorder1');";if($login_disapprovesorder1==1) echo " checked ";echo">Disapprove
			<input type='checkbox'  $dis name='Chk_Unmodify_SorderPriceView' onclick=SetView('Unmodify_SorderPrice','Unmodify_SorderPrice1');";if($Unmodify_SorderPrice1==1) echo " checked ";echo">UnModify Price
			<input type='checkbox'  $dis name='Chk_FI_SOrderWithPriceView' onclick=SetView('FI_SOrderWithPrice','FI_SOrderWithPrice1');";if($FI_SOrderWithPrice1==1) echo " checked ";echo">Print Prices
			<input type='checkbox'  $dis name='Chk_FI_SorderRejectUnconfirmedView' onclick=SetView('FI_SorderRejectUnconfirmed','FI_SorderRejectUnconfirmed1');";if($FI_SorderRejectUnconfirmed1==1) echo " checked ";echo">Reject Unconfirmed
			<input type='checkbox'  $dis name='Chk_FI_RepostSorderView' onclick=SetView('FI_RepostSorder','FI_RepostSorder1');";if($FI_RepostSorder1==1) echo " checked ";echo">Repost Transaction
			<input type='checkbox'  $dis name='Chk_FI_SorderPosQtyView' onclick=SetView('FI_SorderPosQty','FI_SorderPosQty1');";if($FI_SorderPosQty1==1) echo " checked ";echo">Show Positive Qty
			<input type='checkbox'  $dis name='Chk_FI_SorderAllowConfirmCashView' onclick=SetView('FI_SorderAllowConfirmCash','FI_SorderAllowConfirmCash');";if($FI_SorderAllowConfirmCash==1) echo " checked ";echo">Allow Confirm Cash Order
		</td>
		</tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Salesmen</td><td align='center'><input type='checkbox'  $dis name='Chk_SalesmenView' onclick=SetView('Salesmen','FI_Salesmen1');";if($FI_Salesmen1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SalesmenApp' onclick=SetApp('Salesmen','FI_SalesmenApp');";if($FI_SalesmenApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SalesmenMod' onclick=SetMod('Salesmen','FI_SalesmenMod');";if($FI_SalesmenMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SalesmenDel' onclick=SetDel('Salesmen','FI_SalesmenDel');";if($FI_SalesmenDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Shipment</td><td align='center'><input type='checkbox'  $dis name='Chk_ShipmentView' onclick=SetView('Shipment','FI_Shipment1');";if($FI_Shipment1==1) echo " checked ";echo"></td>
		<td align='center'>&nbsp;</td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ShipmentMod' onclick=SetMod('Shipment','FI_ShipmentMod');";if($FI_ShipmentMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ShipmentDel' onclick=SetDel('Shipment','FI_ShipmentDel');";if($FI_ShipmentDel==1) echo " checked ";echo"></td></tr>";
		
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Shipment Routing Pending</td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ShipmentconfirmedView' onclick=SetView('Shipmentconfirmed','FI_Shipmentconfirmed1');";if($FI_Shipmentconfirmed1==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Stock Evaluation</td><td align='center'><input type='checkbox'  $dis name='Chk_stockevalView' onclick=SetView('stockeval','FI_stockeval1');";if($FI_stockeval1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_stockevalApp' onclick=SetApp('stockeval','FI_stockevalApp');";if($FI_stockevalApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_stockevalMod' onclick=SetMod('stockeval','FI_stockevalMod');";if($FI_stockevalMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_stockevalDel' onclick=SetDel('stockeval','FI_stockevalDel');";if($FI_stockevalDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Subgroup</td><td align='center'><input type='checkbox'  $dis name='Chk_SubGroupingView' onclick=SetView('SubGrouping','FI_SubGrouping1');";if($FI_SubGrouping1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SubGroupingApp' onclick=SetApp('SubGrouping','FI_SubGroupingApp');";if($FI_SubGroupingApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SubGroupingMod' onclick=SetMod('SubGrouping','FI_SubGroupingMod');";if($FI_SubGroupingMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SubGroupingDel' onclick=SetDel('SubGrouping','FI_SubGroupingDel');";if($FI_SubGroupingDel==1) echo " checked ";echo"></td></tr>";
		
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Suppliers</td><td align='center'><input type='checkbox'  $dis name='Chk_SuppliersView' onclick=SetView('Suppliers','FI_Suppliers1');";if($FI_Suppliers1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SuppliersApp' onclick=SetApp('Suppliers','FI_SuppliersApp');";if($FI_SuppliersApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SuppliersMod' onclick=SetMod('Suppliers','FI_SuppliersMod');";if($FI_SuppliersMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SuppliersDel' onclick=SetDel('Suppliers','FI_SuppliersDel');";if($FI_SuppliersDel==1) echo " checked ";echo"></td></tr>";
		
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Supplier Group</td><td align='center'><input type='checkbox'  $dis name='Chk_SupplierGrpView' onclick=SetView('SupplierGrp','FI_SupplierGrp1');";if($FI_SupplierGrp1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SupplierGrpApp' onclick=SetApp('SupplierGrp','FI_SupplierGrpApp');";if($FI_SupplierGrpApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SupplierGrpMod' onclick=SetMod('SupplierGrp','FI_SupplierGrpMod');";if($FI_SupplierGrpMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_SupplierGrpDel' onclick=SetDel('SupplierGrp','FI_SupplierGrpDel');";if($FI_SupplierGrpDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Transfer</td><td align='center'><input type='checkbox'  $dis name='Chk_TransferView' onclick=SetView('Transfer','FI_Transfer1');";if($FI_Transfer1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_TransferApp' onclick=SetApp('Transfer','FI_TransferApp');";if($FI_TransferApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_TransferMod' onclick=SetMod('Transfer','FI_TransferMod');";if($FI_TransferMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_TransferDel' onclick=SetDel('Transfer','FI_TransferDel');";if($FI_TransferDel==1) echo " checked ";echo"></td></tr>";
		
		if($Module_TransferItem==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Transfer Item</td><td align='center'><input type='checkbox'  $dis name='Chk_ITransferView' onclick=SetView('ITransfer','FI_ITransfer1');";if($FI_ITransfer1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ITransferApp' onclick=SetApp('ITransfer','FI_ITransferApp');";if($FI_ITransferApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ITransferMod' onclick=SetMod('ITransfer','FI_ITransferMod');";if($FI_ITransferMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ITransferDel' onclick=SetDel('ITransfer','FI_ITransferDel');";if($FI_ITransferDel==1) echo " checked ";echo"></td></tr>";
		}
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Transportation</td><td align='center'><input type='checkbox'  $dis name='Chk_TransportationView' onclick=SetView('Transportation','FI_Transportation1');";if($FI_Transportation1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_TransportationApp' onclick=SetApp('Transportation','FI_TransportationApp');";if($FI_TransportationApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_TransportationMod' onclick=SetMod('Transportation','FI_TransportationMod');";if($FI_TransportationMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_TransportationDel' onclick=SetDel('Transportation','FI_TransportationDel');";if($FI_TransportationDel==1) echo " checked ";echo"></td></tr>";
		
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Warehouse</td><td align='center'><input type='checkbox'  $dis name='Chk_WarehouseView' onclick=SetView('Warehouse','FI_Warehouse1');";if($FI_Warehouse1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_WarehouseApp' onclick=SetApp('Warehouse','FI_WarehouseApp');";if($FI_WarehouseApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_WarehouseMod' onclick=SetMod('Warehouse','FI_WarehouseMod');";if($FI_WarehouseMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_WarehouseDel' onclick=SetDel('Warehouse','FI_WarehouseDel');";if($FI_WarehouseDel==1) echo " checked ";echo"></td></tr>";
		
		if($Module_bill==1){
			echo"<tr bgcolor='$grid_color1' height='20px'><td>WayBill</td><td align='center'><input type='checkbox'  $dis name='Chk_WayBillView' onclick=SetView('WayBill','FI_WayBill1');";if($FI_WayBill1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_WayBillApp' onclick=SetApp('WayBill','FI_WayBillApp');";if($FI_WayBillApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_WayBillMod' onclick=SetMod('WayBill','FI_WayBillMod');";if($FI_WayBillMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_WayBillDel' onclick=SetDel('WayBill','FI_WayBillDel');";if($FI_WayBillDel==1) echo " checked ";echo"></td></tr>";
		}
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Transfer Request</td><td align='center'><input type='checkbox'  $dis name='Chk_TransferRequestMod' onclick=SetMod('TransferRequest','FI_TransferRequest');";if($FI_TransferRequest==1) echo " checked ";echo"></td></td></td></td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'>
		<td>Purchase Request Items</td><td align='center'><input type='checkbox'  $dis name='Chk_PurchaseRequestItemsView' onclick=SetView('PurchaseRequestItems','FI_PurchaseRequestItems1');";if($FI_PurchaseRequestItems1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseRequestItemsApp' onclick=SetApp('PurchaseRequestItems','fi_pendingpurchaserequest1');";if($fi_pendingpurchaserequest1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseRequestItemsMod' onclick=SetMod('PurchaseRequestItems','fi_pendingtransferrequest1');";if($fi_pendingtransferrequest1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_PurchaseRequestItemsDel' onclick=SetDel('PurchaseRequestItems','fi_pendingadjustmentrequest1');";if($fi_pendingadjustmentrequest1==1) echo " checked ";echo"></td></tr>";
		
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Stock In</td><td align='center'><input type='checkbox'  $dis name='Chk_StockInView' onclick=SetView('StockIn','FI_IN1');";if($FI_IN1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_StockInApp' onclick=SetApp('StockIn','FI_INapp');";if($FI_INapp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_StockInMod' onclick=SetMod('StockIn','FI_INMod');";if($FI_INMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_StockInDel' onclick=SetDel('StockIn','FI_INDel');";if($FI_INDel==1) echo " checked ";echo"></td>
		</tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Stock Out</td><td align='center'><input type='checkbox'  $dis name='Chk_StockOutView' onclick=SetView('StockOut','FI_OUT1');";if($FI_OUT1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_StockOutApp' onclick=SetApp('StockOut','FI_Outapp');";if($FI_Outapp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_StockOutMod' onclick=SetMod('StockOut','FI_OUTMod');";if($FI_OUTMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_StockOutDel' onclick=SetDel('StockOut','FI_OUTDel');";if($FI_OUTDel==1) echo " checked ";echo"></td>
		</tr>";

		echo"<tr bgcolor='$grid_color1' height='20px'><td>Stock Taken</td><td align='center'><input type='checkbox'  $dis name='Chk_StockTakeView' onclick=SetView('StockTake','FI_StockTake');";if($FI_StockTake==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_StockTake_App' onclick=SetApp('StockTake','FI_StockTake_App');";if($FI_StockTake_App==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_StockTake_Mod' onclick=SetMod('StockTake','FI_StockTake_Mod');";if($FI_StockTake_Mod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_StockTake_Del' onclick=SetDel('StockTake','FI_StockTake_Del');";if($FI_StockTake_Del==1) echo " checked ";echo"></td>
		</tr>";
		
			
	
	
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Statistics</td><td align='center'><input type='checkbox'  $dis name='Chk_StatisticsView' onclick=SetView('Statistics','FI_Statistics');";if($FI_Statistics==1) echo " checked ";echo"></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	
	echo"<tr bgcolor='$grid_color1' height='20px'><td>PRequest Approved Level</td><td align='center'><input type='text'  $dis name='prequestapproved_level' value='$prequestapproved_level'  style='width:60px' ></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Porder Approved Level</td><td align='center'><input type='text'  $dis name='porderapproved_level' value='$porderapproved_level' style='width:60px' ></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Approved Level</td><td align='center'><input type='text'  $dis name='approved_level' value='$approved_level' style='width:60px'  ></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>TransferRequest Approved Level</td><td align='center'><input type='text'  $dis name='transferrequestapproved_level' value='$transferrequestapproved_level'  style='width:60px' ></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Adjustment Request Approved Level</td><td align='center'><input type='text'  $dis name='adjustmentrequestapproved_level' value='$adjustmentrequestapproved_level' style='width:60px'  ></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Preq Approve</td><td align='center'><input type='checkbox'  $dis name='Chk_login_preqapproveView' onclick=SetView('login_preqapprove','login_preqapprove');";if($login_preqapprove==1) echo " checked ";echo"></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Preq Reject</td><td align='center'><input type='checkbox'  $dis name='Chk_login_preqrejectView' onclick=SetView('login_preqreject','login_preqreject');";if($login_preqreject==1) echo " checked ";echo"></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Preq Und Proc</td><td align='center'><input type='checkbox'  $dis name='Chk_login_prequndprocView' onclick=SetView('login_prequndproc','login_prequndproc');";if($login_prequndproc==1) echo " checked ";echo"></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Pord Approve</td><td align='center'><input type='checkbox'  $dis name='Chk_login_pordapproveView' onclick=SetView('login_pordapprove','login_pordapprove');";if($login_pordapprove==1) echo " checked ";echo"></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Pord Reject</td><td align='center'><input type='checkbox'  $dis name='Chk_login_pordrejectView' onclick=SetView('login_pordreject','login_pordreject');";if($login_pordreject==1) echo " checked ";echo"></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Treq Approve</td><td align='center'><input type='checkbox'  $dis name='Chk_login_treqapproveView' onclick=SetView('login_treqapprove','login_treqapprove');";if($login_treqapprove==1) echo " checked ";echo"></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Treq Reject</td><td align='center'><input type='checkbox'  $dis name='Chk_login_treqrejectView' onclick=SetView('login_treqreject','login_treqreject');";if($login_treqreject==1) echo " checked ";echo"></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Areq Approve</td><td align='center'><input type='checkbox'  $dis name='Chk_login_areqapproveView' onclick=SetView('login_areqapprove','login_areqapprove');";if($login_areqapprove==1) echo " checked ";echo"></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Areq Reject</td><td align='center'><input type='checkbox'  $dis name='Chk_login_areqrejectView' onclick=SetView('login_areqreject','login_areqreject');";if($login_areqreject==1) echo " checked ";echo"></td>		<td align='center'></td>		<td align='center'></td>		<td align='center'></td>		</tr>";
	
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Delivery Status</td><td align='center'><input type='checkbox'  $dis name='Chk_FI_DeliveryStatusView' onclick=SetView('FI_DeliveryStatus','FI_DeliveryStatus');";if($FI_DeliveryStatus==1) echo " checked ";echo"></td>		
	<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Set Delivery Status</td><td align='center'><input type='checkbox'  $dis name='Chk_FI_SetDeliveryStatusView' onclick=SetView('FI_SetDeliveryStatus','FI_SetDeliveryStatus');";if($FI_SetDeliveryStatus==1) echo " checked ";echo"></td>		
	<td align='center'>From <input type='text'  $dis name='FI_DeliveryStatusFrom' value='$FI_DeliveryStatusFrom' style='width:60px'  ></td>		
	<td align='center'>To <input type='text'  $dis name='FI_DeliveryStatusTo' value='$FI_DeliveryStatusTo' style='width:60px'  > </td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Expiry Date</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_ExpiryDateView' onclick=SetView('RI_ExpiryDate','RI_ExpiryDate');";if($RI_ExpiryDate==1) echo " checked ";echo"></td>		
	<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Visit</td><td align='center'><input type='checkbox'  $dis name='Chk_FI_VisitView' onclick=SetView('FI_Visit','FI_Visit');";if($FI_Visit==1) echo " checked ";echo"></td>		
	<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";
	
	if($Module_Purchase_Pending)
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Purchase Pending Type</td><td align='center'><input type='checkbox'  $dis name='Chk_Login_Purchase_PendingView' onclick=SetView('Login_Purchase_Pending','Login_Purchase_Pending');";if($Login_Purchase_Pending==1) echo " checked ";echo"></td>		
	<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";
	if($module_locationGrn || $module_locationPurchases || $module_locationDelivery || $module_locationadjustment || $module_locationTransfer || $module_locationproduction)
	echo"<tr bgcolor='$grid_color1' height='20px'><td>Location Login</td><td align='center'><input type='checkbox'  $dis name='Chk_Login_locationView' onclick=SetView('Login_location','Login_location');";if($Login_location==1) echo " checked ";echo"></td>		
	<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";
	
	}
	else if($txtApplication=='Payroll' && $txtSchemaAssigned!=''){
	
	
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Payroll</td><td align='center'>
		<input type='checkbox'  $dis name='Chk_PayrollView' onclick=SetView('Payroll','payroll1');";if($payroll1==1) echo " checked ";echo" $dis></td>
		<td colspan=3>&nbsp;</td></tr>";
		
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Attendance</td><td align='center'><input type='checkbox'  $dis name='Chk_AttendanceView' onclick=SetView('Attendance','FP_Attendance1');";if($FP_Attendance1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AttendanceApp' onclick=SetApp('Attendance','FP_AttendanceApp');";if($FP_AttendanceApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AttendanceMod' onclick=SetMod('Attendance','FP_AttendanceMod');";if($FP_AttendanceMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_AttendanceDel' onclick=SetDel('Attendance','FP_AttendanceDel');";if($FP_AttendanceDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Bonus</td><td align='center'><input type='checkbox'  $dis name='Chk_BonusView' onclick=SetView('Bonus','FP_Bonus1');";if($FP_Bonus1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_BonusApp' onclick=SetApp('Bonus','FP_BonusApp');";if($FP_BonusApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_BonusMod' onclick=SetMod('Bonus','FP_BonusMod');";if($FP_BonusMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_BonusDel' onclick=SetDel('Bonus','FP_BonusDel');";if($FP_BonusDel==1) echo " checked ";echo"></td></tr>";
	
	if($module_costcenter==1 || $module_costcenterdt==1){
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Costcenter</td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CostcenterpayrollView' onclick=SetView('Costcenterpayroll','Costcenter1');";if($Costcenter1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CostcenterpayrollApp' onclick=SetApp('Costcenterpayroll','CostcenterApp');";if($CostcenterApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CostcenterpayrollMod' onclick=SetMod('Costcenterpayroll','CostcenterMod');";if($CostcenterMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CostcenterpayrollDel' onclick=SetDel('Costcenterpayroll','CostcenterDel');";if($CostcenterDel==1) echo " checked ";echo"></td></tr>";
	}
	
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Currency</td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CurrencypayrollView' onclick=SetView('Currencypayroll','Currency1');";if($Currency1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CurrencypayrollApp' onclick=SetApp('Currencypayroll','CurrencyApp');";if($CurrencyApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CurrencypayrollMod' onclick=SetMod('Currencypayroll','CurrencyMod');";if($CurrencyMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CurrencypayrollDel' onclick=SetDel('Currencypayroll','CurrencyDel');";if($CurrencyDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Department</td><td align='center'><input type='checkbox'  $dis name='Chk_DeptView' onclick=SetView('Dept','FP_Dept1');";if($FP_Dept1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_DeptApp' onclick=SetApp('Dept','FP_DeptApp');";if($FP_DeptApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_DeptMod' onclick=SetMod('Dept','FP_DeptMod');";if($FP_DeptMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_DeptDel' onclick=SetDel('Dept','FP_DeptDel');";if($FP_DeptDel==1) echo " checked ";echo"></td></tr>";
		
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Employee</td><td align='center'><input type='checkbox'  $dis name='Chk_EmployeeView' onclick=SetView('Employee','FP_Employee1');";if($FP_Employee1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_EmployeeApp' onclick=SetApp('Employee','FP_EmployeeApp');";if($FP_EmployeeApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_EmployeeMod' onclick=SetMod('Employee','FP_EmployeeMod');";if($FP_EmployeeMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_EmployeeDel' onclick=SetDel('Employee','FP_EmployeeDel');";if($FP_EmployeeDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Generate</td><td align='center'><input type='checkbox'  $dis name='Chk_GenerateView' onclick=SetView('Generate','FP_Generate1');";if($FP_Generate1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_GenerateApp' onclick=SetApp('Generate','FP_GenerateApp');";if($FP_GenerateApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_GenerateMod' onclick=SetMod('Generate','FP_GenerateMod');";if($FP_GenerateMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_GenerateDel' onclick=SetDel('Generate','FP_GenerateDel');";if($FP_GenerateDel==1) echo " checked ";echo"></td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_DetailGenerateDelView' onclick=SetView('DetailGenerateDel','FP_DetailGenerateDel1');";if($FP_DetailGenerateDel1==1) echo " checked ";echo">Delete- Detail Generate</td>
		
		
		
		</tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Grades</td><td align='center'><input type='checkbox'  $dis name='Chk_GradesView' onclick=SetView('Grades','FP_Grades1');";if($FP_Grades1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_GradesApp' onclick=SetApp('Grades','FP_GradesApp');";if($FP_GradesApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_GradesMod' onclick=SetMod('Grades','FP_GradesMod');";if($FP_GradesMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_GradesDel' onclick=SetDel('Grades','FP_GradesDel');";if($FP_GradesDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Insurance</td><td align='center'><input type='checkbox'  $dis name='Chk_InsuranceView' onclick=SetView('Insurance','FP_Insurance1');";if($FP_Insurance1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_InsuranceApp' onclick=SetApp('Insurance','FP_InsuranceApp');";if($FP_InsuranceApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_InsuranceMod' onclick=SetMod('Insurance','FP_InsuranceMod');";if($FP_InsuranceMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_InsuranceDel' onclick=SetDel('Insurance','FP_InsuranceDel');";if($FP_InsuranceDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Loan</td><td align='center'><input type='checkbox'  $dis name='Chk_LoanView' onclick=SetView('Loan','FP_Loan1');";if($FP_Loan1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_LoanApp' onclick=SetApp('Loan','FP_LoanApp');";if($FP_LoanApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_LoanMod' onclick=SetMod('Loan','FP_LoanMod');";if($FP_LoanMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_LoanDel' onclick=SetDel('Loan','FP_LoanDel');";if($FP_LoanDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Parameters</td><td align='center'><input type='checkbox'  $dis name='Chk_ParametersView' onclick=SetView('Parameters','FP_Parameters1');";if($FP_Parameters1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ParametersApp' onclick=SetApp('Parameters','FP_ParametersApp');";if($FP_ParametersApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ParametersMod' onclick=SetMod('Parameters','FP_ParametersMod');";if($FP_ParametersMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_ParametersDel' onclick=SetDel('Parameters','FP_ParametersDel');";if($FP_ParametersDel==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>PreEmployee</td><td align='center'><input type='checkbox'  $dis name='Chk_preempView' onclick=SetView('preemp','FP_Fpreemp1');";if($FP_Fpreemp1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_preempApp' onclick=SetApp('preemp','FP_preempApp');";if($FP_preempApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_preempMod' onclick=SetMod('preemp','FP_preempMod');";if($FP_preempMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_preempDel' onclick=SetDel('preemp','FP_preempDel');";if($FP_preempDel==1) echo " checked ";echo"></td></tr>";
		
		if($module_project==1 || $module_projectdt==1){
		echo"<tr bgcolor='$grid_color2' height='20px'><td>ProjectP</td><td align='center'><input type='checkbox'  $dis name='Chk_ProjectView' onclick=SetView('Project','FP_Project1');";if($FP_Project1==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProjectApp' onclick=SetApp('Project','FP_ProjectApp');";if($FP_ProjectApp==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProjectMod' onclick=SetMod('Project','FP_ProjectMod');";if($FP_ProjectMod==1) echo " checked ";echo"></td>
			<td align='center'><input type='checkbox'  $dis name='Chk_ProjectDel' onclick=SetDel('Project','FP_ProjectDel');";if($FP_ProjectDel==1) echo " checked ";echo"></td></tr>";
		}
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Report Options in Payroll</td><td align='center'><input type='checkbox'  $dis name='Chk_ReportOptionsPayrollView' onclick=SetView('ReportOptionsPayroll','FP_ReportOptions1');";if($FP_ReportOptions1==1) echo " checked ";echo"></td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Vacation</td><td align='center'><input type='checkbox'  $dis name='Chk_VacationView' onclick=SetView('Vacation','FP_Vacation1');";if($FP_Vacation1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_VacationApp' onclick=SetApp('Vacation','FP_VacationApp');";if($FP_VacationApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_VacationMod' onclick=SetMod('Vacation','FP_VacationMod');";if($FP_VacationMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_VacationDel' onclick=SetDel('Vacation','FP_VacationDel');";if($FP_VacationDel==1) echo " checked ";echo"></td></tr>";
		
	}
	else if($txtApplication=='Access' && $txtSchemaAssigned!=''){
	
	
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Access</td><td align='center'>
			<input type='checkbox'  $dis name='Chk_AccessView' onclick=SetView('Access','Access1');";if($Access1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>UserManager</td><td align='center'><input type='checkbox'  $dis name='Chk_UserManagerView' onclick=SetView('UserManager','Access_UserManager1');";if($Access_UserManager1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
	}
	else if($txtApplication=='AccReports' && $txtSchemaAssigned!=''){
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Statement of Account</td><td align='center'><input type='checkbox'  $dis name='Chk_StatementofAccountView' onclick=SetView('StatementofAccount','RA_StatementofAccount1');";if($RA_StatementofAccount1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Trial Balance</td><td align='center'><input type='checkbox'  $dis name='Chk_TrialbalanceView' onclick=SetView('Trialbalance','RA_Trialbalance1');";if($RA_Trialbalance1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		if($module_project==1 || $module_projectdt==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Report of Project</td><td align='center'><input type='checkbox'  $dis name='Chk_StatementofProjectView' onclick=SetView('StatementofProject','RA_StatementofProject1');";if($RA_StatementofProject1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
		
		if($module_costcenter==1 || $module_costcenterdt==1){
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Report of Costcenter</td><td align='center'><input type='checkbox'  $dis name='Chk_StatmentofCostcenterView' onclick=SetView('StatmentofCostcenter','RA_StatmentofCostcenter1');";if($RA_StatmentofCostcenter1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
		if($Module_ItemAging==1){	
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Aging</td><td align='center'><input type='checkbox'  $dis name='Chk_AgingView' onclick=SetView('Aging','RA_Aging1');";if($RA_Aging1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
							
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Aging Supplier Invoices</td><td align='center'><input type='checkbox'  $dis name='Chk_AgingOfSupplierInvoicesView' onclick=SetView('AgingOfSupplierInvoices','RA_AgingOfSupplierInvoices1');";if($RA_AgingOfSupplierInvoices1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";					
			
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Aging Client Invoices</td><td align='center'><input type='checkbox'  $dis name='Chk_AgingOfClientInvoicesView' onclick=SetView('AgingOfClientInvoices','RA_AgingOfClientInvoices1');";if($RA_AgingOfClientInvoices1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Financial Report</td><td align='center'><input type='checkbox'  $dis name='Chk_FinancialAccountsView' onclick=SetView('FinancialAccounts','RA_FinancialAccounts1');";if($RA_FinancialAccounts1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";				
							
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Daily Report</td><td align='center'><input type='checkbox'  $dis name='Chk_DailyReportView' onclick=SetView('DailyReport','FA_DailyReport1');";if($FA_DailyReport1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	

		echo"<tr bgcolor='$grid_color1' height='20px'><td>Statistics Report</td><td align='center'><input type='checkbox'  $dis name='Chk_StatisticsReportView' onclick=SetView('StatisticsReport','RA_StatisticsReport1');";if($RA_StatisticsReport1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Transaction JV</td><td align='center'><input type='checkbox'  $dis name='Chk_TransactionJVView' onclick=SetView('TransactionJV','RA_TransactionJV1');";if($RA_TransactionJV1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
			
		if($Module_SalesJV1==1){	
			echo"<tr bgcolor='$grid_color1' height='20px'><td>List of Sales JV</td><td align='center'><input type='checkbox'  $dis name='Chk_SalesJVView' onclick=SetView('SalesJV','RA_SalesJV1');";if($RA_SalesJV1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
		}
		echo"<tr bgcolor='$grid_color2' height='20px'><td>List of Purchases JV</td><td align='center'><input type='checkbox'  $dis name='Chk_PurchasesJVView' onclick=SetView('PurchasesJV','RA_PurchasesJV1');";if($RA_PurchasesJV1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>List Of General Ledger</td><td align='center'><input type='checkbox'  $dis name='Chk_GeneralLedgerJVView' onclick=SetView('GeneralLedgerJV','RA_GeneralLedger1');";if($RA_GeneralLedger1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Amortization</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_AmortizationView' onclick=SetView('RA_Amortization','RA_Amortization1');";if($RA_Amortization1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Average Days</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_AvgDaysView' onclick=SetView('RA_AvgDays','RA_AvgDays1');";if($RA_AvgDays1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		if($Module_budget==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Budget</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_TabSheetBudgetView' onclick=SetView('RA_TabSheetBudget','RA_TabSheetBudget1');";if($RA_TabSheetBudget1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
		}
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Credit Limit Roster</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_CreditLimitRosterView' onclick=SetView('RA_CreditLimitRoster','RA_CreditLimitRoster1');";if($RA_CreditLimitRoster1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		if($module_project==1 || $module_projectdt==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Income Statement By Project</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_IncomeStmtView' onclick=SetView('RA_IncomeStmt','RA_IncomeStmt1');";if($RA_IncomeStmt1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Income Statement/Balance Sheet</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_IncomeStatBalanceSheetView' onclick=SetView('RA_IncomeStatBalanceSheet','RA_IncomeStatBalanceSheet1');";if($RA_IncomeStatBalanceSheet1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Interest Rate</td><td align='center'><input type='checkbox'  $dis name='Chk_FA_InterrestRateView' onclick=SetView('FA_InterrestRate','FA_InterrestRate1');";if($FA_InterrestRate1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
	
		echo"<tr bgcolor='$grid_color1' height='20px'><td>List of Due Invoices</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_ListofDueInvoicesView' onclick=SetView('RA_ListofDueInvoices','RA_ListofDueInvoices1');";if($RA_ListofDueInvoices1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>List of Receipt/Payment/Debit/Credit</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_ListofRecPayDebCredView' onclick=SetView('RA_ListofRecPayDebCred','RA_ListofRecPayDebCred1');";if($RA_ListofRecPayDebCred1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		if($Module_budget==1){
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Monthly Budget</td>
			<td align='center'><input type='checkbox'  $dis name='Chk_RA_TabSheetMonthlyAmountView' onclick=SetView('RA_TabSheetMonthlyAmount','RA_TabSheetMonthlyAmount1');";if($RA_TabSheetMonthlyAmount1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Monthly Distribution/Budget Forecasting</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_MonthDistBudgetForCastView' onclick=SetView('RA_MonthDistBudgetForCast','RA_MonthDistBudgetForCast1');";if($RA_MonthDistBudgetForCast1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Payment Request</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_TabSheetPaymentRqstView' onclick=SetView('RA_TabSheetPaymentRqst','RA_TabSheetPaymentRqst1');";if($RA_TabSheetPaymentRqst1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Pre Payment </td><td align='center'><input type='checkbox'  $dis name='Chk_RA_PrePaymentView' onclick=SetView('RA_PrePayment','RA_PrePayment1');";if($RA_PrePayment1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
	
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Query</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_QueryView' onclick=SetView('RA_Query','RA_Query1');";if($RA_Query1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Reconsiliation</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_AccountReconciliationView' onclick=SetView('RA_AccountReconciliation','RA_AccountReconciliation1');";if($RA_AccountReconciliation1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Salesman Commission</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_SalesmanCommView' onclick=SetView('RA_SalesmanComm','RA_SalesmanComm1');";if($RA_SalesmanComm1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Unmoved Accounts</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_unmovedAcountsView' onclick=SetView('RA_unmovedAcounts','RA_unmovedAcounts1');";if($RA_unmovedAcounts1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Statistics</td><td align='center'><input type='checkbox'  $dis name='Chk_RA_StatisticsView' onclick=SetView('RA_Statistics','RA_Statistics');";if($RA_Statistics==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		
	}
	
	else if($txtApplication=='InvReports' && $txtSchemaAssigned!=''){
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Transaction List</td><td align='center'><input type='checkbox'  $dis name='Chk_ListTransactionView' onclick=SetView('ListTransaction','RI_ListTransaction1');";if($RI_ListTransaction1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Inventory</td><td align='center'><input type='checkbox'  $dis name='Chk_ListInventoryView' onclick=SetView('ListInventory','RI_Inventory1');";if($RI_Inventory1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Client Sales</td><td align='center'><input type='checkbox'  $dis name='Chk_ListSalesReportsView' onclick=SetView('ListSalesReports','RI_SalesReports1');";if($RI_SalesReports1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
		<td align='left' colspan='2'><input type='checkbox'  $dis name='Chk_RI_CltSaleR_ShowSalesmanView' onclick=SetView('RI_CltSaleR_ShowSalesman','RI_CltSaleR_ShowSalesman1');";if($RI_CltSaleR_ShowSalesman1==1) echo " checked ";echo">Show Salesman</td>
		</tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>List of Porder/Purchase Request</td><td align='center'><input type='checkbox'  $dis name='Chk_ListPorderPurRequestView' onclick=SetView('ListPorderPurRequest','FI_PorderPurRequest1');";if($FI_PorderPurRequest1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		if($Module_production==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>List of Production</td><td align='center'><input type='checkbox'  $dis name='Chk_ListofProductionView' onclick=SetView('ListofProduction','RI_ListofProduction1');";if($RI_ListofProduction1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";				
		}
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Statement of Items</td><td align='center'><input type='checkbox'  $dis name='Chk_ListSatementofItemsView' onclick=SetView('ListSatementofItems','RI_SatementofItems1');";if($RI_SatementofItems1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		if($Module_YearlyReport==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Yearly Sales</td><td align='center'><input type='checkbox'  $dis name='Chk_ListYearlySalesView' onclick=SetView('ListYearlySales','RI_YearlySales1');";if($RI_YearlySales1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";			
		}

		echo"<tr bgcolor='$grid_color2' height='20px'><td>Tracking Report</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_TrackingReportView' onclick=SetView('TrackingReport','RI_TrackingRMA1');";if($RI_TrackingRMA1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";			
		
		
		if($Module_ItemAging==1){			
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Item Aging</td><td align='center'><input type='checkbox'  $dis name='Chk_ListAgingView' onclick=SetView('ListAging','RI_Aging1');";if($RI_Aging1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Comparison Report</td><td align='center'><input type='checkbox'  $dis name='Chk_ListInvComparisonReportView' onclick=SetView('ListInvComparisonReport','RI_InvComparisonReport1');";if($RI_InvComparisonReport1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";				
							
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Target Rebate Report</td><td align='center'><input type='checkbox'  $dis name='Chk_ListTargetRebateReportView' onclick=SetView('ListTargetRebateReport','RI_TargetRebateReport1');";if($RI_TargetRebateReport1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>PurchaseOrder Report</td><td align='center'><input type='checkbox'  $dis name='Chk_ListPorderReportView' onclick=SetView('ListPorderReport','RI_PorderReport1');";if($RI_PorderReport1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";				
						
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Purchase Report</td><td align='center'><input type='checkbox'  $dis name='Chk_ListPurchaseReportsView' onclick=SetView('ListPurchaseReports','RI_PurchaseReports1');";if($RI_PurchaseReports1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";		

		echo"<tr bgcolor='$grid_color1' height='20px'><td>Report Options</td><td align='center'><input type='checkbox'  $dis name='Chk_FI_ReportsOptionsView' onclick=SetView('FI_ReportsOptions','FI_ReportsOptions');";if($FI_ReportsOptions==1) echo " checked ";echo"></td>		
		<td align='center'></td>	<td align='center'> </td>		<td align='center'></td>		</tr>";

		echo"<tr bgcolor='$grid_color2' height='20px'><td>SalesOrder Report</td><td align='center'><input type='checkbox'  $dis name='Chk_ListSalesOrderReportView' onclick=SetView('ListSalesOrderReport','RI_SalesOrderReport1');";if($RI_SalesOrderReport1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		//echo"<tr bgcolor='$grid_color2' height='20px'><td>Sales Report</td><td align='center'><input type='checkbox'  $dis name='Chk_ListSalesReportsView' onclick=SetView('ListSalesReports','RI_SalesReports');";if($RI_SalesReports==1) echo " checked ";echo">";if($RI_SalesReports=='') $RI_SalesReports=0;echo"<input type='hidden' name='RI_SalesReports' value='$RI_SalesReports'></td>
		//<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>GRN Report</td><td align='center'><input type='checkbox'  $dis name='Chk_ListGrnReportsView' onclick=SetView('ListGrnReports','RI_GrnReports1');";if($RI_GrnReports1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Books and Balance</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_tabsheetbooksbalanceView' onclick=SetView('RI_tabsheetbooksbalance','RI_tabsheetbooksbalance1');";if($RI_tabsheetbooksbalance1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
		<td colspan='2'><input type='checkbox'  $dis name='Chk_RI_SaleR_ShowSalesmanView' onclick=SetView('RI_SaleR_ShowSalesman','RI_SaleR_ShowSalesman1');";if($RI_SaleR_ShowSalesman1==1) echo " checked ";echo">Show Salesman</td>
		</tr>";
		
		if($module_budgetinv==1){
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Budget Invers</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_BudgetInvTabSheetView' onclick=SetView('RI_BudgetInvTabSheet','RI_BudgetInvTabSheet1');";if($RI_BudgetInvTabSheet1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Export</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_TabSheetexportView' onclick=SetView('RI_TabSheetexport','RI_TabSheetexport1');";if($RI_TabSheetexport1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Inventory By Entry No</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_InvByEntryNoView' onclick=SetView('RI_InvByEntryNo','RI_InvByEntryNo1');";if($RI_InvByEntryNo1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		if($module_project==1 || $module_projectdt==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Invoice By Project</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_InvoiceProjectView' onclick=SetView('RI_InvoiceProject','RI_InvoiceProject1');";if($RI_InvoiceProject1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Invoices</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_InvoicesView' onclick=SetView('RI_Invoices','RI_Invoices1');";if($RI_Invoices1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Item Per Warehouse(Size)</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_ItemsPerWarehouseSizeView' onclick=SetView('RI_ItemsPerWarehouseSize','RI_ItemsPerWarehouseSize1');";if($RI_ItemsPerWarehouseSize1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>List of Adjustment</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_AdjustmentView' onclick=SetView('RI_Adjustment','RI_Adjustment');";if($RI_Adjustment==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>List of Delivered Qty</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_ListOfDeliveryQtyView' onclick=SetView('RI_ListOfDeliveryQty','RI_ListOfDeliveryQty1');";if($RI_ListOfDeliveryQty1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>List of Due Items</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_LISTOFDUEITEMSView' onclick=SetView('RI_LISTOFDUEITEMS','RI_LISTOFDUEITEMS1');";if($RI_LISTOFDUEITEMS1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>List of Items</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_ListofItemsView' onclick=SetView('RI_ListofItems','RI_ListofItems1');";if($RI_ListofItems1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>List of Purchases Charges</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_listofPIChargesView' onclick=SetView('RI_listofPICharges','RI_listofPICharges1');";if($RI_listofPICharges1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>List of Transfer</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_TransferView' onclick=SetView('RI_Transfer','RI_Transfer');";if($RI_Transfer==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		if($Module_RMA==1){
		echo"<tr bgcolor='$grid_color1' height='20px'><td>List of RMA</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_ListofRMAView' onclick=SetView('RI_ListofRMA','RI_ListofRMA1');";if($RI_ListofRMA1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
		
		if($Module_Pack==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Packing</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_PackingView' onclick=SetView('RI_Packing','RI_Packing1');";if($RI_Packing1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Profit Per Items</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_ProfitperItemsView' onclick=SetView('RI_ProfitperItems','RI_ProfitperItems1');";if($RI_ProfitperItems1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Query</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_QueryView' onclick=SetView('RI_Query','RI_Query1');";if($RI_Query1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		if($Module_RMA==1){
		echo"<tr bgcolor='$grid_color1' height='20px'><td>RMA</td>
		<td align='center'><input type='checkbox'  $dis name='Chk_RI_TabSheetrmaView' onclick=SetView('RI_TabSheetrma','RI_TabSheetrma1');";if($RI_TabSheetrma1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Sales Statistics</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_SalesStatisticsView' onclick=SetView('RI_SalesStatistics','RI_SalesStatistics1');";if($RI_SalesStatistics1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Sold By Salesman</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_SoldbySalesmanView' onclick=SetView('RI_SoldbySalesman','RI_SoldbySalesman1');";if($RI_SoldbySalesman1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Stock Movement</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_StkMovementView' onclick=SetView('RI_StkMovement','RI_StkMovement1');";if($RI_StkMovement1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Trans Page</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_TranspPageView' onclick=SetView('RI_TranspPage','RI_TranspPage1');";if($RI_TranspPage1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
	
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Statistics</td><td align='center'><input type='checkbox'  $dis name='Chk_RI_StatisticsView' onclick=SetView('RI_Statistics','RI_Statistics');";if($RI_Statistics==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
	}	
	
	else if($txtApplication=='PayReports' && $txtSchemaAssigned!=''){ 
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Analysis Report</td><td align='center'><input type='checkbox'  $dis name='Chk_FP_AnalysisReportView' onclick=SetView('FP_AnalysisReport','FP_AnalysisReport1');";if($FP_AnalysisReport1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
			
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Arabic Report</td><td align='center'><input type='checkbox'  $dis name='Chk_FP_ArabicReportsView' onclick=SetView('FP_ArabicReports','FP_ArabicReports1');";if($FP_ArabicReports1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
	
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Attendance</td><td align='center'></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
	
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Bank Statement</td><td align='center'><input type='checkbox'  $dis name='Chk_RP_BankStatementView' onclick=SetView('RP_BankStatement','RP_BankStatement1');";if($RP_BankStatement1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Collection of Reports/Payroll</td><td align='center'><input type='checkbox'  $dis name='Chk_RP_CollectionofRepPayView' onclick=SetView('RP_CollectionofRepPay','RP_CollectionofRepPay1');";if($RP_CollectionofRepPay1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Employee</td><td align='center'><input type='checkbox'  $dis name='Chk_RP_EmployeeView' onclick=SetView('RP_Employee','RP_Employee1');";if($RP_Employee1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";

		echo"<tr bgcolor='$grid_color1' height='20px'><td>Evaluation</td><td align='center'><input type='checkbox'  $dis name='Chk_RP_EvaluationView' onclick=SetView('RP_Evaluation','RP_Evaluation1');";if($RP_Evaluation1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Overtime</td><td align='center'><input type='checkbox'  $dis name='Chk_FP_OvertimeView' onclick=SetView('FP_Overtime','FP_Overtime1');";if($FP_Overtime1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Query</td><td align='center'><input type='checkbox'  $dis name='Chk_RP_QueryView' onclick=SetView('RP_Query','RP_Query1');";if($RP_Query1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Time Sheet</td><td align='center'><input type='checkbox'  $dis name='Chk_RP_TimeSheetView' onclick=SetView('RP_TimeSheet','RP_TimeSheet1');";if($RP_TimeSheet1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
	}
	else if($txtApplication=='Reports' && $txtSchemaAssigned!=''){ 
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Accounting</td><td align='center'><input type='checkbox'  $dis name='Chk_Rep_AccountingView' onclick=SetView('Rep_Accounting','Rep_Accounting1');";if($Rep_Accounting1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		echo"<tr bgcolor='$grid_color2' height='20px'><td>General</td><td align='center'><input type='checkbox'  $dis name='Chk_Rep_GeneralView' onclick=SetView('Rep_General','Rep_General1');";if($Rep_General1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Inventory</td><td align='center'><input type='checkbox'  $dis name='Chk_Rep_InventoryView' onclick=SetView('Rep_Inventory','Rep_Inventory1');";if($Rep_Inventory1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
	}	
	
	else if($txtApplication=='POS' && $txtSchemaAssigned!=''){ 
		echo"<tr bgcolor='$grid_color1' height='20px'><td>POS</td><td align='center'><input type='checkbox'  $dis name='Chk_POSView' onclick=SetView('POS','Fi_POS');";if($Fi_POS==1) echo " checked ";echo"></td>
		<td align='center'></td>
		<td align='center'></td>
		<td align='center'></td>
		</tr>";
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Cash Register</td><td align='center'><input type='checkbox'  $dis name='Chk_CashRegisterView' onclick=SetView('CashRegister','FC_CashRegister1');";if($FC_CashRegister1==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CashRegisterApp' onclick=SetApp('CashRegister','FC_CashRegisterApp');";if($FC_CashRegisterApp==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CashRegisterMod' onclick=SetMod('CashRegister','FC_CashRegisterMod');";if($FC_CashRegisterMod==1) echo " checked ";echo"></td>
		<td align='center'><input type='checkbox'  $dis name='Chk_CashRegisterDel' onclick=SetDel('CashRegister','FC_CashRegisterDel');";if($FC_CashRegisterDel==1) echo " checked ";echo"></td>
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_AddClientView' onclick=SetView('FC_AddClient','FC_AddClient1');";if($FC_AddClient1==1) echo " checked ";echo">Add Client</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_CashRegisterCouponView' onclick=SetView('FC_CashRegisterCoupon','FC_CashRegisterCoupon1');";if($FC_CashRegisterCoupon1==1) echo " checked ";echo">Add Coupon</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_FC_CashRegisterCustomerView' onclick=SetView('FC_CashRegisterCustomer','FC_CashRegisterCustomer1');";if($FC_CashRegisterCustomer1==1) echo " checked ";echo">Add Customer</td>
		
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_CashRegisterCancelView' onclick=SetView('FC_CashRegisterCancel','FC_CashRegisterCancel1');";if($FC_CashRegisterCancel1==1) echo " checked ";echo">Cancel</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_CashRegisterCheckView' onclick=SetView('FC_CashRegisterCheck','FC_CashRegisterCheck1');";if($FC_CashRegisterCheck1==1) echo " checked ";echo">Check</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_ConfirmCustomerView' onclick=SetView('FC_ConfirmCustomer','FC_ConfirmCustomer1');";if($FC_ConfirmCustomer1==1) echo " checked ";echo">Confirm Customer</td>
		
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_CashRegisterCreditView' onclick=SetView('FC_CashRegisterCredit','FC_CashRegisterCredit1');";if($FC_CashRegisterCredit1==1) echo " checked ";echo">Credit</td></tr>
		
		<tr bgcolor='$grid_color2'><td colspan=5>&nbsp;</td><td align='left'><input type='checkbox'  $dis name='Chk_FC_CashRegisterDiscView' onclick=SetView('FC_CashRegisterDisc','FC_CashRegisterDisc1');";if($FC_CashRegisterDisc1==1) echo " checked ";echo">Discount</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_Fc_forcingvendorView' onclick=SetView('Fc_forcingvendor','Fc_forcingvendor1');";if($Fc_forcingvendor1==1) echo " checked ";echo">Forcing Vendor</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_FC_PermToCancelCashView' onclick=SetView('FC_PermToCancelCash','FC_PermToCancelCash1');";if($FC_PermToCancelCash1==1) echo " checked ";echo">Permission To Cancel Cash</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_PostingByCashRegisterView' onclick=SetView('FC_PostingByCashRegister','FC_PostingByCashRegister1');";if($FC_PostingByCashRegister1==1) echo " checked ";echo">Post</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_PromotionView' onclick=SetView('Promotion','Promotion1');";if($Promotion1==1) echo " checked ";echo">Promotion</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_ReturnQuantityView' onclick=SetView('ReturnQuantity','ReturnQuantity1');";if($ReturnQuantity1==1) echo " checked ";echo">Qty Return</td></tr>
		<tr bgcolor='$grid_color1'><td colspan=5>&nbsp;</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_CashRegisterScrollView' onclick=SetView('FC_CashRegisterScroll','FC_CashRegisterScroll1');";if($FC_CashRegisterScroll1==1) echo " checked ";echo">Scroll</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_CashRegScrollOkView' onclick=SetView('FC_CashRegScrollOk','FC_CashRegScrollOk1');";if($FC_CashRegScrollOk1==1) echo " checked ";echo">Scroll OK</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_CashRegScrollPrintView' onclick=SetView('FC_CashRegScrollPrint','FC_CashRegScrollPrint1');";if($FC_CashRegScrollPrint1==1) echo " checked ";echo">Scroll Print</td>
		<td align='left'><input type='checkbox'  $dis name='Chk_FC_CashRegisterSearchView' onclick=SetView('FC_CashRegisterSearch','FC_CashRegisterSearch1');";if($FC_CashRegisterSearch1==1) echo " checked ";echo">Search</td>
		<td align='left' colspan=2><input type='checkbox'  $dis name='Chk_FC_ShowBtnOpenDrawerView' onclick=SetView('FC_ShowBtnOpenDrawer','FC_ShowBtnOpenDrawer1');";if($FC_ShowBtnOpenDrawer1==1) echo " checked ";echo">Show Button Open Drawer</td>
		</tr>";

		echo"<tr bgcolor='$grid_color2' height='20px'><td>Retail Report</td><td align='center'><input type='checkbox'  $dis name='Chk_FC_RetailReportView' onclick=SetView('FC_RetailReport','FC_RetailReport');";if($FC_RetailReport==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Retail Statistics</td><td align='center'><input type='checkbox'  $dis name='Chk_FC_RetailStatisticsView' onclick=SetView('FC_RetailStatistics','FC_RetailStatistics');";if($FC_RetailStatistics==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Sales Analysis</td><td align='center'><input type='checkbox'  $dis name='Chk_FC_SalesAnalysisView' onclick=SetView('FC_SalesAnalysis','FC_SalesAnalysis');";if($FC_SalesAnalysis==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Retail Viewer</td><td align='center'><input type='checkbox'  $dis name='Chk_FC_RetailViewerView' onclick=SetView('FC_RetailViewer','FC_RetailViewer');";if($FC_RetailViewer==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Sales Statistic</td><td align='center'><input type='checkbox'  $dis name='Chk_FC_SalesStatisticView' onclick=SetView('FC_SalesStatistic','FC_SalesStatistic');";if($FC_SalesStatistic==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Slippass</td><td align='center'><input type='checkbox'  $dis name='Chk_FI_SlippassView' onclick=SetView('FI_Slippass','FI_Slippass');";if($FI_Slippass==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		




		echo"<tr bgcolor='$grid_color2' height='20px'><td>Retail Report</td><td colspan=4>&nbsp;</td><td align='left'><input type='checkbox'  $dis name='Chk_Rc_cashFlowView' onclick=SetView('Rc_cashFlow','Rc_cashFlow1');";if($Rc_cashFlow1==1) echo " checked ";echo">Cash Flow</td>
			<td align='left'><input type='checkbox'  $dis name='Chk_Closing_RetailReportView' onclick=SetView('Closing_RetailReport','Closing_RetailReport1');";if($Closing_RetailReport1==1) echo " checked ";echo">Closing Retail Report</td>
			<td align='left'><input type='checkbox'  $dis name='Chk_RC_ForcingUserAccountView' onclick=SetView('RC_ForcingUserAccount','RC_ForcingUserAccount1');";if($RC_ForcingUserAccount1==1) echo " checked ";echo">Forcing User Access</td>
			<td align='left'><input type='checkbox'  $dis name='Chk_RC_ItemsSizesView' onclick=SetView('RC_ItemsSizes','RC_ItemsSizes1');";if($RC_ItemsSizes1==1) echo " checked ";echo">Item Sizes</td>
			<td align='left' colspan=4><input type='checkbox'  $dis name='Chk_RC_ListOfInvoicesView' onclick=SetView('RC_ListOfInvoices','RC_ListOfInvoices1');";if($RC_ListOfInvoices1==1) echo " checked ";echo">List of Invoices 
			<input type='checkbox'  $dis name='Chk_RC_SalesmenCommissionView' onclick=SetView('RC_SalesmenCommission','RC_SalesmenCommission1');";if($RC_SalesmenCommission1==1) echo " checked ";echo">Salesmen Commission</td>
		</tr>";
	}
	
	else if($txtApplication=='Edatacom' && $txtSchemaAssigned!=''){
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Edatacom</td><td align='center'><input type='checkbox'  $dis name='Chk_EdatacomView' onclick=SetView('Edatacom','Edatacom1');";if($Edatacom1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
	}
	else if($txtApplication=='Utilities' && $txtSchemaAssigned!=''){
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Utilities </td><td align='center'><input type='checkbox'  $dis name='Chk_UtilitiesView' onclick=SetView('Utilities','Utilities');";if($Utilities==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Repost Transaction </td><td align='center'><input type='checkbox'  $dis name='Chk_U_RePostTransactionView' onclick=SetView('U_RePostTransaction','U_RePostTransaction');";if($U_RePostTransaction==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Setup </td><td align='center'><input type='checkbox'  $dis name='Chk_FU_SetupView' onclick=SetView('FU_Setup','FU_Setup');";if($FU_Setup==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Backup File </td><td align='center'><input type='checkbox'  $dis name='Chk_U_BackupFileView' onclick=SetView('U_BackupFile','U_BackupFile1');";if($U_BackupFile1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Cash Register</td><td align='center'><input type='checkbox'  $dis name='Chk_U_CashRegisterView' onclick=SetView('U_CashRegister','U_CashRegister1');";if($U_CashRegister1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Close Company</td><td align='center'><input type='checkbox'  $dis name='Chk_U_CloseCompanyView' onclick=SetView('U_CloseCompany','U_CloseCompany1');";if($U_CloseCompany1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Close Year</td><td align='center'><input type='checkbox'  $dis name='Chk_U_CloseYearView' onclick=SetView('U_CloseYear','U_CloseYear1');";if($U_CloseYear1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Closing Period</td><td align='center'><input type='checkbox'  $dis name='Chk_FU_ClosingPeriodView' onclick=SetView('FU_ClosingPeriod','FU_ClosingPeriod1');";if($FU_ClosingPeriod1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Delete Company</td><td align='center'><input type='checkbox'  $dis name='Chk_U_DeleteCompanyView' onclick=SetView('U_DeleteCompany','U_DeleteCompany1');";if($U_DeleteCompany1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Delete Year</td><td align='center'><input type='checkbox'  $dis name='Chk_U_DeleteYearView' onclick=SetView('U_DeleteYear','U_DeleteYear1');";if($U_DeleteYear1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	

		if($module_costcenter==1 || $module_costcenterdt==1){
			echo"<tr bgcolor='$grid_color1' height='20px'><td>Distributing Costcenter</td><td align='center'><input type='checkbox'  $dis name='Chk_U_DistributingCostcenterView' onclick=SetView('U_DistributingCostcenter','U_DistributingCostcenter1');";if($U_DistributingCostcenter1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
		}
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Fill Setup File</td><td align='center'><input type='checkbox'  $dis name='Chk_U_FillSetupFileView' onclick=SetView('U_FillSetupFile','U_FillSetupFile1');";if($U_FillSetupFile1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
	
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Merger Database</td><td align='center'><input type='checkbox'  $dis name='Chk_U_MergerDataBaseView' onclick=SetView('U_MergerDataBase','U_MergerDataBase1');";if($U_MergerDataBase1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	

		echo"<tr bgcolor='$grid_color2' height='20px'><td>New Company</td><td align='center'><input type='checkbox'  $dis name='Chk_U_NewCompanyView' onclick=SetView('U_NewCompany','U_NewCompany1');";if($U_NewCompany1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
	
		echo"<tr bgcolor='$grid_color1' height='20px'><td>New Year</td><td align='center'><input type='checkbox'  $dis name='Chk_U_NewYearView' onclick=SetView('U_NewYear','U_NewYear1');";if($U_NewYear1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color2' height='20px'><td>Ports</td><td align='center'><input type='checkbox'  $dis name='Chk_U_PortsView' onclick=SetView('U_Ports','U_Ports1');";if($U_Ports1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Post To Checks and Bills</td><td align='center'><input type='checkbox'  $dis name='Chk_U_PostToChecksAndBillsView' onclick=SetView('U_PostToChecksAndBills','U_PostToChecksAndBills1');";if($U_PostToChecksAndBills1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";

		echo"<tr bgcolor='$grid_color2' height='20px'><td>Post To Items</td><td align='center'><input type='checkbox'  $dis name='Chk_U_PostToItemsView' onclick=SetView('U_PostToItems','U_PostToItems1');";if($U_PostToItems1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	

		echo"<tr bgcolor='$grid_color1' height='20px'><td>Post To Ledger</td><td align='center'><input type='checkbox'  $dis name='Chk_U_PostToLedgerView' onclick=SetView('U_PostToLedger','U_PostToLedger1');";if($U_PostToLedger1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	

		echo"<tr bgcolor='$grid_color2' height='20px'><td>Re Number Jv</td><td align='center'><input type='checkbox'  $dis name='Chk_U_ReNumberJVView' onclick=SetView('U_ReNumberJV','U_ReNumberJV1');";if($U_ReNumberJV1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";	
		
		echo"<tr bgcolor='$grid_color1' height='20px'><td>Transfer Account</td><td align='center'><input type='checkbox'  $dis name='Chk_U_TransferAccountView' onclick=SetView('U_TransferAccount','U_TransferAccount1');";if($U_TransferAccount1==1) echo " checked ";echo"></td>
		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";			
		
		if($Module_TransferItem==1){
			echo"<tr bgcolor='$grid_color2' height='20px'><td>Transfer Item</td><td align='center'><input type='checkbox'  $dis name='Chk_U_TransferItemView' onclick=SetView('U_TransferItem','U_TransferItem1');";if($U_TransferItem1==1) echo " checked ";echo"></td>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
		}

// echo"<tr bgcolor='$grid_color2' height='20px'><td>Transfer Account</td><td align='center'><input type='checkbox'  $dis name='FA_FIPAddress' onclick=SetView('FA_FIPAddress','FA_FIPAddress1');";if($FA_FIPAddress1==1) echo " checked ";echo"></td>
// 		<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";			
		
		
	}
	
	

	echo"</table></div></td></tr>";	
	echo"</table></td></tr>";	 

echo"</table>";

$tabs->end();

$tabs->start("Locked Period");

if($AllowLockedPeriod=='')
	$AllowLockedPeriod=0;
	
echo"<table border='0'  align='left' valign='top'  class='tablecontent'><col width=30><col width=30><col width=100><col width=170><col width=120>
<col width=120><col width=120><col width=120>";


echo"   <tr bgcolor='#d0d0d0' height='25' ><td>&nbsp;</td><td>&nbsp;</td><td  align='center'><span class='style1'>Lock Trans</span></td>
		<td  align='center'><span class='style1'>Company</span>
		<span class='style1'>Year</span></td>
		<td align='center' ><span class='style1'>Up To Date</span></td>
		<td align='center' ><span class='style1'>Only Allowed</span></td>
		<td align='center' ><span class='style1'>Lock View Period</span></td>
		<td align='center' ><span class='style1'>View Period Date</span></td>
		<td align='center' ><span class='style1'>View Lock Daily</span></td>
		<td align='center' ><span class='style1'>View Number of Days</span></td><td>&nbsp;</td></tr>";
		
		
	//$query="Select distinct CompanyName from directories ";	
	/*$query="select concat(CompanyName,Diryear) from directories where concat(CompanyName,Diryear) 
			not in (select concat(companyname,diryear) from listuserdir where usercode='".$user_code."')";
	$result_companies=mysql_query($query,$connection);*/
	
echo"   <tr bgcolor='#F7F7F7' height='25' ><td>&nbsp;</td><td>&nbsp;</td><td valign='top' align='left'><span class='style1'><input type='checkbox'  $dis name='Chk_AllowLockedPeriod' onclick='ChkAllowLockedPeriod();'";
if($AllowLockedPeriod==1) echo " checked ";echo">
		<input type='hidden' name='AllowLockedPeriod' value='$AllowLockedPeriod'></span></td>
		
		<td><b>$Companies</b>";
		
		/*<select name='Companies'>
			<option value=''>&nbsp;</option>";
		while ($row_com=mysql_fetch_row($result_companies)){
			if($row_com[0]==$Companies)
				echo "<option value='$row_com[0]'  selected>$row_com[0]</option>";
			else echo "<option value='$row_com[0]'>$row_com[0]</option>";
		}
		echo"</select>";*/
		
		echo"</td>
		<td align='center' ><span class='style1'><input type='text' name='uptodate' value='$uptodate' readonly size=10></span>	";

		if($mode!=''){
print<<< HERE
<A HREF="#" onClick="displayCalendar(document.useraccess.uptodate,'dd-mm-yyyy',this); return false;" NAME="anchor1" ID="anchor1"><image src='./img/cal.gif' border=0 align=center></image></A>
HERE;
}
if($LockViewPeriod=='')
	$LockViewPeriod=0;

if($ViewLockDaily=='')
	$ViewLockDaily=0;	
	
	
echo"</td>
		<td align='center' ><span class='style1'><input type='text' name='onlyallowed' value='$onlyallowed'  size=10 $status></span></td>
		<td align='center' ><span class='style1'><input type='checkbox'  $dis name='Chk_LockViewPeriod' onclick='ChkLockViewPeriod();'";
		if($LockViewPeriod==1) echo " checked ";echo">
		<input type='hidden' name='LockViewPeriod' value='$LockViewPeriod'></span></td>
		<td align='center' ><span class='style1'><input type='text' name='viewperioddate' value='$viewperioddate' readonly size=10></span>	";
if($mode!=''){
print<<< HERE
<A HREF="#" onClick="displayCalendar(document.useraccess.viewperioddate,'dd-mm-yyyy',this); return false;" NAME="anchor1" ID="anchor1"><image src='./img/cal.gif' border=0 align=center></image></A>
HERE;
}

	echo"<td align='center' ><span class='style1'><input type='checkbox'  $dis name='Chk_ViewLockDaily' onclick='ChkViewLockDaily();'";
	if($ViewLockDaily==1) echo " checked ";echo">
		<input type='hidden' name='ViewLockDaily' value='$ViewLockDaily'></span></td>";
	echo"
		<td align='center' ><span class='style1'><span class='style1'><input type='text' name='viewnumberdays' value='$viewnumberdays'  size=10 $status></span></td>
		<td align=center >

		<button type='button'  name='submitrecord' ";
if($mode=='') echo " disabled ";
echo" onclick='SubmitRecord(2); return false;' title='Save Changes' $Insmode><span><span>Submit</span></span></button>";

   
echo " <button type='button'  name='clearbutton' value='Clear'";
if($mode=='') echo " disabled ";
echo" onclick='cleardetail(); return false;' title='Clear Detail' ><span><span>Clear</span></span></button>";

echo"&nbsp;&nbsp;</td></tr>";		
	
	$querydt = " select concat(CompanyName,Diryear),if(ifnull(AllowLockedPeriod,0)=0,'False','True'),date_Format(LockedPeriod,'%d-%m-%Y'),
			LockedPeriodDays,if(ifnull(LockViewPeriod,0)=0,'False','True'),date_Format(ViewPeriodDate,'%d-%m-%Y'),if(ifnull(ViewLockDaily,0)=0,'False','True'),
				ViewNumberOfDays ".
		   "  ".
		   " from ".$_SESSION['dbLabel'].".listuserdir ".
		   " where usercode='".$user_code."'";

//echo $querydt;
$resultdt = mysql_query($querydt, $connection);
while($rowsdt=mysql_fetch_array($resultdt)){
			    
	$ct+=1;

	if($ct%2==0)
		$Color="style='background-color:".$grid_color1."'";
	else			
		$Color="style='background-color:".$grid_color2."'";	
						
				
	echo "<tr ".$Color." >";
	echo "	<td align='center' valign='center'><span class='style15'><img src='img/button_edit.png'  onMouseOver=\"style.cursor='hand'\" onclick=UpdateDetail('".$rowsdt[0]."') title='Edit Record'  ></span></td>";
	echo "	<td align='center' valign='center'><span class='style15'><img src='img/c_delete.png'  onMouseOver=\"style.cursor='hand'\" onclick=DeleteDetail('".$rowsdt[0]."') title='Delete Record'  ></span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[1]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[0]."</span></td>";
	echo "	<td align='center'><span class='style15'>".$rowsdt[2]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[3]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[4]."</span></td>";
	echo "	<td align='center'><span class='style15'>".$rowsdt[5]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[6]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[7]."</span></td>";
	
	
	echo "	<td align='left'><span class='style15'>&nbsp;</span></td>";
	echo "</tr>";
						
}					
		
echo"</table>";		
$tabs->end();	

$tabs->start("Access On Multi Forms");

if($txtSchemaAssigned!='' && $checkduplicate!=1){
	$query="select  FI_SalebelowLandedCost as FI_SalebelowLandedCost,".
		" fastprinttransaction as fastprinttransaction,".
		" Posted as Posted,".
		" ExporttoExcel as ExporttoExcel,".
		" FI_ShowCostPrice as FI_ShowCostPrice,".
		" Unmodify_SellingPrice as Unmodify_SellingPrice,".
		" FA_LedgerAccess as FA_LedgerAccess,".
		" DailyInvoiceModification as DailyInvoiceModification,".
		" FixJVofSales as FixJVofSales,".
		" ShowTransaction as ShowTransaction,".
		" ModifyingOldTransactions as ModifyingOldTransactions,".
		" ShowDepositJVBtn as ShowDepositJVBtn,".
		" FA_ManagingRequiredCost as FA_ManagingRequiredCost,".
		" AskBeforeCloseAcc as AskBeforeCloseAcc,".
		" Show_group as Show_group,".
		" RA_RequiredCostcenter as RA_RequiredCostcenter,".
		" Login_negativeQty as Login_negativeQty,".
		" AskBeforeCloseInv as AskBeforeCloseInv,".
		" ModifyVAT as ModifyVAT,".
		" RI_OpInvForNewYear as RI_OpInvForNewYear,".
		" Login_ModifyAllPending as Login_ModifyAllPending,".
		" Login_modAdjIsInvoice as Login_modAdjIsInvoice,".
		" Login_modAdjIsInvoice as Login_modAdjIsInvoice,".
		" FI_PricePerUnit as FI_PricePerUnit,".
		" Login_ShowLoggedUser as Login_ShowLoggedUser,".
		" Login_ModifyDiscount as Login_ModifyDiscount,".
		" FI_RepRestrictProject as FI_RepRestrictProject,".
		" FI_RepRestrictCostcenter as FI_RepRestrictCostcenter,".
		" FI_RepRestrictWarehouse as FI_RepRestrictWarehouse, ".
		" RMA_In as RMA_In, ".
		" RMA_Out as RMA_Out, ".
		" Login_Decimal as Login_Decimal, ".
		" FI_PurchaseCategory as FI_PurchaseCategory, ".
		" login_maturitydate as login_maturitydate, ".
		" Perc_creditlimit as Perc_creditlimit,FC_RetailReport as FC_RetailReport,FC_RetailStatistics as FC_RetailStatistics,FC_SalesAnalysis as FC_SalesAnalysis,FC_RetailViewer as FC_RetailViewer,FC_SalesStatistic as FC_SalesStatistic,
		is_superUser, language as login_language, FI_RMAPendingItems, FI_RMALocations, login_belongstogrp as belongtogrp ".
		" from ".$_SESSION['dbLabel'].".login where upper(login_schema)=upper('".$txtSchemaAssigned."') and user_account='".$user_code."'";

		//echo$query;exit;
		$result=mysql_query($query,$connection);
		$rows=mysql_fetch_array($result);
		extract($rows);
}


if($FI_SalebelowLandedCost=='') $FI_SalebelowLandedCost=0;
if($fastprinttransaction=='') $fastprinttransaction=0;
if($Posted=='') $Posted=0;
if($is_superUser == '') $is_superUser = 0;	
if($DeliveryStatus_Type=='') $DeliveryStatus_Type=0;

if($ExporttoExcel=='') $ExporttoExcel=0;
if($FI_ShowCostPrice=='') $FI_ShowCostPrice=0;
if($Unmodify_SellingPrice=='') $Unmodify_SellingPrice=0;
if($FA_LedgerAccess=='') $FA_LedgerAccess=0;
if($DailyInvoiceModification=='') $DailyInvoiceModification=0;
if($FixJVofSales=='') $FixJVofSales=0;
if($ShowTransaction=='') $ShowTransaction=0;
if($ModifyingOldTransactions=='') $ModifyingOldTransactions=0;
if($ShowDepositJVBtn=='') $ShowDepositJVBtn=0;
if($FA_ManagingRequiredCost=='') $FA_ManagingRequiredCost=0;
if($AskBeforeCloseAcc=='') $AskBeforeCloseAcc=0;
if($Show_group=='') $Show_group=0;
if($RA_RequiredCostcenter=='') $RA_RequiredCostcenter=0;
if($Login_negativeQty=='') $Login_negativeQty=0;
if($AskBeforeCloseInv=='') $AskBeforeCloseInv=0;
if($ModifyVAT=='') $ModifyVAT=0;
if($RI_OpInvForNewYear=='') $RI_OpInvForNewYear=0;
if($Login_ModifyAllPending=='') $Login_ModifyAllPending=0;
if($Login_modAdjIsInvoice=='') $Login_modAdjIsInvoice=0;
if($FI_PricePerUnit=='') $FI_PricePerUnit=0;
if($Login_ShowLoggedUser=='') $Login_ShowLoggedUser=0;
if($Login_ModifyDiscount=='') $Login_ModifyDiscount=0;
if($FI_RepRestrictProject=='') $FI_RepRestrictProject=0;
if($FI_RepRestrictCostcenter=='') $FI_RepRestrictCostcenter=0;
if($FI_RepRestrictWarehouse=='') $FI_RepRestrictWarehouse=0;
if($login_maturitydate=='') $login_maturitydate=0;
if($approved_level1=='') $approved_level1=0;
if($Perc_creditlimit=='') $Perc_creditlimit=0;

echo"<table border='0'  align='left' valign='top'  class='tablecontent'><col width=240><col width=240><col width=240><col width=200>";
echo"   <tr bgcolor='#F7F7F7' height='25' ><td  align='left' colspan=4><B>$txtSchemaAssigned</b></td></tr>";
echo"   <tr bgcolor='#F7F7F7' height='25' ><td  align='left'><input type='checkbox'  $dis name='Chk_FI_SalebelowLandedCost' onclick=ChkMultiForms('FI_SalebelowLandedCost');";
if($FI_SalebelowLandedCost==1) echo " checked ";echo">
		<input type='hidden' name='FI_SalebelowLandedCost' value='$FI_SalebelowLandedCost'><span class='style1'>Price Below Landed Cost</span></td>
		
		<td  align='left'><input type='checkbox'  $dis name='Chk_fastprinttransaction' onclick=ChkMultiForms('fastprinttransaction');";
if($fastprinttransaction==1) echo " checked ";echo">
		<input type='hidden' name='fastprinttransaction' value='$fastprinttransaction'><span class='style1'>Print Transactions</span></td>
		
			<td  align='left'><input type='checkbox'  $dis name='Chk_Posted' onclick=ChkMultiForms('Posted');";
if($Posted==1) echo " checked ";echo">
		<input type='hidden' name='Posted' value='$Posted'><span class='style1'>Posted</span></td>";

echo"<td align='left'><input type='checkbox' name='Chk_isSuperUser'";
if($isSuperUser == 1)
echo "checked";
echo" onclick=\"ChkMultiForms('isSuperUser');\" /><input type='hidden' name='isSuperUser' value='$isSuperUser'><span class='style1'>Super User</span></td>";		
echo"</tr>";
		
	echo"   <tr bgcolor='#F7F7F7' height='25' ><td  align='left'><input type='checkbox'  $dis name='Chk_ExporttoExcel' onclick=ChkMultiForms('ExporttoExcel');";
if($ExporttoExcel==1) echo " checked ";echo">
		<input type='hidden' name='ExporttoExcel' value='$ExporttoExcel'><span class='style1'>Export To Excel</span></td>
		
<td  align='left'><input type='checkbox'  $dis name='Chk_FI_ShowCostPrice' onclick=ChkMultiForms('FI_ShowCostPrice');";
if($FI_ShowCostPrice==1) echo " checked ";echo">
		<input type='hidden' name='FI_ShowCostPrice' value='$FI_ShowCostPrice'><span class='style1'>Show Cost Price</span></td>		
		
<td  align='left'><input type='checkbox'  $dis name='Chk_Unmodify_SellingPrice' onclick=ChkMultiForms('Unmodify_SellingPrice');";
if($Unmodify_SellingPrice==1) echo " checked ";echo">
		<input type='hidden' name='Unmodify_SellingPrice' value='$Unmodify_SellingPrice'><span class='style1'>Selling Price (not Rectifying)</span></td>
		
<td  align='left'><input type='checkbox'  $dis name='Chk_FA_LedgerAccess' onclick=ChkMultiForms('FA_LedgerAccess');";
if($FA_LedgerAccess==1) echo " checked ";echo">
		<input type='hidden' name='FA_LedgerAccess' value='$FA_LedgerAccess'><span class='style1'>Ledger Access</span></td></tr>";

echo"   <tr bgcolor='#F7F7F7' height='25' ><td  align='left'><input type='checkbox'  $dis name='Chk_DailyInvoiceModification' onclick=ChkMultiForms('DailyInvoiceModification');";
if($DailyInvoiceModification==1) echo " checked ";echo">
		<input type='hidden' name='DailyInvoiceModification' value='$DailyInvoiceModification'><span class='style1'>No Daily Modification</span></td>	
		
<td  align='left'><input type='checkbox'  $dis name='Chk_FixJVofSales' onclick=ChkMultiForms('FixJVofSales');";
if($FixJVofSales==1) echo " checked ";echo">
		<input type='hidden' name='FixJVofSales' value='$FixJVofSales'><span class='style1'>Fix Jv of Sales</span></td>	

<td  align='left'><input type='checkbox'  $dis name='Chk_ShowTransaction' onclick=ChkMultiForms('ShowTransaction');";
if($ShowTransaction==1) echo " checked ";echo">
		<input type='hidden' name='ShowTransaction' value='$ShowTransaction'><span class='style1'>See Other Transaction</span></td>		

<td  align='left'><input type='checkbox'  $dis name='Chk_ModifyingOldTransactions' onclick=ChkMultiForms('ModifyingOldTransactions');";
if($ModifyingOldTransactions==1) echo " checked ";echo">
		<input type='hidden' name='ModifyingOldTransactions' value='$ModifyingOldTransactions'><span class='style1'>Modifying Old Transactions</span></td></tr>";
		
echo"   <tr bgcolor='#F7F7F7' height='25' ><td  align='left'><input type='checkbox'  $dis name='Chk_ShowDepositJVBtn' onclick=ChkMultiForms('ShowDepositJVBtn');";
if($ShowDepositJVBtn==1) echo " checked ";echo">
		<input type='hidden' name='ShowDepositJVBtn' value='$ShowDepositJVBtn'><span class='style1'>Show Deposit Checks</span></td>";	

if($module_costcenter==1 || $module_costcenterdt==1){		
	echo"<td  align='left'><input type='checkbox'  $dis name='Chk_FA_ManagingRequiredCost' onclick=ChkMultiForms('FA_ManagingRequiredCost');";
if($FA_ManagingRequiredCost==1) echo " checked ";echo">
		<input type='hidden' name='FA_ManagingRequiredCost' value='$FA_ManagingRequiredCost'><span class='style1'>Managing Required CostCenter</span></td>	";

}
else {
echo"<input type='hidden' name='FA_ManagingRequiredCost' value='$FA_ManagingRequiredCost'>";

}		
		
echo"<td  align='left'><input type='checkbox'  $dis name='Chk_AskBeforeCloseAcc' onclick=ChkMultiForms('AskBeforeCloseAcc');";
if($AskBeforeCloseAcc==1) echo " checked ";echo">
		<input type='hidden' name='AskBeforeCloseAcc' value='$AskBeforeCloseAcc'><span class='style1'>Ask Before Closing Accounting</span></td>			

<td  align='left'><input type='checkbox'  $dis name='Chk_Show_group' onclick=ChkMultiForms('Show_group');";
if($Show_group==1) echo " checked ";echo">
		<input type='hidden' name='Show_group' value='$Show_group'><span class='style1'>Show Group</span></td></tr>	";
	
echo"   <tr bgcolor='#F7F7F7' height='25' >";


if($module_costcenter==1 || $module_costcenterdt==1){
	echo"<td  align='left'><input type='checkbox'  $dis name='Chk_RA_RequiredCostcenter' onclick=ChkMultiForms('RA_RequiredCostcenter');";
if($RA_RequiredCostcenter==1) echo " checked ";echo">
		<input type='hidden' name='RA_RequiredCostcenter' value='$RA_RequiredCostcenter'><span class='style1'>Required CostCenter</span></td>";
}
else {
	echo"<input type='hidden' name='RA_RequiredCostcenter' value='$RA_RequiredCostcenter'>";

}

echo"<td  align='left'><input type='checkbox'  $dis name='Chk_Login_negativeQty' onclick=ChkMultiForms('Login_negativeQty');";
if($Login_negativeQty==1) echo " checked ";echo">
		<input type='hidden' name='Login_negativeQty' value='$Login_negativeQty'><span class='style1'>Negative Qty</span></td>			

<td  align='left'><input type='checkbox'  $dis name='Chk_AskBeforeCloseInv' onclick=ChkMultiForms('AskBeforeCloseInv');";
if($AskBeforeCloseInv==1) echo " checked ";echo">
		<input type='hidden' name='AskBeforeCloseInv' value='$AskBeforeCloseInv'><span class='style1'>Ask Before Closing Inventory</span></td>	

<td  align='left'><input type='checkbox'  $dis name='Chk_ModifyVAT' onclick=ChkMultiForms('ModifyVAT');";
if($ModifyVAT==1) echo " checked ";echo">
		<input type='hidden' name='ModifyVAT' value='$ModifyVAT'><span class='style1'>Modify Vat</span></td></tr>";

echo"   <tr bgcolor='#F7F7F7' height='25' ><td  align='left'><input type='checkbox'  $dis name='Chk_RI_OpInvForNewYear' onclick=ChkMultiForms('RI_OpInvForNewYear');";
if($RI_OpInvForNewYear==1) echo " checked ";echo">
		<input type='hidden' name='RI_OpInvForNewYear' value='$RI_OpInvForNewYear'><span class='style1'>Opening Inventory For new Year</span></td>		
		
<td  align='left'><input type='checkbox'  $dis name='Chk_Login_ModifyAllPending' onclick=ChkMultiForms('Login_ModifyAllPending');";
if($Login_ModifyAllPending==1) echo " checked ";echo">
		<input type='hidden' name='Login_ModifyAllPending' value='$Login_ModifyAllPending'><span class='style1'>Modify All Pending</span></td>			

<td  align='left'><input type='checkbox'  $dis name='Chk_Login_modAdjIsInvoice' onclick=ChkMultiForms('Login_modAdjIsInvoice');";
if($Login_modAdjIsInvoice==1) echo " checked ";echo">
		<input type='hidden' name='Login_modAdjIsInvoice' value='$Login_modAdjIsInvoice'><span class='style1'>Adjustment is Invoice</span></td>	

<td  align='left'><input type='checkbox'  $dis name='Chk_FI_PricePerUnit' onclick=ChkMultiForms('FI_PricePerUnit');";
if($FI_PricePerUnit==1) echo " checked ";echo">
		<input type='hidden' name='FI_PricePerUnit' value='$FI_PricePerUnit'><span class='style1'>Sale Price per unit</span></td></tr>";

echo"   <tr bgcolor='#F7F7F7' height='25' ><td  align='left'><input type='checkbox'  $dis name='Chk_Login_ShowLoggedUser' onclick=ChkMultiForms('Login_ShowLoggedUser');";
if($Login_ShowLoggedUser==1) echo " checked ";echo">
		<input type='hidden' name='Login_ShowLoggedUser' value='$Login_ShowLoggedUser'><span class='style1'>Show Logged User</span></td>	
		
<td  align='left'><input type='checkbox'  $dis name='Chk_Login_ModifyDiscount' onclick=ChkMultiForms('Login_ModifyDiscount');";
if($Login_ModifyDiscount==1) echo " checked ";echo">
		<input type='hidden' name='Login_ModifyDiscount' value='$Login_ModifyDiscount'><span class='style1'>Modify Discount</span></td>	";

if($module_project==1 || $module_projectdt==1){		
echo"<td  align='left'><input type='checkbox'  $dis name='Chk_FI_RepRestrictProject' onclick=ChkMultiForms('FI_RepRestrictProject');";
if($FI_RepRestrictProject==1) echo " checked ";echo">
		<input type='hidden' name='FI_RepRestrictProject' value='$FI_RepRestrictProject'><span class='style1'>Report Project Restrict</span></td>	";
}
else {
	echo"<input type='hidden' name='FI_RepRestrictProject' value='$FI_RepRestrictProject'>";

}		
	
if($module_costcenter==1 || $module_costcenterdt==1){	
echo"
<td  align='left'><input type='checkbox'  $dis name='Chk_FI_RepRestrictCostcenter' onclick=ChkMultiForms('FI_RepRestrictCostcenter');";
if($FI_RepRestrictCostcenter==1) echo " checked ";echo">
		<input type='hidden' name='FI_RepRestrictCostcenter' value='$FI_RepRestrictCostcenter'><span class='style1'>Report CostCenter Restrict</span></td>";
}
else{
	echo"<input type='hidden' name='FI_RepRestrictCostcenter' value='$FI_RepRestrictCostcenter'>";

}

echo"		</tr>

<tr bgcolor='#F7F7F7' height='25' ><td  align='left' ><input type='checkbox'  $dis name='Chk_FI_RepRestrictWarehouse' onclick=ChkMultiForms('FI_RepRestrictWarehouse');";
if($FI_RepRestrictWarehouse==1) echo " checked ";echo">
		<input type='hidden' name='FI_RepRestrictWarehouse' value='$FI_RepRestrictWarehouse'><span class='style1'>Report Warehouse Restrict</span></td>
<td  align='left' colspan=4><input type='checkbox'  $dis name='Chk_login_maturitydate' onclick=ChkMultiForms('login_maturitydate');";
if($login_maturitydate==1) echo " checked ";echo">
		<input type='hidden' name='login_maturitydate' value='$login_maturitydate'><span class='style1'>Modify Maturity Date</span></td>		
		</tr>
<tr bgcolor='#F7F7F7' height='25' ><td  align='left' >";

if($Module_RMA==1){
	echo"<span class='style1'>Rma In &nbsp;&nbsp;</span><input type='text' name='RMA_In' value='$RMA_In' maxlength='15' size=15 $status>";
}	
else echo "<input type='hidden' name='RMA_In' value='$RMA_In' maxlength='15' size=15 $status>";

echo"</td>

<td colspan=2><span class='style1'>Category : <input type='radio' $dis name='FI_PurchaseCategory1' value='0'";if($FI_PurchaseCategory1==0) echo " checked ";echo"><span class='style1'>All
<input type='radio' $dis name='FI_PurchaseCategory1' value='1'";if($FI_PurchaseCategory1==1) echo " checked ";echo"><span class='style1'>Local
<input type='radio' $dis name='FI_PurchaseCategory1' value='2'";if($FI_PurchaseCategory1==2) echo " checked ";echo"><span class='style1'>Export</td>";
/*
echo"<td colspan=2 ><span class='style1'>Delivery Status Type</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<select id='DeliveryStatus_Type'  name='DeliveryStatus_Type'>";
			$query="select id,name from deliverystatus_setup where deliverystatus_level <= $deliverystatus_level order by deliverystatus_level";
			$resultstatus=mysql_query($query,$connection) or die(mysql_error());
			echo"<option value='-1'></option> ";
				while($curf=mysql_fetch_row($resultstatus)){
				echo"<option ";
					if ($DeliveryStatus_Type==$curf[0] )
						echo " selected ";
					echo" value='$curf[0]'>$curf[1] </option>";
					}
			 
			echo"</select>";
			
echo"</td>*/

echo"<td valign='center' align='left' colspan=2 ><span class='style1'>Delivery Status Level</span>&nbsp;&nbsp;&nbsp;&nbsp;";
echo"<input type='text' name='deliverystatus_level' id='deliverystatus_level' value='$deliverystatus_level' style='width:75px'></td>";



echo"</tr>";
		
if($Login_Decimal=='')
	$Login_Decimal=0;
		
echo"<tr bgcolor='#F7F7F7' height='25' ><td  align='left'>";

if($Module_RMA==1){
	echo"<span class='style1'>Rma Out </span><input type='text' name='RMA_Out' value='$RMA_Out' maxlength='15' size=15 $status>";
}	
else echo "<input type='hidden' name='RMA_Out' value='$RMA_Out' maxlength='15' size=15 $status>";	

echo"</td><td  align='left' colspan=2><span class='style1'>Decimal &nbsp;</span><input type='text' name='Login_Decimal' value='$Login_Decimal' maxlength='15' $status></td>";

if ($belongtogrp == '') $belongtogrp = 0;
if ($Module_BelongsToGroup == 1){
	echo "<td><span class='style1'>Belongs To Group</span> <input type='text' name='belongtogrp' id='belongtogrp' value='$belongtogrp' style='width:50px;'></td>";
} else echo "<td><input type='hidden' name='belongtogrp' id='belongtogrp' value='$belongtogrp'></td>";
echo "</tr>";
		

echo"<tr bgcolor='#F7F7F7' height='25' ><td></td><td  align='left' colspan='3'><span class='style1'>
Approved Level</span><input type='text' name='approved_level1' value='$approved_level1' maxlength='11' $status>
<span class='style1'>&nbsp;&nbsp;&nbsp;Credit limit Percentage</span><input type='text' name='Perc_creditlimit' value='$Perc_creditlimit' maxlength='11' $status>

</td></tr>";
		
echo"</table>";		
$tabs->end();		
		
$tabs->start("Item Access");

echo"<table border='0'   style='table-layout:fixed' align='left' valign='top'  class='tablecontent'><col width=140><col width=230>";

echo"   <tr  height='25' bgcolor='#F7F7F7'><td  align='left'><span class='style1'>Project</span></td><td align=left colspan=2><input type=text name='project_code' value='$project_code' maxlength='10' $status readonly size='10' style='font-size:12px; width:110px; height:18px;'>";
echo"  <label><span class='style1'><img src='img/btnopen.jpg' title=' Select Project '  width='15' height='17' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistprojects(9); return false' /></span></label>";
		
echo"&nbsp;<input type=text name='project_name' value='$project_name' maxlength='15' $status readonly size='20' style='font-size:12px; width:200px; height:18px;'></td></tr>

<tr bgcolor='#F7F7F7'><td  align='left'><span class='style1'>CostCenter</span></td><td align=left colspan=2><input type=text name='costcenter_code' value='$costcenter_code' maxlength='10' $status readonly size='10' style='font-size:12px; width:110px; height:18px;'>";
echo"  <label><span class='style1'><img src='img/btnopen.jpg' title=' Select CostCenter '  width='15' height='17' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistcostcenter(7); return false' /></span></label>";
		
echo"&nbsp;<input type=text name='costcenter_name' value='$costcenter_name' maxlength='15' $status readonly size='20' style='font-size:12px; width:200px; height:18px;'></td></tr>

	<tr bgcolor='#F7F7F7'><td  align='left'><span class='style1'>Group</span></td><td align=left colspan=2><input type=text name='group_code' value='$group_code' maxlength='10' $status readonly size='10' style='font-size:12px; width:110px; height:18px;'>";
echo"  <label><span class='style1'><img src='img/btnopen.jpg' title=' Select Group '  width='15' height='17' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistgroups(4); return false' /></span></label>";
		
echo"&nbsp;<input type=text name='group_name' value='$group_name' maxlength='15' $status readonly size='20' style='font-size:12px; width:200px; height:18px;'></td></tr>

	<tr bgcolor='#F7F7F7'><td  align='left'><span class='style1'>Sub Group</span></td><td align=left colspan=2><input type=text name='subgroup_code' value='$subgroup_code' maxlength='10' $status readonly size='10' style='font-size:12px; width:110px; height:18px;'>";
echo"  <label><span class='style1'><img src='img/btnopen.jpg' title=' Select SubGroup '  width='15' height='17' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistsubgroups(2); return false' /></span></label>";
		
echo"&nbsp;<input type=text name='subgroup_name' value='$subgroup_name' maxlength='15' $status readonly size='20' style='font-size:12px; width:200px; height:18px;'></td></tr>

	<tr bgcolor='#F7F7F7'><td  align='left'><span class='style1'>Warehouse</span></td><td align=left colspan=2><input type=text name='warehouse_code' value='$warehouse_code' maxlength='10' $status readonly size='10' style='font-size:12px; width:110px; height:18px;'>";
echo"  <label><span class='style1'><img src='img/btnopen.jpg' title=' Select Warehouse '  width='15' height='17' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistwarehouse(4); return false' /></span></label>";
		
echo"&nbsp;<input type=text name='warehouse_name' value='$warehouse_name' maxlength='15' $status readonly size='20' style='font-size:12px; width:200px; height:18px;'></td></tr>";

echo"<tr bgcolor='#F7F7F7'><td  align='left'><span class='style1'>To Warehouse</span></td><td align=left colspan=2><input type=text name='towarehouse_code' value='$towarehouse_code' maxlength='10' $status readonly size='10' style='font-size:12px; width:110px; height:18px;'>";
echo"  <label><span class='style1'><img src='img/btnopen.jpg' title=' Select Warehouse '  width='15' height='17' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistwarehouse(7); return false' /></span></label>";
		
echo"&nbsp;<input type=text name='towarehouse_name' value='$towarehouse_name' maxlength='15' $status readonly size='20' style='font-size:12px; width:200px; height:18px;'></td></tr>";

if($DefaultProject=='')
	$DefaultProject=0;
	
if($DefaultCost=='')
	$DefaultCost=0;	
	
if($DefaultWarehouse=='')
	$DefaultWarehouse=0;		
	
echo"<tr bgcolor='#F7F7F7'><td  align='left'>
	<input type='checkbox'  $dis name='Chk_DefaultProject' onclick='ChkDefaultProject();'";
		if($DefaultProject==1) echo " checked ";echo"><span class='style1'>Default Project</span>
		<input type='hidden' name='DefaultProject' value='$DefaultProject'></span>
	</td><Td><input type='checkbox'  $dis name='Chk_DefaultCost' onclick='ChkDefaultCost();'";
		if($DefaultCost==1) echo " checked ";echo"><span class='style1'>Default CostCenter</span>
		<input type='hidden' name='DefaultCost' value='$DefaultCost'></span>
	</td><Td><input type='checkbox'  $dis name='Chk_DefaultWarehouse' onclick='ChkDefaultWarehouse();'";
		if($DefaultWarehouse==1) echo " checked ";echo"><span class='style1'>Default Warehouse</span>
		<input type='hidden' name='DefaultWarehouse' value='$DefaultWarehouse'></span></td></tr>
	
	<tr bgcolor='#F7F7F7'><td  align='left'><span class='style1'>Client Salesmen</span></td><td  colspan=2><input type=text name='clientsalesmen' value='$clientsalesmen' maxlength='20' $status  size='20' style='font-size:12px; width:200px; height:18px;'></td>
		</tr>
		<tr  bgcolor='#F7F7F7'><td  align='left'><span class='style1'>Master Project</span></td>
		<td  colspan=2><input type=text name='master_project' value='$master_project' maxlength='20' $status  size='20' style='font-size:12px; width:200px; height:18px;'></td></tr>
	<tr bgcolor='#F7F7F7'><td  align='left'><span class='style1'>Master CostCenter</span></td>
	<td><input type=text name='master_costcent' value='$master_costcent' maxlength='20' $status  size='20' style='font-size:12px; width:200px; height:18px;'></td>



	
		<td align=left><button type='button'  name='submitrecord'";
if($mode=='') echo " disabled ";
echo" onclick='SubmitRecord(5); return false;' title='Save Changes' $Insmode><span><span>Submit</span></span></button>";
   
echo " <button type='button'  name='clearbutton' ";
if($mode=='') echo " disabled ";
echo" onclick='cleardetailloginstk(); return false;' title='Clear Detail' ><span><span>Clear</span></span></button>";

echo"&nbsp;&nbsp;</td></tr>";

echo"<tr><td colspan=3>
	<table  border=0 >
	<col width=30>
	<col width=30>
	<col width=150>
	<col width=150>
	<col width=150>
	<col width=150>
	<col width=150>
	<col width=70>
	<col width=70>
	<col width=80>
	<col width=150>
	<col width=150>
	<col width=150>
	<col width=150>
	<tr>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td  align='left'><span class='style1'>Project</span></td>
		<td  align='left'><span class='style1'>CostCenter</span></td>
		<td  align='left'><span class='style1'>Group</span></td>
		<td  align='left'><span class='style1'>Sub Group</span></td>
		<td  align='left'><span class='style1'>Warehouse</span></td>
		<td  align='left'><span class='style1'>To Warehouse</span></td>
		<td  align='left'><span class='style1'>Default Project</span></td>
		<td  align='left'><span class='style1'>Default CostCenter</span></td>
		<td  align='left'><span class='style1'>Default Warehouse</span></td>
		<td  align='left'><span class='style1'>Client Salesmen</span></td>
		<td  align='left'><span class='style1'>Master Project</span></td>
		<td  align='left'><span class='style1'>Master CostCenter</span></td></tr>";
	
	
	$querydt = " select ID,concat(loginstk.project_code,' - ',project_name),concat(loginstk.costcent_code,' - ',costcent_name),
			concat(loginstk.group_code,' - ',group_name),concat(loginstk.subGroup_code,' - ',subGroup_name),
			concat(loginstk.warehouse_code,' - ',warehouse_name),if(Default_Project=1,'True','False'),if(Default_Costcenter=1,'True','False'),if(default_warehouse=1,'True','False'),ClientSalesmen,MasterProject,MasterCostCenter, towarehouse_code ".
		   " from ".$_SESSION['dbLabel'].".loginstk ".
		   " left join ".$_SESSION['dbName'].".project on ".$_SESSION['dbName'].".project.project_code=loginstk.project_code ".
		   " left join ".$_SESSION['dbName'].".costcent on ".$_SESSION['dbName'].".costcent.costcent_code=loginstk.costcent_code ".
		   " left join ".$_SESSION['dbName'].".grouping on ".$_SESSION['dbName'].".grouping.group_code=loginstk.group_code ".
		   " left join ".$_SESSION['dbName'].".subgroup on ".$_SESSION['dbName'].".subgroup.subgroup_code=loginstk.subgroup_code ".
		   " left join ".$_SESSION['dbName'].".warehouse on ".$_SESSION['dbName'].".warehouse.warehouse_code=loginstk.warehouse_code ".
		   " where loginstk.user_account='".$user_code."'";


$resultdt = mysql_query($querydt, $connection);
while($rowsdt=mysql_fetch_array($resultdt)){
			    
	$ct+=1;

	if($ct%2==0)
		$Color="style='background-color:".$grid_color1."'";
	else			
		$Color="style='background-color:".$grid_color2."'";	
						
				
	echo "<tr ".$Color." >";
	echo "	<td align='center' valign='center'><span class='style15'><img src='img/button_edit.png'  onMouseOver=\"style.cursor='hand'\" onclick=\"UpdateDetailLoginStk('".$rowsdt[0]."');\" title='Edit Record'  ></span></td>";
	echo "	<td align='center' valign='center'><span class='style15'><img src='img/c_delete.png'  onMouseOver=\"style.cursor='hand'\" onclick=\"DeleteDetailLoginStk('".$rowsdt[0]."');\" title='Delete Record'  ></span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[1]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[2]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[3]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[4]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[5]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[12]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[6]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[7]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[8]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[9]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[10]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[11]."</span></td>";
	echo "</tr>";
						
}					
echo"</table></td></tr>";		
echo"</table>";		
$tabs->end();	
		
$tabs->start("Ledger Access");

echo"<table border='0'  align='left' valign='top'  class='tablecontent'><col width=30><col width=30><col width=350><col width=120>";

if($LedgerIncluded=='')
	$LedgerIncluded=0;
	
echo"   <tr bgcolor='#d0d0d0' height='25' ><td>&nbsp;</td><td>&nbsp;</td><td  align='left'><span class='style1'>Ledger Number/Name</span><span class='style26'>*</span></td>
		<td  align='center'><span class='style1'>Included</span>
		</td>
		<td>&nbsp;</td></tr>";

	
echo"   <tr bgcolor='#F7F7F7' height='25' ><td>&nbsp;</td><td>&nbsp;</td>
<td align=left><input type=text name='ledger_code' value='$ledger_code' maxlength='10' $status readonly size='10' style='font-size:12px; width:110px; height:18px;'>";
		
echo"  <label><span class='style1'><img src='img/btnopen.jpg' title=' Select Ledger '  width='15' height='17' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistledger(20); return false' /></span></label>";
		

echo"&nbsp;<input type=text name='ledger_name' value='$ledger_name' maxlength='15' $status readonly size='20' style='font-size:12px; width:200px; height:18px;'></td>
<td valign='top' align='center'><span class='style1'><input type='checkbox'  $dis name='Chk_LedgerIncluded' onclick='ChkLedgerIncluded();'";
if($LedgerIncluded==1) echo " checked ";echo">
		<input type='hidden' name='LedgerIncluded' value='$LedgerIncluded'></span></td>";
		
		
	echo"
		
<td align=left >
<button type='button'  name='submitrecord' ";
if($mode=='') echo " disabled ";
//if($Companies=='') echo " disabled ";
echo" onclick='SubmitRecord(3); return false;' title='Save Changes' $Insmode><span><span>Submit</span></span></button>";

   
echo " <button type='button'  name='clearbutton' value='Clear'";
if($mode=='') echo " disabled ";
echo" onclick='cleardetailledgerstk(); return false;' title='Clear Detail' ><span><span>Clear</span></span></button>";


echo"&nbsp;&nbsp;</td></tr>";		
	
	$querydt = " select id,ledgerstk.ledger_number,if(ledger_include=0,'No','Yes'),ledger_name ".
		   " from ".$_SESSION['dbLabel'].".ledgerstk ".
		   " left join ".$_SESSION['dbName'].".ledger on ".$_SESSION['dbName'].".ledger.ledger_number=ledgerstk.ledger_number ".
		   " where user_account='".$user_code."'";


$resultdt = mysql_query($querydt, $connection);
while($rowsdt=mysql_fetch_array($resultdt)){
			    
	$ct+=1;

	if($ct%2==0)
		$Color="style='background-color:".$grid_color1."'";
	else			
		$Color="style='background-color:".$grid_color2."'";	
						
				
	echo "<tr ".$Color." >";
	echo "	<td align='center' valign='center'><span class='style15'><img src='img/button_edit.png'  onMouseOver=\"style.cursor='hand'\" onclick=UpdateDetailLedger('".$rowsdt[0]."') title='Edit Record'  ></span></td>";
	echo "	<td align='center' valign='center'><span class='style15'><img src='img/c_delete.png'  onMouseOver=\"style.cursor='hand'\" onclick=DeleteDetailLedger('".$rowsdt[0]."') title='Delete Record'  ></span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[1]." - ".$rowsdt[3]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[2]."</span></td>";
	
	echo "	<td align='left'><span class='style15'>&nbsp;</span></td>";
	echo "</tr>";
						
}					
		
echo"</table>";		
$tabs->end();		

$tabs->start("Report Ledger Access");

echo"<table border='0'  align='left' valign='top'  class='tablecontent'><col width=30><col width=30><col width=350><col width=120>";

if($LedgerReportIncluded=='')
	$LedgerReportIncluded=0;
	
echo"   <tr bgcolor='#d0d0d0' height='25' ><td>&nbsp;</td><td>&nbsp;</td><td  align='left'><span class='style1'>Ledger Number/Name</span><span class='style26'>*</span></td>
		<td  align='center'><span class='style1'>Included</span>
		</td>
		<td>&nbsp;</td></tr>";

	
echo"   <tr bgcolor='#F7F7F7' height='25' ><td>&nbsp;</td><td>&nbsp;</td>
<td align=left><input type=text name='ledgerrep_code' value='$ledgerrep_code' maxlength='10' $status readonly size='10' style='font-size:12px; width:110px; height:18px;'>";
		
echo"  <label><span class='style1'><img src='img/btnopen.jpg' title=' Select Ledger '  width='15' height='17' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistledger(21); return false' /></span></label>";
		

echo"&nbsp;<input type=text name='ledgerrep_name' value='$ledgerrep_name' maxlength='15' $status readonly size='20' style='font-size:12px; width:200px; height:18px;'></td>
<td valign='top' align='center'><span class='style1'><input type='checkbox'  $dis name='Chk_LedgerReportIncluded' onclick='ChkLedgerReportIncluded();'";
if($LedgerReportIncluded==1) echo " checked ";echo">
		<input type='hidden' name='LedgerReportIncluded' value='$LedgerReportIncluded'></span></td>";
		
		
	echo"
		
		<td align='left' >
		
<button type='button'  name='submitrecord' ";
if($mode=='') echo " disabled ";
echo" onclick='SubmitRecord(4); return false;' title='Save Changes' $Insmode><span><span>Submit</span></span></button>";

   
echo " <button type='button'  name='clearbutton' value='Clear'";
if($mode=='') echo " disabled ";
echo" onclick='cleardetailledgerrepstk(); return false;' title='Clear Detail' ><span><span>Clear</span></span></button>";
		

echo"&nbsp;&nbsp;</td></tr>";		
	
	$querydt = " select id,ledgerrepstk.ledger_number,if(ledger_include=0,'No','Yes'),ledger_name ".
		   " from ".$_SESSION['dbLabel'].".ledgerrepstk ".
		   " left join ".$_SESSION['dbName'].".ledger on ".$_SESSION['dbName'].".ledger.ledger_number=ledgerrepstk.ledger_number ".
		   " where user_account='".$user_code."'";


$resultdt = mysql_query($querydt, $connection);
while($rowsdt=mysql_fetch_array($resultdt)){
			    
	$ct+=1;

	if($ct%2==0)
		$Color="style='background-color:".$grid_color1."'";
	else			
		$Color="style='background-color:".$grid_color2."'";	
						
				
	echo "<tr ".$Color." >";
	echo "	<td align='center' valign='center'><span class='style15'><img src='img/button_edit.png'  onMouseOver=\"style.cursor='hand'\" onclick=UpdateDetailLedgerRep('".$rowsdt[0]."') title='Edit Record'  ></span></td>";
	echo "	<td align='center' valign='center'><span class='style15'><img src='img/c_delete.png'  onMouseOver=\"style.cursor='hand'\" onclick=DeleteDetailLedgerRep('".$rowsdt[0]."') title='Delete Record'  ></span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[1]." - ".$rowsdt[3]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[2]."</span></td>";
	
	echo "	<td align='left'><span class='style15'>&nbsp;</span></td>";
	echo "</tr>";
						
}					
		
echo"</table>";		
$tabs->end();		
	

	
	
if($Module_LimitProject==1){
$tabs->start("Project Limit");

echo"<table border='0'  align='left' valign='top'  class='tablecontent'><col width=30><col width=30><col width=350><col width=120>";


 	$querydt = " select projectlimit_id,projectlimit.project_code,projectlimit_limit,project_name ".
		   " from projectlimit ".
		   " left join project on project.project_code=projectlimit.project_code ".
		   " where projectlimit_id ='".$projectcode."'";

//echo $querydt;
$resultdt = mysql_query($querydt, $connection);
$rowsdt=mysql_fetch_array($resultdt);
$projectlimit_project_code=$rowsdt[1];
$projectlimit_project_name=$rowsdt[3];
$projectlimit_limit=$rowsdt[2];
$projectlimit_id=$rowsdt[0];
	
echo"   <tr bgcolor='#d0d0d0' height='25' ><td>&nbsp;</td><td>&nbsp;</td><td  align='left'><span class='style1'>Project Code/Name</span><span class='style26'>*</span></td>
		<td  align='center'><span class='style1'>Amount</span>
		</td>
		<td>&nbsp;</td></tr>";

	
echo"   <tr bgcolor='#F7F7F7' height='25' ><td>&nbsp;</td><td>&nbsp;</td>
<td align=left>
<input type=hidden name='projectlimit_id'  id='projectlimit_id' value='$projectlimit_id' maxlength='10'   style='font-size:12px; width:110px; height:18px;'>
<input type=text name='projectlimit_project_code' value='$projectlimit_project_code' maxlength='10' $status readonly size='10' style='font-size:12px; width:110px; height:18px;'>";
		
echo"  <label><span class='style1'><img src='img/btnopen.jpg' title=' Select Project '  width='15' height='17' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistprojects(30); return false' /></span></label>";
		

echo"&nbsp;<input type=text name='projectlimit_project_name' value='$projectlimit_project_name' maxlength='15' $status readonly size='20' style='font-size:12px; width:200px; height:18px;'></td>
<td valign='top' align='center'><span class='style1'>";

echo"<input type='text' name='projectlimit_limit' value='$projectlimit_limit' style='width:90px'></span></td>";
		
		
echo"<td align=left >
<button type='button'  name='submitrecord' ";
if($mode=='') echo " disabled ";

echo" onclick='SubmitRecord(13); return false;' title='Save Changes' $Insmode><span><span>Submit</span></span></button>";

   
 


echo"&nbsp;&nbsp;</td></tr>";		
	
	$querydt = " select projectlimit_id,projectlimit.project_code,projectlimit_limit,project_name ".
		   " from projectlimit ".
		   " left join project on project.project_code=projectlimit.project_code ".
		   " where user_account='".$user_code."'";

//echo $querydt;
$resultdt = mysql_query($querydt, $connection);
while($rowsdt=mysql_fetch_array($resultdt)){
			    
	$ct+=1;

	if($ct%2==0)
		$Color="style='background-color:".$grid_color1."'";
	else			
		$Color="style='background-color:".$grid_color2."'";	
						
				
	echo "<tr ".$Color." >";
	echo "	<td align='center' valign='center'><span class='style15'><img src='img/button_edit.png'  onMouseOver=\"style.cursor='hand'\" onclick=UpdateProjectLimit('".$rowsdt[0]."') title='Edit Record'  ></span></td>";
	echo "	<td align='center' valign='center'><span class='style15'><img src='img/c_delete.png'  onMouseOver=\"style.cursor='hand'\" onclick=DeleteProjectLimit('".$rowsdt[0]."') title='Delete Record'  ></span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[1]." - ".$rowsdt[3]."</span></td>";
	echo "	<td align='left'><span class='style15'>".$rowsdt[2]."</span></td>";
	
	echo "	<td align='left'><span class='style15'>&nbsp;</span></td>";
	echo "</tr>";
						
}					
		
echo"</table>";		
$tabs->end();		
}

$tabs->start("Notification");
if($user_code != ''){

echo"<table border='0' align='left' valign='top' class='tablecontent'>
		<col width=120>
		<col width=180>
		<col width=100><col width=70>";
		
echo "<tr height='25px' bgcolor='#d0d0d0'><td><span class='style1'>Notification Name</span></td><td><span class='style1'>Notification Description</span></td><td><span class='style1'>View</span></td>
	<td><span class='style1'>Number Of Days</span></td></tr>";	

	$ct=0;
	$query = "select notification_type.Notification_Name,Notification_Description,ifnull(View_Access,0), nbrOfDays
			from ".$_SESSION['dbName'].".notification_type as notification_type
			left join ".$_SESSION['dbLabel'].".Notification_Access on Notification_Access.Notification_Name = notification_type.Notification_Name 
			and user_code='$user_code' "; 
	$result = mysql_query($query,$connection);
	while($row = mysql_fetch_row($result)){
		if($ct%2) $bgclr = "bgcolor='#FFFFFF'";
		else $bgclr = "bgcolor='#F5FAFF'";
		
		$notification_type = 'notification_type'.$ct;
		$$notification_type = $row[0];
		$notification_view = 'notification_view'.$ct;
		$$notification_view = $row[2];
		$notification_daysno = 'notification_daysno'.$ct;
		$$notification_daysno = $row[3];
		
		echo "<tr height='20px' $bgclr>";
		echo "<td>$row[0]<input type='hidden' name='$notification_type' id='$notification_type' value='".$$notification_type."'></td>";
		echo "<td>$row[1]</td>";
		echo "<td><input type='checkbox' name='$notification_view' id='$notification_view' value='".$$notification_view."' ".($$notification_view==1?'checked':'')." onclick=\"setNotification('$ct');\"></td>";
		echo "<td><input type='text' name='$notification_daysno' id='$notification_daysno' value='".$$notification_daysno."' style='width:60px;' onkeyup=\"setNotification('$ct');\"></td>";
		echo "</tr>";
		$ct++;
	}	
echo"</table>";		
}
$tabs->end();

if($user_code != ''){
$tabs->start("Emails");

echo"<table border='0' align='left' valign='top' class='tablecontent' width='660px'>
		<col width=30><col width=30><col width=500><col width=100>";
		
echo "<tr height='25px' bgcolor='#d0d0d0'><td></td><td></td><td><span class='style1'>Email Address</span></td><td></td></tr>";	
echo "<tr><td colspan='4'>";
echo "<div id='submitEmail'  style='height:40px;'>";
 SubmitUserEmails($email_id, $user_code, $connection);

echo "</div></td></tr>";
echo "<tr><td colspan='4'>";
echo "<div id='showEmails' style='overflow-x:hidden; overflow-y:scroll; height:200px;'>";
ShowUserEmails($email_id, $user_code, $connection);
echo "</div></td></tr>";

echo "</table>";
$tabs->end();
}


if($user_code != ''){
$tabs->start("HOD");

echo"<table border='0' align='left' valign='top' class='tablecontent' width='1100px'>";
echo "<tr height='25px'><td><span class='style1'>HOD: $user_code</span></td></tr>";	

echo "<tr><td>";

echo"<table border='0' align='left' valign='top' class='tablecontent' width='410px'>
		<col width=30px><col width=30px><col width=150px><col width=200px>";
echo "<tr height='25px' bgcolor='#d0d0d0'><td></td><td></td><td align='center'><span class='style1'>User Code</span></td><td align='center'><span class='style1'>Username</span></td></tr>";	
echo "</table>";
echo "</td></tr>";
echo "<tr><td>";	
echo "<div id='submitusers'  style='height:350px;width:1100px;overflow-y:scroll;overflow-x:hidden;'>";
userHODGrid($hod_id, $user_code, $connection);
echo "</div></td></tr>";
echo "</table>";
$tabs->end();
}

if ($user_code != ''){
	// Costcenter Access
$tabs->start("Costcenter Access");

echo"<table border='0' align='left' valign='top' class='tablecontent' width='1100px'>";
echo "<tr><td>";

echo"<table border='0' align='left' valign='top' class='tablecontent' width='1000px'>
		<col width=30px><col width=30px><col width=400px><col width=120px><col width=420px>";
echo "<tr height='25px' bgcolor='#d0d0d0'>
			<td></td><td></td>
			<td align='center'><span class='style1'>Costcenter Code/Name</span></td>
			<td align='center'><span class='style1'>Included</span></td>
			<td></td>
		</tr>";	
echo "</table>";
echo "</td></tr>";

echo "<tr><td>";	
echo "<div id='costcentAcc'  style='height:350px;width:1100px;overflow-y:scroll;overflow-x:hidden;'>";
	costcentAccessGrid('', $user_code, $connection);
echo "</div></td></tr>";
echo "</table>";
$tabs->end();

// Project Access
$tabs->start("Project Access");

echo"<table border='0' align='left' valign='top' class='tablecontent' width='1100px'>";
echo "<tr><td>";

echo"<table border='0' align='left' valign='top' class='tablecontent' width='1000px'>
		<col width=30px><col width=30px><col width=400px><col width=120px><col width=420px>";
echo "<tr height='25px' bgcolor='#d0d0d0'>
			<td></td><td></td>
			<td align='center'><span class='style1'>Project Code/Name</span></td>
			<td align='center'><span class='style1'>Included</span></td>
			<td></td>
		</tr>";	
echo "</table>";
echo "</td></tr>";

echo "<tr><td>";	
echo "<div id='projectAcc'  style='height:350px;width:1100px;overflow-y:scroll;overflow-x:hidden;'>";
	ProjectAccessGrid('', $user_code, $connection);
echo "</div></td></tr>";
echo "</table>";
$tabs->end();
}
$tabs->run();	
				
echo"</td></tr>";
echo "<tr> <td id='content-body' align='center'>";


echo"<table style='width:1050px; position:relative; left:60px;' border='0'>
	<col width=50>
	<col width=350>
	<col width=350>
	<col width=350>

	<tr><td id='' style='width:1050px;height:15px;' colspan='4'></td>
	</tr>
	 <tr><td  valign='top' colspan=3 id='' style='width:1050px;'>
	 <table style='width:1050px;' border='0' cellspacing=0>
	<col width=50>
	<col width=350>
	<col width=350>
	<col width=350>	
	<tr height='30px' style='background-color:darkgray;'><td>&nbsp;</td>
	<td align='center'><span class='style1'><b>Code</b></td>
	<td align='center'><span class='style1'><b>Name</b></td>
	<td align='center'><b>Is Group</b></td></tr>";
	
	echo"<tr><td colspan=4>
	<div style='overflow-y:scroll;height:250px;width:1050px;border:0px solid #000000;'>
	<table  border='0' width='1050px'>
	<col width=50>
	<col width=350>
	<col width=350>
	<col width=350>";
	
	$querysearch="select User_account,User_Name,if(User_IsGroup=1,'Group','User') from ".$_SESSION['dbLabel'].".users ";
	$querysearch=$querysearch." where (User_account like"."('%".$txtKeyword."%') or User_Name like"."('%".$txtKeyword."%')  ) ";

	$resultsearch=mysql_query($querysearch,$connection) or die(mysql_error());
	$totalrows = mysql_num_rows($resultsearch);
	
	if ($startrange=='')
		$startrange = 0;
	if ($perpage=='')
		$perpage = 20;
	
	$querysearch = $querysearch." limit ".$startrange.",".$perpage;
	

	$resultsearch=mysql_query($querysearch,$connection) or die(mysql_error());	
	while($rows=mysql_fetch_array($resultsearch)){
		$ct+=1;
		$stylefont='style15';
		if($ct%2==0)
			$Color="style='background-color:".$grid_color1."'";
		else			
			$Color="style='background-color:".$grid_color2."'";	
				
		if($mode=='edit' && $user_code==$rows[0]){
			
			$Color="style='background-color:#1e87a5'";
			$stylefont='style28';
	}	
		
	echo'<tr '.$Color.' height="20px" >';
	
	
print<<<HERE

<td align=center ><img border='0' src='img/c_delete.png' width='9' height='10' title='Delete User/Group' onmouseover="this.style.cursor='pointer'" OnClick="confirm_delete('$rows[0]')" $DelMode></td>

HERE;
/*
else print<<<HERE

<td align=center >&nbsp;</td>

HERE;*/

	echo"<td onMouseOver=\"style.cursor='hand'\" "; echo " ondblclick=SetUser('$rows[0]');";echo"><span class='$stylefont' >$rows[0]&nbsp;</span></font></td>
		<td onMouseOver=\"style.cursor='hand'\" "; echo " ondblclick=SetUser('$rows[0]');";echo"><font face='Arial' size='2' color='#186194'><span class='$stylefont'>$rows[1]&nbsp;</span></font></td>
		<td onMouseOver=\"style.cursor='hand'\" "; echo " ondblclick=SetUser('$rows[0]');";echo"><font face='Arial' size='2' color='#186194'><span class='$stylefont'>$rows[2]&nbsp;</span></font></td>";

	echo"	</tr>";
}		
	
echo"</table></div></td></tr></table></td></tr>";	
echo"<tr ><td id='' colspan='4'><table width=100% border='0'><tr><td align='center'>";
		
		$diff= $startrange - $perpage;
		
		if (($diff) >= 0 ){
			$prvstartrange = $startrange - $perpage;
			echo"<img src='img/arrowleft.png' title='Previous' onMouseOver=\"style.cursor='hand'\"  onclick=SetPrvPage('".$prvstartrange."','".$perpage."')>";
		}
		else
			echo "&nbsp;";
		
		echo"</td><td  align='center'>";
		
		
		if ($startrange <= $totalrows){
			$startrange = $startrange + $perpage;
			if  ($startrange <= $totalrows)
				echo"<img src='img/arrowright.png' title='Next' onMouseOver=\"style.cursor='hand'\" onclick=SetNextPage('".$startrange."','".$perpage."')>";
		} else
			echo "&nbsp;";
			
	echo"</td></tr></table></td></tr>";

echo"<tr>
					<td id='' style='width:1050px;height:20px;' colspan='6'></td>
				</tr></table>";


echo" </td></tr>";
			
	 


print <<< HERE
       </td>
      </tr>  <tr height='30'><td align='center' id='content-bottom' >
	  
	  
	  
	  </td></tr>
	  </table>
HERE;


print <<<HERE
</form>
</body>

HERE;

	if($checkduplicate=='1' ){
		//echo$user_codePrv.'   '.$user_code;
	
		if($user_codePrv!=$user_code){
		$query_testcode="select count(*) from ".$_SESSION['dbLabel'].".users where User_account='".$user_code."'";
		//echo$query_testcode;exit;
		$result_testcode=mysql_query($query_testcode, $connection);
		$row_code=mysql_fetch_row($result_testcode);
		$num=$row_code[0];
		}
		else $num=0;
		
		if($num>0){
			$message="Code Already exists";
				//echo'asdad2222';exit;
			echo"<script type='text/javascript'>";
			echo"	document.useraccess.message.value='Code Already Exists';";
			echo"	document.useraccess.checkduplicate.value='0';";
			echo"	document.useraccess.submit();";	
			echo"</script>";
		}
		
		else{
			//echo'asdad';exit;
			echo"<script type='text/javascript'>";
			echo"	document.useraccess.action='Form_UserManager_Actions.php';";
			echo"	document.useraccess.submit();";
			echo"</script>";
		}
	
	}
	
if($vTabFocus!=''){
	echo'<script type="text/javascript" language="javascript">';
	echo"tab_('$vTabFocus','');";
	echo'</script>';	
}	
?>