function main_change(go1, go2, act, id)	
	{
	
		advAJAX.post({
		url: go1+".php",
		
		parameters : {
		"go1" : go1,
		"go2" : go2,
		"id" : id,		
		"act" : act
		},
	

		onSuccess : function(obj) { document.getElementById('inside').innerHTML=obj.responseText; },
		onError : function(obj) { alert("Error: " + obj.status); }
		});
	
	}	


function menu_change(go1)
	{
		advAJAX.post({
		url: go1+".php",
		
		parameters : {
		"go1" : go1
		},		

		onSuccess : function(obj) { document.getElementById('inside').innerHTML=obj.responseText; },
		onError : function(obj) { alert("Error: " + obj.status); }
		});

	}
	
	
function form_create(go1, act, tree, parent_id, id, lvl)
	{
		advAJAX.post({
		url: go1+".php",
		
		parameters : {
		"go1" : go1,
		"parent_id" : parent_id,		
		"tree" : tree,			
		"act" : act,
		"id" : id,	
		"lvl" : lvl			
		},
	

		onSuccess : function(obj) {FCKeditorAPI = null; __FCKeditorNS = null; document.getElementById('inside').innerHTML=obj.responseText;},
		onError : function(obj) { alert("Error: " + obj.status); }
		});

	}	
	
function send_form()
	{	

		if (FCKeditorAPI) 
		{
		for (instance in FCKeditorAPI.__Instances) 
		{
		field_name = instance.toString();
		field_value = FCKeditorAPI.GetInstance(field_name).GetXHTML();
		document.getElementById(field_name).value = field_value;
		}
		
		}
	
		advAJAX.submit(document.getElementById("send_form"), {

		onSuccess : function(obj) {

		
		FCKeditorAPI = null; 
		__FCKeditorNS = null; 
		
		
		document.getElementById('inside').innerHTML=obj.responseText; },
		onError : function(obj) { alert("Error: " + obj.status); }		
		
		});	

	}
	
	

	
	
	
	
function send_newsletter(id)
	{	

		advAJAX.submit(document.getElementById("send_newsletter"), {

		onSuccess : function(obj) {

		
		document.getElementById('box_'+id).innerHTML=obj.responseText; },
		onError : function(obj) { alert("Error: " + obj.status); }		
		
		});	

	}	
	
	
function send_contact_form(id)
	{	

		advAJAX.submit(document.getElementById("send_contact_form"), {

		onSuccess : function(obj) {

		
		document.getElementById('box_'+id).innerHTML=obj.responseText; },
		onError : function(obj) { alert("Error: " + obj.status); }		
		
		});	

	}		
	
function send_serwis_form(id)
	{	

		advAJAX.submit(document.getElementById("send_serwis_form"), {

		onSuccess : function(obj) {
			document.getElementById('box_'+id).innerHTML=obj.responseText; 
			dodaj_menu(4)},
		onError : function(obj) { alert("Error: " + obj.status); }		
		
		});	

	}	
	
function send_projekt_form(id)
	{	

		advAJAX.submit(document.getElementById("send_projekt_form"), {

		onSuccess : function(obj) {
			document.getElementById('box_'+id).innerHTML=obj.responseText; 
			dodaj_menu(4,1)},
		onError : function(obj) { alert("Error: " + obj.status); }		
		
		});	

	}	
