//------------------------------------------------
// This code is Copyrighted (c) 2003-05 Ian Pimm.
// It may not be used without proper permission.
// Please contact the author about it if you
// really want to use it that badly.  Thanks.
//
//------------------------------------------------

r=new Array()
c=new Array()
r[1]="030120.gif";c[1]="level1"
r[2]="030123.gif";c[2]="thanks"
r[3]="030127.gif";c[3]="waiting"
r[4]="030130.gif";c[4]="calm"
r[5]="030203.gif";c[5]="storeopen"
r[6]="030206.gif";c[6]="money"
r[7]="030210.gif";c[7]="excitement"
r[8]="030211.gif";c[8]="who"
r[9]="030212.gif";c[9]="andwho"
r[10]="030213.gif";c[10]="airplane"
r[11]="030217.jpg";c[11]="dvd"
r[12]="030220.jpg";c[12]="drink"
r[13]="030224.jpg";c[13]="kylawork"
r[14]="030227.jpg";c[14]="ouch"
r[15]="030303.jpg";c[15]="board"
r[16]="030306.gif";c[16]="cmart"
r[17]="030310.gif";c[17]="phone"
r[18]="030313.gif";c[18]="pajamas"
r[19]="030317.jpg";c[19]="gameon"
r[20]="030320.jpg";c[20]="dark"
r[21]="030324.gif";c[21]="sleep"
r[22]="030327.gif";c[22]="diner"
r[23]="030331.jpg";c[23]="storm"
r[24]="030401.gif";c[24]="baka"
r[25]="030403.gif";c[25]="mug"
r[26]="030407.gif";c[26]="resident"
r[27]="030410.jpg";c[27]="meow"
r[28]="030414.jpg";c[28]="blah"
r[29]="030417.gif";c[29]="wakeup"
r[30]="030421.gif";c[30]="notequal"
r[31]="030424.gif";c[31]="waitress"
r[32]="030428.gif";c[32]="leaving"
r[33]="030501.jpg";c[33]="classic"
r[34]="030505.jpg";c[34]="hyper"
r[35]="030508.gif";c[35]="shelves"
r[36]="030512.gif";c[36]="stunned"
r[37]="030515.jpg";c[37]="car"
r[38]="030519.gif";c[38]="hot"
r[39]="030522.gif";c[39]="link"
r[40]="030526.gif";c[40]="bokken"
r[41]="030529a.gif";c[41]="pose"
r[42]="030529b.jpg";c[42]="pose2"
r[43]="030602.gif";c[43]="laugh"
r[44]="030605.jpg";c[44]="tree"
r[45]="030611.jpg";c[45]="smirk"
r[46]="030613.jpg";c[46]="rune"
r[47]="030617.jpg";c[47]="apology"
r[48]="030619.jpg";c[48]="screen"
r[49]="030623.gif";c[49]="pacman"
r[50]="030626.gif";c[50]="worried"
r[51]="030630.gif";c[51]="cosplay"
r[52]="030703.jpg";c[52]="surfing"
r[53]="030707.gif";c[53]="computer"
r[54]="030710.gif";c[54]="bedroom"
r[55]="030714.gif";c[55]="guard"
r[56]="030717.gif";c[56]="bluescreen"
r[57]="030721.jpg";c[57]="tired"
r[58]="030724.gif";c[58]="bsod2"
r[59]="030728.gif";c[59]="reply"
r[60]="030731.gif";c[60]="bsod3"
r[61]="030804.jpg";c[61]="walking"
r[62]="030807.gif";c[62]="wings"
r[63]="030814.gif";c[63]="bsod4"
r[64]="030818.jpg";c[64]="night"
r[65]="030821.jpg";c[65]="glow"
r[66]="030825.jpg";c[66]="bed"
r[67]="030828.jpg";c[67]="curious"
r[68]="030901.gif";c[68]="awaken"
r[69]="030904.jpg";c[69]="fridge"
r[70]="030908.jpg";c[70]="sparkle"
r[71]="030911.gif";c[71]="september11th"
r[72]="030915.gif";c[72]="manager"
r[73]="030918.gif";c[73]="couch"
r[74]="030923.gif";c[74]="manga"
r[75]="030925.gif";c[75]="bsodlite"
r[76]="030929.gif";c[76]="checking"
r[77]="031003.gif";c[77]="bsod5"
r[78]="031006.jpg";c[78]="ice"
r[79]="031013.jpg";c[79]="group"
r[80]="031017.gif";c[80]="motivated"
r[81]="031020.gif";c[81]="bsod6"
r[82]="031023.gif";c[82]="star"
r[83]="031030.gif";c[83]="cafe"
r[84]="031114.jpg";c[84]="bsod6.5"
r[85]="040107.jpg";c[85]="returnofro"
r[86]="040119.gif";c[86]="verygood"
r[87]="040122.gif";c[87]="slam"
r[88]="040126.jpg";c[88]="split"
r[89]="040129.gif";c[89]="immortal"
r[90]="040205.jpg";c[90]="bowling"
r[91]="040209.jpg";c[91]="cdplayer"
r[92]="040315.gif";c[92]="whack"
usercode=""
maxindex=r.length-1
userindex=maxindex
userWrong=0

