function FP_xslview(oFrame,sXML,sXSL,sErr){
	var oXml,oXsl,oTarget=oFrame.parentNode,sHtml,oDoc=document,/*ie*/sMXSML="Microsoft.XMLDOM",/*moz*/oImp=oDoc.implementation,oXslProc,oXform,oXmlSer;
	
	if(!XformInIE()&&!XformInMoz())
	{
		oTarget.innerHtml=oTarget;
	}
	
	function OnMozXmlDocLoaded(e)
	{
		oXslProc=new XSLTProcessor(); 
		oXform=oImp.createDocument("","t2",null); 
		oXform.addEventListener("load",onloadXSL,false); 
		oXform.load(sXSL); 
		
		function onloadXSL()
		{ 
			try
			{
				netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); 
			}
			catch(e)
			{
				;
			}
			oXslProc.importStylesheet(oXform); 
  			oXslProc.setParameter(null, "dvt_filterval", doItinJS() );
			var oXmlXformed=oXslProc.transformToDocument(oXml);
			oXmlSer=new XMLSerializer();
			sHtml=oXmlSer.serializeToString(oXmlXformed);
			oTarget.innerHTML=sHtml; 	
		} 
	}
	
	function XformInIE()
	{ 
		if(!document.all)
		{
			return false;
		} 
		try
		{
 			oXml=new ActiveXObject("Msxml2.DOMDocument");
		} 
		catch(e)
		{
			return false;
		} 
		
		if(oXml)
		{ 

			oXml.async = false;
			oXml.load(sXML);
	
			var oXsl = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
			oXsl.async = false;
			oXsl.load(sXSL);
			
			var xsltThread = new ActiveXObject("Msxml2.XSLTemplate");
			xsltThread.stylesheet = oXsl;
			var xsltProc = xsltThread.createProcessor();
			xsltProc.input = oXml;
			xsltProc.addParameter("dvt_filterval", doItinJS());
			
			xsltProc.transform();
			oTarget.innerHTML = xsltProc.output;
			return true; 

		} 
		return false; 
	}
			
	function XformInMoz()
	{ 
		if(oImp&&oImp.createDocument)
		{ 
			try
			{
				netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); 
			}
			catch(e)
			{
				;
			}

			oXml=oImp.createDocument("","t1",null); 
			oXml.addEventListener("load",OnMozXmlDocLoaded,false);
			oXml.load(sXML); 
			return true; 
		} 
		return false; 
	}	
	function doItinJS() {
		if (document.location.toString().indexOf("Lot1.htm") == -1) {		//If Wrong case sensitive page, forget it.
			return "ALL";
		}
		if (document.location.toString().indexOf("?Lot=") == -1) {			//Look for the parm, if not there
 			var _Lot = escape(document.MyForm.Lot.value);					//Grab Default from form
			document.location = document.location + "?Lot=" + _Lot;			//Puts the default at the end 
		}
		
		var _p,_q,_n;
		_p = document.location.toString();
		_q = _p.indexOf("?Lot=");					//Finds the first Lot=
		if (_q != -1 ) {
		    _n = _p.substr(_q+5,_p.length);
		    if (_n.indexOf("&") != -1) {
			    _n = _n.substr(0,_n.indexOf("&"));
		    }
		    document.MyForm.Lot.value = unescape(_n);
		}
		return document.MyForm.Lot.value;
	}
}	