<!-- JAVASCRIPT APPLICATION FOR http://members.fortunecity.com/zyenwebb -->
<!-- 26th October 2003 -->

<!-- Variables -->
dateLast = "2nd September 2004"
datePrevious = "26th April 2004"

website = "http://members.fortunecity.com/zyenweb"
webmail = "szeyen@pl.jaring.my"


<!-- Menu Type constants -->
ctr=0
home = ctr++
aboutme = ctr++
my2cts = ctr++
adventures = ctr++
photog = ctr++
dwshop = ctr++
special = ctr++
wwb=ctr+1	// It is NOT ctr++ because I don't want this link to appear on the page!!!

numMajorLinks = ctr

majorLinks = new Array (numMajorLinks)
majorLinks[home] = "index.html"
majorLinks[aboutme] = "aboutme/index.html"
majorLinks[my2cts] = "my2cts/index.html"
majorLinks[adventures] = "adventures/index.html"
majorLinks[photog] = "photog/index.html"
majorLinks[dwshop] = "dwshop/index.html"
majorLinks[special] = "special/index.html"

majorLinksName = new Array (numMajorLinks)
majorLinksName[home] = "Home"
majorLinksName[aboutme] = "About Me"
majorLinksName[my2cts] = "My Two Cents"
majorLinksName[adventures] = "Real Adventures"
majorLinksName[photog] = "Photo Gallery"
majorLinksName[dwshop] = "Devil's Workshop"
majorLinksName[special] = "Special Mentions"


function preLoadImgs() {
   menuImg = new Array (numMajorLinks)
   menuOverImg = new Array (numMajorLinks)
   menuCurrImg = new Array (numMajorLinks)

   ctr = 0
   for (var i=0; i<numMajorLinks; i++) {
      menuImg[i] = new Image();
      menuOverImg[i] = new Image();
      menuCurrImg[i] = new Image();
      if (i<9) { menuImg[i].src = linkLevel + "_img/menu_0" + i + ".gif" 
                 menuImg[i].src = linkLevel + "_img/menu_0" + i + "c.gif" 
                 menuImg[i].src = linkLevel + "_img/menu_0" + i + "o.gif" }
      else { menuImg[i].src = linkLevel + "_img/menu_" + i + ".gif" 
             menuImg[i].src = linkLevel + "_img/menu_" + i + "c.gif" 
             menuImg[i].src = linkLevel + "_img/menu_" + i + "o.gif" }
   }      
}

