//<!--
var d=document;
// ----------------------------------------------------
// Called on page load to provide dynamic content.
// ----------------------------------------------------
function body_onload(){
if (script_load==1){
if (isValidObj('searchmenu'))  {Show_SearchBox();}
if (isValidObj('callout'))     {Show_Callout();}
if (isValidObj('keypoints'))   {Show_KeyPoints();}
if (isValidObj('showguide'))   {Show_Guide();}
if (isValidObj('showthumb'))   {Show_Chara();Show_Thumb();}
if (isValidObj('animekeys'))   {Show_Pop_Guide();}
if (isValidObj('footer_links')){Show_Footer();}
Do_AddHomeToPlotSummary();
Do_AddNewItemsToIndex();
Do_MenuExtend();
Replace_Mailto();
Add_ToTop();}}

// ----------------------------------------------------
// Object tester.
// ----------------------------------------------------
function isValidObj(whatObj)
{var isValid = (!eval("(typeof "+whatObj+"=='undefined')") || (d.getElementById(whatObj)));return isValid;}

// ----------------------------------------------------
// Scroll to top of page.
// ----------------------------------------------------
function moveToTop() {window.scrollTo(0,0);}

// ----------------------------------------------------
// Add scrolling to top links.
// ----------------------------------------------------
function Add_ToTop(){
var whatDoc;
if (d.getElementsByTagName('a')) {
whatDoc=d.getElementsByTagName('a');
for (var i=0;i<whatDoc.length;i++) {
if (whatDoc[i].href.indexOf("#_top")>-1) {
if (whatDoc[i].setAttribute) {whatDoc[i].setAttribute("onclick", "moveToTop();return false;");}
}}}}

// ----------------------------------------------------
// Adds additional options to top nav menu bar using innerHTML.
// ----------------------------------------------------
function Do_AddHomeToPlotSummary(){
if (location.href.indexOf('info_')!=-1){
var ahDoc, divs;
var hs="";
if (d.getElementsByTagName('div')){
divs=d.getElementsByTagName('div');
for (var i=0;i<divs.length;i++) {
if (divs[i].className=="prevnextmenu"){
ahDoc=divs[i];
hs=ahDoc.innerHTML;
hs='<a href="index.html" title="Back to AARG Home">AARG Home</a>'+hs;
ahDoc.innerHTML=hs;
break;}}}}}

