lsopen=function() {
	jQuery("a[rel='animate']").click(function() {			
		handle=this.id.replace('button', '');
		handle=handle.replace('handle', '');		
		panes=jQuery("div[class='metapane']");
		inactive=new Array();
		for (var i=0; i<panes.length; i++){
			if(panes[i].id != handle+"pane"){				
				inactive.push(panes[i].id);					
			}
		}			
		oheight=jQuery('#'+handle+"form").height()+4;
		this.status=parseInt(document.getElementById(handle+'box').style.height)>10;
		height=(this.status)?'0':oheight;	
		if(!status) {			
				document.getElementById(handle+'pane').style.zIndex=1;
				for (var j=0; j<inactive.length; j++){
					document.getElementById(inactive[j]).style.zIndex=10;
					document.getElementById(inactive[j].replace('pane', 'box')).style.height=0;
				}			
		}
  		jQuery("#"+handle+"box").animate({'height': height}, 500);		
  	return false;
	});
	jQuery("a[rel='close']").click(function() {
		var closebox=this.id.replace('close', 'box');
		jQuery("#"+closebox).animate({'height': 0}, 200);
	});
}




/*
lsopen=function() {
	jQuery("a[rel='animate']").click(function() {
		var boxes=jQuery("div[class='box']");
		w="";
		for (i in boxes){
			w+=i+": "+boxes[i]+"\n";	
		}
	
		handle=this.id.replace('button', '');
		handle=handle.replace('handle', '');
		
		oheight=jQuery('#'+handle+"form").height();
		status=parseInt(document.getElementById(handle+'box').style.height)>10;
		height=(status)?'0':oheight;
		jQuery("#"+handle+"box").animate({'height': height}, 500);
		
		return false;
		
	
	});
}
*/
