// SlideShow.js ver. 0.21
// (C)2007-2008 YOSHIOKA, Akinori
// http://homepage3.nifty.com/akino-yo/Index.htm

var Initialized = false;
var IntervalTimerHandle = 0;
var MouseCursorBackup = new Array();
var NavigationDisplayVisibleTimerHandle = 0;
var NavigationDisplayVisible = false;
var NavigationDisplayFadeInIntervalTimerHandle = 0;
var NavigationDisplayFadeOutIntervalTimerHandle = 0;
var NavigationDisplayDelayVisiblization = false;
var NavigationDisplayDelayHiding = false;
var MouseOnNavigationDisplay = false;
var MouseCursorVisibleTimerHandle = 0;
var MouseCursorVisible = true;
var MouseCursorX = -1;
var MouseCursorY = -1;
var FadeInIntervalTimerHandle = 0;
var FadeOutIntervalTimerHandle = 0;
var SkipCount = 0;
var PreloadingImage = new Image();
var PreloadingImageSourceListIndex = -1;
var FadeTypeOShift = 0;
var FadeTypeMShift = 4;
var FadeTypeBShift = 8;
var FadeTypeDShift = 12;
var FadeDirUShift = 0;
var FadeDirRShift = 1;
var FadeDirDShift = 2;
var FadeDirLShift = 3;
var FadeTypeListForRandomSelection = new Array(
	((1 << FadeDirUShift) |
		(1 << FadeDirRShift) |
		(1 << FadeDirDShift) |
		(1 << FadeDirLShift)) <<
			FadeTypeOShift,
	((1 << FadeDirUShift) |
		(1 << FadeDirRShift) |
		(1 << FadeDirDShift) |
		(1 << FadeDirLShift)) <<
			FadeTypeMShift,
	((1 << FadeDirUShift) |
		(0 << FadeDirRShift) |
		(1 << FadeDirDShift) |
		(0 << FadeDirLShift)) <<
			FadeTypeBShift,
	((0 << FadeDirUShift) |
		(1 << FadeDirRShift) |
		(0 << FadeDirDShift) |
		(1 << FadeDirLShift)) <<
			FadeTypeBShift,
	((1 << FadeDirUShift) |
		(0 << FadeDirRShift) |
		(0 << FadeDirDShift) |
		(0 << FadeDirLShift)) <<
			FadeTypeDShift,
	((1 << FadeDirUShift) |
		(1 << FadeDirRShift) |
		(0 << FadeDirDShift) |
		(0 << FadeDirLShift)) <<
			FadeTypeDShift,
	((0 << FadeDirUShift) |
		(1 << FadeDirRShift) |
		(0 << FadeDirDShift) |
		(0 << FadeDirLShift)) <<
			FadeTypeDShift,
	((0 << FadeDirUShift) |
		(1 << FadeDirRShift) |
		(1 << FadeDirDShift) |
		(0 << FadeDirLShift)) <<
			FadeTypeDShift,
	((0 << FadeDirUShift) |
		(0 << FadeDirRShift) |
		(1 << FadeDirDShift) |
		(0 << FadeDirLShift)) <<
			FadeTypeDShift,
	((0 << FadeDirUShift) |
		(0 << FadeDirRShift) |
		(1 << FadeDirDShift) |
		(1 << FadeDirLShift)) <<
			FadeTypeDShift,
	((0 << FadeDirUShift) |
		(0 << FadeDirRShift) |
		(0 << FadeDirDShift) |
		(1 << FadeDirLShift)) <<
			FadeTypeDShift,
	((1 << FadeDirUShift) |
		(0 << FadeDirRShift) |
		(0 << FadeDirDShift) |
		(1 << FadeDirLShift)) <<
			FadeTypeDShift);

function shuffleImageSourceList()
{
	var i, j, k;

	for(i = 0 ; i < ImageSourceList.length ; i++)
	{
		j = Math.floor(Math.random() * ImageSourceList.length);
		k = ImageSourceList[i];
		ImageSourceList[i] = ImageSourceList[j];
		ImageSourceList[j] = k;
		if("undefined" != typeof(SlideImageCopyrightList))
		{
			k = SlideImageCopyrightList[i];
			SlideImageCopyrightList[i] = SlideImageCopyrightList[j];
			SlideImageCopyrightList[j] = k;
		}
		if("undefined" != typeof(SlideImageCopyrightLinkList))
		{
			k = SlideImageCopyrightLinkList[i];
			SlideImageCopyrightLinkList[i] = SlideImageCopyrightLinkList[j];
			SlideImageCopyrightLinkList[j] = k;
		}
	}
}