// ----------------------------------------------------
// Adds additional options to menu container using innerHTML.
// ----------------------------------------------------
function Do_MenuExtend(){
var meDoc, divs;
var hs="";
if (d.getElementsByTagName('div'))
{
divs=d.getElementsByTagName('div');
for (var i=0;i<divs.length;i++) {
if (divs[i].className=="menu-wrapper"){
meDoc=divs[i];
hs=meDoc.innerHTML;
if (location.href.indexOf('index.html')<0){
hs+="<p><div class='menu'>";
hs+="<H5>About AARG</H5>";
hs+="<div class='textsection'>Angel's Anime Rating Guide (AARG) exists as a way to promote the anime art form and to give back to the anime community by providing an anime fan's perspective on anime.";
hs+="<p>";
hs+="Here you will find plot summaries, ratings, comments and cover art on many animation titles.";
hs+="</div></div><p>";
}
hs+="<p><div class='menu'>";
hs+='<H5>Blog Links</H5>';
hs+='<A href="http://aarg.blogspot.com/">AARG Blog</A>';
hs+='<A href="http://aarg.blogspot.com/2005/01/aarg-wallpapers.html">Wallpapers</A>';
hs+='<A href="http://aarg.blogspot.com/2005/01/aarg-site-feedback.html">View Feedback</A>';
hs+='<A href="http://aarg.blogspot.com/2005/01/aarg-site-updates.html">View Update Log</A>';
hs+='<A href="http://aarg.blogspot.com/2005/10/early-aarg_22.html">A History of AARG</A>';
hs+='<A href="http://aarg.blogspot.com/2005/03/confessions-of-pascal-programmer.html">Confessions of a Pascal Programmer</A>';
hs+='<A href="http://aarg.blogspot.com/2007/10/ultimate-otaku-fall-cleanup.html">Ultimate Otaku Fall Cleanup</A>';
hs+='<A href="http://aarg.blogspot.com/2007/08/my-interest-in-anime.html">My Interest In Anime</A>';
hs+='<A href="http://aarg.blogspot.com/2007/07/where-to-buy-anime-in-city-of-brotherly.html">Where to buy anime in Philadelphia</A>';
hs+='<A href="http://rodriguezfamilyevents.blogspot.com/2005/01/aarg-family-photo-album.html">Family Photo Album</A>';
hs+="</div><p>";
hs+="<p><div class='menu'>";
hs+='<H5>Blog Labels</H5>';
hs+='<A href="http://aarg.blogspot.com/search/label/Anime">Anime</A>';
hs+='<A href="http://aarg.blogspot.com/search/label/Not%20Necessarily%20Anime">Not Necessarily Anime</A>';
hs+='<A href="http://aarg.blogspot.com/search/label/Site%20Revisions">Site Revisions</A>';
hs+="</div><p>";
if (location.href.indexOf('index.html')<0){
hs+="<p><div class='menu'>";
hs+="<H5>What's New</H5>";
hs+='<p>Recent additions to the anime ratings database...</p>';
hs+=Do_NewITems();
hs+="</div><p>";
hs+="<p><div class='menu'>";
hs+='<H5>Webmaster</H5>';
hs+='<IMG height=80 alt="Angel" src="Family/Family_Angel.jpg" width=80 style="border: 1px solid #bbbbbb; padding: 2px;margin-bottom: 10px;">';
hs+='<P><b>Angel</b></P><P>Philadelphia, Pennsylvania, USA</P>';
hs+='<A href="http://www.blogger.com/profile/01316798477881881433" class="newline">View My Profile</A>';
hs+="</div><p>";
}
meDoc.innerHTML=hs;
break;}}}}

// ----------------------------------------------------
// Add newly added items to content div.
// ----------------------------------------------------
function Do_AddNewItemsToIndex(){
if (location.href.indexOf('index.html')!=-1){
var anDoc, divs;
var hs="";
if (d.getElementsByTagName('div')){
divs=d.getElementsByTagName('div');
for (var i=0;i<divs.length;i++) {
if (divs[i].className=="home_detail_items"){
anDoc=divs[i];
hs=anDoc.innerHTML;
hs=Do_NewITems()+hs;
hs="<H3>What's New</H3>"+hs;
anDoc.innerHTML=hs;
break;}}}}}

