function openWindow(url, name, width, height) {
var x = 0
var y = (screen.height)
var conf = 'left=' + x + ',top=' + y + ',screenX=' + x + ',screenY=' + y + ',width=' + width + ',height=' + height;
var newWindow = window.open(url, name, conf);
} 

function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
  {
  xhttp=new XMLHttpRequest();
  }
else
  {
  xhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xhttp.open("GET",dname,false);
xhttp.send("");
return xhttp.responseXML;
}

function displayResult(xmlfile,xslfile,dstname)
{
xml=loadXMLDoc(xmlfile);
xsl=loadXMLDoc(xslfile);
// code for IE
if (window.ActiveXObject)
  {
  ex=xml.transformNode(xsl);
  document.getElementById(dstname).innerHTML=ex;
  }
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
  {
  xsltProcessor=new XSLTProcessor();
  xsltProcessor.importStylesheet(xsl);
  resultDocument = xsltProcessor.transformToFragment(xml,document);
  document.getElementById(dstname).appendChild(resultDocument);
  }
}

function fixEmbed(objStr){
	var obj = swfobject.getObjectById(objStr);
	if (obj) {
		var nestedObj = obj.getElementsByTagName("object")[0];
		if (nestedObj) {
			var e = document.createElement("embed");
			var a = nestedObj.attributes;
			if (a) {
				var al = a.length;
				for (var i = 0; i < al; i++) {
					if (a[i].nodeName.toLowerCase() == "data") {
						e.setAttribute("src", a[i].nodeValue);
					}
					else {
						e.setAttribute(a[i].nodeName, a[i].nodeValue);
					}
				}
			}
			var c = nestedObj.childNodes;
			if (c) {
				var cl = c.length;
				for (var j = 0; j < cl; j++) {
					if (c[j].nodeType == 1 && c[j].nodeName.toLowerCase() == "param") {
						e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));
					}
				}
			}
			obj.parentNode.replaceChild(e, obj);
		}
	}
}

