			children = new Array();

			function nodeToString(_node, level){
				if(!level){
					level = 1;
				}


				var str = "";

				if(!_node.nodeName)
					return false;

				//alert(level + ' / ' + _node.nodeName);
				str += "<" + _node.nodeName ;

				attrs = _node.attributes;
				for(i=0; i < attrs.length; i++){
					attr = attrs.item(i);

					if(attr.nodeValue == null || attr.nodeValue == "")
				 		continue;

				 	str += ' ' + attr.nodeName + '="' + attr.nodeValue + '"';
				}



				children[level] = _node.childNodes;

				if(children[level].length > 0){
					str += ">";

				 	for(j=0; j < children[level].length; j++){
				 		children_node = children[level].item(j);
				 		str += nodeToString(children_node, level+1);
				 	}

				 	str += "</" + _node.nodeName + ">";
				}else{
					str += " />";
				}

				return str;
			}

			function flash_fix(){
				var objNodes=document.getElementsByTagName("OBJECT");

				for(x=0; x < objNodes.length; x++){
					var objNode = objNodes[x];

					replacement_html = nodeToString(objNode);

					replacement = document.createElement('span');
					replacement.innerHTML = replacement_html;

					objNode.parentNode.replaceChild(replacement, objNode);
				}
			}

			function useFlash(){
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		if ( plugin ) {
		  plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 5;
		}else if (!window.opera && navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
		  for (var i=3;i<9;i++){
				try{
					if (eval('new ActiveXObject("ShockwaveFlash.ShockwaveFlash.'+i+'")')){f=i;}
				}catch(e){}
			}
   			try{
   				plugin = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.'+f);
   			}catch(e){
   				plugin=0;
   			}

		}

		if ( plugin ) {
		  return true;
		}else
			return false;

}