// ----------------------------------------------------
// Newly added items.
// ----------------------------------------------------
function Do_NewITems(){
var hs="";
hs+='<div class="menu_detail_items">';
if (location.href.indexOf('info_bigo.html')==-1){hs+='<div class="detail_item"><a href="info_bigo.html"><img src="Thumbs/tn_bigo.gif" alt="Big O" title="Big O">Big O<div class="itemdate">01.22.2009</div></a></div>';}
if (location.href.indexOf('info_bludgeonangel.html')==-1){hs+='<div class="detail_item"><a href="info_bludgeonangel.html"><img src="Thumbs/tn_bludgeonangel.gif" alt="Bludgeoning Angel Dokuro-Chan" title="Bludgeoning Angel Dokuro-Chan">Bludgeoning Angel Dokuro-Chan<div class="itemdate">08.15.2009</div></a></div>';}
if (location.href.indexOf('info_claymore.html')==-1){hs+='<div class="detail_item"><a href="info_claymore.html"><img src="Thumbs/tn_claymore.gif" alt="Claymore" title="Claymore">Claymore<div class="itemdate">05.25.2009</div></a></div>';}
if (location.href.indexOf('info_gunslingergirl.html')==-1){hs+='<div class="detail_item"><a href="info_gunslingergirl.html"><img src="Thumbs/tn_gunslingergirl.gif" alt="Gunslinger Girl" title="Gunslinger Girl">Gunslinger Girl<div class="itemdate">01.24.2009</div></a></div>';}
if (location.href.indexOf('info_kannagi.html')==-1){hs+='<div class="detail_item"><a href="info_kannagi.html"><img src="Thumbs/tn_kannagi.gif" alt="Kannagi: Crazy Shrine Maidens" title="Kannagi: Crazy Shrine Maidens">Kannagi: Crazy Shrine Maidens<div class="itemdate">10.04.2009</div></a></div>';}
if (location.href.indexOf('info_moribito.html')==-1){hs+='<div class="detail_item"><a href="info_moribito.html"><img src="Thumbs/tn_moribito.gif" alt="Moribito: Guardian of the Spirit" title="Moribito: Guardian of the Spirit">Moribito: Guardian of the Spirit<div class="itemdate">12.01.2008</div></a></div>';}
if (location.href.indexOf('info_rocketgirls.html')==-1){hs+='<div class="detail_item"><a href="info_rocketgirls.html"><img src="Thumbs/tn_rocketgirls.gif" alt="Rocket Girls" title="Rocket Girls">Rocket Girls<div class="itemdate">04.01.2009</div></a></div>';}
if (location.href.indexOf('info_third.html')==-1){hs+='<div class="detail_item"><a href="info_third.html"><img src="Thumbs/tn_third.gif" alt="Third: The Girl With the Blue Eye" title="Third: The Girl With the Blue Eye">Third: The Girl With the Blue Eye<div class="itemdate">12.02.2008</div></a></div>';}
if (location.href.indexOf('info_tweeny_witches.html')==-1){hs+='<div class="detail_item"><a href="info_tweeny_witches.html"><img src="Thumbs/tn_tweeny_witches.gif" alt="Tweeny Witches" title="Tweeny Witches">Tweeny Witches<div class="itemdate">08.24.2008</div></a></div>';}
hs+="</div>";
return hs;}

// ----------------------------------------------------
// Search box functionality.
// Checks for invalid conditions before launching search page (location.href).
// ----------------------------------------------------
function Do_Search(){
var valWhat=d.RemoteBox.RemoteTerms.value;
var ec=0;
if (valWhat.length==1) {ec=1;}
if (valWhat.length>50) {ec=2;}
if ((valWhat.substring(0,1)=='"') && (valWhat.length==2)) {ec=6;}
if ((valWhat.substring(0,1)=="'") && (valWhat.length==2)) {ec=6;}
if (valWhat.indexOf("<")>-1) {ec=6;}
if (valWhat.indexOf(">")>-1) {ec=6;}
if (valWhat.indexOf("&")>-1) {ec=6;}
if (valWhat.indexOf("#")>-1) {ec=6;}
if (valWhat.indexOf("%")>-1) {ec=6;}
if (valWhat.indexOf("=")>-1) {ec=6;}
if (valWhat.indexOf("/")>-1) {ec=6;}
if (valWhat.indexOf("\\")>-1) {ec=6;}
if (valWhat.indexOf(":")>-1) {ec=6;}
if (ec==0) {location.href='i_searchjs.html#'+escape(valWhat);}
else{
if (ec==1) {alert("Input must be at least two characters.\nTry Again.");ClearForm();}
if (ec==2) {alert("Input is limited to 50 characters.\nTry Again.");ClearForm();}
if (ec==6) {alert("Input contains invalid characters.\nTry Again.");ClearForm();}}}

// ----------------------------------------------------
// Render search form using innerHTML.
// ----------------------------------------------------
function Show_SearchBox(){
var SearchDoc;
var hs="";
if (typeof searchmenu=="undefined") {if (d.getElementById('searchmenu')) {SearchDoc=d.getElementById('searchmenu');}}
else {if (searchmenu){SearchDoc=searchmenu;}}
hs+='<form name="RemoteBox" method="post" action="javascript:Do_Search();">';
hs+='<table cellpadding="0" cellspacing="0" border="0"><tr><td class="remoteinput"><input name="RemoteTerms" type="text" style="width: 100%;" title="Enter Keywords"></td>';
hs+='<td class="remotesearch"><a href="javascript:Do_Search();" title="Search">Search</a></td></tr></table>';
hs+='</form>';
SearchDoc.innerHTML=hs;}

