document.write("<script type='text/javascript' src='/scripts/jquery-latest.js'></script>");
document.write("<script type='text/javascript' src='/scripts/jquery.ui.thickbox-compressed.js'></script>");
function govehicle() {
        if (document.leftnav.year.selectedIndex == 0 || 
	    document.leftnav.make.selectedIndex == 0 || 
	    document.leftnav.model.selectedIndex == 0)  {
	       alert("Please Choose the year, make & model of your vehicle");
	       return false;
	}
        document.leftnav.action = "/bodystyle.html";
	document.leftnav.page.value = "/tirelist.html";
        document.leftnav.submit();
}

 function filllist(opt,page,qstr) {
             if (opt.selectedIndex.value == 0) {
	               return false;
	     }
 var strURL = 'http://'+window.location.host+'/'+page+'.html';
 getlist(strURL,qstr,opt);
}
function getlist(strURL,qstr,listobj){
            var xmlHttpReq = false;
	    var self = this;
	    // Mozilla/Safari
	    if (window.XMLHttpRequest) {
	           self.xmlHttpReq = new XMLHttpRequest();
  	    }
	    // IE
	    else if (window.ActiveXObject) {
	        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	    }
	    self.xmlHttpReq.open('POST', strURL, true);
	    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
            self.xmlHttpReq.onreadystatechange = function() {
                if (self.xmlHttpReq.readyState == 4) {
                    loadlist(listobj,self.xmlHttpReq.responseText);
                }
	    }
	    self.xmlHttpReq.send(qstr);
}
function loadlist (obj,str) {
                var i;
                var temp = new Array();
                var temp1 = new Array();
                temp = str.split(',');
                obj.length = 0;
                for (i in temp) {
                        temp1 = temp[i].split('|');
                        obj.options[i] = new Option(temp1[0],temp1[1]);
                }
               obj.options[i] = null;
               obj.options[0] = null;
               //obj.disabled = false;
}


function gosignup() {
  document.header.signup.value = document.email.signupemail.value;
  document.header.action = "/sign-up.html";
  document.header.method="post";
  document.header.submit();

}
function jumpto(page) {
   if (page == "") {
   	document.header.action='/index.html';
   }
   else {
   	document.header.action=page;
   }
   document.header.method="post";
   document.header.submit();
}
function jumpregion(page) {
   document.header.region.value='';
   document.header.action="/selectregion.html";
   document.header.page.value=page;
   document.header.method="get";
   document.header.submit();
	
}
function gowheelbrand(mfg) {
    document.header.action = "wheelbrand.html";
	document.header.brandname.value=mfg;
	document.header.submit();
}
function gobrand(mfg) {
        document.header.action = "/tirebrand.html";
	document.header.brandname.value=mfg;
	document.header.submit();
}

function popup(url,h,w) {
	var wint = (screen.height-h)/2;
	var winl = (screen.width-w)/2;
	window.open(url,'','height='+h+',width='+w+',top='+wint+',left='+winl+'')
}






