+function unescapeHTML(cont) {
+ var div = document.createElement('div');
+ var memo = "";
+ var i;
+
+ div.innerHTML = cont;
+ if (div.childNodes[0]) {
+ if (div.childNodes.length > 1) {
+ if (div.childNodes.toArray)
+ alert("si puo");
+ else {
+ var length = div.childNodes.length, results = new Array(length);
+ while (length--)
+ results[length] = div.childNodes[length];
+
+ for (i=0 ; i<results.length ; i++)
+ memo = memo + results[i].nodeValue;
+ }
+
+ return (memo);
+ }
+ else {
+ return (div.childNodes[0].nodeValue);
+ }
+ }
+ else {
+ return ('');
+ }
+}
+