// ----------------------------------------------------
// Render page description using innerHTML.
// ----------------------------------------------------
function Show_Callout(){
var whatCallout="";
var metas,calloutDoc;
if (d.getElementsByTagName('meta')) {
metas = d.getElementsByTagName('meta');
for (var i=0;i<metas.length;i++) {
if(metas[i].getAttribute('name')=="jssearchval") {whatCallout=new String(metas[i].getAttribute('content'));}}
if (typeof callout=="undefined") {calloutDoc=d.getElementById("callout");}
else {calloutDoc=callout;}
if (whatCallout.length>4) {calloutDoc.innerHTML='<div class="textsection">'+whatCallout+"</div>";calloutDoc.style.display="block";}}}

// ----------------------------------------------------
// Render rating summary using innerHTML.
// ----------------------------------------------------
function Show_KeyPoints(){
var whatKeys,whatRating,KeyDoc,RatingDoc;
var hs="";
var k;
if (typeof keypoints=="undefined") {if (d.getElementById('keypoints')) {KeyDoc=d.getElementById('keypoints');}}
else {KeyDoc=keypoints;}
whatKeys=new String(KeyDoc.innerHTML);
if (typeof showguide=="undefined") {if (d.getElementById('showguide')) {RatingDoc=d.getElementById('showguide');}}
else {RatingDoc=showguide;}
if (typeof RatingDoc=="undefined") {} else {
whatRating=new String(RatingDoc.innerHTML);
hs+=Rating(whatRating.substring(0,1),"Rating");
k=whatKeys.indexOf("w",0);if (k>-1) {hs+=Rating(whatKeys.substring(k+1,k+2),"Writing Quality");}
k=whatKeys.indexOf("m",0);if (k>-1) {hs+=Rating(whatKeys.substring(k+1,k+2),"Music Quality");}
k=whatKeys.indexOf("a",0);if (k>-1) {hs+=Rating(whatKeys.substring(k+1,k+2),"Animation Quality");}
k=whatKeys.indexOf("e",0);if (k>-1) {hs+=Rating(whatKeys.substring(k+1,k+2),"Entertainment Value");}
k=whatKeys.indexOf("s",0);if (k>-1) {hs+=Rating(whatKeys.substring(k+1,k+2),"Intrinsic Value");}
hs+="<p class='newline'></p>";
hs+=Show_AnimeKeyLink();
KeyDoc.innerHTML=hs;KeyDoc.style.display="block";}}

// ----------------------------------------------------
// Render rating guide using innerHTML.
// ----------------------------------------------------
function Show_Guide(){
var whatGuide,GuideDoc;
var hs="";
var cMedia=0;
var cLang=0;
if (typeof showguide=="undefined") {if (d.getElementById('showguide')) {GuideDoc=d.getElementById('showguide');}}
else {GuideDoc=showguide;}
if (typeof GuideDoc=="undefined") {} else {
whatGuide=new String(GuideDoc.innerHTML);
hs+='<br><div class="ratingbox">';
hs+='<a id="commentary_link" href="#commentary"><img SRC="Buttons/pic_'+whatGuide.substring(0,1)+'.gif" title="Rating '+whatGuide.substring(0,1)+' of 5 (View Commentary)" ALT="Rating '+whatGuide.substring(0,1)+' of 5 (View Commentary)"></a><a href="#commentary" title="View Commentary"><img src="Buttons/pic_comment.gif" alt="View Commentary"></a>';
if ((whatGuide.indexOf("vhs",0)>-1) && (whatGuide.indexOf("xvhs",0)==-1)) {hs+='<img SRC="Buttons/pic_vhs.gif" title="VHS" ALT="VHS">';cMedia=cMedia+1;}
if ((whatGuide.indexOf("xvhs",0)>-1) && (whatGuide.indexOf("copy",0)==-1)) {hs+='<img SRC="Buttons/pic_noVHS.gif" title="Removed From VHS Archive" ALT="Removed From VHS Archive">';}
if (whatGuide.indexOf("copy",0)>-1) {hs+='<img SRC="Buttons/pic_xferDVD.gif" title="VHS To DVD Transfer" ALT="VHS To DVD Transfer">';if(cMedia==0){cMedia=cMedia+1;}}
if (whatGuide.indexOf("vcd",0)>-1) {hs+='<img SRC="Buttons/pic_vcd.gif" title="VCD" ALT="VCD">';cMedia=cMedia+1;}
if (whatGuide.indexOf("laser",0)>-1) {hs+='<img SRC="Buttons/pic_laser.gif" title="LASER" ALT="LASER">';cMedia=cMedia+1;}
if (whatGuide.indexOf("dvd",0)>-1) {hs+='<img SRC="Buttons/pic_dvd.gif" title="DVD" ALT="DVD">';cMedia=cMedia+1;}
if (whatGuide.indexOf("hd",0)>-1) {hs+='<img SRC="Buttons/pic_hd.gif" title="High Definition DVD" ALT="High Definition DVD">';}
if (whatGuide.indexOf("dub",0)>-1) {cLang=cLang+1;}
if (whatGuide.indexOf("sub",0)>-1) {cLang=cLang+1;}
if (cLang>1) {hs+='<img SRC="Buttons/pic_both.gif" title="Hybrid: Multiple Languages" ALT="Hybrid: Multiple Languages">';}
if ((whatGuide.indexOf("dub",0)>-1) && (cLang==1)) {hs+='<img SRC="Buttons/pic_dub.gif" title="Englaish language version" ALT="Englaish language version">';}
if ((whatGuide.indexOf("sub",0)>-1) && (cLang==1)) {hs+='<img SRC="Buttons/pic_sub.gif" title="Englaish subtitled version" ALT="Englaish subtitled version">';}
hs+='</div>';
GuideDoc.innerHTML=hs;GuideDoc.style.display="inline";}}

