function addCustomRimsToCart(pId, qtyName, uP){							
document.fToCart.pId.value=pId;
document.fToCart.qty.value=document.getElementById(qtyName).value;
document.fToCart.uP.value=uP;					
document.fToCart.submit();		
}
function UpdateIt(id){
    var idx = document.getElementById("Size_"+id).selectedIndex;    
    var size = document.getElementById("Size_"+id)[idx].value;
    idx = document.getElementById("Finish_"+id).selectedIndex;   
    var finish = document.getElementById("Finish_"+id)[idx].value;
    var weight = document.getElementById("Weight_"+id).value;
    idx = document.getElementById("IsActive_"+id).selectedIndex;   
    var isAct = document.getElementById("IsActive_"+id)[idx].value;
    idx = document.getElementById("IsBlowOut_"+id).selectedIndex;   
    var isBlowOut = document.getElementById("IsBlowOut_"+id)[idx].value;
    idx = document.getElementById("IsOnSale_"+id).selectedIndex;   
    var isOnSale = document.getElementById("IsOnSale_"+id)[idx].value;
    idx = document.getElementById("IsDiscontinue_"+id).selectedIndex;   
    var isDisc = document.getElementById("IsDiscontinue_"+id)[idx].value;
    var shipping = document.getElementById("Shipping_"+id).value;
    var blowOut = document.getElementById("BlowOut_"+id).value;
    var onSale = document.getElementById("OnSale_"+id).value;
    var newPrice = document.getElementById("NewPrice_"+id).value;
    AjUrl = "AJEditRim.aspx?pId="+id+"&size="+size+"&finish="+finish+"&weight="+weight+"&isActive="+isAct+"&isBlowOut="+isBlowOut+"&isOnSale="+isOnSale+"&isDisc="+isDisc+"&shipping="+shipping+"&blowOut="+blowOut+"&onSale="+onSale+"&newPrice="+newPrice;    
    display = document.getElementById('msg');
    callServer();
}
function callVoiceDescription(brandStyle, output){
    document.getElementById(output).style.display = "block";
    display = document.getElementById(output);
    AjUrl = "VoiceDescription.aspx?f="+brandStyle;    
    callServer();   
}
function loadCar(form){	
	var curURL = location.href;
	var todo = "W";
    if(curURL.indexOf("DiscountTire.aspx") > -1)
	    todo = "T";
	else if(curURL.indexOf("CarRimGalleryList.aspx") > -1)
	    todo = "G";
	AjUrl = "AjaxSearchVehicle.aspx?input="+form.value+"&do="+todo;	
	display = document.getElementById('output');
	callServer();					
}
function loadRimByStyle(form){		       
	AjUrl = "AjaxSearchWheelStyle.aspx?s="+form.value;		
	display = document.getElementById('output');
	callServer();					
}
function updateSimilar(b, s, si){
    AjUrl = "AJSimilarWheel.aspx?b="+b+"&s="+s+"&si="+si;		
    //alert("AJ: "+AjUrl);
	display = document.getElementById('output');
	callServer();
}
function loadRimByBrand(form){	    
	AjUrl = "AjaxSearchWheelStyle.aspx?b="+form.value;	
	display = document.getElementById('output');
	callServer();					
}
function loadGalleryByStyle(form){		       
	AjUrl = "AjaxSearchGalleryByWheel.aspx?s="+form.value;		
	display = document.getElementById('output');
	callServer();					
}
function loadGalleryByBrand(form){	    
	AjUrl = "AjaxSearchGalleryByWheel.aspx?b="+form.value;	
	display = document.getElementById('output');
	callServer();					
}
function onOffStyle(brandId, styleId, onOff){
    AjUrl = "OnOffStyle.aspx?b="+brandId+"&s="+styleId+"&off="+onOff;	
	display = document.getElementById('onOff_'+brandId+styleId);
	callServer();
}
function checkFitment(sId, s, w, o){				
window.open('/str/Fitment.aspx?sId='+sId+'&s='+s+'&w='+w+'&o='+o,'', 'left=200,top=100,width=560,height=760,toolbar=no,menubar=no,location=no,resizable=1');		 
}
function checkFitment(sId, s, w, o, bp){				
window.open('/str/Fitment.aspx?sId='+sId+'&s='+s+'&w='+w+'&o='+o+'&bp='+bp,'', 'left=200,top=100,width=560,height=760,toolbar=no,menubar=no,location=no,resizable=1');		 
}
<!--
menu_status = new Array(); 
var tId = "";
function show(sId, s){						
if (document.getElementById) {
var switch_id = document.getElementById('dQuestion');				
switch_id.className = 'show';
menu_status['dQuestion'] = 'show';
document.getElementById('dQuestion').style.left = 500;
document.getElementById("sId").innerHTML = "<b>TITLE: Question about style "+sId+" and size "+s+"</b>";
document.getElementById("subject").value = "Question about wheel: style "+sId+" and size "+s;				
}
}
function toggle(img, whichLayer){
    if (document.getElementById){
        // this is the way the standards workvar 
        style2 = document.getElementById(whichLayer).style;            
        style2.display = (style2.display == "none") ? "block":"none";        
        if(style2.display.indexOf("none") < 0){
            img.src = "http://www.specialrims.com/../images/minus.gif";                                      
        }else{
            img.src = "http://www.specialrims.com/../images/plus.gif";               
        }        
    }else if (document.all){
        // this is the way old msie versions workvar 
        style2 = document.all[whichLayer].style;
        style2.display =  (style2.display == "none") ? "block":"none";
        if(style2.display == "none"){
            img.src = "../images/minus.gif";                       
        }else{
            img.src = "../images/plus.gif";    
        }
    }else if (document.layers){
        // this is the way nn4 worksvar 
        style2 = document.layers[whichLayer].style;
        style2.display =  (style2.display == "none") ? "block":"none";
        if(style2.display == "none"){
            img.src = "../images/minus.gif";                       
        }else{
            img.src = "../images/plus.gif";    
        }
    }
    }
