// JavaScript Document

function toggle_height(height){
	if(document.getElementById("in_this_guide").style.height == height + 'px'){
		document.getElementById("in_this_guide").style.height = 0;
		document.getElementById("in_this_guide").style.backgroundImage = "url(images/inthisguide.png)";			
	}
	else{
		document.getElementById("in_this_guide").style.backgroundImage = "url(images/inthisguide_up.png)";
		document.getElementById("in_this_guide").style.height = height + "px";
	}
}



/*var enddrop = false;

function toggle_height(height){
	if(!enddrop){
		if(document.getElementById("in_this_guide").style.height == height + 'px'){
			dropUp_ID("in_this_guide",height,0,40,1);
			document.getElementById("in_this_guide").style.backgroundImage = "url(images/inthisguide.png)";
		}
		else{
			dropDown_ID("in_this_guide",0,height,40,1);
			document.getElementById("in_this_guide").style.backgroundImage = "url(images/inthisguide_up.png)";
		}
	}
	else{
		enddrop = false;	
	}
}	


function dropDown_ID(id,starting,ending,increase,timeout){
	if(starting < ending){
		document.getElementById(id).style.height = starting + increase + "px";
		starting += increase;
		delay = function() { dropDown_ID(id,starting,ending,increase,timeout); };
		setTimeout(delay,timeout);
	}
	if(starting > ending)
		document.getElementById(id).style.height = ending + "px";
}
function dropUp_ID(id,starting,ending,increase,timeout){
	if(starting > ending){
		document.getElementById(id).style.height = starting - increase + "px";
		starting -= increase;
		delay = function() { dropUp_ID(id,starting,ending,increase,timeout); };
		setTimeout(delay,timeout);
	}
	if(starting < ending)
		document.getElementById(id).style.height = ending + "px";
}

function end_drop(){
	 enddrop = true;
}*/