// ----------------------------------------------------
// Render rating key summary using innerHTML.
// ----------------------------------------------------
function Show_Pop_Guide(){
var whatDoc,otherDoc;
var shortlist=0;
if (typeof animekeys=="undefined") {if (d.getElementById('animekeys')) {whatDoc=d.getElementById('animekeys');}}
else {whatDoc=animekeys;}
if (typeof whatDoc=="undefined") {} else {
if (typeof shortanimekeys=="undefined") {if (document.getElementById('shortanimekeys')) {shorlist=1;otherDoc=d.getElementById('shortanimekeys');}}
else {shortlist=1;otherDoc=shortanimekeys;}
if (shortlist==1){otherDoc.innerHTML=Show_AnimeKeyLink();otherDoc.style.display="block";;}
var hs='';
hs+='<div class="popguide_wrapper">';
hs+='<table id="popguide" border="0" cellspacing="0" cellpadding="0"><tr class="highlight"><td colspan="3"><h5>Rating Keys</h5></td></tr>';
hs+='<tr><td width="5%"><img src="Buttons/pic_5.gif"></td><td width="1%">&nbsp;</td><td width="94%">Excellent. Infinitely re-watchable. Never get tired of seeing it.</td></tr>';
hs+='<tr class="highlight"><td><img src="Buttons/pic_4.gif"></td><td>&nbsp;</td><td>Great. Well worth buying.</td></tr>';
hs+='<tr><td><img src="Buttons/pic_3.gif"></td><td>&nbsp;</td><td>Really good. A good title to buy. Worth watching several times a year.</td></tr>';
hs+='<tr class="highlight"><td><img src="Buttons/pic_2.gif"></td><td>&nbsp;</td><td>A good rental title. Might be worth buying. Might be worth watching twice.</td></tr>';
hs+='<tr><td><img src="Buttons/pic_1.gif"></td><td>&nbsp;</td><td>Not so good. Not really worth buying, but might be worth renting.</td></tr>';
hs+='<tr class="highlight"><td><img src="Buttons/pic_0.gif"></td><td>&nbsp;</td><td>Poor. Do not waste your time or money.</td></tr>';
if (shortlist==0){
hs+='<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
hs+='<tr class="highlight"><td colspan="3"><h5>Language Keys</h5></td></tr>';
hs+='<tr><td colspan="3">In the age of digital media, more often than not, you will see multiple languages indicated. But, way back in the misty dawn of time, when VHS still roamed the video stores, you had to choose between dubbed and subtitled. If all of the material that I have (or used to have) is dubbed, subtitled or a mix of both, then I will indicate the language format.</td></tr>';
hs+='<tr><td><img src="Buttons/pic_sub.gif"></td><td>&nbsp;</td><td>English subtitled version.</td></tr>';
hs+='<tr class="highlight"><td><img src="Buttons/pic_dub.gif"></td><td>&nbsp;</td><td>English language version.</td></tr>';
hs+='<tr><td><img src="Buttons/pic_both.gif"></td><td>&nbsp;</td><td>Hybrid: Multiple Languages. The newest entries will, more often than not, be DVD. A hybrid DVD contains multiple language tracks. In some cases, some older titles in my collection will be marked as hybrid when I have (or used to have) a mix of dubbed and subtitled VHS.</td></tr>';
hs+='<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
hs+='<tr class="highlight"><td colspan="3"><h5>Media Keys</h5></td></tr>';
hs+='<tr><td colspan="3">The newest entries will, more often than not, be DVD. But, many of the older entries are VHS. Some titles have been around long enough to have been released and re-released in different formats. When I feel that a title is worthy of being purchased more than once, I indicate the formats that I have. In the latter part of 2007, I decided to dispose of nearly all of my anime on VHS. Some titles were repurchased on DVD, others were copied to DVD, but, the vast majority of the anime on VHS, would not find a place in my collection.</td></tr>';
hs+='<tr><td><img src="Buttons/pic_vhs.gif"></td><td>&nbsp;</td><td>VHS media.</td></tr>';
hs+='<tr class="highlight"><td><img src="Buttons/pic_dvd.gif"></td><td>&nbsp;</td><td>DVD media.</td></tr>';
hs+='<tr><td><img src="Buttons/pic_laser.gif"></td><td>&nbsp;</td><td>Laser disk media.</td></tr>';
hs+='<tr class="highlight"><td><img src="Buttons/pic_vcd.gif"></td><td>&nbsp;</td><td>VCD media.</td></tr>';
hs+='<tr><td><img src="Buttons/pic_format.gif"></td><td>&nbsp;</td><td>Multiple media formats.</td></tr>';
hs+='<tr class="highlight"><td><img src="Buttons/pic_xferDVD.gif"></td><td>&nbsp;</td><td>VHS transfer to DVD.</td></tr>';
hs+='<tr><td><img src="Buttons/pic_noVHS.gif"></td><td>&nbsp;</td><td>VHS removed from archive.</td></tr>';
hs+='<tr class="highlight"><td><img src="Buttons/pic_hd.gif"></td><td>&nbsp;</td><td>Not all DVDs are created equal. A few entries are in High Definition.</td></tr>';}
hs+='<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></table>';
hs+='</div>';
whatDoc.innerHTML=hs;}}