<!-- Page header including banner and side menu -->
function pgHeader(pageType) {
   detPageType(pageType)

// Start the Body part
   document.write("<BODY LINK='#001FFF' VLINK='#001FFF' ALINK='#00BFFF' onLoad='preLoadImgs()'>")


// Force a marginless page
   document.write("<DIV STYLE='Position:Absolute;Left:0;Top:250;Width:103%'>")

// Banner
   document.write("<TABLE BACKGROUND='" + linkLevel + "_img/zyenweb_banner.gif' BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0>")
   document.write("<TR><TD HEIGHT=66></TD></TR></TABLE>")

// Table to put menu at the side
   document.write("<TABLE BORDER=0 WIDTH=100% CELLSPACING=0 CELLPADDING=10>")
   document.write("<TR VALIGN=TOP ALIGN=LEFT><TD WIDTH=200>")

// Side menu
   document.write("<IMG SRC='" + linkLevel + "_img/menu_top.gif' BORDER=0><BR>")
   for (var i=0;i<numMajorLinks;i++) {

    if (i==menuType && i!=0) { 
         document.write("<IMG SRC='" + linkLevel + "_img/menu_")
         if (i<10) { document.write("0") }
         document.write(i + "c.gif' ALT='[" + majorLinksName[i] + "]' BORDER=0><BR>")
    }
    else {
      document.write("<A HREF='" + linkLevel + majorLinks[i] + "'>")
      document.write("<IMG SRC='" + linkLevel + "_img/menu_")
      if (i<10) { document.write("0") }
      document.write(i + ".gif'")

      // onMouseOver
      document.write(" onMouseOver='this.src=\"" + linkLevel + "_img/menu_")
      if (i<10) { document.write("0") }
      document.write(i + "o.gif\"'")

      // onMouseOut
      document.write(" onMouseOut='this.src=\"" + linkLevel + "_img/menu_")
      if (i<10) { document.write("0") }
      document.write(i + ".gif\"'")

      document.write(" ALT='[" + majorLinksName[i] + "]' BORDER=0></A><BR>")
    }
   }
   document.write("<IMG SRC='" + linkLevel + "_img/menu_bot.gif' BORDER=0><BR>")

   // My Shoutbox
   document.write("<P ALIGN=CENTER><TABLE BORDER=1 BGCOLOR='#005500' WIDTH=100%><TR ALIGN=CENTER BGCOLOR='#AAEEAA'><TD><H3>My Shoutbox</H3>")
   <!-- Start JUNAIDIX.com ShoutBox -->
   document.write("<table width=180 border=0 cellpadding=0 cellspacing=0>")
   document.write("<tr><td>")
   document.write("<iframe id='shout' name='shout' src='http://www.junaidix.com/shoutbox.remote.jm/index.cfm?jm.open.index=10' width=100% height=350 border=0 frameBorder=0 noResize scrolling=yes>")
   document.write("Your browser does not support inline frames or is currently configured not to display inline frames. </iframe>")
   document.write("</td></tr><tr><td>")
   document.write("<iframe name='sform' src='http://www.junaidix.com/shoutbox.remote.jm/dspShoutForm.cfm?jm.open.index.uid=10' width=100% height=150 border=0 frameBorder=0 noResize scrolling=no>")
   document.write("Your browser does not support inline frames or is currently configured not to display inline frames. </iframe>")
   document.write("</td></tr></table>")
   document.write("<P><I>Courtesy of <A HREF='http://junaidix.tk/' TARGET='_NEW'>Junaidix</A></I>")
   document.write("</TD></TR></TABLE></P>")
   <!-- End JUNAIDIX.com ShoutBox -->

   document.write("</TD><TD>")
}


<!-- Page footer including text menu, border, credits and disclaimer -->
function pgFooter(pageType) {
   detPageType(pageType)

// Close off the table from pgHeader()
   document.write("</TD></TR></TABLE>")

// Text menu
   document.write("<P ALIGN=CENTER>")
   for (var i=0; i<numMajorLinks; i++) {
      if (i!=0) { document.write(" | ") }
      document.write("<A HREF='" + linkLevel + majorLinks[i] + "'>" + majorLinksName[i] + "</A>")
   }
   document.write("</P>")

// Purple horizontal border
   document.write("<HR COLOR=#410056 WIDTH=100%>")

// Feedback
   document.write("<P ALIGN=CENTER>")
   document.write("You are viewing a page on <A HREF='" + website + "'>" + website + "</A>.<BR>")
   document.write("Email me at <A HREF='mailto:" + webmail + "'>" + webmail + "</A>.")
   document.write("</P>")

// Image credits
   document.write("<P CLASS='Small' ALIGN=CENTER><FONT COLOR='#FF0000'>")
   document.write("N.B. All images here were painstakingly designed by myself, including but not limited to animated gifs, photos with special effects, and title bars, except for images taken from other sites including but not limited to Fortunecities, Geocities, Guestpage, and other links, and where stated.")
   document.write("</FONT></P>")

// Site update information
   document.write("<P ALIGN=CENTER CLASS='Small'>")
   document.write("This site was last updated<BR>")
   document.write("<FONT COLOR='#FF0055'><B>" + dateLast + "</B></FONT><BR>")
   document.write("The previous update<BR>") 
   document.write("<FONT COLOR='#0055FF'><B>" + datePrevious + "</B></FONT>")
   document.write("</P>")

   document.write("</DIV>")
   document.write("</BODY>")
}

