function floatFrame(name) {
	this.fname 			= name;
	var height 			= 0;
	var oheight 		= 0;
	var intID			= 0;
	var ths 			= this;
	
	this.hide = function() {
		if (height > 0) {
			height = Math.round(height / 2) - 1;
			if (height < 0 ) height = 0;
			document.getElementById(ths.fname).style.height = height;			
		}
		if (height <= 0) {
			document.getElementById(ths.fname).style.display = 'none';
			clearInterval(intID);
		}
	}
	
	this.show = function() {
		if (height < oheight) {
			height = Math.round(height * 2);
			if (height > oheight) height = oheight;
			document.getElementById(ths.fname).style.height = height;
			document.getElementById(ths.fname).style.display = 'block';
		}
		if (height >= oheight) {
			clearInterval(intID);
		}	
	}
	
	this.fShow = function() {
		if (oheight == 0) {
			oheight = document.getElementById(ths.fname).offsetHeight; // Fix for IE
		}
		
		if (document.getElementById(ths.fname).style.display == 'none' || document.getElementById(ths.fname).style.display == '') {
			height = 1;
			intID = setInterval(function(){ ths.show(); },30);
		} else {
			height = oheight;
			intID = setInterval(function(){ ths.hide(); },30);
		}		
	}
}

function closedFrame(name) {
	this.fname 			= name;
	var height 			= 0;
	var oheight 		= 0;
	var intID			= 0;
	var ths 			= this;
	
	this.hide = function() {
		if (height > 0) {
			height = Math.round(height / 2) - 1;
			if (height < 0 ) height = 0;
			document.getElementById(ths.fname).style.height = height;			
		}
		if (height <= 0) {
			document.getElementById(ths.fname).style.display = 'none';
			clearInterval(intID);
		}
	}
	
	this.show = function() {
		if (height < oheight) {
			height = Math.round(height * 2);
			if (height > oheight) height = oheight;
			document.getElementById(ths.fname).style.height = height;
			document.getElementById(ths.fname).style.display = 'block';
		}
		if (height >= oheight) {
			clearInterval(intID);
		}	
	}
	
	this.fShow = function() {
		if (oheight == 0) {
			document.getElementById(ths.fname).style.display = 'block';
			oheight = document.getElementById(ths.fname).offsetHeight; // Fix fot IE
			document.getElementById(ths.fname).style.display = 'none';
		}
		
		if (document.getElementById(ths.fname).style.display == 'none' || document.getElementById(ths.fname).style.display == '') {
			height = 1;
			intID = setInterval(function(){ ths.show(); },30);
		} else {
			height = oheight;
			intID = setInterval(function(){ ths.hide(); },30);
		}		
	}
}

