//Function to set the Height of the DIV Proportionately
function setHeight(clientIDList, divSpacerList)
{
    try
    {        
        var maxDivH = maxHeight(clientIDList);
        var cID = new Array();
        cID = clientIDList.split(",");
        var spID = new Array();
        spID = divSpacerList.split(",");
        for(var i = 0; i < cID.length; ++i)
        {
            if(cID[i].length >0)
            {
            if(document.getElementById(cID[i].toString()))
                {
                    document.getElementById(cID[i].toString()).style.height = maxDivH + "px";                            
                }               
            }       
        }
        
        for(var i = 0; i < spID.length; ++i)
        {
            if(spID[i].length >0)
            {
                if(document.getElementById(spID[i].toString()))
                {
                    document.getElementById(spID[i].toString()).style.height = (maxDivH -20)  + "px";                            
                } 
            }       
        }           
    }
    catch(e)
    {
        alert(e.description);//Error Message
    }
}	

//Function to get the largest height of all the products div
//Returns max height after looping through all the divs(products)
function maxHeight(clientIDList)
{
    try
    {
        var cID = new Array();
        cID = clientIDList.split(",");
        
        var maxObjH = 1, maxCurrObjH = 1,maxOuterDivs;
        maxOuterDivs = 10;//This is set by an assumption
        
        
        
        for(var i = 0; i < cID.length; ++i)
        {
            if(cID[i].length >0)
            {
                if(document.getElementById(cID[i].toString()))
                {
                     maxCurrObjH = parseInt(document.getElementById(cID[i].toString()).offsetHeight);//Height of the first div. considered as a difference                                      
                }              
            }  
            maxObjH = Math.max(maxObjH,maxCurrObjH); // Obtaining the max Height  	                   
        }
        return maxObjH;           
    }
    catch(e)
    {
        alert(e.descrption);//Error Message
    }
}