//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
//openwin
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

function openwin(url) { 
	var wsize = 890;
	var hsize = 600;
	if((navigator.userAgent.indexOf("Mac")!=-1) && (navigator.userAgent.indexOf("MSIE")!=-1)){
		var width_macIE = Number(wsize-16);
		var height_macIE = Number(hsize-16);
	} else {
		var width_macIE = Number(wsize);
		var height_macIE = Number(hsize);
	}

	//同じwindow名にならないようにする。
	winname = makeWinName();

	Win01 = window.open(url,winname,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes"+",resizable=no,width="+width_macIE+",height="+height_macIE);
	Win01.focus();
}


//Flash専用
function openwin02(id) { 
	var wsize = 890;
	var hsize = 600;
	if((navigator.userAgent.indexOf("Mac")!=-1) && (navigator.userAgent.indexOf("MSIE")!=-1)){
		var width_macIE = Number(wsize-16);
		var height_macIE = Number(hsize-16);
	} else {
		var width_macIE = Number(wsize);
		var height_macIE = Number(hsize);
	}
	
	//同じwindow名にならないようにする。
	winname = makeWinName();

	Win01 = window.open('food.php?id='+id,winname,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes"+",resizable=no,width="+width_macIE+",height="+height_macIE);
	
	if(Win01){
		Win01.focus();
	} else {
		thisMovie("local_map").asFunc("food.php?id="+id);
	}
}


//同じwindow名にならないための関数
function makeWinName() {
	myD       = new Date();
	
	myYear    = myD.getYear();
	myYear4   = (myYear < 2000) ? myYear+1900 : myYear;
	myMonth   = myD.getMonth() + 1;
	myDate    = myD.getDate();
	myDay     = myD.getDay();
	myHours   = myD.getHours();
	myMinutes = myD.getMinutes();
	mySeconds = myD.getSeconds();
	
	myYMDHMS   = myYear4+""+myMonth+""+myDate+""+myHours+"" +myMinutes+""+mySeconds+"";
	winname = "pop" + myYMDHMS
	
	return winname;
}

//Flash関数呼び出し
function thisMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}


//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