function hide(){
var switch_id = document.getElementById('dQuestion');
switch_id.className = 'hide';
menu_status['dQuestion'] = 'hide';
}
	


menu_status = new Array(); 

function showHide(theid){
if (document.getElementById) {
var switch_id = document.getElementById(theid);

if(menu_status[theid] != 'show') {
    switch_id.className = 'show';
    menu_status[theid] = 'show';
    //document.getElementById('sign').src="../../media_files/minus.gif";          
}else{
    switch_id.className = 'hide';
    menu_status[theid] = 'hide';
    //document.getElementById('sign').src="../../media_files/plus.gif";
}
}
}

//-->
var content = "";
var display = "";
var AjUrl = "";
var browser = new Browser()
function Browser(){
var ua, s, i;
this.isIE    = false;
this.isNS    = false;
this.version = null;
ua = navigator.userAgent;
s = "MSIE";
if ((i = ua.indexOf(s)) >= 0) {
this.isIE = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}
s = "Netscape6/";
if ((i = ua.indexOf(s)) >= 0) {
this.isNS = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}
s = "Gecko";
if ((i = ua.indexOf(s)) >= 0) {
this.isNS = true;
this.version = 6.1;
return;
}
}
var browser = new Browser();
function loadTireSize(form, loc){
    var size = form.options[form.selectedIndex].value;
    AjUrl = "AjaxTireSizeList.aspx?rz="+size;
    display = document.getElementById(loc);
    callServer();
}
function loadTires(form, rimId, rimPrice, divName){	
diName = divName;
AjUrl = "WheelandTirePackage.aspx?tiresize="+form.options[form.selectedIndex].value+"&rimId="+rimId+"&rimPrice="+rimPrice;
callServer();
display = document.getElementById("pack_"+divName);				
}
function loadTireOptions(make, year, model, rimId, rimPrice, rimSize, divName, rec, sortBy){
diName = divName;

AjUrl = "TireOptions.aspx?make="+make+"&year="+year+"&model="+model+"&rimId="+rimId+"&rimPrice="+rimPrice+"&rimSize="+rimSize+"&sortBy="+sortBy+"&rec="+rec+"&div="+divName;
callServer();
display = document.getElementById("pack_"+divName);	
}
function addToView(dis, pId){
display = document.getElementById(dis);
AjUrl = "ViewedItemAjax.aspx?pid="+pId;
callServer();
}
function callCarInfo(dis){    
    display = document.getElementById(dis);
    AjUrl = "CarAjax.aspx";
    callServer();    
}
function callCarInfoByYear(dis){  
    display = document.getElementById(dis);
    var idx = document.getElementById("cYear").selectedIndex;
    var year = document.getElementById("cYear")[idx].value;  
    AjUrl = "CarAjax.aspx?cYear="+year;
    callServer();    
}
function callCarInfoByYearMake(dis){    
    display = document.getElementById(dis);
    var year = document.getElementById("cYear").value;
    var idx = document.getElementById("cMake").selectedIndex;
    var make = document.getElementById("cMake")[idx].value;
    AjUrl = "CarAjax.aspx?cYear="+year+"&cMake="+make;
    callServer();    
}
function callCarInfoByYearMakeModel(dis){    
    display = document.getElementById(dis);
    var year = document.getElementById("cYear").value;
    var make = document.getElementById("cMake").value;
    var idx = document.getElementById("cModel").selectedIndex;
    var model = document.getElementById("cModel")[idx].value;
    AjUrl = "CarAjax.aspx?cYear="+year+"&cMake="+make+"&cModel="+model;
    var curURL = location.href;
    if(curURL.indexOf("DiscountTire.aspx") > -1)
        window.location = "CarTire.aspx?sz=ANY&carYear="+year+"&carMake="+make+"&carModel="+model;
    else    
        callServer();    
}
function callWheelInfo(rimDis){     
    display = document.getElementById(rimDis);
    AjUrl = "WheelStyleAjax.aspx";
    callServer();    
}
function callWheelInfoByBrand(rimDis){        
    display = document.getElementById(rimDis);
    var idx = document.getElementById("wBrand").selectedIndex;
    var brand = document.getElementById("wBrand")[idx].value;
    AjUrl = "WheelStyleAjax.aspx?wBrand="+brand;
    callServer();    
}
function callWheelInfoByBrandStyle(rimDis){    
    display = document.getElementById(rimDis);
    var brand = document.getElementById("wBrand").value;
    var idx = document.getElementById("wStyle").selectedIndex;
    var style = document.getElementById("wStyle")[idx].value;
    AjUrl = "WheelStyleAjax.aspx?wBrand="+brand+"&wStyle="+style;
    callServer();    
}

