if (screen.width < 400) location.href = location.href.replace("www.", "mobile.");


C = "12/31/2007";

ARTICLES = 32;

EMAIL = "\x40" + "gmail" + "." + "com";
EMAIL = "DrEddieHyatt" + EMAIL;
EM = EMAIL;
SMAIL = "\x40" + "live" + "." + "com";
SMAIL = "DrSueHyatt" + SMAIL;

EMAIL = "\x3CA HREF='mailto:" + EMAIL + "'>" + EMAIL + "\x3C/A>";
SMAIL = "\x3CA HREF='mailto:" + SMAIL + "'>" + SMAIL + "\x3C/A>";


function EML(SUBJECT) { document.write("<A HREF=\"mailto:" + EM + "?subject=" + SUBJECT + "\">" + EM + "</A>"); }

MENU = [

"index",        "Home",
"b1",           "Dr. Eddie L. Hyatt",
"bookstore",    "Bookstore",
"archives",     "Audio/Video<BR>Messages",
"articles",     "Articles",
//"itinerary",    "Itinerary",
"bookings",     "Bookings",
"friends",      "Make a Donation",
"links",        "Links"

];

FILESUFFIX = ".html";

if (top.location != self.location) top.location = self.location;

ONLINE = (location.href.toUpperCase().indexOf("HTTP") < 0) ? false : true;


// CREATE PAGE LABEL

A = location.href.toUpperCase();     // GET CURRENT ADDRESS

if (A.charAt(A.length - 1) == "/")   // REMOVE FINAL SLASH
  A = A.substring(0, A.length - 1);

P = A.lastIndexOf("/");              // EXTRACT FILE NAME
if (P < 0) P = 0;
A = A.slice(P);

P = A.lastIndexOf(".");              // REMOVE EXTENSION
if (P < 0) P = A.length;
A = A.substring(1, P);

for (N = i = 0; i < A.length; i++)
  if (isFinite(A.charAt(i))) { N = A.substring(i, i + 2); break; }

LABEL = (N > 0) ? A.charAt(0) + N : A.substring(0, 3);


// WE CAN MAKE PRINTER-FRIENDLY PAGES...
BARE = (location.search.toUpperCase() == "?BARE") ? 1 : 0;


// BUILD BODY FRAME

