
function changeOpacity(id,type){
$opacityStatus = type;
if($opacityStatus==0){
	new Effect.Opacity('item_'+id, {duration:0.5, from:1.0, to:0.3});
	$opacityStatus.value = 1;
} 
else {
	new Effect.Opacity('item_'+id, {duration:0.5, from:0.3, to:1.0});
	$opacityStatus.value= 0;
}
}

function Minimize(id)
{
var item 	= document.getElementById('item_'+id);
var max 	= document.getElementById('max'+id);
var min 	= document.getElementById('min'+id);

item.style.height 		= 52+'px';
item.style.overflow 	= 'hidden';
max.style.visibility 	= 'visible';
min.style.visibility 	= 'hidden';

update(id);	
		
	function update(id) {
		var url = 'ajax.php?minimize='+id;
		var ajax = new Ajax.Request(url,{
			method: 'post',
			parameters: id,
			onLoading: function(){$('workingMsg').show()},
			onLoaded: function(){$('workingMsg').hide()}
		});
	}
}
function Maximize(id)
{
document.getElementById('item_'+id).style.height 	= 100+'%';
document.getElementById('item_'+id).style.overflow 	= 'visible';
document.getElementById('max'+id).style.visibility 	= 'hidden';
document.getElementById('min'+id).style.visibility 	= 'visible';
update(id);	
		
	function update(id) {
		var url = 'ajax.php?maximize='+id;
		var ajax = new Ajax.Request(url,{
			method: 'post',
			parameters: id,
			onLoading: function(){$('workingMsg').show()},
			onLoaded: function(){$('workingMsg').hide()}
		});
	}
}
function Remove(id)
{
document.getElementById('item_'+id).style.height 	= 0+'px';
document.getElementById('item_'+id).style.overflow 	= 'hidden';
document.getElementById('max'+id).style.visibility 	= 'hidden';
document.getElementById('min'+id).style.visibility 	= 'hidden';
document.getElementById('close'+id).style.visibility 	= 'hidden';
update(id);	
		
	function update(id) {
		var url = 'ajax.php?remove='+id;
		var ajax = new Ajax.Request(url,{
			method: 'post',
			parameters: id,
			onLoading: function(){$('workingMsg').show()},
			onLoaded: function(){$('workingMsg').hide()}
		});
	}
}