// ----------------------------------------------------
// Render footer using innerHTML.
// ----------------------------------------------------
function Show_Footer(){
var whatDoc;
var footerLinks='<a href="http://validator.w3.org/check?uri=referer" target="_blank">HTML</a>&nbsp;&middot;&nbsp;<a href="http://jigsaw.w3.org/css-validator/validator?uri=http://mysite.verizon.net/izaa/_common.css" target="_blank">CSS</a>&nbsp;&middot;&nbsp;<a href="http://mysite.verizon.net/izaa/index.html" title="Home">Home</a>&nbsp;&middot;&nbsp;<a href="http://aarg.blogspot.com/" title="AARG Blog">AARG Blog</a>&nbsp;&middot;&nbsp;<a href="http://mysite.verizon.net/izaa/_disclaimer.html" title="Disclaimer">Disclaimer</a>&nbsp;&middot;&nbsp;<a href="mailto:izaa_c5@yahoo.com" title="Contact Me">Contact Me</a>&nbsp;&middot;&nbsp;Optimized for 1024x768.';
if (typeof footer_links=="undefined") {if (d.getElementById('footer_links')) {whatDoc=d.getElementById('footer_links');}}
else {whatDoc=footer_links;}
whatDoc.innerHTML=footerLinks;
var today=new Date();
var ty=today.getYear();
if (ty<1900) {ty=ty+1900;}
if (typeof footer_copyright=="undefined") {if (d.getElementById('footer_copyright')) {whatDoc=d.getElementById('footer_copyright');}}
else {whatDoc=footer_copyright;}
whatDoc.innerHTML=whatDoc.innerHTML+" "+ty;}