function callGalleryById(dis, id){
 display = document.getElementById(dis);
 AjUrl = "CarGalleryByIdAjax.aspx?gId="+id;
 callServer();  
}

var bFilter = "";
var sFilter = "";
var pFilter = "";
var fFilter = "";
function callByVehicleResult(){   
    var curURL = location.href;
    if(curURL.indexOf("ChromeRimsByVehicleResult.aspx") > -1)
        AjUrl = "ByVehicleResultAjax.aspx?brand="+bFilter
    else if(curURL.indexOf("CarRims.aspx") > - 1)
        AjUrl = "AjaxSearchWheelStyle.aspx?brand="+bFilter
    else{
        var idx = curURL.lastIndexOf("/");        
        sFilter = curURL.substr(idx+22, 2);        
        AjUrl = "AjaxWheelBySize.aspx?brand="+bFilter
    }   
    if(sFilter.length > 0)
    AjUrl +="&size="+sFilter;
    if(pFilter.length > 0)
    AjUrl +="&price="+pFilter;
    if(fFilter.length > 0)
    AjUrl +="&feature="+fFilter;
   //alert("ajUrl="+AjUrl);
 callServer();
}
function callLink(dis, url){
    display = document.getElementById(dis);
    AjUrl = url;
    callServer();
}
function filterFeatureCodi(){
    var temp = fFilter;
    var dropdownIndex = document.getElementById('sCombine').selectedIndex;
    var combine = document.getElementById('sCombine')[dropdownIndex].value;
    if(combine == "AND"){
        temp = replaceAll(temp, "OR", "AND");        
    }else{
        temp = temp.substring(4);
        temp = replaceAll(temp, "AND", "OR");
        temp = "AND"+temp;
    }
    fFilter = temp;
    callByVehicleResult();
}
function replaceAll(str, repl, by){
    idx = str.indexOf(repl);    
    while(idx > -1){
        str = str.replace(repl, by);
        idx = str.indexOf(repl);
    }
    return str;
}
function filterByFeature(obj, dis){
var dropdownIndex = document.getElementById('sCombine').selectedIndex;
var combine = document.getElementById('sCombine')[dropdownIndex].value;

    display = document.getElementById(dis);
    var isAdd = obj.checked;    
    var val = obj.value;
    if(fFilter.length == 0){
        if(isAdd)
            fFilter = " AND ( specification LIKE @"+val+"~)";
    }else{
        var temp = fFilter;
        if(isAdd){
            if(temp.indexOf(val) < 0){
                temp = temp.replace(")","");                
                temp += " "+combine+" specification LIKE @"+val+"~)";
            }
        }else{                  
            if(temp.lastIndexOf(combine) < 2){
                alert("Narrow down by FEATURE will not be used");
                temp = "";                
            }else{  
                var removed = " "+combine+" specification LIKE @"+val+"~";            
                var idx = temp.indexOf(removed);
                var len = 0;
                if(combine == "OR")
                    len = val.length + 25;
                 else
                    len = val.length + 26;
                if(idx > -1){                
                    var pre = temp.substring(0, idx);
                    var tail = temp.substr(idx+len);
                    temp = pre+tail;
                }else{                                
                    removed = " specification LIKE @"+val+"~ "+combine;                 
                    idx = temp.indexOf(removed);
                    if(idx > -1){                    
                        if(combine == "OR")
                            len = val.length + 25;
                         else
                            len = val.length + 26;
                        pre = temp.substring(0, idx);
                        tail = temp.substring(idx+len);
                        temp = pre +tail;
                    }
                }
          }
        }
        fFilter = temp;
    }
    callByVehicleResult();
}
function filterByPrice(obj, dis){    
    display = document.getElementById(dis);
    var isAdd = obj.checked;
    
    var val = obj.value;
    if(pFilter.length == 0){
        if(isAdd)
            pFilter =   " AND ( RegularPrice between " + val + ")";
    }else{    
        var temp = pFilter;        
        if (isAdd)
        {
            if(temp.indexOf(val) < 0){                
                temp = temp.replace(")","");                
                temp +=  " OR RegularPrice between " + val + ")";                    
            }
        }
        else
        {   if(temp.lastIndexOf("OR") < 2){
                alert("Narrow down by PRICE will not be used");
                temp = "";                
            }else{
                var removed = " OR RegularPrice between " + val + "";
                var idx = temp.indexOf(removed);
                var len = val.length +25;
                if(idx > -1){
                    var pre = temp.substring(0, idx);
                    var tail = temp.substr(idx+len);
                    temp = pre+tail;
                }else{
                    removed = " RegularPrice between " + val + " OR";
                    idx = temp.indexOf(removed);
                    if(idx > -1){
                        len = val.length+25;
                        pre = temp.substring(0, idx);
                        tail = temp.substring(idx+len); 
                        temp = pre+tail;           
                    }
                }  
             }                      
        }
        pFilter = temp;                
    }    
    callByVehicleResult();
}

