function xinhaThis(thisbox,autopageid)
{
	var maxw, minw, maxh, minh;
	maxw=thisbox.offsetWidth;
	maxh=thisbox.offsetHeight;
	
	if (maxh<100) maxh=100;
	if (maxw<100) maxw=100;

	var newTAcontainer = document.createElement('form');
	newTAcontainer.setAttribute('id','inlineeditor');
	var newTA = document.createElement('textarea');
	newTA.setAttribute('id','htmlarea1');
	newTA.setAttribute('name','content');

	newTA.style.width=maxw+'px';
	newTA.style.height=maxh+'px';
	
	newTA.value=thisbox.innerHTML;

	var reg=new RegExp('\<a.*?admin\_edit.*?\>\<\/a\>');
 	newTA.value=newTA.value.replace(reg,'');

	newTAcontainer.action='/admin/content.php?autoreturn=1&editcontent='+autopageid+"&autoreturnurl="+escape(window.location);
	newTAcontainer.method='POST';
	newTAcontainer.style.display='block';
	newTAcontainer.style.width=maxw+'px';
	newTAcontainer.style.height=maxh+'px';
	newTAcontainer.style.left=parseInt(thisbox.offsetLeft)+'px';
	newTAcontainer.style.top=parseInt(thisbox.offsetTop)+'px';
	newTAcontainer.style.position='absolute';
// 		newTA.style.marginBottom=(-maxh)+'px';
	newTAcontainer.style.zIndex=100;

	if (thisbox.nextSibling!=null) thisbox.parentNode.insertBefore(newTAcontainer,thisbox.nextSibling);
	else thisbox.parentNode.appendChild(newTAcontainer);

	newTAcontainer.appendChild(newTA);

	var xinhaScript = document.createElement('script');
	xinhaScript.setAttribute('src','/tools/xinha1/XinhaCore2.js');
	document.getElementsByTagName('body')[0].appendChild(xinhaScript);

	var xinhaScript2 = document.createElement('script');
	xinhaScript2.setAttribute('src','/tools/xinha1/my_config_inline.js');
	document.getElementsByTagName('body')[0].appendChild(xinhaScript2);

return false;
}

    _editor_url  = "/tools/xinha1/"  // (preferably absolute) URL (including trailing slash) where Xinha is installed
    _editor_lang = "en";      // And the language we need to use in the editor.
	_editor_skin = "green-look";

