﻿/* Setting the collapse\expand state of the filters.  
 *		The function is called from each filter object but appears once in the search page
 *
 *      Dom object structure:
 *          img.td.tr.tbody.table.siblingTable = children table
 */
		function SwitchStyle(imgObj)
		{
			if (imgObj.title=='Expand') 
			{   
			    //alert(navigator.appName);
			    if(navigator.appName == "Netscape")
			    {
			        imgObj.parentNode.parentNode.parentNode.parentNode.nextSibling.nextSibling.style.display='inLine';	
				
			    }else if(navigator.appName == "Microsoft Internet Explorer")
			    {
			        imgObj.parentNode.parentNode.parentNode.parentNode.nextSibling.style.display='inLine';	
			    }
			    
			    imgObj.title = 'Collapse';
				imgObj.src = 'Images/Mercado/arrow_up.gif';
			}
			else
			{			
				//img.td.tr.tbody.table.siblingTable = children table
				//imgObj.parentElement.parentElement.parentElement.parentElement.nextSibling.style.display='none';
				
				if(navigator.appName == "Netscape")
			    {
			        imgObj.parentNode.parentNode.parentNode.parentNode.nextSibling.nextSibling.style.display='none';	
				
			    }else if(navigator.appName == "Microsoft Internet Explorer")
			    {
			        imgObj.parentNode.parentNode.parentNode.parentNode.nextSibling.style.display='none';	
			    }
				
				imgObj.title = 'Expand';
				imgObj.src = 'Images/Mercado/arrow_down.gif';				
			}
		}


