
jQuery(document).ready(function() {
	
	jQuery("#prflknbumn1").bind("click",prflknbumnService);
	jQuery("#prflknbumn2").bind("click",prflknbumnService);
	jQuery("#prflknbumn3").bind("click",prflknbumnService);
	jQuery("#prflknbumn4").bind("click",prflknbumnService);
	jQuery("#prflknbumn5").bind("click",prflknbumnService);
	jQuery("#prflknbumn6").bind("click",prflknbumnService);
	jQuery("#prflknbumn7").bind("click",prflknbumnService);
});

function menuPrflknbumnLegal()
{
	//prflknbumn_modules ("s01","prflknbumn")
	$url = "http://oa.bumn.go.id/ext/webservice/oa.sender.sdm.php";	
	prflknbumn_modules ("s21","prflknbumn","");

}

function menuPrflknbumnAuthority()
{
	prflknbumn_modules ("s24","prflknbumn","")
}

function menuPrflknbumnDirection()
{
	prflknbumn_modules ("s23","prflknbumn","")
}

function menuPrflknbumnVision()
{
	prflknbumn_modules ("s22","prflknbumn","")

}

function menuPrflknbumnOrg()
{
	prflknbumn_modules ("s25","prflknbumn","")
}

function menuPrflknbumnDirector()
{
	prflknbumn_modules ("s26","prflknbumn","")
}

function prflknbumn_modules (svr,idreg,nametitle) {	
var fopts ="";
var showsfilters="";
//var judul ="PROFIL KEMENTERIAN BUMN"; 
var judul =nametitle;

fopts = { id: "prflknbumn" };			
		  var url  = "modules/";	
		  var pctgr = function() {
			$("#prflknbumn1").bind("click",prflknbumnService);
			$("#prflknbumn2").bind("click",prflknbumnService);
			$("#prflknbumn3").bind("click",prflknbumnService);
			$("#prflknbumn4").bind("click",prflknbumnService);
			$("#prflknbumn5").bind("click",prflknbumnService);
			$("#prflknbumn6").bind("click",prflknbumnService);
			$("#prflknbumn7").bind("click",prflknbumnService);
			$("a[@class=windowOpen]").bind("click",prflknbumnImg);
		  }

		  var options = {title : judul,url: "modules/",filterOptions : fopts, id : idreg , postCtgr : pctgr, showfilter: false};
		  var pars = {id: idreg, svr: svr};
		  Container.displayOnView(options,pars,function( ) {
			$("#prflknbumn1").bind("click",prflknbumnService);
			$("#prflknbumn2").bind("click",prflknbumnService);
			$("#prflknbumn3").bind("click",prflknbumnService);
			$("#prflknbumn4").bind("click",prflknbumnService);
			$("#prflknbumn5").bind("click",prflknbumnService);
			$("#prflknbumn6").bind("click",prflknbumnService);
			$("#prflknbumn7").bind("click",prflknbumnService);
			$("a[@class=windowOpen]").bind("click",prflknbumnImg);
	});
profileKNTop();
}

function prflknbumnService (event) {
	var svr = $(this).attr("svr");
	var idreg = $(this).attr("idreg");
	var nametitle = $(this).attr("nametitle");
	

	prflknbumn_modules(svr,idreg,nametitle);	
}

function profileKNTop () {
	var svr ="s400";
	var idreg ="prflknbumn";
	var url = 'modules/?';
	var pars = 'id='+idreg+'&svr='+svr ;
	$.get(url,pars, function (data) {
		$("#cont-submenu").css("display","none");
		//$("#cont-filter").html(data);
	    $("#cont-submenu").html(data);
		$("#cont-submenu").show();
		$("#prflknbumn1").bind("click",prflknbumnService);
		$("#prflknbumn2").bind("click",prflknbumnService);
		$("#prflknbumn3").bind("click",prflknbumnService);
		$("#prflknbumn4").bind("click",prflknbumnService);
		$("#prflknbumn5").bind("click",prflknbumnService);
		$("#prflknbumn6").bind("click",prflknbumnService);
		$("#prflknbumn7").bind("click",prflknbumnService);
});		
}
//-------------------- modul bursa (Ajax) -------------------------------------------------------------------------------------


function reportError(request)	{
	alert('Sorry. There was an error.');
}

function prflknbumnImg (event) {
	
	var svr = $(this).attr("svr");
	var idreg = $(this).attr("idreg");
	var idimg = $(this).attr("idimg");

	var url = '/'+idimg;
	swin = window.open(url+"?id="+idreg+"&idreg="+idreg+"&svr="+svr+"&idimg="+idimg,'win','scrollbars,width=900,height=700,top=100,left=75');
	swin.focus();
}

