
var mac = navigator.platform.indexOf("Mac")>=0; // MAC?
var ie = navigator.appVersion.indexOf("MSIE")>=0; // IE?
var ms = navigator.appVersion.indexOf("MSIE");
var ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4);
var nesc = navigator.appName.lastIndexOf("Netscape"); //一致した位置(0)を返す
var nesc4 = (nesc >= 0) && (parseInt(navigator.appVersion.substring(0,2)) >= 4);
focusflg = false; // focus機能フラグ
function openFullscreen(u,n){
	if(mac){
		if(ie){ // MAC IE
			var hoseix = -12; var hoseiy = -48;
		}else{ // MAC NN
			var hoseix = -12; var hoseiy = -48;
		}
		var w = window.screen.width + hoseix; // 
		var h = window.screen.height + hoseiy; // 

   	newwindow = window.open(u,n,"scrollbars=no,width=" + w + ",height=" + h);
		newwindow.moveTo(0,0);
		
	}else if (nesc4){ // WIN NN
		var hoseix = -6; var hoseiy = 0;
		var w = window.screen.width + hoseix; // 
		var h = window.screen.height + hoseiy; // 

	   	newwindow = window.open(u,n,"scrollbars=no,width=" + w + ",height=" + h);
		newwindow.moveTo(0,0);
		newwindow.focus();
	}else if (ie4){
		window.open(u,"screen","fullscreen=yes");
	}else{
		location.href=u;

	}
}
