function LeftShowSubcatDiv(tmpcatdivno)
{
	tmpsiteurl=GetSiteUrl();
	
	for(var i=1;i<=document.getElementById("totmaincat").value;i++)
	{
		if(i!=tmpcatdivno)
		{
			var tmpsubcatdivname=eval("document.getElementById('subcatdiv"+i+"')");
			var tmpcatdivname=eval("document.getElementById('catdiv"+i+"')");
			var tmpcatimg=eval("document.getElementById('catimg"+i+"')");
			var tmphdnimgname=eval("document.getElementById('hdnimg"+i+"')");
			var tmphdnimgovname=eval("document.getElementById('hdnimgov"+i+"')");
			
			tmpsubcatdivname.style.display="none";
			tmpcatdivname.style.height="38px";
			tmpcatdivname.className=""; 
			tmpcatimg.src=tmpsiteurl+"/images/"+tmphdnimgname.value
			
			var tmpcatdivback=eval("document.getElementById('catdivback"+i+"')");
			tmpcatdivback.style.filter = 'alpha(opacity = 0)';
			tmpcatdivback.style.opacity = '0.1';
		}
	}
	
	var tmpsubcatdivname=eval("document.getElementById('subcatdiv"+tmpcatdivno+"')");
	var tmpcatdivname=eval("document.getElementById('catdiv"+tmpcatdivno+"')");
	var tmplinkimg=eval("document.getElementById('linkimg"+tmpcatdivno+"')");
	var tmpcatimg=eval("document.getElementById('catimg"+tmpcatdivno+"')");
	var tmphdnimgname=eval("document.getElementById('hdnimg"+tmpcatdivno+"')");
	var tmphdnimgovname=eval("document.getElementById('hdnimgov"+tmpcatdivno+"')");
		
		
	if(tmpsubcatdivname.style.display=="inline")
	{
		document.getElementById("hdncatsel").value="";
		tmpsubcatdivname.style.display="none";
		tmpcatdivname.style.height="38px";
		tmpcatdivname.className=""; 
		tmpcatimg.src=tmpsiteurl+"/images/"+tmphdnimgname.value;
		tmplinkimg.onmouseout="MM_swapImgRestore()";
		
		var tmpcatdivback=eval("document.getElementById('catdivback"+tmpcatdivno+"')");
		tmpcatdivback.style.filter = 'alpha(opacity = 0)';
		tmpcatdivback.style.opacity = '0.1';
	}
	else
	{
		document.getElementById("hdncatsel").value=tmpcatdivno;
		tmpsubcatdivname.style.display="inline";
		tmpcatdivname.style.height="";
		tmpcatdivname.className="selleftcategory"; 
		tmpcatimg.src=tmpsiteurl+"/images/"+tmphdnimgovname.value;
		tmplinkimg.onmouseout="";
		
		var tmpcatdivback=eval("document.getElementById('catdivback"+tmpcatdivno+"')");
		tmpcatdivback.style.filter = 'alpha(opacity = 0)';
		tmpcatdivback.style.opacity = '0.1';
	}
	
	
	if(document.location.host=="www.comfortstyle.com.au")
	{
		if(tmpcatdivno==9)
			window.location.href=tmpsiteurl+"/furniture/clearance/1";
		else if(tmpcatdivno==10)
			window.location.href=tmpsiteurl+"/furniture/catalogue/1";
	}
	else
	{
		if(tmpcatdivno==9)
			window.location.href=tmpsiteurl+"/productlist.php?cat=cle";
		else if(tmpcatdivno==10)
			window.location.href=tmpsiteurl+"/productlist.php?cat=catalogue";
	}
}

function LeftshowMenuDiv(divid,tmpcatdivno) 
{
	tmpsiteurl=GetSiteUrl();
	//alert(divid);
	if(document.getElementById("hdncatsel").value!=tmpcatdivno)
	{
		document.getElementById(divid).style.filter = 'alpha(opacity = 10)';
		document.getElementById(divid).style.opacity = '0.5';
		document.getElementById(divid).style.cursor='hand';
		
		var tmphdnimgname=eval("document.getElementById('hdnimg"+tmpcatdivno+"')");
		var tmphdnimgovname=eval("document.getElementById('hdnimgov"+tmpcatdivno+"')");
		
		var tmpdivimgnm=eval("document.getElementById('catimg"+tmpcatdivno+"')");
		tmpdivimgnm.src=tmpsiteurl+"/images/"+tmphdnimgovname.value;
	}	
}

function LefthideMenuDiv(divid,tmpcatdivno)
{
	tmpsiteurl=GetSiteUrl();
	if(document.getElementById("hdncatsel").value!=tmpcatdivno)
	{
		document.getElementById(divid).style.filter = 'alpha(opacity = 0)';
		document.getElementById(divid).style.opacity = '0.1';
		//document.getElementById(divid).style.backgroundColor = ' rgb(0,0,0,0) ';
		
		var tmphdnimgname=eval("document.getElementById('hdnimg"+tmpcatdivno+"')");
		var tmphdnimgovname=eval("document.getElementById('hdnimgov"+tmpcatdivno+"')");
		var tmpdivimgnm=eval("document.getElementById('catimg"+tmpcatdivno+"')");
		var tmpsubcatdiv=eval("document.getElementById('subcatdiv"+tmpcatdivno+"')");
		
		if(tmpsubcatdiv.style.display=="inline")
			tmpdivimgnm.src=tmpsiteurl+"/images/"+tmphdnimgovname.value;
		else
			tmpdivimgnm.src=tmpsiteurl+"/images/"+tmphdnimgname.value;
	}
}

