function test(){
alert('TEST');
}

function menu(){
var content = $$('div.content');
var all_el = $$('div#menu a').each(function(item,index){
var name = "a#" + item.getProperty('id');
item.addEvent('click', function (e) {
   e.stop(); 
   load_content_slide(name,content);
});
}); 
}
function box_slides(){
var mySlide = new Fx.Slide('box1',{
    duration: 1000,
    transition: 'elastic:in:out'
});
var statbutton = $$('a#box_open_1').addEvent('click', function (e) {
   e.stop();
   mySlide.toggle();
});
}
function form_open(sele2edit){
$$('div.form_body').slide('out'); 
var openform = $$('div.form_head').addEvent('click', function (e) {
   e.stop();
   $$('div.form_body').slide('toggle');
   if(this.get('text')=='Upload (+)'){this.set('text', "Upload (-)");}
   else{this.set('text', "Upload (+)");}
});
$$('.fileupl').addEvent('submit', function(e) {
		//Prevents the default submit event from loading a new page.
		e.stop();
    //sele2edit.empty().addClass('ajax-loading');
		this.set('send', {onComplete: function(response) { 
			//sele2edit.removeClass('ajax-loading');
		sele2edit.set('html', response);
		}});
		//Send the form.
		this.send();
	});
}
var load_content_slide = function(linkselector, sele2edit, postdata){
if(!postdata || typeof(postdata)=='undefined'){postdata='by=java';}
else{postdata += 'by=java';}
var myRequest = new Request({
    method: 'post', 
    url: $$(linkselector).get('href'),
    data: postdata,
    headers: {'Content-Type': 'text/html; charset="iso-8859-2"'}, 
    onComplete: function(response) {
      $$(sele2edit).set('slide', {duration: 1000, transition: 'elastic:in:out'});   
      $$(sele2edit).set('html', response).slide('in');
      form_open(sele2edit);
    }    
  });
  //myRequest.setHeader('Content-type', 'text/plain; charset=ISO-8859-15');
  myRequest.send();
}
