function a_process(aload){
		  new Ajax.Request(aload);
		  //alert(aload)
}
function reThenPop(url1,url2,name,w){
	a_process(url1)
	a_popbox(name,url2,w)
}
function a_popbox(name,url,w){
	Modalbox.show(name, url, {width: w})
}

function a_load(aload,dload,iarray){
	
	
	document.getElementById('content').innerHTML = document.getElementById('loading').innerHTML;//define loaing message
	//var newcontent = (content)? content:'content';
	new Ajax.Updater('content', aload, {method:'post', postBody:'jx=1',asynchronous:true});
	
	var a = aload.split('?');
	
	
	if(iarray){
	var ida = iarray.split(','); 
	
	for(var i=0;i<ida.length;i++){
	
	new Ajax.Updater(ida[i], "v.php?v="+ida[i]+"&"+a[1], {method:'post', postBody:'jx=1',asynchronous:true});
	
	}
	} else {
	new Ajax.Updater('breadcrumb', "v.php?v=breadcrumb&"+a[1], {method:'post', postBody:'jx=1',asynchronous:true});
	new Ajax.Updater('pagetitle', "v.php?v=pagetitle&"+a[1], {method:'post', postBody:'jx=1',asynchronous:true});
	//new Ajax.Updater('main_menu', "v.php?v=main_menu&"+a[1], {method:'post', postBody:'jx=1',asynchronous:true});
	
	}
	setTimeout("tp_init('content')",1200);//wait for content to load from ajax
	//setTimeout("alert(document.getElementById('content').innerHTML)",3200);//wait for content to load from ajax
	
	if(dload)  a_load(aload,false,'main_menu')
	//setTimeout("tp_init('content',1)",500);//wait for content to load from ajax
	//tp_init('content',1)
	//Tooltip.prototype._test('tooltip');
	
	return false;
 }
 
 function a_dialog(aload,title){
 	Modalbox.show(title, aload,{amethod:'post', params:'jx=1'})
	 return false;
 }
 
 function sysload(url){
	//document.getElementById('content').innerHTML = document.getElementById('loading').innerHTML;//define loaing message
		
	  //location.href = '?egap=control_panel&f=themes&';

	// return true;
}
