var XmlHttpCat; var XmlHttpConstr; var XmlHttpExtra; var XmlHttpBannerLT; var XmlHttpBannerRT; var XmlHttpBannerLM; var XmlHttpBannerRM; var XmlHttpBannerLU; var XmlHttpBannerLMU; var XmlHttpBannerRMU; var XmlHttpBannerRU; var XmlHttpBannerClicked; function NewXMLHttp() { var Obj; if (window.XMLHttpRequest) { Obj = new XMLHttpRequest(); } else if (window.ActiveXObject) { Obj = new window.ActiveXObject("Microsoft.XMLHTTP"); } return Obj; } function LoadCatOptions(sVhcltype) { if (XmlHttpCat != null && XmlHttpCat.readyState >= 3) { delete XmlHttpCat; XmlHttpCat = null; } XmlHttpCat = NewXMLHttp(); XmlHttpCat.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpCat.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpCat.setRequestHeader("MessageType", "CALL"); XmlHttpCat.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpCat.onreadystatechange = OnReadyStateChangeCat; XmlHttpCat.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + sVhcltype + '\n' + ' \n' + ' \n' + '\n'); } function OnReadyStateChangeCat() { var sMakeId; var sDescription; var oOption; if (XmlHttpCat != null) { if (XmlHttpCat.readyState == 4) { var oXml, oNode; var sPrefix; sPrefix = "m:"; // Clear options, except option any var oSelectBox = document.getElementById("merkSelectBox"); for(i = oSelectBox.options.length; i > 0 ; i--) { oSelectBox.options[i] = null; } oXml = XmlHttpCat.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "Make"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("Make"); } for (i = 0; i < oNode.length; i++) { if (document.all) { try{ sMakeId = oNode[i].childNodes.item(0).firstChild.nodeValue; } catch (error) { sMakeId=""; } try{ sDescription = oNode[i].childNodes.item(1).firstChild.nodeValue; } catch (error) { sDescription=""; } } else { if(oNode[i].childNodes.item(1).firstChild.nodeValue != null) sMakeId = oNode[i].childNodes.item(1).firstChild.nodeValue; if(oNode[i].childNodes.item(3).firstChild.nodeValue != null) sDescription = oNode[i].childNodes.item(3).firstChild.nodeValue; } oOption = document.createElement('Option'); oSelectBox.options.add(oOption); oOption.innerHTML = sDescription; oOption.value = sMakeId; } } } } function LoadConstrOptions(sVhcltype) { if (XmlHttpConstr != null && XmlHttpConstr.readyState >= 3) { delete XmlHttpConstr; XmlHttpConstr = null; } XmlHttpConstr = NewXMLHttp(); XmlHttpConstr.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpConstr.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpConstr.setRequestHeader("MessageType", "CALL"); XmlHttpConstr.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpConstr.onreadystatechange = OnReadyStateChangeConstr; XmlHttpConstr.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + sVhcltype + '\n' + ' ' + '2' + '\n' + ' \n' + ' \n' + '\n'); } function OnReadyStateChangeConstr() { var sConstructionId; var sDescription; var oOption; if (XmlHttpConstr != null) { if (XmlHttpConstr.readyState == 4) { var oXml, oNode; var sPrefix; sPrefix = "m:"; // Clear options, except option any var oSelectBox = document.getElementById("opbouwSelectBox"); for(i = oSelectBox.options.length; i > 0 ; i--) { oSelectBox.options[i] = null; } oXml = XmlHttpConstr.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "Construction"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("Construction"); } for (i = 0; i < oNode.length; i++) { if (document.all) { try{ sConstructionId = oNode[i].childNodes.item(0).firstChild.nodeValue; } catch (error) { sConstructionId=""; } try{ sDescription = oNode[i].childNodes.item(1).firstChild.nodeValue; } catch (error) { sDescription=""; } } else { if(oNode[i].childNodes.item(1).firstChild.nodeValue != null) sConstructionId = oNode[i].childNodes.item(1).firstChild.nodeValue; if(oNode[i].childNodes.item(3).firstChild.nodeValue != null) sDescription = oNode[i].childNodes.item(3).firstChild.nodeValue; } oOption = document.createElement('Option'); oSelectBox.options.add(oOption); oOption.innerHTML = sDescription; oOption.value = sConstructionId; } } } } function CatUpdateOptions(obj) { var sVhcltype = obj.value; /* if (sVhcltype == 'CAR ') { var oWin = window.open ('http://www.trucks.nl', '_new'); if (oWin==null || typeof(oWin)=="undefined") { alert("Popups van deze site worden door uw browser geblokkeert, hierdoor kunt u niet gebruik maken van alle mogelijkheden die deze site biedt. Als u Internet Explorer heeft, kunt u met de rechter muisknop op de balk onder de adresbalk klikken en kiezen voor 'Popups voor deze site altijd toestaan'."); } sVhcltype=obj.options[0].value; } TODO: TEST CODE*/ if (document.getElementById("extraDiv") != null) LoadExtra(sVhcltype); LoadCatOptions(sVhcltype); LoadConstrOptions(sVhcltype); updateBanners(); } function LoadExtra(sVhcltype) { if (XmlHttpExtra != null && XmlHttpExtra.readyState >= 3) { delete XmlHttpExtra; XmlHttpExtra = null; } XmlHttpExtra = NewXMLHttp(); XmlHttpExtra.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpExtra.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpExtra.setRequestHeader("MessageType", "CALL"); XmlHttpExtra.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpExtra.onreadystatechange = OnchangeExtra; XmlHttpExtra.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + sVhcltype + '\n' + ' ' + '2' + '\n' + ' \n' + ' \n' + '\n'); } function OnchangeExtra() { var sConstructionId; var sDescription; var oOption; if (XmlHttpExtra != null) { if (XmlHttpExtra.readyState == 4) { var oXml; var sPrefix; var sHtml; var oNode; sPrefix = "m:"; oXml = XmlHttpExtra.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "getExtraHtmlResponse"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("getExtraHtmlResponse"); } if (document.all) { sHtml = oNode[0].childNodes.item(0).firstChild.nodeValue; } else { sHtml = oNode.item(0).textContent; } document.getElementById("extraDiv").innerHTML = sHtml; } } } function showExtra() { document.getElementById("extraTr").style.display = ""; } function LoadBannerLT(sVhcltype, sConstruction) { if (XmlHttpBannerLT != null && XmlHttpCat.readyState >= 3) { delete XmlHttpBannerLT; XmlHttpBannerLT = null; } XmlHttpBannerLT = NewXMLHttp(); XmlHttpBannerLT.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpBannerLT.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpBannerLT.setRequestHeader("MessageType", "CALL"); XmlHttpBannerLT.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpBannerLT.onreadystatechange = OnChangeBannerLT; XmlHttpBannerLT.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + 'CARSMAIN' + '\n' + ' ' + 'LT' + '\n' + ' ' + sVhcltype + '\n' + ' ' + sConstruction + '\n' + ' ' + '2' + '\n' + ' \n' + ' \n' + '\n'); } function OnChangeBannerLT() { var sConstructionId; var sDescription; var oOption; if (XmlHttpBannerLT != null) { if (XmlHttpBannerLT.readyState == 4) { var oXml; var sPrefix; var sHtml; var oNode; sPrefix = "m:"; oXml = XmlHttpBannerLT.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "BannerHtmlResponse"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("BannerHtmlResponse"); } if (document.all) { sHtml = oNode[0].childNodes.item(0).firstChild.nodeValue; } else { sHtml = oNode.item(0).textContent; } document.getElementById("Banner_LT").innerHTML = sHtml; } } } function LoadBannerRT(sVhcltype, sConstruction) { if (XmlHttpBannerRT != null && XmlHttpCat.readyState >= 3) { delete XmlHttpBannerRT; XmlHttpBannerRT = null; } XmlHttpBannerRT = NewXMLHttp(); XmlHttpBannerRT.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpBannerRT.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpBannerRT.setRequestHeader("MessageType", "CALL"); XmlHttpBannerRT.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpBannerRT.onreadystatechange = OnChangeBannerRT; XmlHttpBannerRT.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + 'CARSMAIN' + '\n' + ' ' + 'RT' + '\n' + ' ' + sVhcltype + '\n' + ' ' + sConstruction + '\n' + ' ' + '2' + '\n' + ' \n' + ' \n' + '\n'); } function OnChangeBannerRT() { var sConstructionId; var sDescription; var oOption; if (XmlHttpBannerRT != null) { if (XmlHttpBannerRT.readyState == 4) { var oXml; var sPrefix; var sHtml; var oNode; sPrefix = "m:"; oXml = XmlHttpBannerRT.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "BannerHtmlResponse"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("BannerHtmlResponse"); } if (document.all) { sHtml = oNode[0].childNodes.item(0).firstChild.nodeValue; } else { sHtml = oNode.item(0).textContent; } document.getElementById("Banner_RT").innerHTML = sHtml; } } } function LoadBannerLM(sVhcltype, sConstruction) { if (XmlHttpBannerLM != null && XmlHttpCat.readyState >= 3) { delete XmlHttpBannerLM; XmlHttpBannerRT = null; } XmlHttpBannerLM = NewXMLHttp(); XmlHttpBannerLM.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpBannerLM.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpBannerLM.setRequestHeader("MessageType", "CALL"); XmlHttpBannerLM.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpBannerLM.onreadystatechange = OnChangeBannerLM; XmlHttpBannerLM.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + 'CARSMAIN' + '\n' + ' ' + 'LM' + '\n' + ' ' + sVhcltype + '\n' + ' ' + sConstruction + '\n' + ' ' + '2' + '\n' + ' \n' + ' \n' + '\n'); } function OnChangeBannerLM() { var sConstructionId; var sDescription; var oOption; if (XmlHttpBannerLM != null) { if (XmlHttpBannerLM.readyState == 4) { var oXml; var sPrefix; var sHtml; var oNode; sPrefix = "m:"; oXml = XmlHttpBannerLM.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "BannerHtmlResponse"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("BannerHtmlResponse"); } if (document.all) { sHtml = oNode[0].childNodes.item(0).firstChild.nodeValue; } else { sHtml = oNode.item(0).textContent; } document.getElementById("Banner_LM").innerHTML = sHtml; } } } function LoadBannerRM(sVhcltype, sConstruction) { if (XmlHttpBannerRM != null && XmlHttpCat.readyState >= 3) { delete XmlHttpBannerRM; XmlHttpBannerRT = null; } XmlHttpBannerRM = NewXMLHttp(); XmlHttpBannerRM.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpBannerRM.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpBannerRM.setRequestHeader("MessageType", "CALL"); XmlHttpBannerRM.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpBannerRM.onreadystatechange = OnChangeBannerRM; XmlHttpBannerRM.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + 'CARSMAIN' + '\n' + ' ' + 'RM' + '\n' + ' ' + sVhcltype + '\n' + ' ' + sConstruction + '\n' + ' ' + '2' + '\n' + ' \n' + ' \n' + '\n'); } function OnChangeBannerRM() { var sConstructionId; var sDescription; var oOption; if (XmlHttpBannerRM != null) { if (XmlHttpBannerRM.readyState == 4) { var oXml; var sPrefix; var sHtml; var oNode; sPrefix = "m:"; oXml = XmlHttpBannerRM.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "BannerHtmlResponse"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("BannerHtmlResponse"); } if (document.all) { sHtml = oNode[0].childNodes.item(0).firstChild.nodeValue; } else { sHtml = oNode.item(0).textContent; } document.getElementById("Banner_RM").innerHTML = sHtml; } } } function LoadBannerLU(sVhcltype, sConstruction) { if (XmlHttpBannerLU != null && XmlHttpCat.readyState >= 3) { delete XmlHttpBannerLU; XmlHttpBannerRT = null; } XmlHttpBannerLU = NewXMLHttp(); XmlHttpBannerLU.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpBannerLU.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpBannerLU.setRequestHeader("MessageType", "CALL"); XmlHttpBannerLU.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpBannerLU.onreadystatechange = OnChangeBannerLU; XmlHttpBannerLU.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + 'CARSMAIN' + '\n' + ' ' + 'LU' + '\n' + ' ' + sVhcltype + '\n' + ' ' + sConstruction + '\n' + ' ' + '2' + '\n' + ' \n' + ' \n' + '\n'); } function OnChangeBannerLU() { var sConstructionId; var sDescription; var oOption; if (XmlHttpBannerLU != null) { if (XmlHttpBannerLU.readyState == 4) { var oXml; var sPrefix; var sHtml; var oNode; sPrefix = "m:"; oXml = XmlHttpBannerLU.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "BannerHtmlResponse"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("BannerHtmlResponse"); } if (document.all) { sHtml = oNode[0].childNodes.item(0).firstChild.nodeValue; } else { sHtml = oNode.item(0).textContent; } document.getElementById("Banner_LU").innerHTML = sHtml; } } } function LoadBannerLMU(sVhcltype, sConstruction) { if (XmlHttpBannerLMU != null && XmlHttpCat.readyState >= 3) { delete XmlHttpBannerLMU; XmlHttpBannerRT = null; } XmlHttpBannerLMU = NewXMLHttp(); XmlHttpBannerLMU.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpBannerLMU.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpBannerLMU.setRequestHeader("MessageType", "CALL"); XmlHttpBannerLMU.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpBannerLMU.onreadystatechange = OnChangeBannerLMU; XmlHttpBannerLMU.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + 'CARSMAIN' + '\n' + ' ' + 'LMU' + '\n' + ' ' + sVhcltype + '\n' + ' ' + sConstruction + '\n' + ' ' + '2' + '\n' + ' \n' + ' \n' + '\n'); } function OnChangeBannerLMU() { var sConstructionId; var sDescription; var oOption; if (XmlHttpBannerLMU != null) { if (XmlHttpBannerLMU.readyState == 4) { var oXml; var sPrefix; var sHtml; var oNode; sPrefix = "m:"; oXml = XmlHttpBannerLMU.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "BannerHtmlResponse"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("BannerHtmlResponse"); } if (document.all) { sHtml = oNode[0].childNodes.item(0).firstChild.nodeValue; } else { sHtml = oNode.item(0).textContent; } document.getElementById("Banner_LMU").innerHTML = sHtml; } } } function LoadBannerRMU(sVhcltype, sConstruction) { if (XmlHttpBannerRMU != null && XmlHttpCat.readyState >= 3) { delete XmlHttpBannerRMU; XmlHttpBannerRT = null; } XmlHttpBannerRMU = NewXMLHttp(); XmlHttpBannerRMU.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpBannerRMU.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpBannerRMU.setRequestHeader("MessageType", "CALL"); XmlHttpBannerRMU.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpBannerRMU.onreadystatechange = OnChangeBannerRMU; XmlHttpBannerRMU.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + 'CARSMAIN' + '\n' + ' ' + 'RMU' + '\n' + ' ' + sVhcltype + '\n' + ' ' + sConstruction + '\n' + ' ' + '2' + '\n' + ' \n' + ' \n' + '\n'); } function OnChangeBannerRMU() { var sConstructionId; var sDescription; var oOption; if (XmlHttpBannerRMU != null) { if (XmlHttpBannerRMU.readyState == 4) { var oXml; var sPrefix; var sHtml; var oNode; sPrefix = "m:"; oXml = XmlHttpBannerRMU.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "BannerHtmlResponse"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("BannerHtmlResponse"); } if (document.all) { sHtml = oNode[0].childNodes.item(0).firstChild.nodeValue; } else { sHtml = oNode.item(0).textContent; } document.getElementById("Banner_RMU").innerHTML = sHtml; } } } function LoadBannerRU(sVhcltype, sConstruction) { if (XmlHttpBannerRU != null && XmlHttpCat.readyState >= 3) { delete XmlHttpBannerRU; XmlHttpBannerRT = null; } XmlHttpBannerRU = NewXMLHttp(); XmlHttpBannerRU.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpBannerRU.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpBannerRU.setRequestHeader("MessageType", "CALL"); XmlHttpBannerRU.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpBannerRU.onreadystatechange = OnChangeBannerRU; XmlHttpBannerRU.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + 'CARSMAIN' + '\n' + ' ' + 'RU' + '\n' + ' ' + sVhcltype + '\n' + ' ' + sConstruction + '\n' + ' ' + '2' + '\n' + ' \n' + ' \n' + '\n'); } function OnChangeBannerRU() { var sConstructionId; var sDescription; var oOption; if (XmlHttpBannerRU != null) { if (XmlHttpBannerRU.readyState == 4) { var oXml; var sPrefix; var sHtml; var oNode; sPrefix = "m:"; oXml = XmlHttpBannerRU.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "BannerHtmlResponse"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("BannerHtmlResponse"); } if (document.all) { sHtml = oNode[0].childNodes.item(0).firstChild.nodeValue; } else { sHtml = oNode.item(0).textContent; } document.getElementById("Banner_RU").innerHTML = sHtml; } } } function updateBanners() { var sVhcltype = document.getElementById("categorieSelectBox").value; var sConstruction = document.getElementById("opbouwSelectBox").value; LoadBannerLT (sVhcltype, sConstruction); LoadBannerRT (sVhcltype, sConstruction); LoadBannerLM (sVhcltype, sConstruction); LoadBannerRM (sVhcltype, sConstruction); LoadBannerLU (sVhcltype, sConstruction); LoadBannerLMU(sVhcltype, sConstruction); LoadBannerRMU(sVhcltype, sConstruction); LoadBannerRU (sVhcltype, sConstruction); } function bannerClicked( iBannerDtlId ) { if (XmlHttpBannerClicked != null && XmlHttpBannerClicked.readyState >= 3) { delete XmlHttpBannerClicked; XmlHttpBannerClicked = null; } XmlHttpBannerClicked = NewXMLHttp(); XmlHttpBannerClicked.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpBannerClicked.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpBannerClicked.setRequestHeader("MessageType", "CALL"); XmlHttpBannerClicked.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpBannerClicked.onreadystatechange = OnBannerClicked; XmlHttpBannerClicked.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + iBannerDtlId + '\n' + ' \n' + ' \n' + '\n'); } function OnBannerClicked() { } var giLastVehicleId; function checkLatestVehicle() { // object (opnieuw) aanmaken. if (XmlHttpLatestVehicle != null && XmlHttpLatestVehicle.readyState >= 3) { delete XmlHttpLatestVehicle; XmlHttpLatestVehicle = null; } XmlHttpLatestVehicle = NewXMLHttp(); XmlHttpLatestVehicle.open("POST", "optionsService.wso", true); // forward slash mist geeft een error 500 XmlHttpLatestVehicle.setRequestHeader("Man", "POST optionsService.wso HTTP/1.1"); XmlHttpLatestVehicle.setRequestHeader("MessageType", "CALL"); XmlHttpLatestVehicle.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttpLatestVehicle.onreadystatechange = OnLatestReceived; XmlHttpLatestVehicle.send( '\n' + '\n' + ' \n' + ' \n' + ' ' + giLastVehicleId + '\n' + ' \n' + ' \n' + '\n'); } function OnLatestReceived() { if (XmlHttpLatestVehicle != null) { if (XmlHttpLatestVehicle.readyState == 4) { var oXml; var sPrefix; var iNewVehicleId; var oNode; sPrefix = "m:"; oXml = XmlHttpLatestVehicle.responseXML; oNode = oXml.getElementsByTagName(sPrefix + "checkLatestVehicleResult"); if(oNode === null || typeof(oNode) === "undefined" || oNode.length === 0){ oNode = oXml.getElementsByTagName("checkLatestVehicleResult"); } if (document.all) { iNewVehicleId = oNode[0].childNodes.item(0).firstChild.nodeValue; } else { iNewVehicleId = oNode.item(0).textContent; } if (iNewVehicleId != 0) { window.location.reload(); } else { window.setTimeout("checkLatestVehicle();", 10000); } // // giLastVehicleId = iNewVehicleId; } } }