function urlDecode(str){
    str=str.replace(new RegExp('\\+','g'),' ');
    return unescape(str);
}
function urlEncode(str){
    str=escape(str);
    str=str.replace(new RegExp('\\+','g'),'%2B');
    return str.replace(new RegExp('%20','g'),' ');
}

function stripHTML(str){

	var stripped =  str.replace(/(<([^>]+)>)/ig," ");
	
	stripped = stripped.replace(/<(.|\n)*[^>](?=.)/, '...');
	stripped = stripped.replace(/%\w{1}(?=\s)/, '');


	/*
	var stripped = str.replace(/<(\/)*(\\?xml:|meta|link|span|font|del|ins|st1:|[ovwxp]:)((.|\s)*?)>/gi, ''); // Unwanted tags
    stripped = stripped.replace(/(class|style|type|start)=("(.*?)"|(\w*))/gi, ''); // Unwanted sttributes
    stripped = stripped.replace(/<style((.|\n)*?)style>/gi, '');   // Style tags
    stripped = stripped.replace(/<script((.|\n)*?)script>/gi, ''); // Script tags
  	stripped = stripped.replace(/<!--((.|\n)*?)-->/gi, '');        // HTML comments
   
   */
	return stripped;	
}





function rewriteTxtBox() {
	var txts = YAHOO.util.Dom.getElementsByClassName("codecTxt");
	for(var ff=0;ff<txts.length;ff++){
		txts[ff].value = urlDecode(txts[ff].value);
		//	alert(txts[ff].name);
	}
	var txts = YAHOO.util.Dom.getElementsByClassName("codecPrnt");
	for(var ff=0;ff<txts.length;ff++){
		txts[ff].innerHTML = urlDecode(txts[ff].innerHTML);
		//	alert(txts[ff].name);
	}
	try{
		adjHgt();
	}catch(error){
		
	}	
}


YAHOO.util.Event.addListener(window,'load',rewriteTxtBox);