window.info=false;
window.infoBtn=false;
window.info_INT;
window.toHigh;
function getPic(file,desc){
	if(file) {
		window.info_INT=setInterval("closeDesc();",20);
		document.getElementById('folio_pic').innerHTML='<div align="center" style="margin-top:150px; color:#EEEEEE; letter-spacing:0.2em;">Loading...</div>';
		document.getElementById('folio_pic').innerHTML='<img src=\"'+file+'\" />';
		document.getElementById('folio_desc').innerHTML=desc;
	}
}
function toggleInfo() {
	if(window.info_INT) return;
	if(window.info) {
		window.info_INT=setInterval("closeDesc();",20);
	} else {
		window.toHigh=getToHeight();
		document.getElementById('folio_info').style.display='block';
		window.info_INT=setInterval("openDesc();",20);
	}
}
function getToHeight() {
	var dsc=document.getElementById('folio_desc').innerHTML;
	var h=(Math.floor(dsc.length/90)+1)*13; // lines of text 13px each
	h+=(parseInt(document.getElementById('folio_desc_holder').style.padding)+3)*2; // padding at top and bottom of holder
	h+=(Math.floor(dsc.split(/<br/i).length-1))*12; // for new paragraphs
	h+=5; // extra for bottom
	if(h>300) h=300; // max height
	return h;
}
function openDesc() {
	var o=document.getElementById('folio_info');
	var newHigh=parseInt(o.style.height)+15;
	if(newHigh>window.toHigh) newHigh=window.toHigh;
	o.style.height=newHigh+'px';
	window.info=true;
	if(newHigh>=window.toHigh) {
		clearInterval(window.info_INT);
		window.info_INT=null;
	}
}
function closeDesc() {
	var o=document.getElementById('folio_info');
	var newHigh=parseInt(o.style.height)-15;
	if(newHigh<1) newHigh=1;
	o.style.height=newHigh+'px';
	window.info=false;
	if(newHigh<=1) {
		o.style.display='none';
		clearInterval(window.info_INT);
		window.info_INT=null;
	}
}
function lightBtn() {
	document.getElementById('folio_fade_btn').className='_trans_75';
	window.infoBtn=true;
}
function offBtn() {
	window.infoBtn=false;
	setTimeout("dimBtn();",100);
}
function dimBtn() {
	if(!window.infoBtn && !window.info) document.getElementById('folio_fade_btn').className='_trans_25';
}