function get_ua(){
	var my_ua;
	//Win用
	if (navigator.userAgent.indexOf("Win") != -1) {
		//Firefox
		if (navigator.userAgent.indexOf("Firefox") != -1) {
			my_ua = 'win_ff';
		}
		//Netscape
		else if (navigator.appName == "Netscape") {
			my_ua = 'win_ns';
		}
		//Netscape6 や Mozilla(オープンソース版)
		else if (navigator.userAgent.indexOf("Gecko") != -1) {
			my_ua = 'win_gk';
		}
		//Opreaすべて
		else if (window.opera) {
			my_ua = 'win_op';
		}
		//Internet Explorer
		else if (navigator.userAgent.indexOf("MSIE") != -1) {
			my_ua = 'win_ie';
		}
	}
	//Mac
	if (navigator.userAgent.indexOf("Mac") != -1) {
		//Safari (Mac OSX用ブラウザ)の場合
		if (navigator.userAgent.indexOf("Safari") != -1) {
			my_ua = 'mac_sf';
		}
		//Firefox
		else if (navigator.userAgent.indexOf("Firefox") != -1) {
			my_ua = 'mac_ff';
		}
		//Netscape
		else if (navigator.appName == "Netscape") {
			my_ua = 'mac_ns';
		}
		//Netscape6 や Mozilla(オープンソース版)
		else if (navigator.userAgent.indexOf("Gecko") != -1) {
			my_ua = 'mac_gk';
		}
		//Opreaすべて
		else if (window.opera) {
			my_ua = 'mac_op';
		}
		//Internet Explorer
		else if (navigator.userAgent.indexOf("MSIE") != -1) {
			my_ua = 'mac_ie';
		}
	}
	return my_ua;
}

TimeID = null;

function menu_popup(nval,flag,vy,vx,bc){
	idList = ['popup_gyao','popup_contents','popup_cinema','popup_hikari','popup_bgm','popup_musicdl','popup_mobile','popup_karaoke','popup_coupon','popup_restaurant','popup_etc'];
	var lyname = idList[nval];
	var px = 0;
	var py = 0;
	if (document.getElementById) {
		spl = document.getElementById(lyname).style;
		if (bc != '') {
			px = document.getElementById('wrapper').offsetLeft;
			py = document.getElementById(bc).offsetTop;
		}
	}
	else if (document.all) {
		spl = document.all(lyname).style;
		if (bc != '') {
			px = document.all('wrapper').offsetLeft;
			py = document.all(bc).offsetTop;
		}
	}
	else if (document.layers) {
		spl = document.layers[lyname];
		if (bc != '') {
			px = document.layers[bc].left;
			py = document.layers[bc].top;
		}
	}
	var sec = 300;
	var zvl = 100;
	var nvx = 0;
	var nvy = 0;
	if (my_ua == 'win_ns') {
		nvx = 0;
		nvy = 0;
	}
	else if (my_ua == 'win_gk') {
		nvx = 0;
		nvy = 0;
	}
	else if (my_ua == 'win_op') {
		nvx = 0;
		nvy = 0;
	}
	else if (my_ua == 'win_ie') {
		nvx = 0;
		nvy = 0;
	}
	else if (my_ua == 'mac_sf') {
		nvx = 0;
		nvy = 0;
	}
	else if (my_ua == 'mac_ns') {
		nvx = 0;
		nvy = 0;
	}
	else if (my_ua == 'mac_gk') {
		nvx = 0;
		nvy = 0;
	}
	else if (my_ua == 'mac_op') {
		nvx = 0;
		nvy = 0;
	}
	else if (my_ua == 'mac_ie') {
		nvx = 0;
		nvy = -45;
	}
	
	if (flag == '1') {
		clearTimeout(TimeID);
		var hdname, tln, x, y;
		var imax = idList.length;
		for (i = 0; i < imax; i++) {
			hdname = idList[i];
			if (document.getElementById) {
				tln = document.getElementById(hdname).style;
			}
			else if (document.all) {
				tln = document.all(hdname).style;
			}
			else if (document.layers) {
				tln = document.layers[hdname];
			}
			if (i == nval) {
				x = px + vx + nvx;
				y = py + vy + nvy;
				tln.display = 'block';
				tln.position = 'absolute';
				tln.zIndex = zvl;
				if (document.getElementById || document.layers) {
					tln.top = y + 'px';
					tln.left = x + 'px';
				}
				else {
					tln.pixelTop = y + 'px';
					tln.pixelLeft = x + 'px';
				}
			}
			else {
				tln.display = 'none';
			}
		}
	}
	else if (flag == '2') {
		clearTimeout(TimeID);
	}
	else if (flag == '0') {
		TimeID = setTimeout('menu_off()', sec);
	}
}

function menu_off() {
	spl.display = 'none';
}

function img_over(idval,xval,fval){
	var url,tln;
	
	url = 'http://' + dval;
	if(dval.match(/mighty2/)) url += (dval.match(/\.com/) ? '/usen' : '') + '/usen_com/www';
	
	if (document.getElementById) {
		tln = document.getElementById(idval).style;
	}
	else if (document.all) {
		tln = document.all(idval).style;
	}
	else if (document.layers) {
		tln = document.layers[idval];
	}
	
	if (fval) {
		tln.background = 'url(' + url + '/images/footer_nav/footer_nav.gif) -' + xval + 'px -45px no-repeat';
	}
	else {
		tln.background = 'url(' + url + '/images/footer_nav/footer_nav.gif) ' + ((my_ua == 'mac_sf') ? '-' : '') + xval + 'px 0px no-repeat';
	}
}

function openWindow (u,n) {
	window.open(u, n, 'resizable=no, scrollbars=no, width=800, height=795');
}