function delHtmlBox(id){
	elemid='edit_html_'+id;
	new Effect.Fade(elemid);
}
function updateHTMLBox(id,Title,Text){
	elemid='item_html_'+id+'_title';
	$(elemid).innerHTML=Title;
	elemid='item_html_'+id+'_text';
	$(elemid).innerHTML=Text;
	ToolTip.hide();
}

function getElement( id )
{
	return document.getElementById( id ).innerHTML;
}

function resize_textarea(Obj){
	
	var defHeight=47;
	
	document.getElementById('user_info_work').style.height=defHeight+'px';
	document.getElementById('user_info_about').style.height=defHeight+'px';
	document.getElementById('user_info_welcome').style.height=defHeight+'px';
	if ( Obj == null ) return;
	var width=xWidth(Obj);
	if ( width == 0 ) return;

	cols= Math.ceil(width/9);
	var count=0;
	txt = Obj.value;
	var ln=String(txt).split('\n');
	for(var i=0;i<ln.length;i++){
		count += Math.ceil( (ln[i].length + 8.0) / cols );
	}
	newheight = ((count * 15) >defHeight)?count * 15:defHeight; 
	Obj.style.height = newheight + 'px';

}

function setNodeAttribute( node, attr, val )
{
	var attrNode = document.createAttribute( attr );

	attrNode.nodeValue = val;

	node.setAttributeNode( attrNode );
}

function hide( id )
{
	document.getElementById( id ).style.display='none';
}

function unhide( id )
{
	document.getElementById( id ).style.display='block';
}
