               function detail_link(name,pid)
                    {
                      var urlink="";
                      for(i=0; i < productid_arr.length; i++)
                      {
                         var vals = productid_arr[i].split(',');
                         if(vals[0] == name)
                         {
                            urlink='/ih/cardetail/'+'?'+'ew_5_p_id'+'='+vals[2]+'&'+'ew_6_p_id'+'='+vals[2];
                         }
                      }
                      document.location.href = urlink + "&amp;product_category_id" + "=" + pid;
                    }


function detail_link(name,pid,url)
          {
                      var urlink="";
                      var cnt = 0;
                      var len = productid_arr.length;
                      for(i=0; i < len; i++)
                      {
                         var vals = productid_arr[i].split(',');
                              
                         if(vals[4] == name)
                         {
                            cnt = eval(cnt) + eval(1);
                            urlink ='/ih/cardetail/'+vals[1]+'&'+'ew_6_p_id'+'='+vals[2]+'&'+'news_category_id'+'='+vals[3];
                         }
                      }
                      if(cnt == 1)
                          document.location.href = urlink + "&"+"product_category_id" + "=" + pid;
                      if(cnt == 0 || cnt > 1)
                          document.location.href = "/ih/cartype-landing/"+url;
}      
function changeHyperLink(id,toogler,name)
{
     if(toogler)
     {
         document.getElementById('link_'+id).href= 'javascript:detail_link(\'' + name + '\',\'' + id+'\')';
     }
     else
     {
         document.getElementById('link_'+id).href= '#';
     }
}


   function change_url()
   {
       if(document.getElementById('dropdown').value != "select")
            document.location.href = document.getElementById('dropdown').value;
   }

     function image_store(path,width,height)
     {
      ImageMatrix[index] = new Array(2);
      ImageMatrix[index][0] = path;
      ImageMatrix[index][1] = width;
      ImageMatrix[index][2] = height;
      index = eval(index)+eval(1);          
     }


function create_xml(xml)
{
 xml = xml + open_tag + '/categories' + close_tag;
     xml = escape(xml);
if (AC_FL_RunContent == 0) {
  alert("This page requires AC_RunActiveContent.js.");
 } else {
  AC_FL_RunContent(
   'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
   'width', '100%',
   'height', '340',
   'src', '/ih/upload/files/templates/flashfiles/ihgallerynew',
   'quality', 'high',
   'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
   'align', 'middle',
   'play', 'true',
   'loop', 'true',
   'scale', 'showall',
   'wmode', 'transparent',
   'devicefont', 'false',
   'id', 'IHGallery',
   'name', 'IHGallery',
   'menu', 'false',
   'allowFullScreen', 'false',
   'allowScriptAccess','sameDomain',
   'movie', '/ih/upload/files/templates/flashfiles/IHGallery',
   'salign', '',
   'flashvars','xml'+  '=' +xml
   ); //end AC code
 }

}


/* Car detail - Specification */


function displayMe(obj) {

}

function specDisplay(obj) {       
          prodname= obj.title;
          document.getElementById("prodheading1").innerHTML = prodname + " :";  
          document.getElementById("prodheading2").innerHTML = prodname + " :";  
          var tabarray = document.getElementById("spec_tab1").childNodes;  
          var tabarray2 = document.getElementById("spec_tab2").childNodes;  
          prodid = prodname + "_tab1";
          for(var i=0;i<tabarray.length;i++)
          {  
               if(tabarray[i].id !=prodid)
               {   
                    tabarray[i]. className="unsel_tab_img";     
                    tabarray2[i]. className="unsel_tab_img";     
               }
               else
               {   
                    tabarray[i]. className="sel_tab_img";          
                    tabarray2[i]. className="sel_tab_img";        

               }
          }
     
          var prodarray = document.getElementById("spec_titles1").childNodes; 
          var prodarray2 = document.getElementById("spec_titles2").childNodes; 
          
          for(var i=0;i<prodarray.length;i++)
          {  
               if(prodarray[i].getAttribute("name")!=prodname)
               {    
                     prodarray[i].style. display="none";          
               }
               else
               {          
                    $(prodarray[i]).slideDown("slow");//.style. display="block";          
                           
               }
          }
          for(var i=0;i<prodarray2.length;i++)
          {  
               if(prodarray2[i].getAttribute("name")!=prodname)
               {    
                     prodarray2[i].style. display="none";          
               }
               else
               {          
                    $(prodarray2[i]).slideDown("slow");//.style. display="block";          
                           
               }
          }
     }

function showBigImage(imgUrl)
{
 var currentImgPath = imgUrl;
 $("#car_largeimg").fadeOut(400, function() {
      this.style.backgroundImage = "url('" + currentImgPath + "')"; // document.getElementById("car_largeimg")
      this.style.backgroundRepeat = "no-repeat"; 
      this.style.backgroundColor = "black";
 });
 $("#car_largeimg").fadeIn(400);
}


function popupPage(popurl, w, h) {
var windowprops = "location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes" +
", left=" + 50 + ", top=" + 50 + ", width=" + w + ", height=" + h;
popup = window.open(popurl,"MenuPopup",windowprops);

}

