function LoadAction(WorkPage,Params,Root){
	if(Root == undefined){
		Root = DIR_LOCAL + '/';
	}
	
	Effect.Appear('LoadingArea',{duration:.1});
	
	if(Params != ''){
		Path = Root + 'process/ajax.'+WorkPage+'.php?'+Params;
	} else {
		Path = Root + 'process/ajax.'+WorkPage+'.php';
	}
	
	new Ajax.Updater('TempArea', Path, {onComplete:function(){ Element.hide('LoadingArea'); new Effect.Appear('WorkArea',{duration:.3});},asynchronous:true, evalScripts:true});
	
}

function LoadParams(WorkPage,Params,DataList,HideDataList,Root){
	if(Root == undefined){
		Root = DIR_LOCAL + '/';
	}	
	
	if(DataList == ''){
		DataList = 'DataList';
	}	
	
	if(Params != ''){
		Path = Root + 'process/ajax.'+WorkPage+'.php?'+Params+'&DataList='+DataList;
	} else {
		Path = Root + 'process/ajax.'+WorkPage+'.php&DataList='+DataList;
	}

	if(HideDataList == true || HideDataList == undefined){
		Effect.Fade(DataList,{duration:.1});
	}

	Effect.Appear('indicator',{duration:.1});
	
	new Ajax.Updater('TempArea', Path, {asynchronous:true, evalScripts:true, onComplete:function(){Element.hide('indicator');}});

}


function LoadResults(WorkPage,Params,Identifier,Root){
	if(Root == undefined){
		Root = DIR_LOCAL + '/';
	}
	
	if(Params != ''){
		Path = Root + 'process/ajax.'+WorkPage+'.php?'+Params+'&DataList=DataList_'+Identifier;
	} else {
		Path = Root + 'process/ajax.'+WorkPage+'.php&DataList=DataList_'+Identifier;
	}

	if($('HideableList_'+Identifier)){
		Element.hide('HideableList_'+Identifier,{duration:.1});
	}
	
	if($('Indicator_'+Identifier)){
		Effect.Appear('Indicator_'+Identifier,{duration:.1});	
	}
	
	new Ajax.Updater('TempArea', Path, {asynchronous:true, evalScripts:true, onComplete:function(){	if($('Indicator_'+Identifier)){Element.hide('Indicator_'+Identifier);}}});

}


function LoadTab(WorkPage,TabSection,SelectedTab,Params,Root){
	if(Root == undefined){
		Root = DIR_LOCAL + '/';
	}	

	if(Params != ''){
		Path = Root + 'process/ajax.'+WorkPage+'.php?'+Params+'&DataList='+TabSection+'DataList';
	} else {
		Path = Root + 'process/ajax.'+WorkPage+'.php?DataList='+TabSection+'DataList';
	}

	$$('#' + TabSection + 'Tabs li').each(function(n){
		$(n).className = '';
	});
	
	$(SelectedTab).className = 'tab_selected';

	$(TabSection+'DataList').innerHTML = '';
	Effect.Fade(TabSection+'DataList',{duration:.1});
	
	Effect.Appear(TabSection+'Indicator',{duration:.1});	
	
	new Ajax.Updater('TempArea', Path, {asynchronous:true, evalScripts:true, onComplete:function(){Element.hide(TabSection+'Indicator');}});

}

function DoAction(WorkForm,Identifier){

	if(WorkForm == undefined){
		WorkForm = 'WorkForm';
	}
	
	serialForm = $(WorkForm).serialize(true);
	
	if($(Identifier+'Indicator')){
		Effect.Appear(Identifier+'Indicator',{duration:.1});	
	}
	
	new Ajax.Updater('TempArea', $(WorkForm).action, { parameters: serialForm, method: 'post',asynchronous:true, evalScripts:true, onComplete:function(){	if($(Identifier+'Indicator')){Element.hide(Identifier+'Indicator');} }}); 
  
}

function DoActionWithRefresh(DivName){

	DoAction();
	
	if($(DivName)){
	//	$(DivName).innerHTML = '&nbsp';
	}	
  
}

function DoFormAction(FormName){

	if($(FormName)){
		serialForm = $(FormName).serialize(true);

		new Ajax.Updater('TempArea', $(FormName).action, { parameters: serialForm, method: 'post',asynchronous:true, evalScripts:true }); 
	}
	

  
}

function DoDeleteFormAction(FormName,DivName){

	DoFormAction(FormName);
	
	if($(DivName)){
	//	$(DivName).innerHTML = '&nbsp';
	}
	
}