window.current_div = new Object();
window.T = 0;

function openclose( div_id ){

	var scroll_div = document.getElementById( div_id );
	window.current_div = scroll_div;

	if( Number(scroll_div.style.height.replace(/px/gi, '')) <= 1 ){

		open_div();
	} else {

		close_div();
	}
}


function open_div(){
	if(  Number( window.current_div.style.height.replace(/px/gi, '') ) < window.current_div.scrollHeight ){
		window.current_div.style.height = Number( window.current_div.style.height.replace(/px/gi, '')) + 7 +'px';
		window.T = window.setTimeout('open_div()', window.current_div.style.height.replace(/px/gi, '') / 7 );
	} else {

		window.current_div.style.height = window.current_div.scrollHeight +'px';
	}
}


function close_div(){
	//window.open(window.current_div.style.height,'_blank');

	if(  Number( window.current_div.style.height.replace(/px/gi, '') ) >5 ){
		window.current_div.style.height = Number( window.current_div.style.height.replace(/px/gi, '')) - 7 +'px';
		window.T = window.setTimeout('close_div()',   window.current_div.style.height.replace(/px/gi, '') / 7 );

	} else {
		
		window.current_div.style.height = 1 + 'px';
	}
}

function ki_be( div_id ){

	var did = document.getElementById( div_id );
	if (did.style.display=='none'){
		did.style.display='block';
	} else {		
		did.style.display='none';
	}
}