function getFadeTypeAtRandom()
{
	return FadeTypeListForRandomSelection[Math.floor(Math.random() * FadeTypeListForRandomSelection.length)];
}

function turnOnNavigationDisplay()
{
	if(Initialized)
	{
		MouseOnNavigationDisplay = true;
		visiblizeNavigationDisplay();
	}
}

function turnOffNavigationDisplay()
{
	if(Initialized)
	{
		MouseOnNavigationDisplay = false;
		hideNavigationDisplay();
	}
}

function increaseIntervalTime()
{
	if(Initialized)
	{
		if(IntervalTimeIndex < MaxIntervalTimeIndex)
		{
			IntervalTimeIndex++;
		}
		displayIntervalTime();
		if(IntervalTimerHandle)
		{
			changeImage();
		}
	}
}

function decreaseIntervalTime()
{
	if(Initialized)
	{
		if(MinIntervalTimeIndex < IntervalTimeIndex)
		{
			IntervalTimeIndex--;
		}
		displayIntervalTime();
		if(IntervalTimerHandle)
		{
			changeImage();
		}
	}
}

function pausePlay()
{
	if(Initialized)
	{
		Playing = !Playing;
		if((!FadeInIntervalTimerHandle) && (!FadeOutIntervalTimerHandle))
		{
			changeImage();
		}
		setPlayButtonText();
	}
}

function skipPlay(Index)
{
	if(Initialized)
	{
		SkipCount += Index;
		preloadImage();
		if((!FadeInIntervalTimerHandle) && (!FadeOutIntervalTimerHandle))
		{
			changeImage();
		}
	}
}

function jumpPlay(Index)
{
	if(Initialized && ("" != Index) && ((--Index) != ImageSourceListIndex))
	{
		skipPlay(Index - ImageSourceListIndex);
	}
}

function turnOnMouseCursor(event)
{
	if(Initialized)
	{
		visiblizeMouseCursor(event);
		if(!MouseOnNavigationDisplay)
		{
			hideMouseCursor();
		}
	}
}

function initialize()
{
	__hideNavigationDisplay(0);

	setNavigationDisplayConstantValue();
	hideMouseCursor();

	if(!SlideShowFadeInType)
	{
		FadeInType = getFadeTypeAtRandom();
	}
	if(!SlideShowFadeOutType)
	{
		FadeOutType = getFadeTypeAtRandom();
	}
	setFadeRatio(document.SlideImage.style, FadeInType, 0);

	Initialized = true;
}

function _changeImage()
{
	IntervalTimerHandle = 0;

	__changeImage(FadeCountTimes);
}

function __changeImage(Counter)
{
	FadeOutIntervalTimerHandle = 0

	if(0 < Counter)
	{
		setFadeRatio(document.SlideImage.style, FadeOutType, Counter / FadeCountTimes);

		FadeOutIntervalTimerHandle =
			setTimeout("__changeImage(" + (Counter - 1) + ")",
				convertTimeIndexToTime(FadeIntervalTimeIndex));
	}
	else
	{
		setFadeRatio(document.SlideImage.style, FadeOutType, 0);

		ImageSourceListIndex = PreloadingImageSourceListIndex;
		if(SkipCount)
		{
			SkipCount = 0;
		}
		else
		{
			if(!ImageSourceListIndex)
			{
				if(!SlideShowLoopType)
				{
					finishSlideShow();
				}

				if(SlideShowPlayType)
				{
					shuffleImageSourceList();
				}
			}
		}
		if(!SlideShowFadeInType)
		{
			FadeInType = getFadeTypeAtRandom();
		}
		if(!SlideShowFadeOutType)
		{
			FadeOutType = getFadeTypeAtRandom();
		}
		document.SlideImage.alt = ImageSourceList[ImageSourceListIndex];
		document.SlideImage.src = PreloadingImage.src;
	}
}

function convertTimeIndexToTime(TimeIndex)
{
	return Math.pow(10, TimeIndex / TimeIndexNormalizingNumber) * 1000;
}

