function sabLoad(x,y) {
	  //$('#wrapper').html('<p><img src="images/loader.gif"" /> Loading...</p>');
	  //$('#wrapper').show();
	  //$('#content').hide();

	  //$('#content').hide('slow',loadContent);
	  //$('#content').slideToggle('fast');
	  $('#'+y).html('<p><img src="images/loader.gif"" /> Loading...</p>');
	  $('#'+y).load(x); //,'',function(){$('#content').show('fast')});
	  //$('#content').show();

	  //$('#content').hide('fast',loadContent);
	  //$('#wrapper').fadeOut('fast');
	  
	function loadContent() {
		$('#content').load(x,'',showNewContent())
	}
	function showNewContent() {
		$('#content').show('slow',hideLoader());
	}
	function hideLoader() {
		$('#load').fadeOut('slow');
	}
}
function ClearAll(x,y) {
	document.getElementById(x).reset();
	document.getElementById(y).focus();
}
function SetFocus(x) {
	document.getElementById(x).focus();
}
function sabGet(x,y) {
	//$('#'+y).hide();
	$('#'+y).load(x); //,'',function(){
		//var t=$('#'+y).text();
		//$('#'+z).text(t.toUpperCase());
		//document.getElementById(z).value=$('#'+y).text();
		//});
}

function sabarg(x) {
	var a=x + "=" + document.getElementById(x).value;
	return a;
}

$('#lobutton').click(function(){
	$("#left-col").hide('normal');
	$("#topbuttons").hide('normal');
});

$('a#genealogy').click(function(){
	sabLoad('sab/genealogy.html','content');
});
$('a#delete').click(function(){
	sabLoad('sab/delete.html','content');
});
$('a#receiptlist').click(function(){
	sabLoad('sab/receiptlist.php','content');
});

$('a#receiptlist2').click(function(){
	sabLoad('sab/receiptlist2.php','content');
});

$('a#custlist').click(function(){
	sabLoad('sab/custlist.php','content');
});

$('a#custlist2').click(function(){
	sabLoad('sab/custlist2.php','content');
});

$('a#agentlist').click(function(){
	sabLoad('sab/agentlist.php','content');
});

$('a#agentlist2').click(function(){
	sabLoad('sab/agentlist2.php','content');
});

$('a#jtnews').click(function(){
	sabLoad('sab/agent.html','content');
});

$('a#jtupdates').click(function(){
	sabLoad('sab/customer.html','content');
});

$('a#jtbutton').click(function(){
	sabLoad('sab/receipt.html','content');
});

$('a#lobutton').click(function(){
	sabLoad('sab/login.html','content');
});
$('a#login').click(function(){
	$("#top-modules").hide();
	sabLoad('sab/login.html','content');
	$('#cwrapper').show();
});
$('a#home').click(function(){
	$("#cwrapper").hide();
	sabLoad('sab/home.html','top-modules');
	$("#top-modules").show();
});
$('a#licjm').click(function(){
	sabLoad('sab/licjm.html','content');
});
$('a#jap').click(function(){
	sabLoad('sab/jap.html','content');
});
$('a#licjmp').click(function(){
	sabLoad('sab/jmp.html','content');
});
$('a#AVoucher').click(function(){
	sabLoad('sab/avoucher.html','content');
});
$('a#VList').click(function(){
	sabLoad('sab/vlist.html','content');
});
$('a#GenVouchers').click(function(){
	sabLoad('sab/vgen.php','content');
});
$('a#gallary').click(function(){
	sabLoad('box/test.html','top-modules');
});