function detPageType(pageType) {
//Determine page type
   switch (pageType) {
      case ("aboutme") : menuType = aboutme;
      break;
      case ("my2cts") : menuType = my2cts;
      break;
      case ("adventures") : menuType = adventures;
      break;
      case ("photog") : menuType = photog;
      break;
      case ("dwshop") : menuType = dwshop;
      break;
      case ("special") : menuType = special;
      break;
      case ("wwb") : menuType = wwb;
      break;
      default : menuType = home;
   }

   if (menuType != home) { linkLevel = "../" }
   else { linkLevel = "" }
}

function scrollArrows(pageType, prevPage, nextPage, mainPage, mainPageLink) {
   switch (pageType) {
      case ("my2cts") : { backTo = "My Two Cents Main Page"
                          backToLink = "index"
                          docType = "Thoughts" }
      break;
      case ("adventures") : { backTo = "Real Adventures Main Page"
                             backToLink = "index"
                             docType = "Experience" }
      break;
      case ("photog") : { backTo = "Photo Album"
                          backToLink = "index"
                          docType = "Photo" }
      break;
      case ("dwshop") : { backTo = "Devil's Workshop Main Page"
                          backToLink = "index" }
      break;
      default : { backTo = ""
                  docType = "" }
   }

   if (mainPage != null) { backTo = mainPage }
   if (mainPageLink != null) { backToLink = mainPageLink }

   document.write("<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR VALIGN=CENTER><TD WIDTH=30% ALIGN=LEFT>")

// Arrow to previous page
   if (prevPage != null ) {
      document.write("<A HREF='" + prevPage + ".html'>")
      document.write("<IMG SRC='../_img/arrow_prev.gif' WIDTH=20 HEIGHT=20 BORDER=0>")
      document.write("&nbsp;&nbsp;View Previous " + docType + "</A>")
   }

   document.write("</TD><TD ALIGN=CENTER>")
   document.write("<A HREF='" + backToLink + ".html' STYLE='background-color:#eeaaee'>Back to " + backTo + "</A>")
   document.write("</TD><TD WIDTH=30% ALIGN=RIGHT>")

// Arrow to next page
   if (nextPage != null ) {
      document.write("<A HREF='" + nextPage + ".html'>")
      document.write("View Next " + docType + "&nbsp;&nbsp;")
      document.write("<IMG SRC='../_img/arrow_next.gif' WIDTH=20 HEIGHT=20 BORDER=0></A>")
   }

   document.write("</TD></TR></TABLE>")
}

// Bulleted list for archives
function archiveList(link, item, dateA, isNew) {
   document.write("<A HREF='" + link + "'>" + item + "</A> <FONT CLASS='Date'>" + dateA + "</FONT>")
   if (isNew != null) { document.write("&nbsp;&nbsp;<IMG SRC='../_img/btn_new.gif' ALT='[NEW!]' WIDTH=50 HEIGHT=15>") }
}

<!-- Opens image in a bare separate window -->
function viewImg(imgname) {
  outputWindow = open(imgname, "", "toolbar=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no")
}

<!-- Image in normal text. To prevent people from saving the file -->
function photoPlace(pageType, imgName, align, alt, wth, ht) {
   if (pageType==null) { imgLoc = "_img/" + imgName }
   else if (pageType=="main") { imgLoc = "../_img/" + imgName }
   else { imgLoc = "../_img/" + pageType + "/" + imgName }
   writeLn = "<IMG SRC='" + imgLoc + "'"
   if (align!=null) { writeLn = writeLn + " ALIGN=" + align}
   if (alt!=null) { writeLn = writeLn + " ALT='[" + alt + "]'"}
   if (wth!=null) { writeLn = writeLn + " WIDTH=" + wth }
   if (ht!=null) { writeLn = writeLn + " HEIGHT=" + ht }
   writeLn = writeLn + " BORDER=0 onMouseDown='javascript:alert(\"Please don&prime;t download any photos! If you wish to have a copy, email me instead. Thank you.\")'>"
   document.write(writeLn)
}

<!-- To view images in a modal window -->
function openFile(filename) {
   outputWindow = open(filename, "View_Images", "toolbar=no,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=yes")
}