<!--
/////////////////////////////////////////
// rel. 1.01 - 27/10/2006 - by R. Poli //
/////////////////////////////////////////
// versione COSMOS - e-comm            //
/////////////////////////////////////////

function SpecialChars()
{
// '"', '&quot;',   '&#34;',
	this.chars = [ 
		       '&', '&amp;',    '&#38;',
		       '<', '&lt;',     '&#60;',
		       '>', '&gt;',     '&#62;',
		       'Œ', '&OElig;',  '&#338;',
		       'œ', '&oelig;',  '&#339;',
		       'Š', '&Scaron;', '&#352;',
		       'š', '&scaron;', '&#353;',
		       'Ÿ', '&Yuml;',   '&#376;',
		       'ˆ', '&circ;',   '&#710;',
		       '˜', '&tilde;',  '&#732;',
		       '–', '&ndash;',  '&#8211;',
		       '—', '&mdash;',  '&#8212;',
		       '‘', '&lsquo;',  '&#8216;',
		       '’', '&rsquo;',  '&#8217;',
		       '‚', '&sbquo;',  '&#8218;',
		       '“', '&ldquo;',  '&#8220;',
		       '”', '&rdquo;',  '&#8221;',
		       '„', '&bdquo;',  '&#8222;',
		       '†', '&dagger;', '&#8224;',
		       '‡', '&Dagger;', '&#8225;',
		       '‰', '&permil;', '&#8240;',
		       '‹', '&lsaquo;', '&#8249;',
		       '›', '&rsaquo;', '&#8250;',
		       '€', '&euro;',   '&#8364;'
		     ];



	this.encode = function(sText)
	{
		for(var i = 0; i < this.chars.length; i += 3)
			sText = sText.replaceAll(this.chars[i + 0], this.chars[i + 2]);

		return sText;
	}

	this.decode = function(sText)
	{
		for(var i = 0; i < this.chars.length; i += 3)
			sText = sText.replaceAll(this.chars[i + 2], this.chars[i + 0]);

		return sText;
	}
}

-->