function displayIntervalTime()
{
	var i, j;

	document.NavigationDisplay.IntervalTimeDisplay.value = "";
	for(i = MaxIntervalTimeIndex, j = IntervalTimeIndex + 1 ; j < i ; i--)
	{
		document.NavigationDisplay.IntervalTimeDisplay.value += IntervalTimeDisplayLabelList[0];
	}
	if(IntervalTimeIndex < i)
	{
		document.NavigationDisplay.IntervalTimeDisplay.value += IntervalTimeDisplayLabelList[1];
		i--;
	}
	if(MinIntervalTimeIndex < i)
	{
		document.NavigationDisplay.IntervalTimeDisplay.value += IntervalTimeDisplayLabelList[2];
		i--;
	}
	for( ; MinIntervalTimeIndex < i ; i--)
	{
		document.NavigationDisplay.IntervalTimeDisplay.value += IntervalTimeDisplayLabelList[3];
	}
}

function setPlayButtonText()
{
	var s;

	document.NavigationDisplay.PlayButton.value = PlayButtonLabelList[Playing ? 1 : 0];
	document.NavigationDisplay.PlayButton.title = PlayButtonTitleList[Playing ? 1 : 0];
}

function changeImage()
{
	if(IntervalTimerHandle)
	{
		clearTimeout(IntervalTimerHandle);
		IntervalTimerHandle = 0;
	}

	if(SkipCount)
	{
		IntervalTimerHandle = setTimeout("_changeImage()", 0);
	}
	else if(Playing)
	{
		IntervalTimerHandle =
			setTimeout("_changeImage()",
				convertTimeIndexToTime(IntervalTimeIndex));
	}
}

function setNavigationDisplayConstantValue()
{
	document.NavigationDisplay.IntervalTimeIncrementButton.value = IntervalTimeIncrementButtonLabel;
	document.NavigationDisplay.IntervalTimeDecrementButton.value = IntervalTimeDecrementButtonLabel;
	document.NavigationDisplay.PreviousButton.value = PreviousButtonLabel;
	document.NavigationDisplay.NextButton.value = NextButtonLabel;
	document.NavigationDisplay.TotalCountDisplay.value = ImageSourceList.length + "";
	if(("undefined" != typeof(SlideImageCopyright)) && ("undefined" == typeof(SlideImageCopyrightList)))
	{
		document.NavigationDisplay.SlideImageCopyrightDisplay.value = SlideImageCopyright;
	}
	document.NavigationDisplay.TotalCountDisplay.size = document.NavigationDisplay.TotalCountDisplay.value.length;
	document.NavigationDisplay.CountDisplay.size = document.NavigationDisplay.TotalCountDisplay.size;
	displayIntervalTime();
	setPlayButtonText();
}

function setNavigationDisplayValue()
{
	document.NavigationDisplay.CountDisplay.value = (ImageSourceListIndex + 1) + "";
	if(PathNameDisplayType)
	{
		document.NavigationDisplay.PathNameDisplay.value = ImageSourceList[ImageSourceListIndex];
	}
	if("undefined" != typeof(SlideImageCopyrightList))
	{
		document.NavigationDisplay.SlideImageCopyrightDisplay.value = SlideImageCopyrightList[ImageSourceListIndex];
	}
}

function visiblizeNavigationDisplay()
{
	if(NavigationDisplayVisible)
	{
		if(NavigationDisplayVisibleTimerHandle)
		{
			clearTimeout(NavigationDisplayVisibleTimerHandle);
			NavigationDisplayVisibleTimerHandle = 0;
		}

		if(NavigationDisplayFadeInIntervalTimerHandle)
		{
			NavigationDisplayDelayHiding = false;
		}

		if(NavigationDisplayFadeOutIntervalTimerHandle)
		{
			NavigationDisplayDelayVisiblization = true;
		}

		return;
	}

	NavigationDisplayVisible = true;

	_visiblizeNavigationDisplay(0);
}