// ----------------------------------------------------
// Functionality to render character art using innerHTML.
// whatFile must be a string containing a filename fragment to use in character art filenames.
//      (i.e.: info_xyz.html becomes xyz, which in turn becomes Charaters/xyz01.jpg).
// whatTag must be a string containing tag to search for (usually "span" or "div").
// ----------------------------------------------------
function getCharaImages(whatFile,whatTag){
var whatImages,idVal,numImages,imgCount,isZero;
if (d.getElementsByTagName(whatTag)) {
whatDiv=d.getElementsByTagName(whatTag);
for (var i=0;i<whatDiv.length;i++) {
if (whatDiv[i].className=="chara") {
if (whatDiv[i].innerHTML.length==0) {
if (whatDiv[i].getAttribute("id")) {
idVal=new String(whatDiv[i].getAttribute("id").replace("ref",""));
if (idVal.substring(0,1)=="0") 
{numImages=new String(idVal.substring(1,idVal.length));}
else
{numImages=new String(idVal);}
imgIndex=parseInt(numImages);
if (idVal.substring(0,1)!="0") {
whatImages="";
for (var n=1;n<=imgIndex;n++) {
isZero="";if (n<10) {isZero="0";}
whatImages+='<img src="Characters/'+whatFile+isZero+n+'.jpg" alt="'+IDPage()+' (Image '+n+')" title="'+IDPage()+' (Image '+n+')">';
}
whatDiv[i].innerHTML=whatImages;}
else{
isZero="";if (imgIndex<10) {isZero="0";}
whatImages='<img src="Characters/'+whatFile+isZero+imgIndex+'.jpg" alt="">';
whatDiv[i].innerHTML=whatImages;}}}}}}
}

// ----------------------------------------------------
// Render character art using innerHTML.
// Div/Span must contain "chara" class and an ID (ref0##).
//      0 prefix indicates that only image ## is displayed.
//      Otherwise all images from 1 through ## are displayed.
// ----------------------------------------------------
function Show_Chara(){
var whatDoc,whatFile;
if (typeof showthumb=="undefined") {if (d.getElementById('showthumb')) {whatDoc=d.getElementById('showthumb');}}
else {whatDoc=showthumb;}
if (typeof whatDoc!="undefined") {
whatFile=new String(whatDoc.innerHTML);
getCharaImages(whatFile,"div");
getCharaImages(whatFile,"span");
}}

// ----------------------------------------------------
// Replace mailto's with my email and a subject line.
// ----------------------------------------------------
function Replace_Mailto(){
var whatDoc;
if (d.getElementsByTagName('a')) {
whatDoc=d.getElementsByTagName('a');
for (var i=0;i<whatDoc.length;i++) {
if (whatDoc[i].href.substring(0,7)=="mailto:") {
whatDoc[i].href="mailto:izaa_c5@yahoo.com?Subject=%5Bsite-mail%5D%20Re:"+escape(" "+IDPage());
whatDoc[i].title="Contact Me Regarding: "+IDPage();}}}}

// ----------------------------------------------------
// Use the title element to return a page description.
// ----------------------------------------------------
function IDPage(){
var ts="";
if (d.getElementsByTagName('title')[0]) {ts = new String(d.getElementsByTagName('title')[0].innerHTML);}
if (ts.substring(0,4)=="Plot"){if (ts.length>39) {ts=ts.substring(39,ts.length);}}
if (ts.indexOf('@')>0) {ts=ts.substring(0,ts.indexOf('@')-1);}
return ts;}

// ----------------------------------------------------
// Fireworks functions.
// ----------------------------------------------------
function MM_findObj(n, d){ //v4.01
var p,i,x;  if(!d) d=document;if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;}