function filterBySize(obj, dis){
    display = document.getElementById(dis);
    var isAdd = obj.checked;
    
    var val = obj.value;
    if(sFilter.length == 0){
        if(isAdd)
            sFilter =   " AND Intprop1 IN(" + val + ")";
    }else{    
        var temp = sFilter;        
        if (isAdd)
        {
            if(temp.indexOf(val) < 0){
                temp = temp.replace(")", "");
                temp += ", " + val + ")";                        
            }
        }
        else
        {
            if(temp.lastIndexOf(",") < 2){
                alert("Narrow down by SIZE will not be used");
                temp = "";                
            }else{
                var removed = ", " + val + "";
                var idx = temp.indexOf(removed);
                var len = val.length +2;
                if(idx > -1){
                    var pre = temp.substring(0, idx);
                    var tail = temp.substr(idx+len);
                    temp = pre+tail;
                }else{
                    removed = ""+val+",";
                    idx = temp.indexOf(removed);
                    if(idx > -1){
                        len = val.length+1;
                        pre = temp.substring(0, idx);
                        tail = temp.substring(idx+len); 
                        temp = pre+tail;           
                    }
                }                        
                temp.replace(removed, "");            
            }
        }
        sFilter = temp;           
    }
    callByVehicleResult();
}
function filterByBrand(obj, dis){
    display = document.getElementById(dis);
    var isAdd = obj.checked;
    
    var val = obj.value;
    if(bFilter.length == 0){
        if(isAdd)
            bFilter =   " AND Brand IN(*" + val + "*)";
    }else{    
        var temp = bFilter;        
        if (isAdd)
        {
            if(temp.indexOf(val) < 0){
                temp = temp.replace(")", "");
                temp += ", *" + val + "*)";                        
            }
        }
        else
        {
            if(temp.lastIndexOf("*") < 2){
                alert("Narrow down by BRAND will not be used");
                temp = "";                
            }else{
                var removed = ", *" + val + "*";
                var idx = temp.indexOf(removed);
                var len = val.length +4;
                if(idx > -1){
                    var pre = temp.substring(0, idx);
                    var tail = temp.substr(idx+len);
                    temp = pre+tail;
                }else{
                    removed = "*"+val+"*,";
                    idx = temp.indexOf(removed);
                    if(idx > -1){
                        len = val.length+3;
                        pre = temp.substring(0, idx);
                        tail = temp.substring(idx+len); 
                        temp = pre+tail;           
                    }
                }            
                temp.replace(removed, ""); 
             }           
        }
        bFilter = temp;           
    }
    callByVehicleResult();
}
function updateShippingStatus(form, oId, ss){		
	var track = document.getElementById("t_"+oId).value;	
	if(track.length < 1){
		alert("Tracking number required!");
		return;
	}
	AjUrl = "AJChangeShippingStatus.aspx?oId="+oId+"&ss="+ss+"&track="+track;
	callServer();
	display = document.getElementById(form);		
}
function updateOrderStatus(form, oId, os){			
	AjUrl = "AJChangeShippingStatus.aspx?oId="+oId+"&os="+os;
	callServer();
	display = document.getElementById(form);		
}

