/* break free from nasty frames */
if (top!=self) top.location.href = location.href;

var delayOut=100;
var delayBack=200;
var speed=20;
var bmoving=new Array();

function get_css_style(id,property)
{
	var ele=get_ele(id);
	if (ele.currentStyle) {
		return ele.currentStyle[property]
	}else if (window.getComputedStyle){ 
		return window.getComputedStyle(ele,"").getPropertyValue(property)
	}
	return null;
}

function get_ele(id)
{
	if (document.all){
		return document.all[id];	
	} else if (document.getElementById){ 
	    return document.getElementById(id);
	}
	return null;
}

function appear(id,num_elements,element_height,footer_height)
{
	if (!document.getElementById){return false;}
	var div=get_ele(id);
	if (parseInt(num_elements)==0) footer_height=0;
	var max_height=parseInt(footer_height)+(parseInt(num_elements)*(parseInt(element_height)));
	if (!max_height) return true;
	var aspeed=speed
	if (div.style.height==0||div.style.height=="") {
		div.style.height="0px";
		aspeed=delayOut;
	}
	clearTimeout(bmoving[id]);
	bmoving[id]=setTimeout('appear_a("'+id+'",'+max_height+')',aspeed);
	return true;
}

function appear_a(id,max_height)
{
	var div=get_ele(id);
	if (document.getElementById){
	 	//div.style.display='visible';
		if (parseInt(div.style.height)>=max_height) {return;}
		div.style.height=(parseInt(div.style.height)+6)+ "px";
    }
	bmoving[id]=setTimeout('appear_a("'+id+'",'+max_height+')',speed);
}

function disappear(id)
{
	if (!document.getElementById){return false;}
	var div=get_ele(id);
	clearTimeout(bmoving[id]);
	bmoving[id]=setTimeout('disappear_a("'+id+'")',delayBack);
	return true;
}

function disappear_a(id)
{
  	var div=get_ele(id);
	if (document.getElementById){
	 	if (parseInt(div.style.height)<=0) {
			//div.style.display='none';
			return;
		}
		div.style.height=(parseInt(div.style.height)-6)+ "px";
    }else return;
  bmoving[id]=setTimeout('disappear_a("'+id+'")',speed);
}

function hybrid_swap(id,c)
{
	get_ele(id).className=c;
}

function swapClass(id,c) {
	id.className = c;
}

function swapParentClass(id,c) {
	id.parentNode.className = c;
}

function swapGrandParentClass(id,c) {
	id.parentNode.parentNode.className = c;
}

/* nasty nasty hack to fix one of ie's rendering bugs */
function tidyup_ie(id) {
	if (navigator.appName !="Microsoft Internet Explorer") return;
	setTimeout('get_ele("'+id+'").style.height="1px"',550);
	setTimeout('get_ele("'+id+'").style.height="0px"',600);
}