function MM_swapImage(){ //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}

function MM_swapImgRestore(){ //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}

function MM_preloadImages(){ //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}

// ----------------------------------------------------
// Functionality for rating key guide popup.
// ----------------------------------------------------
function Toggle_AnimeKeys(){
var td;
if(toggle_key==1){
if (typeof animekeys=="undefined") {if (d.getElementById('animekeys')) {td=d.getElementById('animekeys');td.style.display="block";}}
else {if (animekeys){animekeys.style.display="block";;}}
toggle_key=2;}
else{
if (typeof animekeys=="undefined") {if (d.getElementById('animekeys')) {td=d.getElementById('animekeys');td.style.display="none";}}
else {if (animekeys){animekeys.style.display="none";;}}
toggle_key=1;}}

// ----------------------------------------------------
// Return HTML for rendering the link to toggle the rating guide popup.
// ----------------------------------------------------
function Show_AnimeKeyLink(){
var hs='<div class="animekeylink"><a href="javascript:void();" onClick="Toggle_AnimeKeys();return false;">Toggle Rating Keys</a></div>';
return hs;}

// ----------------------------------------------------
// Render (in menu DIV) thumbnail and cover toggle control using innerHTML.
// ----------------------------------------------------
function Show_Thumb(){
var whatDoc,whatFile,Divs,whatImage,whatThumb,thumbControl;
if (typeof showthumb=="undefined") {if (d.getElementById('showthumb')) {whatDoc=d.getElementById('showthumb');}}
else {whatDoc=showthumb;}
if (typeof whatDoc!="undefined") {
whatFile=new String(whatDoc.innerHTML);
whatThumb=new String("Thumbs/tn_"+whatFile+".gif");
whatImage=new String("CoverArt/"+whatFile+".jpg");
MM_preloadImages(whatImage);
thumbControl='<span id="covercontainer" class="coverthumb"><a href="'+whatImage+'" target="_blank" onClick="if(toggle_thumb==1){MM_swapImage('+"'"+whatFile+"'"+','+"''"+','+"'"+whatImage+"'"+',1);toggle_thumb=2;Set_ThumbOverflow();return false;}else{MM_swapImgRestore();toggle_thumb=1;Set_ThumbOverflow();return false;}"><img id="coverart" name="'+whatFile+'" src="'+whatThumb+'" alt="Toggle Cover Art"></a></span>';
if (isValidObj('showthumb')) {whatDoc.innerHTML=thumbControl;whatDoc.style.display="inline";}
}}

// ----------------------------------------------------
// Set the cover art overflow when the thumbnail is toggled.
// ----------------------------------------------------
function Set_ThumbOverflow(){
var whatDoc;
var k=0;
if (typeof covercontainer=="undefined") {if (d.getElementById('covercontainer')) {whatDoc=d.getElementById('covercontainer');k=1;}}
else {whatDoc=covercontainer;k=2;}
if (k>0){if (toggle_thumb==2) {whatDoc.className="coverexpand";} else {whatDoc.className="coverthumb";}}
}

// ----------------------------------------------------
// Return section headers given a rating and category.
// ----------------------------------------------------
function Add_Header(whatRating,category){
var hs='<h5>'+category+'</h5><img SRC="Buttons/pic_'+whatRating+'.gif" title="Rating '+whatRating+' of 5" ALT="Rating '+whatRating+' of 5">';
return hs;}

// ----------------------------------------------------
// Return rating summary.
// ----------------------------------------------------
function Rating(whatRating,category){
var hs='<div class="one_rating">';
switch (whatRating){
case "0": hs+=Add_Header(whatRating,category)+"Poor.";break;
case "1": hs+=Add_Header(whatRating,category)+"Not so good.";break;
case "2": hs+=Add_Header(whatRating,category)+"Good.";break;
case "3": hs+=Add_Header(whatRating,category)+"Really good.";break;
case "4": hs+=Add_Header(whatRating,category)+"Great.";break;
case "5": hs+=Add_Header(whatRating,category)+"Excellent.";break;}
hs+="</div>";
return hs;}

sc_project=492304; 
sc_invisible=0; 
sc_partition=3; 
sc_security=""; 
sc_text=1; 
var toggle_key=1;
var toggle_thumb=1;
script_load=1;
//-->
