// JavaScript Document
function $(ds)
{
	return document.getElementById(ds);
}

	function findPos(obj) {
		//alert(obj);
	var curleft = curtop = 0;
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
		alert(curleft);
		return [curleft];
	}

	
	function isIE(){	

		  if (navigator.appName == 'Microsoft Internet Explorer')
		  {
		    var ua = navigator.userAgent;
		    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
		    if (re.exec(ua) != null)
		      version = parseFloat( RegExp.$1 );		    
		   
		    if (version < 8.0){
		    	return true;
		    }else{
		    	return false;
		    }
		    return true;
		  }
		  return false;		
	}

	var dropdown_x = "5";
	if (isIE()) dropdown_x = "-485";
	
	
		var di =9;
		
		var menus = [
		new ypSlideOutMenu("drop1", "down", dropdown_x, 0, 225, 150),
		new ypSlideOutMenu("drop2", "down", dropdown_x, 0, 225, 800)]/*,
		new ypSlideOutMenu("menu2", "down", findPos(document.getElementById('act1'))-di, 70, 170, 450),
		new ypSlideOutMenu("menu3", "down", findPos(document.getElementById('act2'))-3, 70, 170, 197),
		new ypSlideOutMenu("menu4", "down", findPos(document.getElementById('act3'))-12, 70, 170, 121),
		new ypSlideOutMenu("menu5", "down", findPos(document.getElementById('act4'))-19, 70, 170, 121),
		new ypSlideOutMenu("menu6", "down", findPos(document.getElementById('act5'))-17, 70, 170, 121)*/
	

		/*for (var i = 0; i < menus.length; i++) {
			menus[i].onactivate = new Function("document.getElementById('act" + i + "').className='active';");
			menus[i].ondeactivate = new Function("document.getElementById('act" + i + "').className='';");
		}*/