if (!BARE)  // DON'T ADD ANYTHING FOR PRINTER-FRIENDLY PAGES!
{

document.write("\x3CBODY TOPMARGIN=0 BOTTOMMARGIN=0 LEFTMARGIN=0 RIGHTMARGIN=0 BACKGROUND='bg.jpg' LINK=FFD8BE ALINK=FFD8BE VLINK=FFD8BE>");
document.write("\x3CSTYLE> H1 { FONT-FAMILY:BOOK ANTIQUA; FONT-SIZE:34PX; FONT-WEIGHT:NORMAL; MARGIN:10; } H2 { FONT-FAMILY:ARIAL BLACK; FONT-SIZE:14PX; FONT-WEIGHT:NORMAL; COLOR:FFDBC3; MARGIN:0; } H3 { FONT-FAMILY:ARIAL BLACK; FONT-SIZE:12PX; FONT-WEIGHT:NORMAL; COLOR:FEDBC3; MARGIN-TOP:7; MARGIN-BOTTOM:0; } A { TEXT-DECORATION:NONE; } A:HOVER { COLOR:FED012; } \x3C/STYLE>");
document.write("\x3CCENTER>\x3CTABLE CELLSPACING=0 CELLPADDING=0 WIDTH=777 HEIGHT=100%>\x3CTD>");
document.write("\x3CTABLE CELLSPACING=0 CELLPADDING=0 WIDTH=100% HEIGHT=100%>\x3CTR>\x3CTD WIDTH=25%>");
document.write("\x3CTABLE CELLSPACING=5 CELLPADDING=0 WIDTH=100% HEIGHT=100% STYLE='BACKGROUND-IMAGE:URL(brl1.jpg); BACKGROUND-REPEAT:REPEAT-X; BACKGROUND-COLOR:D98336; BORDER:SOLID; BORDER-COLOR: FAD6BE E5A96B FAD6BE D4A885; BORDER-WIDTH:1;'>\x3CTD VALIGN=TOP ALIGN=LEFT>");
document.write("<CENTER>\x3CIMG SRC='logo.gif'></CENTER>");

// MAIN MENU SIDEBAR

document.write("\x3CDIV STYLE='FONT-FAMILY:TIMES NEW ROMAN; FONT-SIZE:18PX; MARGIN-TOP:0; MARGIN-LEFT:10; LINE-HEIGHT:1.1;'>\x3CBR>\x3CBR>");

for (i = 0; i < MENU.length; i++)
{
  SELECTED = (location.href.toUpperCase().indexOf(MENU[i].toUpperCase()) >= 0) ? 1 : 0;
  if (MENU[i] == "index" && LABEL == "") SELECTED = 1;

  document.write("\x3CP>" + (SELECTED ? "\x3CB>" : "") + "\x3CA " + (SELECTED ? " STYLE='COLOR:FFCC00;'" : "") + " HREF='" + MENU[i] + FILESUFFIX + "'>"); i++;
  document.write(MENU[i] + (SELECTED ? "\x3C/B>" : "") + "\x3C/A>");
}

// CREATE LINK FOR HIM BROADCAST WINDOW
function startAV() { WHIM = window.open ("http://www.christiannetcast.com/watch/viewer.asp?station=HIM", "player", "HEIGHT=325 WIDTH=790 TOOLBAR=0 SCROLLBARS=0 STATUSBAR=0 MENUBAR=0 RESIZABLE=0 LEFT=20 TOP=20 SCREENX=20 SCREENY=20"); }
function startAU() { WHIM = window.open ("http://208.106.212.19/listen/player.asp?station=HIM", "player", "HEIGHT=320 WIDTH=440 TOOLBAR=0 SCROLLBARS=0 STATUSBAR=0 MENUBAR=0 RESIZABLE=0 LEFT=20 TOP=20 SCREENX=20 SCREENY=20"); }

document.write("<P>&nbsp;&nbsp; <A HREF='javascript:startAV()'><IMG BORDER=0 ALT='HIM Streaming' SRC='him.gif'></A>");

document.write("\x3C/DIV>");

document.write("\x3CTR>\x3CTD VALIGN=BOTTOM>\x3CCENTER>\x3CFONT FACE='BOOK ANTIQUA' SIZE=2 COLOR=FFEECC>");
document.write("<BR><BR>Dr. Eddie Hyatt\x3CP>" + EMAIL);

document.write("\x3CBR>\x3CBR>");
document.write("\x3CP>\x3CFONT SIZE=2><A HREF='http://www.icwhp.org' TARGET='_blank'>icwhp.org\x3C/A>");
document.write("\x3CBR>\x3CBR>\x3CBR>\x3CBR>\x3CBR>");
document.write("\x3C/TABLE>");
document.write("\x3CTD WIDTH=75% BACKGROUND='brl2.jpg' VALIGN=TOP>\x3CTABLE CELLSPACING=5 CELLPADDING=0 WIDTH=100% HEIGHT=100% STYLE='BORDER:SOLID; BORDER-COLOR:FFF5D8 FAD6BE FFF5D8 E5A96B; BORDER-WIDTH:1;'>\x3CTD VALIGN=TOP>");

document.write("\x3CCENTER>\x3CH1>Hyatt International Ministries\x3C/H1>\x3CH2>Taking Spiritual Awakening & Biblical Thinking to the Nations\x3C/H2>\x3CHR WIDTH=95% STYLE='COLOR:FFFFFF;'>\x3C/CENTER>");

//document.write("\x3CCENTER>\x3CH1>Hyatt International Ministries\x3C/H1>\x3CH2>PROMOTING SPIRITUAL AWAKENING & BIBLICAL THINKING\x3C/H2>\x3CHR WIDTH=95% STYLE='COLOR:FFFFFF;'>\x3C/CENTER>");

}  // END OF PRINTER-FRIENDLY PAGE CHECK


// COOKIE HANDLING

function SetCookie(ID, VALUE) { var Expiration = new Date(); Expiration.setFullYear(Expiration.getFullYear() + ((VALUE) ? 5 : -1), 0, 1); document.cookie = ID + "=" + VALUE + ";expires=" + Expiration.toGMTString(); }
function GetCookie(ID) { var COOKIE = document.cookie.split(";"); for (var i = 0; i < COOKIE.length; i++) if (COOKIE[i].indexOf(ID + "=") >= 0) return COOKIE[i].slice(COOKIE[i].indexOf("=") + 1); return ""; }


// TRY TO KEEP TRACK OF THE NUMBER OF VISITS TO THIS PAGE

if (ONLINE)
{
  COOKIENAME = "VISITS" + LABEL;
  VISITS = Math.abs(Math.round(GetCookie(COOKIENAME)) + 1);
  SetCookie(COOKIENAME, isNaN(VISITS) ? 0 : VISITS);

  PAGECOUNTER = new Image();
  PAGECOUNTER.src = "http://www.nextgenstats.com/cgi-bin/statsplus.pl?169286776&" + LABEL + "&" + (navigator.platform.indexOf("Win") >= 0 ? "w" : "o") + "&" + (navigator.appName.indexOf("Explorer") >= 0 ? "e" : "o") + "&" + navigator.appVersion.charAt(0) + "&" + window.screen.colorDepth + "&" + window.screen.width + "&" + window.screen.height + "&X&0&" + document.referrer;
}


