/*function displaydiv()
{
	document.getElementById('div1').style.visibility='visible';	
}

function hidediv()
{
	document.getElementById('div1').style.visibility='hidden';	
}*/

function findPos(obj)
{
    var curleft = curtop = 0;
    if (obj.offsetParent)
    {
        curleft = obj.offsetLeft;
        curtop = obj.offsetTop;
        while (obj = obj.offsetParent) 
        {
            curleft += obj.offsetLeft;
            curtop += obj.offsetTop;
        }
    }
    return [curleft,curtop];
}


function Disp_DropDown(anchor_id,div_id)
{
	
	var browserName=navigator.appName;
	var width = screen.width;
	var height = screen.height;
	//alert(width+' and '+height);
/*	if(width==1024 || width==1152 || width==1280 || width==1360 || width==1366)
	{
*/		if(document.getElementById(anchor_id)!=null)
		{
			if(document.getElementById(div_id)!=null)
			{
				var oDiv = document.getElementById(div_id);
				var oAnchor = document.getElementById(anchor_id);
				var pos = findPos(oAnchor);
				oDiv.className = 'category-active';
				//oAnchor.className = 'active';
				oDiv.style.position = 'absolute';
				//oDiv.style.left = pos[0]+20+'px';
				if (anchor_id == 'mens') {
					oDiv.style.left = pos[0]-167+'px';
				}
				else if (anchor_id == 'brand') {
					oDiv.style.left = pos[0]-166+'px';
				}
				else if (anchor_id == 'category') {
					oDiv.style.left = pos[0]-166+'px';
				}
				else {
					oDiv.style.left = pos[0]-165+'px';
				}
				if (anchor_id == 'mens' || anchor_id == 'brand' || anchor_id == 'category' ) {
					oDiv.style.top = pos[1]-36+'px';
				}				
				oDiv.style.zIndex = 1002;
				return false;
			}
		}
		
/*	}
*/		
	return false;
}
function Hide_DropDown(oAnchor,oDiv)
{
	//alert(oAnchor);
	if(document.getElementById(oAnchor)!=null) 
		//document.getElementById(oAnchor).className ='normal';
	if(document.getElementById(oDiv)!=null) 
		document.getElementById(oDiv).className = 'category-hover';
	
	return false;
}