function _visiblizeNavigationDisplay(Counter)
{
	NavigationDisplayFadeInIntervalTimerHandle = 0;

	if(Counter < NavigationDisplayFadeCountTimes)
	{
		setFadeRatio(document.NavigationDisplay.style,
			(1 << FadeDirUShift) |
				(1 << FadeDirRShift) |
				(1 << FadeDirDShift) |
				(1 << FadeDirLShift),
			Counter / NavigationDisplayFadeCountTimes);

		NavigationDisplayFadeInIntervalTimerHandle =
			setTimeout("_visiblizeNavigationDisplay(" + (Counter + 1) + ")",
				convertTimeIndexToTime(NavigationDisplayFadeIntervalTimeIndex));
	}
	else
	{
		setFadeRatio(document.NavigationDisplay.style,
			(1 << FadeDirUShift) |
				(1 << FadeDirRShift) |
				(1 << FadeDirDShift) |
				(1 << FadeDirLShift),
			1);

		if(NavigationDisplayDelayHiding)
		{
			NavigationDisplayDelayHiding = false;
			hideNavigationDisplay();
		}
	}
}

function hideNavigationDisplay()
{
	if(NavigationDisplayVisibleTimerHandle)
	{
		clearTimeout(NavigationDisplayVisibleTimerHandle);
		NavigationDisplayVisibleTimerHandle = 0;
	}

	if((!NavigationDisplayVisible) || (!SlideShowNavigationDisplayType) || MouseOnNavigationDisplay)
	{
		return;
	}

	if(NavigationDisplayFadeInIntervalTimerHandle)
	{
		NavigationDisplayDelayHiding = true;
		return;
	}

	if(NavigationDisplayFadeOutIntervalTimerHandle)
	{
		if(NavigationDisplayDelayVisiblization)
		{
			NavigationDisplayDelayHiding = true;
		}
		return;
	}

	NavigationDisplayVisibleTimerHandle =
		setTimeout("_hideNavigationDisplay()",
			convertTimeIndexToTime(NavigationDisplayVisibleTimeIndex));
}

function _hideNavigationDisplay()
{
	NavigationDisplayVisibleTimerHandle = 0;

	__hideNavigationDisplay(NavigationDisplayFadeCountTimes);
}

function __hideNavigationDisplay(Counter)
{
	var i, j;

	NavigationDisplayFadeOutIntervalTimerHandle = 0;

	if(0 < Counter)
	{
		setFadeRatio(document.NavigationDisplay.style,
			(1 << FadeDirUShift) |
				(1 << FadeDirRShift) |
				(1 << FadeDirDShift) |
				(1 << FadeDirLShift),
			Counter / NavigationDisplayFadeCountTimes);

		NavigationDisplayFadeOutIntervalTimerHandle =
			setTimeout("__hideNavigationDisplay(" + (Counter - 1) + ")",
				convertTimeIndexToTime(NavigationDisplayFadeIntervalTimeIndex));
	}
	else
	{
		setFadeRatio(document.NavigationDisplay.style,
			(1 << FadeDirUShift) |
				(1 << FadeDirRShift) |
				(1 << FadeDirDShift) |
				(1 << FadeDirLShift),
			0);

		for(i = 0 ; i < document.NavigationDisplay.childNodes.length ; i++)
		{
			if("div" == document.NavigationDisplay.childNodes[i].nodeName.toLowerCase())
			{
				for(j = 0 ; j < document.NavigationDisplay.childNodes[i].childNodes.length ; j++)
				{
					document.NavigationDisplay.childNodes[i].childNodes[j].blur();
				}
			}
			else
			{
				document.NavigationDisplay.childNodes[i].blur();
			}
		}

		NavigationDisplayVisible = false;

		if(NavigationDisplayDelayVisiblization)
		{
			NavigationDisplayDelayVisiblization = false;
			visiblizeNavigationDisplay();
		}
	}
}

function setNextImage()
{
	preloadImage();

	_setNextImage(0);
}

function _setNextImage(Counter)
{
	FadeInIntervalTimerHandle = 0;

	if(!Counter)
	{
		document.SlideImage.style.visibility = "hidden";
		document.SlideImage.style.width = "auto";
		document.SlideImage.style.height = "auto";
		document.getElementById("SlideShowImage").style.width =
			(document.SlideImage.width * SlideImageZoom) + "px";
		document.getElementById("SlideShowImage").style.height =
			(document.SlideImage.height * SlideImageZoom) + "px";
		setSlideImageOnCenter();

		setNavigationDisplayValue();
		if(SlideShowNavigationDisplayType < 2)
		{
			visiblizeNavigationDisplay();
			hideNavigationDisplay();
		}
	}
	if(Counter < FadeCountTimes)
	{
		setFadeRatio(document.SlideImage.style, FadeInType, Counter / FadeCountTimes);

		FadeInIntervalTimerHandle =
			setTimeout("_setNextImage(" + (Counter + 1) + ")",
				convertTimeIndexToTime(FadeIntervalTimeIndex));
	}
	else
	{
		setFadeRatio(document.SlideImage.style, FadeInType, 1);
		changeImage();
	}
	if(!Counter)
	{
		document.SlideImage.style.visibility = "visible";
	}
}

