<!--
	
	function getStyle(oElm, strCssRule) {
		var strValue = "";
		if(document.defaultView && document.defaultView.getComputedStyle){
			styles = window.getComputedStyle(oElm, "");
			if("undefined" != typeof eval("styles."+ strCssRule)) {
				strValue = eval("styles."+ strCssRule);
			} else {
				strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
			}
		}
		else if(oElm.currentStyle){
			strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
				return p1.toUpperCase();
			});
			strValue = oElm.currentStyle[strCssRule];
		}
		return strValue;
	}
	function generate_image(obj) {
		if(obj.childNodes.length > 1) {
			for(_o = 0; _o < obj.childNodes.length; _o++) {
				if("undefined" != typeof obj.childNodes[_o] && "undefined" != typeof obj.childNodes[_o].innerHTML) {
					generate_image(obj.childNodes[_o]);
				}
			}
		} else {
			fontFamily = getStyle(obj, 'fontFamily');
			fontWeight = getStyle(obj, 'fontWeight');
			fontStyle = getStyle(obj, 'fontStyle');
			fontSize = getStyle(obj, 'fontSize');
			if(fontSize.match(/px$/)) {
				fontSize = parseInt(fontSize.replace(/[^0-9\.]/g, ''));
			//	fontSize = Math.floor(parseInt(fontSize) * 0.75);
			}
			fontColor = getStyle(obj, 'color');
			if(fontColor.match(/^rgb\((\d+),\s?(\d+),\s?(\d+)\)$/i)) {
				r = parseInt(RegExp.$1);
				g = parseInt(RegExp.$2);
				b = parseInt(RegExp.$3);
			} else {
				r = g = b = 0;
			}
			str = obj.innerHTML;
			if(getStyle(obj, 'textTransform') == 'uppercase') {
				str = str.toUpperCase();
			}
			obj.innerHTML = "<img src=\"http://fonts.webadvantages.co.uk/?text="+ escape(str) +"&size="+ escape(fontSize) +"&font="+ escape(fontFamily) +"&weight="+ escape(fontWeight) +"&style="+ escape(fontStyle) +"&r=" + r +"&g=" + g +"&b=" + b + "\" alt=\""+ obj.innerHTML.replace(/\"/gi, "") +"\" />";
		}
	}
	function apply_font() {
		var _o = document.getElementsByTagName('*');
		for(_i = 0; _i < _o.length; _i ++) {
			if(_o[_i].className && _o[_i].className.match(/(^|\s)apply_font(\s|$)/i)) {
				generate_image(_o[_i]);
			}
		}
	}
	window.onload = function() {
		apply_font();
	}

-->