function placeArchiveList()
{
	document.write("<option>#071 - 2004.03.15: Demand It.<option>N/A - 2004.02.09: IOD: Relaxation<option>#070 - 2004.02.05: Seven-Ten<option>#069 - 2004.01.29: Can You Hear Me Now?<option>#068 - 2004.01.26: What a Value!<option>#067 - 2004.01.22: Questionable Roots<option>#066 - 2004.01.19: Running Dry<option>N/A - 2004.01.07: Return of RO Announcement<option>N/A - 2003.11.14: BSoD (6 1/2): From Beyond The Blah.<option>#065 - 2003.10.30: Best Part of Waking Up?<option>N/A - 2003.10.23: IOD: Ice - Calm Day<option>N/A - 2003.10.20: BSoD: Dead Before Arrival<option>#064 - 2003.10.17: Indecisiveness<option>#063 - 2003.10.13: And They're Off!<option>#062 - 2003.10.06: But Not Quite Ready<option>N/A - 2003.10.03: BSoD: Yep, It's Time Again!<option>#061 - 2003.09.29: Heads Up<option>N/A - 2003.09.25: BSoD (Lite): Moving Day<option>#060 - 2003.09.23: The Many Faces of Wolf<option>#059 - 2003.09.18: Not a Moment To Lose<option>#058 - 2003.09.15: Calling In<option>N/A - 2003.09.11: September 11th Announcement<option>#057 - 2003.09.08: So Full of Sucrose<option>#056 - 2003.09.04: Like a Cheesy Commercial<option>#055 - 2003.09.01: Morning Conversation<option>#054 - 2003.08.28: The 56K Disconnection<option>#053 - 2003.08.25: First Contact<option>#052 - 2003.08.21: Speaking Out<option>#051 - 2003.08.18: Pessimism<option>N/A - 2003.08.14: IOD: BSoD Iced-Over<option>N/A - 2003.08.07: IOD: Wings. Ears. Tail.<option>#050 - 2003.08.04: On The Bright Side<option>N/A - 2003.07.31: IOD: BS-ODed!<option>#049 - 2003.07.28: Late Reply<option>N/A - 2003.07.24: IOD: BSoD Again!<option>#048 - 2003.07.21: Survival<option>N/A - 2003.07.17: IOD: The Blue Screen of Death!<option>#047 - 2003.07.14: Coming Through<option>#046 - 2003.07.10: Like Waterfalls<option>#045 - 2003.07.07: Request For Bail<option>#044 - 2003.07.03: The Sly Plea<option>N/A - 2003.06.30: IOD: Ice-Cosplay<option>#043 - 2003.06.26: Desperation?<option>#042 - 2003.06.23: Mastermind<option>#041 - 2003.06.19: Artificial Intelligence<option>#040 - 2003.06.17: Unexplainable<option>N/A - 2003.06.13: IOD: Dramatic Pose<option>#039 - 2003.06.11: Technical Difficulty<option>#038 - 2003.06.05: Dark Reunion<option>#037 - 2003.06.02: Behind Enemy Lines<option>N/A - 2003.05.29: IOD: Dead Again Remix<option>N/A - 2003.05.29: IOD: Dead Again<option>#036 - 2003.05.26: To Be Expected<option>N/A - 2003.05.22: IOD: Wolf Link<option>#035 - 2003.05.19: Better Than an Ice Cream Cone<option>#034 - 2003.05.15: Decrescendo<option>#033 - 2003.05.12: It Came From Above<option>#032 - 2003.05.08: To The &quot;X&quot; Power<option>#031 - 2003.05.05: Pocky Overkill<option>N/A - 2003.05.01: IOD: Rune*Bert<option>#030 - 2003.04.28: A Walk in the Park<option>#029 - 2003.04.24: Check Please<option>#028 - 2003.04.21: An Arm and a Leg<option>#027 - 2003.04.17: ...Guess Not.<option>#026 - 2003.04.14: Still Sleeping?<option>N/A - 2003.04.10: IOD: Original CG Work<option>N/A - 2003.04.07: IOD: A Blast From The Past<option>#025 - 2003.04.03: Everything's A-Okay<option>#024 - 2003.04.01: Nekowabaka's First Adventure!<option>#023 - 2003.03.31: Venom<option>#022 - 2003.03.27: Coffee Time<option>#021 - 2003.03.24: Good Morning<option>#020 - 2003.03.20: Malice Otaku<option>#019 - 2003.03.17: Winding Down<option>#018 - 2003.03.13: Making Plans<option>#017 - 2003.03.10: Broken Silence<option>#016 - 2003.03.06: Unexpected Communication<option>#015 - 2003.03.03: The Challenge is On<option>#014 - 2003.02.27: Go-Go-Go<option>#013 - 2003.02.24: All in a Day's Work<option>#012 - 2003.02.20: Ookami Cola<option>#011 - 2003.02.17: Vertically Challenged<option>#010 - 2003.02.13: Rune Awakening<option>#009 - 2003.02.12: Profiles - And who are we?<option>#008 - 2003.02.11: Profiles - Who are we?<option>#007 - 2003.02.10: Yay.<option>#006 - 2003.02.06: Never Say Never<option>#005 - 2003.02.03: Treasures from Beyond<option>#004 - 2003.01.30: Ack.<option>#003 - 2003.01.27: Time Spans and Bad Jokes<option>#002 - 2003.01.23: Enter Rune<option>#001 - 2003.01.20: So It Begins...")
}
function getComicPassword()
{
	usercode = prompt("Please insert your password - You will then return to the comic you left off on.  Passwords can be found to the right of the Random Otaku title of each comic...","???")
	if (usercode!=null)
	{
		editComicPassword()
		searchPassword()
	}
}
function editComicPassword()
{
	usercode = usercode.toLowerCase()
	tempStr = ""
	for (var i=0;i<usercode.length;i++)
	{
		tempPart = usercode.substring(i,i+1)
		if ((tempPart!=" ")&&(tempPart!="-")&&(tempPart!="[")&&(tempPart!="]")&&(tempPart!="'")) tempStr+=tempPart
	}
	usercode = tempStr
}
function searchPassword()
{
	var i=1	
	while ((c[i]!=usercode)&&(i<c.length)) i++
	if (i==c.length)
	{
		if (userWrong<4) {
			userWrong++
			alert("ERROR - Password invalid!")
		} else {
			alert("ERROR - Password invalid!  (P.S. There's no secret codes if that's what you're looking for...)")
		}
	} else	{
		userindex=i
		userWrong=0
		switchComicImg()
		updateArchList()
	}
}
function updateArchList()
{
	document.archivelist.archivedrop.selectedIndex=maxindex-userindex
}
function updateButtons()
{
	if (userindex==1) {
		document.btn0t.src="btn02.gif"
		document.btn0b.src="btn02.gif"
		document.btn1t.src="btn12.gif"
		document.btn1b.src="btn12.gif"
	} else {
		document.btn0t.src="btn01.gif"
		document.btn0b.src="btn01.gif"
		document.btn1t.src="btn11.gif"
		document.btn1b.src="btn11.gif"		
	}
	if (userindex==maxindex) {
		document.btn2t.src="btn22.gif"
		document.btn2b.src="btn22.gif"
		document.btn3t.src="btn32.gif"
		document.btn3b.src="btn32.gif"
	} else {
		document.btn2t.src="btn21.gif"
		document.btn2b.src="btn21.gif"
		document.btn3t.src="btn31.gif"
		document.btn3b.src="btn31.gif"		
	}
}
function switchComicImg(userloc)
{
	document.comicview.src="comics/"+r[userindex]
	updateButtons()
}
function changeComic(usermode,userloc)
{
	if (userloc==1) scroll(0,400)
	if ((userindex>1)&&(usermode==1)) userindex--
	if ((userindex<maxindex)&&(usermode==2)) userindex++
	if (usermode==0) userindex=1
	if (usermode==3) userindex=maxindex
	updateArchList()
	switchComicImg(userloc)
}