﻿var imgObj1=new Image();
imgObj1.src='/images/shape-on.gif';
var imgObj2=new Image();
imgObj2.src='/images/color-on.gif';
var imgObj3=new Image();
imgObj3.src='/images/price-on.gif';
var imgObj4=new Image();
imgObj4.src='/images/grid-on.gif';
var imgObj5=new Image();
imgObj5.src='/images/list-on.gif';
var imgObj6=new Image();
imgObj6.src='/images/text-on.gif';
var imgObj7=new Image();
imgObj7.src='/images/text.gif';
var imgObj8=new Image();
imgObj8.src='/images/list.gif';
var imgObj9=new Image();
imgObj9.src='/images/price.gif';
var imgObj10=new Image();
imgObj10.src='/images/color.gif';
var imgObj11=new Image();
imgObj11.src='/images/shape.gif';
var imgObj12=new Image();
imgObj12.src='/images/grid.gif';
function Showcomment(id)
{   
    if(id==1)
    {
        for(i=0;i<intTotal;i++)
        {
           eval("document.getElementById('List"+i+"').style.display=''");
           eval("document.getElementById('Grid"+i+"').style.display='none'");
        }               
        document.getElementById('imgList').src="/images/list-on.gif";
        document.getElementById('imgGrid').src="/images/grid.gif";
    }
    else 
    {
        for(i=0;i<intTotal;i++)
        {
           eval("document.getElementById('List"+i+"').style.display='none'");
           eval("document.getElementById('Grid"+i+"').style.display=''");
        }         
        document.getElementById('imgGrid').src="/images/grid-on.gif";
        document.getElementById('imgList').src="/images/list.gif";  
    }	
    return false; 
}
function showFilter(id)
{
    eval("document.getElementById('Filter')").style.display='';
    eval("document.getElementById('ddColor')").style.display='none';
    eval("document.getElementById('dvPrice')").style.display='none';
     eval("document.getElementById('dvShape')").style.display='none';
     switch(id)
     {
     case 1:
            eval("document.getElementById('ddColor')").style.display='';
            eval("document.getElementById('dvPrice')").style.display='none';
            eval("document.getElementById('dvShape')").style.display='none';  
            document.getElementById('imgShape').src='/images/shape.gif';
            document.getElementById('imgColor').src='/images/color-on.gif';
            document.getElementById('imgPrice').src='/images/price.gif';          
            break;
     case 2:
            eval("document.getElementById('ddColor')").style.display='none';
            eval("document.getElementById('dvPrice')").style.display='none';
            eval("document.getElementById('dvShape')").style.display='';
            document.getElementById('imgShape').src='/images/shape-on.gif';
             document.getElementById('imgColor').src='/images/color.gif';
             document.getElementById('imgPrice').src='/images/price.gif';
            break;
     case 3:
            eval("document.getElementById('ddColor')").style.display='none';
            eval("document.getElementById('dvPrice')").style.display='';
            eval("document.getElementById('dvShape')").style.display='none';
            document.getElementById('imgShape').src='/images/shape.gif';
             document.getElementById('imgColor').src='/images/color.gif';
             document.getElementById('imgPrice').src='/images/price-on.gif';
            break;
     }
     eval("document.getElementById('HdView')").value=id;    
}

function showFilterSelected()
{
    var id=eval("document.getElementById('HdView')").value;  
     switch(id)
     {
     case '1':          
            eval("document.getElementById('Filter')").style.display='';
            eval("document.getElementById('ddColor')").style.display='';
            eval("document.getElementById('dvPrice')").style.display='none';
            eval("document.getElementById('dvShape')").style.display='none'; 
            document.getElementById('imgShape').src='/images/shape.gif';
             document.getElementById('imgColor').src='/images/color-on.gif';
             document.getElementById('imgPrice').src='/images/price.gif';          
            break;
     case '2':      
            eval("document.getElementById('Filter')").style.display='';    
            eval("document.getElementById('ddColor')").style.display='none';
            eval("document.getElementById('dvPrice')").style.display='none';
            eval("document.getElementById('dvShape')").style.display='';
            document.getElementById('imgShape').src='/images/shape-on.gif';
             document.getElementById('imgColor').src='/images/color.gif';
             document.getElementById('imgPrice').src='/images/price.gif';            
            break;
     case '3':      
            eval("document.getElementById('Filter')").style.display='';
            eval("document.getElementById('ddColor')").style.display='none';
            eval("document.getElementById('dvPrice')").style.display='';
            eval("document.getElementById('dvShape')").style.display='none'; 
            document.getElementById('imgShape').src='/images/shape.gif';
             document.getElementById('imgColor').src='/images/color.gif';
             document.getElementById('imgPrice').src='/images/price-on.gif';           
            break;
          
     }     
     Showcomment(eval("document.getElementById('HdText')").value);
}
function DisplayRow(intCount,subtotal,total,id)
{

    for(intCount1=0;intCount1<total;intCount1++)
    {
            eval("document.getElementById('rowd"+intCount1+"')").style.display="none";           
        
    }
    for(intCount1=intCount;intCount1<intCount+subtotal;intCount1++)
    {
      eval("document.getElementById('rowd"+intCount1+"')").style.display="";  
    }
   
}
function searchShape(cmb)
{
    var loc = document.location.href;
    loc = loc.replace(".aspx","/shop-by-color-shape-price.aspx?sort=s-")+cmb.options[cmb.options.selectedIndex].value;
    document.location.href = loc;
}
function searchPrice(cmb)
{
    var loc = document.location.href;
    loc = loc.replace(".aspx","/shop-by-color-shape-price.aspx?sort=p-")+cmb.options[cmb.options.selectedIndex].value;
    document.location.href = loc;
}