var isIE    = !!(navigator.userAgent.toLowerCase().indexOf('msie') >= 0 && document.all);
var isOpera = !!(window.opera && document.getElementById);
var isMoz   = (!isIE && !isOpera);
var ini_top;
var zIndex = 100;

function uprise(id, t, h)
{
	id_raw =  id;
    id = '#' + id;

    /*if ($(id).css('position') != 'absolute')
    {
        $(id).css('position', 'absolute');
        $(id).css('left', 0);
        $(id).css('top', $('.osn').get(0).offsetHeight + 2 + 'px');
        ini_top = $('.osn').get(0).offsetHeight + 2;
    }
	*/
	
	if (parseInt($(id).css('height')) > 1)
    {
        new_height = 0;
		ini_top=document.getElementById(id_raw).offsetHeight;
		
        new_top = ini_top;
    }
    else
    {
        $(id).css('z-index', ++zIndex);
        /*new_height = $(id + ' > .content').get(0).offsetHeight;
        if (!isMoz) new_height += 35;
        new_top = parseInt($(id).css('top')) - new_height;
		*/
		new_height=h;
		new_top=t;
    }
	
	if (t!=-1){
		$(id).animate
		(
			{height: new_height + 'px', top: new_top + 'px'},	1000
		);
	}else{
			
	
	$(id).animate
		(
			{height: new_height + 'px'},	1000
		);		
		
	}

}

function down(id){
	id_raw= id;
	if (document.getElementById(id_raw).style.display!=""){
		
		id = '#' + id;
		//ini_top=document.getElementById(id_raw).offsetHeight;
		ini_top=0;
		$(id).animate
		(
			{height: '0px', top: ini_top + 'px'},
			1000
		);
		
		document.getElementById(id_raw).style.display="none";
	}
}
