var specsXML = null;
var specsXSL = null;
var xml = null;
var xsl = null;
var mySpecs = null;
var myYear = null;
function getSpec(){
      mySpecs =  getParameter('specs');
      myYear =  getParameter('year');
	if (specsXML == null){
    		var args = "encoding=xml";
    		makeRequest("/en/owners/xml/specs.xml", args, "myReturnedXML(http_request[i].responseText)");
	}else{
		if (specsXSL == null){
    			var args = "";
    			makeRequest("/en/owners/xsl/specs.xsl", args, "myReturnedXSL(http_request[i].responseText)");
		}else{
    			viewSpecsData();
		}
	}
}
function myReturnedXML (myXML) {
	specsXML = myXML;
	xml = xmlParse(specsXML);
    var args = "";
    makeRequest("/en/owners/xsl/specs.xsl", args, "myReturnedXSL(http_request[i].responseText)");
  }
  
function myReturnedXSL (myXSL) {
	specsXSL = myXSL;
	specsXSL = specsXSL.replace("$$_YEAR_$$",myYear);
	//if(mySpecs == ""){
	//	alert("empty");
	//specsXSL = specsXSL.replace("$$_NAME_$$","*");
	//}else{
		//alert("mySpecs "+mySpecs);
	specsXSL = specsXSL.replace("$$_NAME_$$",unescape(mySpecs));
	//}
	xsl = xmlParse(specsXSL);
    	viewSpecsData();
  }
  
function viewSpecsData () {
    html = xsltProcess(xml, xsl);
    writeInnerHTML(html, "mycontenthere")
  }
