<!--hide this script from non-javascript-enabled browsers 
/*
####################################     
# File Name: functions.js
# Created By: Umesh Mundhe
# Created On: November 18 ,2005
# Updated By: Amol Divalkar
# This file contain all the common javascript functions
####################################
*/
	/*
     #############################################################################
     # Function Name: toggleMenu()
     # Created By: Siddharth Thakar  
     # Created on: 26 Sep 2007
     # Purpose: Function for dropdown effect in left navigation.    
     #############################################################################
	 */
		function toggleMenu(obj,url)
		{
			var parentId = obj.id;
			var Pid = "";
			var childId  ="";
			var childIdArray  = new Array();
			var elList  = new Array();
			var cnt =0;
			
			parentArray = parentId.split("_");
			//alert(parentArray);
			if (window.parentArray[3])
				Pid = parentId.substring(0,(parentId.length- (eval(parentArray[3].length) + eval(1)) ));
			else
			{
				//alert(parentArray[1])
				Pid = parentId.substring(0,(parentId.length- (eval(parentArray[1].length) + eval(1)) ));
			}
			
			
			if (Pid == "main")
			{
				childId = parentId+"_product";
				elList = document.getElementsByTagName("TD");
				cnt =0;
				for (var i = 0; i < elList.length; i++) 
				{
					if (elList[i].className == "navtitlesub01" || elList[i].className == "navtitlesub01sel" || elList[i].className == "navtitlesub02" || elList[i].className == "navtitlesub02sel") 
					{  
						id = elList[i].id;
						cntId = id.split("_");
						//alert(cntId)
						if (window.cntId[3])
						{
							id = id.substring(0,(id.length- (eval(cntId[3].length) + eval(1)) ));
						}
						
						//alert(childId+" =MAIN= "+id)
						if (childId == id)
						{
							childIdArray[cnt] = elList[i].id;
							cnt++;
						}
						/*else
						{
							if (typeof(document.getElementById(elList[i].id)) == "object")
							{
								 
								//document.getElementById(elList[i].id).style.display="none";
								 
							}	
						}*/	
					}
					/*else
					{
						if (elList[i].className == "navtitlesub02" || elList[i].className == "navtitlesub02sel"  ) 
						{	 
							if (typeof(document.getElementById(elList[i].id)) == "object")
							{
								//document.getElementById(elList[i].id).style.display="none";
							}
						}
					}*/
				 }
				//alert(childIdArray)
				childId = parentId+"_product_"+id;
				
			}
			else
			{
				childId = parentId;
				elList = document.getElementsByTagName("TD");
				cnt =0;
				for (var i = 0; i < elList.length; i++) 
				{
					if (elList[i].className == "navtitlesub02" || elList[i].className == "navtitlesub02sel") 
					{  
						
						id = elList[i].id;
						cntId = id.split("_");
						if (window.cntId[4])
						{
							id = id.substring(0,(id.length- (eval(cntId[4].length) + eval(1)) ));
						}
						
						
						//alert(childId+" =SUB= "+id)
						if (childId == id)
						{
							childIdArray[cnt] = elList[i].id;
							cnt++;
						}
						/*else
						{
							
							if (typeof(document.getElementById(elList[i].id)) == "object")
							{
								//document.getElementById(elList[i].id).style.display="none";
							}	
								
						}*/	
					}
				 }
				
				
			}
				
			var childObj = document.getElementById(childId);
			//alert(childIdArray.length);
			if (childIdArray.length == "1")
			{
				loadPage(childObj,url);
			}
			containerId = parentId+"_product"
			containerObj = document.getElementById(containerId);
			
			if (containerObj.style.display != "inline")
			{
				
				containerObj.style.display = "inline";
				for (childId in childIdArray)
			    {
					childObj = document.getElementById(childIdArray[childId]);	
					childObj.style.display = ""; // inline
					
				}
			}
			else
			{
				containerObj.style.display = "none";
				
		    }
			
		}
		/*
     #############################################################################
     # Function Name: loadPage()
     # Created By: Siddharth Thakar  
     # Created on: 26 Sep 2007
     # Purpose: Function to load the page.    
     #############################################################################
	 */
		
		function loadPage(obj,url)
		{
			elList = document.getElementsByTagName("TD");
			var className = obj.className;
			for (var i = 0; i < elList.length; i++) 
			{
				
				if (elList[i].className == className+"sel" && obj.id != elList[i].id) 
				{ 
					elList[i].className = className ;
				}
			}
			//alert(obj.className+" : "+obj.className.substring((obj.className.length- 3 )))
			if (obj.className.substring((obj.className.length- 3 )) != "sel")
			{		   
				obj.className= obj.className+'sel';
			}
			if (url != "")
			{
				window.location = url;
			}
		
		}
		
			
// stop hiding --> 