//==================================================================
var xmlHttp = false;
try{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}catch(ex){
		xmlHttp = false;
}
}
if(window.XMLHttpRequest) {
try {
xmlHttp = new XMLHttpRequest();
} catch(e) {
xmlHttp = false;
}
}
if(!xmlHttp && typeof XMLHttpRequest != 'undefined'){
xmlHttp = new XMLHttpRequest();
}
function callServer(){        
var url = AjUrl;					
xmlHttp.open("GET", url, true);					
xmlHttp.onreadystatechange = updatePage;
xmlHttp.send(null);
}
function updatePage(){
if(xmlHttp.readyState == 4){
var response = xmlHttp.responseText;
content = response;
try{
	display.innerHTML=  content;
}catch (e) {	
display.innerHTML = "";
var wrappingDiv = document.createElement('div');
wrappingDiv.innerHTML = content;
display.appendChild(wrappingDiv);				
}
}
}
function addCapToCart(pId, qtyName, uP){
document.fToCart.pId.value=pId;
document.fToCart.qty.value=document.getElementById(qtyName).value;						   
document.fToCart.uP.value=uP;					
document.fToCart.submit();	
}
function addTireToCart(pId, qtyName, uP){							
document.fToCart.pId.value=pId;
document.fToCart.qty.value=document.getElementById(qtyName).value;						   
document.fToCart.uP.value=uP;					
document.fToCart.submit();		
}
function addBestOfferRimsToCart(pId, uP){							
document.fToCart.pId.value=pId;
document.fToCart.qty.value='1';
document.fToCart.uP.value=uP;					
document.fToCart.submit();		
}
function addCustomRimPackageToCart(pId, uP, pId2, uP2){
document.fToCart.isPack.value="1";
document.fToCart.pId.value=pId;		
document.fToCart.qty.value="4";		
document.fToCart.uP.value=uP;					
document.fToCart.pId2.value=pId2;				
document.fToCart.uP2.value=uP2;					
document.fToCart.submit();		
}
function offerDecide(todo, custId, auId, price){
	var expired= window.prompt("How many days for this offer?","5");
	document.fDecide.todo.value = todo;
	document.fDecide.custId.value = custId;				
	document.fDecide.auId.value = auId;				
	document.fDecide.price.value = price;
	document.fDecide.expired.value = expired;
	document.fDecide.action = "OfferDecison.aspx?todo="+todo+"&custId="+custId+"&auId="+auId+"&price="+price+"&expired="+expired;
	document.fDecide.submit();
	
}
//===========================================================
//display functions
//===========================================================
function getObject( obj ) {
  if ( document.getElementById ) {
    obj = document.getElementById( obj );
  } else if ( document.all ) {
    obj = document.all.item( obj );
  } else {
    obj = null;
  }  
  return obj;
}
function moveObject( obj, content, e ) {
  var tempX = 0;
  var tempY = 0;
  var offset = 5;
  var objHolder = obj;
  obj = getObject( obj );
  if (obj==null) return;
  if (document.all) {
    tempX = event.clientX + document.body.scrollLeft;
    tempY = event.clientY + document.body.scrollTop;
  } else {
    tempX = e.pageX;
    tempY = e.pageY;
  }
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}
  obj.style.top  = (tempY + offset) + 'px';
  obj.style.left = (tempX + offset) + 'px';
  displayObject( objHolder, content, true );
}
function displayObject( obj, content, show ) {
  obj = getObject( obj );
  if (obj==null) return;
  obj.innerHTML = "content"+content+"<=";
  obj.style.display = show ? 'block' : 'none';
  obj.style.visibility = show ? 'visible' : 'hidden';
}
function displayGalCar(obj, dis, galId){
    var imgSrc = obj.src;    
    imgSrc = imgSrc.replace("small", "thumbnails");
    var content = "<a href=\"javascript:callGalleryById('dShowCar','"+galId+"'); disableThumbnail('dGalThumbnails');\"><img src='"+imgSrc+"' border=0></a>";
    displayThumbnail(obj, dis, content);
}
function displayRimStyle(obj, dis, brand, styleId){
    var imgSrc = obj.src;    
    imgSrc = imgSrc.replace("small", "thumbnails");
    var content = "<a href='WheelRimsTirePackage.aspx?rimsBrand="+brand+"&rimsStyle="+styleId+"'><img onmouseout=\"disableThumbnail('dWheelStyle')\" src='"+imgSrc+"' border=0></a>";
    displayThumbnail(obj, dis, content);
}
function editRimStyle(obj, dis, brand, styleId){
    var imgSrc = obj.src;    
    imgSrc = imgSrc.replace("small", "thumbnails");
    var content = "<a href='../admin/EditRim.aspx?brand="+brand+"&style="+styleId+"'><img onmouseout=\"disableThumbnail('dWheelStyle')\" src='"+imgSrc+"' border=0></a>";
    displayThumbnail(obj, dis, content);
}
function displayTireStyle(obj, dis, brand){
    var imgSrc = obj.src;    
    imgSrc = imgSrc.replace("small", "thumbnails");
    var content = "<a href='DiscountTire_"+brand+".aspx'><img onmouseout=\"disableThumbnail('"+dis+"')\" src='"+imgSrc+"' border=0></a>";
    displayThumbnail(obj, dis, content);
}
//===========================
var head = "";
head = "<table cellSpacing=0 cellPadding=0 width='350'>";
head +="<tr>";
head +="<td align=right><IMG src='../../images/dialogTL.gif'></td>";
head +="<td align=right background=../../images/dialogTBG.gif><a href=\"javascript:closeDialog('@@');\"><img src='../../images/dialogClose.gif' border=0 /></a></td>";
head +="<td><IMG src='../../images/dialogTR.gif'></td>";
head +="</tr>";
head +="<tr>";
head +="<td width=1 background=../../images/dialogLBG.gif></td>";
head +="<td bgcolor='#e7e8e8' align=center valign=top>";
var foot = "";	
foot +="</td>";
foot +="<td background=../../images/dialogRBG.gif></td>";
foot +="</tr>";
foot +="<tr>";
foot +="<td align=right><img src=../../images/dialogBL.gif></td>";
foot +="<td background=../../images/dialogBBG.gif></td>";
foot +="<td><img src=../../images/dialogBR.gif></td>";
foot +="</tr>";
foot +="</table>";
//===========================