function preloadImage()
{
	var i;

	if((i = (ImageSourceListIndex + (SkipCount ? SkipCount : 1)) % ImageSourceList.length) < 0)
	{
		i += ImageSourceList.length;
	}

	if(PreloadingImageSourceListIndex != i)
	{
		PreloadingImage.src = ImageSourceList[PreloadingImageSourceListIndex = i];
	}
}

function visiblizeMouseCursor(event)
{
	if((MouseCursorX == event.screenX) &&
		(MouseCursorY == event.screenY))
	{
		return;
	}
	MouseCursorX = event.screenX;
	MouseCursorY = event.screenY;

	if(MouseCursorVisibleTimerHandle)
	{
		clearTimeout(MouseCursorVisibleTimerHandle);
		MouseCursorVisibleTimerHandle = 0;
	}

	if(!MouseCursorVisible)
	{
		document.getElementById("SlideShowImage").style.cursor = MouseCursorBackup["SlideShowImage"];
		document.SlideImage.style.cursor = MouseCursorBackup["SlideImage"];

		MouseCursorVisible = true;
	}
}

function hideMouseCursor()
{
	if(!SlideShowMouseCursorType)
	{
		return;
	}

	if(MouseCursorVisibleTimerHandle)
	{
		clearTimeout(MouseCursorVisibleTimerHandle);
		MouseCursorVisibleTimerHandle = 0;
	}

	if(MouseCursorVisible)
	{
		MouseCursorVisibleTimerHandle =
			setTimeout("_hideMouseCursor()",
				convertTimeIndexToTime(MouseCursorVisibleTimeIndex));
	}
}

function _hideMouseCursor()
{
	var i, j, k;

	MouseCursorVisibleTimerHandle = 0;

	MouseCursorBackup["SlideShowImage"] = document.getElementById("SlideShowImage").style.cursor;
	MouseCursorBackup["SlideImage"] = document.SlideImage.style.cursor;
	document.getElementById("SlideShowImage").style.cursor =
		document.SlideImage.style.cursor = "url('" + TransparentCursorFileUrl + "'), auto";

	MouseCursorVisible = false;
}

function setSlideImageOnCenter()
{
	var Dx, Dy;
	var SlideShowImageWidth, SlideShowImageHeight;

	SlideShowImageWidth = document.getElementById("SlideShowImage").style.width.slice(0, -2);
	SlideShowImageHeight = document.getElementById("SlideShowImage").style.height.slice(0, -2);

	if(("undefined" != typeof(innerWidth)) && ("undefined" != typeof(innerHeight)))
	{
		Dx = innerWidth - SlideShowImageWidth;
		Dy = innerHeight - SlideShowImageHeight;
	}
	else if(("undefined" != typeof(document.compatMode)) && ("CSS1Compat" == document.compatMode))
	{
		Dx = document.documentElement.clientWidth - SlideShowImageWidth;
		Dy = document.documentElement.clientHeight - SlideShowImageHeight;
	}
	else
	{
		Dx = document.body.clientWidth - SlideShowImageWidth;
		Dy = document.body.clientHeight - SlideShowImageHeight;
	}

	if(SlideShowType)
	{
		document.getElementById("SlideShowImage").style.left = Math.floor(Math.random() * (Dx + 1)) + "px";
		document.getElementById("SlideShowImage").style.top = Math.floor(Math.random() * (Dy + 1)) + "px";
	}
	else
	{
		document.getElementById("SlideShowImage").style.left = (Dx / 2) + "px";
		document.getElementById("SlideShowImage").style.top = (Dy / 2) + "px";
	}
}

