<!--
var formVars = "";
var changing = false;
var UseOriginal = false;
function cambia(str,actual) {
	if(!changing){
		//var str = actual.innerHTML
		for(i=0; i<str.length; i++){ 
			if(str.indexOf("&nbsp;&nbsp;") > -1){ 
				str=str.replace("&nbsp;&nbsp;","  ");
			}
		}
		height = 200;
		width = 400;
		actual.innerHTML = "<textarea name=\"textarea\" id=\""+ actual.id +"_field\" style=\"width: "+width+"px; height: "+height+"px;\" onfocus=\"highLight(this);\" onblur=\"noLight(this); return fieldBlur(this,'" + actual.id + "');\" onmouseover=\"this.focus()\">" + str + "</textarea>";
	
		changing = true;
		UseOriginal = true;
	}

		actual.firstChild.focus();
}

function EditContent(tid) {
	if(!changing){
		changing = true;
		UseOriginal = true;
		window_handle = window.open('editor.asp?tid='+tid,'cmseditor','resizable=no,width=600,height=500');
		//window_handle.focus();
		return false;
	}
}
function addEvent(elm, evType, fn, useCapture)
{
  if (elm.addEventListener){
    elm.addEventListener(evType, fn, useCapture);
    return true;
  } else if (elm.attachEvent){
    var r = elm.attachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Please upgrade your browser to use full functionality on this page");
  }
}
function highLight(span){
            span.parentNode.style.border = "2px solid #D1FDCD";
            span.parentNode.style.padding = "0";
            span.style.border = "1px solid #54CE43";          
}

function noLight(span){
        span.parentNode.style.border = "0px";
        span.parentNode.style.padding = "2px";
        span.style.border = "0px";       

}

function setVarsForm(vars){
	formVars  = vars;
}

addEvent(window, "load", editbox_init2);
-->
