$orgtel1 = $org->tel_1;
 $orgtel2 = $org->tel_2;
 $orgfax = $org->fax;
 $periodfrom_id = $_POST['periodfrom_id'];
 //$periodto_id=$_POST['periodto_id'];
 $financialyearfrom_id = $_POST['financialyearfrom_id'];
 $reportlevel = $_POST['reportlevel'];
 $showzero = $_POST['showzero'];
 $showaccountcode = $_POST['showaccountcode'];
 $period = new Period();
 if ($period->fetchPeriod($periodfrom_id)) {
     $header[1] = $period->period_name;
 } else {
     $header[1] = "Unknown";
 }
 $financialyear = new FinancialYear();
 if ($financialyear->fetchFinancialYear($financialyearfrom_id)) {
     $header[2] = $financialyear->financialyear_name;
 } else {
     $header[2] = "Unknown";
 }
 $periodrange = $financialyear->getPeriodRange($financialyearfrom_id);
 /*
 if($period->fetchPeriod($periodto_id))
 	$header[2]=$period->period_name;
 else
 	$header[2]="Unknown";
 */
 if ($showaccountcode == "on") {
     $orderby = "ORDER BY ac.classtype,a.accountcode_full";
 } else {
<?php

include "system.php";
include "menu.php";
include_once 'class/Log.php';
include_once 'class/FinancialYear.php';
include_once 'class/FinancialYearLine.php';
include_once 'class/SelectCtrl.php';
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
$log = new Log();
$o = new FinancialYear();
$l = new FinancialYearLine();
$s = new XoopsSecurity();
$ctrl = new SelectCtrl();
$orgctrl = "";
//marhan add here --> ajax
echo "<iframe src='financialyear.php' name='nameValidate' id='idValidate' style='display:none' width='100%' height='260px'></iframe>";
echo "<div id='simit'><form name='frmValidate' target='nameValidate' method='POST'></form></div>";
////////////////////
$action = "";
echo <<<EOF
<script type="text/javascript">
function autofocus(){
document.forms['frmFinancialYear'].financialyear_name.focus();
}

\tfunction validateFinancialYear(){
\t\t
\t\tvar name=document.forms['frmFinancialYear'].financialyear_name.value;
\t\tvar description=document.forms['frmFinancialYear'].description.value;