function setFadeRatio(Style, FadeType, Ratio)
{
	var O = FadeType >> FadeTypeOShift;
	var M = FadeType >> FadeTypeMShift;
	var B = FadeType >> FadeTypeBShift;
	var D = FadeType >> FadeTypeDShift;
	var u = 1 << FadeDirUShift;
	var r = 1 << FadeDirRShift;
	var d = 1 << FadeDirDShift;
	var l = 1 << FadeDirLShift;
	var w1, w2;

	if((O & 0x0000000F) || (0 == Ratio))
	{
		Style.filter = "alpha(opacity:" + (Ratio * 100) + ")";	// for IE
		Style.KHTMLRatio = Ratio;	// for older Safari
		Style.MozRatio = Ratio;	// for older Mozilla
		Style.opacity = Ratio;	// CSS3 standard
	}
	else
	{
		Style.filter = "alpha(opacity:100)";	// for IE
		Style.KHTMLRatio = 1;	// for older Safari
		Style.MozRatio = 1;	// for older Mozilla
		Style.opacity = 1;	// CSS3 standard
	}

	if(M & 0x0000000F)
	{
		Style.height = (Ratio * 100) + "%";
		Style.width = (Ratio * 100) + "%";
	}
	else
	{
		Style.height = "100%";
		Style.width = "100%";
	}

	w1 = 100 - Ratio * 100;
	if(D & u)
	{
		Style.top = w1 + "%";
	}
	else
	{
		Style.top = "auto";
	}
	if(D & r)
	{
		Style.right = w1 + "%";
	}
	else
	{
		Style.right = "auto";
	}
	if(D & d)
	{
		Style.bottom = w1 + "%";
	}
	else
	{
		Style.bottom = "auto";
	}
	if(D & l)
	{
		Style.left = w1 + "%";
	}
	else
	{
		Style.left = "auto";
	}
	if(M & 0x0000000F)
	{
		w1 = 50 - Ratio * 50;
		if((!(D & u)) && (!(D & d)))
		{
			Style.top = w1 + "%";
		}
		if((!(D & l)) && (!(D & r)))
		{
			Style.left = w1 + "%";
		}
	}

	if(B & 0x0000000F)
	{
		w1 = (1 - Ratio) / 2;
		w2 = (1 + Ratio) / 2;
		if(((B & u) || (B & d)) && ((B & r) || (B & l)))
		{
			Style.clip =
				"rect(" + (document.SlideImage.height * w1) + "px," +
				(document.SlideImage.width * w2) + "px," +
				(document.SlideImage.height * w2) + "px," +
				(document.SlideImage.width * w1) + "px)";
		}
		else if((B & u) || (B & d))
		{
			Style.clip =
				"rect(" + (document.SlideImage.height * w1) + "px," +
				"auto," +
				(document.SlideImage.height * w2) + "px," +
				"auto)";
		}
		else if((B & r) || (B & l))
		{
			Style.clip =
				"rect(auto," +
				(document.SlideImage.width * w2) + "px," +
				"auto," +
				(document.SlideImage.width * w1) + "px)";
		}
	}
	else
	{
		Style.clip = "rect(auto,auto,auto,auto)";
	}
}

function finishSlideShow()
{
	var s;

	s = location.href;
	history.back();
	setTimeout("_finishSlideShow('" + s + "')", 1000);
}

function _finishSlideShow(PreviousLocationHref)
{
	if(PreviousLocationHref == location.href)
	{
		close();
	}
}

function openSlideImageCopyrightLink()
{
	var v = false;
	var s;

	if("undefined" != typeof(SlideImageCopyrightLinkList))
	{
		s = SlideImageCopyrightLinkList[ImageSourceListIndex];
		v = true;
	}
	else if("undefined" != typeof(SlideImageCopyrightLink))
	{
		s = SlideImageCopyrightLink;
		v = true;
	}
	if(v)
	{
		open(s, "_blank");
	}
}

if(IntervalTimeIndex < MinIntervalTimeIndex)
{
	IntervalTimeIndex = MinIntervalTimeIndex;
}
if(MaxIntervalTimeIndex < IntervalTimeIndex)
{
	IntervalTimeIndex = MaxIntervalTimeIndex;
}
StartImageSourceListIndex %= ImageSourceList.length;
if(SlideShowPlayType)
{
	shuffleImageSourceList();
}

