All pastes #123891 Raw Edit

Archive.shtml

public text v1 · immutable
·published 2006-08-09 17:43 UTC
rendered paste body
<script language="JavaScript">
latestimage = 103;
imgnum = latestimage;

document.write('<table bgcolor=#003399>');
document.write('<tr><td align=center>');
document.write('<div id="comictitle" class="comictitlestyle">Episode 2</div>');
document.write('<tr><td width=1025 height=300 align=center>');
document.write('<div id="comicview"></div>');

function getFilename(index) {
	if(index == 1) return "1.gif";
	if(index == 11) return "11.PNG";
	if(index < 15) return (index + ".JPG");
	
	if(index == 15) return "15.wmv";
	if(index < 18) return (index + ".JPG");
	
	if(index == 18) return (index + ".PNG");
	if(index == 19) return (index + ".JPG");
	if(index < 22) return (index + ".wmv");
	if(index == 73) return "73.wmv"; 
	if(index == 77) return "77.gif";
	if(index == 78) return "78.gif";
	if(index == 100) returen "100.swf";
		
	return (index + ".PNG");
	

}

function showComic(index) {
	target = getFilename(index);
        if(target == index + ".swf") {
                document.getElementById("comicview").innerHTML =
                        '<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="430" width="550" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="media/images/archive/sagm/' + index  + '" name="movie">
<param value="false" name="loop">
<param value="false" name="menu">
<param value="high" name="quality">
<param value="#000000" name="bgcolor"></object>';
}
	if(target == index + ".wmv") {
		document.getElementById("comicview").innerHTML =
			'<OBJECT id="mediaPlayer" width="320" height="285" ' + 
			'classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" ' + 
			'codebase="ttp://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"' + 
			'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"' + 
			'<param name="fileName" value="media/images/archive/sagm' + target + '">' + 
			'<param name="animationatStart" value="true">' + 
			'<param name="transparentatStart" value="true">' + 
			'<param name="autoStart" value="true">' + 
			'<param name="showControls" value="true">' + 
			'<param name="loop" value="false">' + 
			'<EMBED type="application/x-mplayer2" ' + 
			'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" ' + 
			'id="mediaPlayer" name="mediaPlayer" displaysize="4" autosize="-1" ' + 
			'bgcolor="darkblue" showcontrols="true" showtracker="-1" ' + 
			'showdisplay="0" showstatusbar="-1" videoborder3d="-1" width="320" height="285"' + 
			'src="media/images/archive/sagm/' + target + '" autostart="true" designtimesp="5311" loop="false">' + 
			'</EMBED>' + 
			'</OBJECT>';
	} else {		
		document.getElementById("comicview").innerHTML = 
			'<img src="media/images/archive/sagm/' + target + '">';
	}
	document.getElementById("comictitle").innerHTML = "Episode " + index;
}

function navToImage(index) {
	imgnum = index;
	showComic(imgnum);
}

function navAlongImages(index) {
	imgnum += index;
	if(imgnum > latestimage) imgnum = latestimage;
	if(imgnum < 1) imgnum = 1;
	showComic(imgnum);
}

showComic(imgnum);

document.write('<tr><td align=center class="comicnavigation">');
document.write('<a href="#" onClick="navToImage(1)">First</a> &nbsp; &nbsp; ');
document.write('<a href="#" onClick="navAlongImages(-1)">Last</a> &nbsp; &nbsp; ');
document.write('<a href="#" onClick="navAlongImages(1)">Next</a> &nbsp; &nbsp; ');
document.write('<a href="#" onClick="navToImage(' + latestimage + ')">Latest</a>');
document.write('</td></tr></table>');

</script>