// Thanks for this code to: r6144 (ref. http://www.everything2.com/index.pl?node_id=1336433)
var
	view = document.defaultView;

var
	symboltab = [
		0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,	// 00-0f
		0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,	// 10-1f
		0000,0000,8704,0000,8707,0000,0000,8715,0000,0000,8727,0000,0000,8722,0000,0000,	// 20-2f
		0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,	// 30-3f
		8773,0913,0914,0935,8710,0917,0934,0915,0919,0921,0977,0922,0923,0924,0925,0927,	// 40-4f
		0928,0920,0929,0931,0932,0933,0962,8486,0926,0936,0918,0000,8756,0000,8869,0000,	// 50-5f
		8254,0945,0946,0967,0948,0949,0966,0947,0951,0953,0981,0954,0955,0956,0957,0959,	// 60-6f
		0960,0952,0961,0963,0964,0965,0982,0969,0958,0968,0950,0000,0000,0000,8764,0000,	// 70-7f
		0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,	// 80-8f
		0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,	// 90-9f
		0000,0978,8242,8804,8725,8734,0402,9827,9830,9829,9824,8596,8592,8593,8594,8595,	// a0-af
		0176,0177,8243,8805,0215,8733,8706,8226,0247,8800,8801,8776,8230,0000,0000,8629,	// b0-bf
		8501,8465,8476,8472,8855,8853,8709,8745,8746,8835,8839,8836,8834,8838,8712,8713,	// c0-cf
		8736,8711,0174,0169,8482,8719,8730,8901,0172,8743,8744,8660,8656,8657,8658,8659,	// d0-df
		9674,9001,0174,0169,8482,8721,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,	// e0-ef
		0000,9002,8747,8992,0000,8993,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000		// f0-ff
	];

function convNode(n)
{
	var n1;

	if (n == null)
		return;

	if (n.nodeType == 3)
	{
		elem = n.parentNode;

		var st  = view.getComputedStyle(elem, null);
		var val = st.getPropertyValue('font-family');

		if (val.toLowerCase() == 'wingdings')
		{
			var
				s0 = n.data,
				s1 = '',
				len = s0.length,
				ch;

			for (i = 0; i < len; i++)
			{
				ch = s0.charCodeAt(i);

				switch (ch)
				{
				case 0xf0: ch = 0x21d2; break;
				case 0xd8: ch = 0x27a2; break;
				}

				s1 += String.fromCharCode(ch);
			}

			n.data = s1;
		}
		else if (val.toLowerCase() == 'symbol')
		{
			var
				s0 = n.data,
				s1 = '',
				len = s0.length,
				ch;

			for (i = 0; i < len; i++)
			{
				ch = s0.charCodeAt(i);

				if (ch < 256 && symboltab[ch] != 0)
					ch = symboltab[ch];

				s1 += String.fromCharCode(ch);
			}

			n.data = s1;
		}
	}

	n1 = n.firstChild;

	while (n1 != null)
	{
		convNode(n1);
		n1 = n1.nextSibling;
	}
}

