/*	JavaScript Functions For txtForum 0.7.0 by Lauri Kasvandik */
function add2post(str){
    tinyMCE.execCommand('mceInsertContent',false,"<img src='"+str+"'>");
}
function change_forum(){	
	fid = document.hopform.forums_list.value;
	//document.write (document.location.pathname)
	if (fid != -1)	{
		url='forum.php?action=topics&fid=' + fid;
		parent.location.href = url;
	}
}
function redimensiona(imag,max_width,max_height){
	imag.style.display="inline";
	if(imag.width>max_width || imag.height>max_height) {
		var scale = Math.min((max_width/imag.width),(max_height/imag.height), 1 );
		imag.width=Math.floor(scale*imag.width);
	}
}