function Copyright(C) { if (!BARE) document.write("<HR STYLE='WIDTH:95%; COLOR:FFDBC3; HEIGHT:1;'>"); document.write("<DIV STYLE='MARGIN-LEFT:24; FONT-FAMILY:GARAMOND; FONT-SIZE:15PX; COLOR:000000; LINE-HEIGHT:1.4;'>"); if (!BARE) document.write("Send mail to " + EMAIL + " with questions or comments about this web site.\x3CBR>"); document.write("Copyright © 2011 Eddie Hyatt. "); if (!BARE) document.write("[<A TARGET='_blank' HREF='" + location.href + "?bare'>open printer-friendly page</A>]"); if (!BARE) document.write("<BR>Last Modified: " + C + "\x3C/TABLE>\x3CBR>\x3C/TABLE>\x3C/TABLE>"); }

//  &nbsp; [<A HREF='http://mobile.eddiehyatt.com'>PDA-friendly site</A>]

function ArticlesNavigation()
{
  if (BARE) return;  // DON'T ADD NAVIGATION BAR IN PRINTER-FRIENDLY MODE...

  A = location.href;

  P = A.lastIndexOf(".htm");  // FIND PAGE NUMBER'S POSITION

  P = Math.round(P > 3 ? A.substring(P - 2, P) : 1);

  if (isNaN(P)) P = 1;

  // P NOW CONTAINS THE CURRENT PAGE NUMBER


  // NOW CREATE NAVIGATION BAR

  document.write("<BR><BR><CENTER><A HREF='articles.html'>Return to Articles</A></CENTER>");

  return;  // DON'T ADD BUTTONS


  if (ARTICLES < 10)          // CREATE SIMPLE NAVBAR IF WE HAVE FEWER THAN 10 ARTICLES...

  {
    document.write("<BR><BR><CENTER><INPUT TYPE=BUTTON " + ((P > 1) ? "" : "DISABLED") + " VALUE='  < < <  ' onClick='LoadPage(" + (P - 1) + ");'> ");

    for (i = 1; i <= ARTICLES; i++) document.write("\x3CINPUT STYLE='FONT-FAMILY:VERDANA; WIDTH:33; " + ((i == P) ? "BACKGROUND-COLOR:EEAA55;" : "") + "' TYPE=BUTTON VALUE='" + i + "' " + (i == P ? "DISABLED" : "") + " onClick='LoadPage(" + i + ");'> ");

    document.write("\x3CINPUT TYPE=BUTTON " + ((P < ARTICLES - 1) ? "" : "DISABLED") + " VALUE='  > > >  ' onClick='LoadPage(" + (P + 1) + ");'>\x3C/CENTER>");
  }

  else                        // CREATE COMPLEX NAVBAR IF WE HAVE 10 OR MORE ARTICLES...

  {
    DIVISION = 7;  // Number of article numbers put in the same row
//    if (ARTICLES > 14) DIVISION = 9;

    document.write("\x3CBR>\x3CBR>\x3CCENTER>\x3CTABLE>");
    document.write("\x3CTD>\x3CINPUT STYLE='HEIGHT:48;' TYPE=BUTTON " + ((P > 1) ? "" : "DISABLED") + " VALUE='  < < <  ' onClick='LoadPage(" + (P - 1) + ");'>\x3CTD>");

    for (i = 1; i <= ARTICLES; i++) document.write("\x3CINPUT STYLE='FONT-FAMILY:VERDANA; WIDTH:40; " + ((i == P) ? "BACKGROUND-COLOR:000000;" : "") + "' TYPE=BUTTON VALUE='" + i + "' " + (i == P ? "DISABLED" : "") + " onClick='LoadPage(" + i + ");'>" + ( i % DIVISION ? " " : "\x3CBR>"));

    document.write("\x3CTD>\x3CINPUT STYLE='HEIGHT:48;' TYPE=BUTTON " + ((P < ARTICLES - 1) ? "" : "DISABLED") + " VALUE='  > > >  ' onClick='LoadPage(" + (P + 1) + ");'>\x3C/TABLE></CENTER></CENTER>");
  }
}

function LoadPage(P) { if (P < 10) P = "0" + P; location.href = "article" + P + ".html"; }
