var tempHtml;
var tempString;
var vars;
if (!showMenu)	var showMenu = true;

if (collection == null)	var collection;
if (ryokan == null)	var ryokan = 'none';
if (photoW == null)	var photoW;
if (mainPhoto == null)	var mainPhoto;

vars = "path=" + path + "&collection=" + collection + "&ryokan=" + ryokan + "&photoW=" + photoW + "&mainPhoto=" + mainPhoto + "&section=" + section + "&showMenu=" + showMenu;
var framesetQuery = "";
if ( window.top.location.search != 0 )
	framesetQuery = window.top.location.search;
else
	framesetQuery = "?";
	
function getParameter( queryString, parameterName )
{
	var parameterName = parameterName + "=";
	if ( queryString.length > 0 )
	{
		begin = queryString.indexOf ( parameterName );
		if ( begin != -1 )
		{
			begin += parameterName.length;
			end = queryString.indexOf ( "&" , begin );
			if ( end == -1 )
			{
				end = queryString.length
			}
			return unescape ( queryString.substring ( begin, end ) );
		}
		return "null";
	}
}

var flash_src="";
//if((getParameter(framesetQuery,'ryokan').toString()=="ginrinsoh"&&getParameter(framesetQuery,'from').toString()=="s") )
if((GetParam('from').toString()=="s") )
	flash_src= "../../eng/" + GetParam('ryokan').toString() + "/";
//tempHtml = '<div style="position:absolute; z-index:1;">';

//Main Flash
 if (navigator.userAgent.indexOf('Safari') > 0) {
	tempHtml = '	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%" id="mainFlash">';
	//tempHtml += '	<param name="movie" value="'+path+'swf/main_safari.swf">';
	
		tempHtml += '	<param name="movie" value="'+flash_src+'swf/main_safari.swf">';
		
	tempHtml += '	<param name="quality" value="best">';
	tempHtml += '	<param name="menu" value="false">';
	tempHtml += '	<param name="wmode" value="transparent">';
	tempHtml += '	<param name="flashVars" value="'+vars+'">';
	tempHtml += '	<param name="salign" value="TL">';
	//tempHtml += '	<embed src="'+path+'swf/main_safari.swf" flashVars="'+vars+'" salign="TL" quality="best" wmode="transparent" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%" name="mainFlash"></embed>';
	
	tempHtml += '	<embed src="'+path+'swf/main_safari.swf" flashVars="'+vars+'" salign="TL" quality="best" wmode="opaque" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%" name="mainFlash"></embed>';
	
	tempHtml += '	</object>';
 } else {
	tempHtml = '	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%" id="mainFlash">';
	//tempHtml += '	<param name="movie" value="'+path+'swf/main.swf">';
	
	tempHtml += '	<param name="movie" value="'+path+'swf/main.swf">';
	
	
	tempHtml += '	<param name="quality" value="best">';
	tempHtml += '	<param name="menu" value="false">';
	tempHtml += '	<param name="wmode" value="opaque">';
	tempHtml += '	<param name="flashVars" value="'+vars+'">';
	tempHtml += '	<param name="salign" value="TL">';
	//tempHtml += '	<embed src="'+path+'swf/main.swf" flashVars="'+vars+'" salign="TL" quality="best" wmode="opaque" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%" name="mainFlash"></embed>';
	
	
	tempHtml += '	<embed src="'+path+'swf/main.swf" flashVars="'+vars+'" salign="TL" quality="best" wmode="opaque" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%" name="mainFlash"></embed>';
	
	tempHtml += '	</object>';
 }

//tempHtml += '</div>';

document.write(tempHtml);