function displayRateEntry(loc, show, brand, style){
AjUrl = "AjaxRateProduct.aspx?do=R&brand="+brand+"&style="+style;
var obj = getObject(loc);
dis = getObject(show);
dis.style.top  = obj.offsetTop-150;
dis.style.left = obj.offsetLeft+100;
dis.style.display = 'block';
dis.style.visibility = 'visible';
var start = head.replace("@@", show);
dis.innerHTML = start+"<iframe src='"+AjUrl+"' width=340 height=370 frameborder=0 align=middle bgcolor='#ededed' marginwidth=1 marginheight=1></iframe>"+foot;
}
function displayQuestionEntry(loc, show, brand, style, catId){
AjUrl = "AjaxQuickQuestion.aspx?b="+brand+"&s="+style+"&c="+catId;
var obj = getObject(loc);
dis = getObject(show);
dis.style.top  = obj.offsetTop-150;
dis.style.left = obj.offsetLeft+100;
dis.style.display = 'block';
dis.style.visibility = 'visible';
var start = head.replace("@@", show);
dis.innerHTML = start+"<iframe src='"+AjUrl+"' width=500 height=390 frameborder=0 align=middle bgcolor='#ededed' marginwidth=1 marginheight=1></iframe>"+foot;
}

function displayTire(obj, show, tId){
    AjUrl = "AjaxTire.aspx?tId="+tId;
   // var obj = getObject(loc);
    dis = getObject(show);
    dis.style.top  = obj.offsetTop+12;
    dis.style.left = obj.offsetLeft;
    dis.style.display = 'block';
    dis.style.visibility = 'visible';
    display = dis;
    callServer();
    dis.innerHTML = display.innerHTML;
    highlineTire(tId);    
}
var originColor = "";
function highlineTire(tId){
    var v = getObject("v_"+tId);
    originColor = v.style.background;    
    v.style.background = '#ddf2ff';
    var b = getObject("b_"+tId);
    b.style.background = '#ddf2ff';
    var s = getObject("s_"+tId);
    s.style.background = '#ddf2ff';
    var z = getObject("z_"+tId);   
    z.style.background = '#ddf2ff';
    var p = getObject("p_"+tId);   
    p.style.background = '#ddf2ff';
    var a = getObject("a_"+tId);   
    a.style.background = '#ddf2ff';  
}
function closeDialog(show){    
    var dis = getObject(show);
    dis.style.visibility = 'hidden';
}
function displayThumbnail(obj, dis, content){
    dis = getObject(dis);        
    dis.innerHTML = content
    dis.style.top  = obj.offsetTop;
    dis.style.left = obj.offsetLeft;
    dis.style.display = 'block';
    dis.style.visibility = 'visible';
}
function disableThumbnail(dis){
    dis = getObject(dis);
    dis.style.display = 'none';
    dis.style.visibility = 'hidden';
}
function disableTireDetail(dis, tId){
    dis = getObject(dis);
    dis.style.display = 'none';
    dis.style.visibility = 'hidden';
    var v = getObject("v_"+tId);    
    v.style.background = originColor;
    var b = getObject("b_"+tId);
    b.style.background = originColor;
    var s = getObject("s_"+tId);
    s.style.background = originColor;
    var z = getObject("z_"+tId);   
    z.style.background = originColor;
    var p = getObject("p_"+tId);   
    p.style.background = originColor;
    var a = getObject("a_"+tId);   
    a.style.background = originColor;
}
var depth = 5 // in pixels
//window.onload = function() {
function applyShadow() {
var a = document.all ? document.all : document.getElementsByTagName('*');
for (var i = 0;i < a.length;i++) {
	if (a[i].className == "shadow") {
		for (x = 0;x < depth;x++) {
			var newSd = document.createElement("DIV")
			newSd.className = "shadow2"
			if (a[i].id == "") {
				newSd.style.background = "black"
				}
			else {
				newSd.style.background = a[i].id
				}
			newSd.style.width = a[i].offsetWidth + "px"
			newSd.style.height = a[i].offsetHeight + "px"
			newSd.style.left = a[i].offsetLeft + x + "px"
			newSd.style.top = a[i].offsetTop + x + "px"
			document.body.appendChild(newSd)
			}
		}
	}
}  