var FadeInType = SlideShowFadeInType;
var FadeOutType = SlideShowFadeOutType;
var ImageSourceListIndex = StartImageSourceListIndex;
var Playing = StartPlaying;

document.open();
document.write("<body onmousemove='turnOnMouseCursor(event)' onresize='setSlideImageOnCenter()'>");
document.write("<div class='SlideShowNavigationDisplay' id='SlideShowNavigationDisplay'>");
document.write("<form name='NavigationDisplay'>");

document.write("<div class='IntervalDisplay'>");
document.write("<input class='Button' name='IntervalTimeIncrementButton' title='" + IntervalTimeIncrementButtonTitle + "' type='button' value='' onclick='increaseIntervalTime()' onmouseover='turnOnNavigationDisplay()' onmouseout='turnOffNavigationDisplay()'>");
document.write("<input name='IntervalTimeDisplay' title='" + IntervalTimeDisplayTitle + "' type='button' value='' readonly onmouseover='turnOnNavigationDisplay()' onmouseout='turnOffNavigationDisplay()'>");
document.write("<input class='Button' name='IntervalTimeDecrementButton' title='" + IntervalTimeDecrementButtonTitle + "' type='button' value='' onclick='decreaseIntervalTime()' onmouseover='turnOnNavigationDisplay()' onmouseout='turnOffNavigationDisplay()'>");
document.write("</div>");

document.write("<div class='CounterDisplay'>");
document.write("<input class='Button' name='PreviousButton' title='" + PreviousButtonTitle + "' type='button' value='' onclick='skipPlay(-1)' onmouseover='turnOnNavigationDisplay()' onmouseout='turnOffNavigationDisplay()'>");
document.write("<input name='CountDisplay' title='" + CountDisplayTitle + "' value='' onchange='jumpPlay(value)' onmouseover='turnOnNavigationDisplay()' onmouseout='turnOffNavigationDisplay()'>");
document.write("<input class='Button' name='PlayButton' title='' type='button' value='' onclick='pausePlay()' onmouseover='turnOnNavigationDisplay()' onmouseout='turnOffNavigationDisplay()'>");
document.write("<input name='TotalCountDisplay' title='" + TotalCountDisplayTitle + "' value='' readonly onmouseover='turnOnNavigationDisplay()' onmouseout='turnOffNavigationDisplay()'>");
document.write("<input class='Button' name='NextButton' title='" + NextButtonTitle + "' type='button' value='' onclick='skipPlay(1)' onmouseover='turnOnNavigationDisplay()' onmouseout='turnOffNavigationDisplay()'>");
document.write("</div>");

if(PathNameDisplayType)
{
	document.write("<div class='PathNameDisplay'>");
	document.write("<input name='PathNameDisplay' title='" + PathNameDisplayTitle + "' type='button' value='' readonly onmouseover='turnOnNavigationDisplay()' onmouseout='turnOffNavigationDisplay()'");
	if(1 < PathNameDisplayType)
	{
		document.write(" class='Button' onclick='window.open(value, &quot;_blank&quot;)'");
	}
	document.write(">");
	document.write("</div>");
}

if(("undefined" != typeof(SlideImageCopyright)) || ("undefined" != typeof(SlideImageCopyrightList)))
{
	document.write("<div class='SlideImageCopyrightDisplay'>");
	document.write("<input");
	if(("undefined" != typeof(SlideImageCopyrightLinkList)) || ("undefined" != typeof(SlideImageCopyrightLink)))
	{
		document.write(" class='Button'");
	}
	document.write(" name='SlideImageCopyrightDisplay' title='" + SlideImageCopyrightDisplayTitle + "' type='button' value='' onclick='openSlideImageCopyrightLink()' onmouseover='turnOnNavigationDisplay()' onmouseout='turnOffNavigationDisplay()'>");
	document.write("</div>");
}

document.write("</form>");
document.write("</div>");
document.write("<div class='SlideShowImage' id='SlideShowImage'><a href='http://www.clala.co.jp/top/model/modelhouse.html' target='_parent'>");
document.write("<img name='SlideImage' src='" + ImageSourceList[ImageSourceListIndex] + "' alt='" + ImageSourceList[ImageSourceListIndex] + "' title='" + SlideImageTitle + "' onload='setNextImage()' onclick='finishSlideShow()' border='0'>");
document.write("</a></div>");
document.write("</body>");
document.close();

initialize();

