








//var TeVeo = "http://www.teveo.com/_go/cam.asp?ID=1030109004";
var TeVeo = "http://64.170.56.239:80/guest.htm";

// Menu indices
var MAINMENU      = 0;

// Indices into the MenuItem Array
var HOMEIX     = 0;
var MAPIX      = 1;
var MENUIX     = 2;
var PHOTOSIX   = 3;
var WEBCAMIX   = 4;
var SITEMAPIX  = 5;
var EVENTSIX   = 6;
var FEEDBACKIX = 7;

//File names must be "images/<IMGNAME>[Selected|On|Off].jpg" and be of the same size for Selected/On/Off files.
//File extension can be overriden by supplying the function (".gif" e.g.):
//function OverrideMenuImageDefaultExt()
//{ return(".gif"); }
//Targets must be named <HTMFILENAME>.htm.

//Each menu item is comfigured:
//  [0] <HTMFILENAME> => the "<HTMLFILENAME>.htm" file loaded when menu item is selected
//  [1] <IMGFILENAME> => the "images/<IMAGEFILENAME[Selected|On|Off].jpg files load when
//                       the menuitem is Selected, RolledOver, MouseOut conditions, respectively,
//  [2] <DISPLAYNAME> => the "ALT" name displayed when the menuitem is hovered over,
//  [3] <HEIGHT>      => the height in pixels of the menu image
//  [4] <WIDTH>       => the width in pixels of the menu image
//  [5] <ALIGN>       => LEFT or RIGHT (not implemented yet - LEFT only)
//  [6] <IMGIX>       => the internal index of the image, set internally

//Last item in each menu array is for general information for the menu, and is configured:
//  [0] CURRSELECTEDIX => internal use to store currently selected item, should be set to NOMENUIX here
//  [1] DEFAULTIX      => Default selection when menu is drawn
//  [2] OVERRIDEIX     => Override the default to jump to any page, should be set to NOMENUIX here
//  [3] CONTROLFRAMEIX => Frame to draw menu
//  [4] TARGETFRAMEIX  => Frame to draw page
//  [5] MENULAYOUTIX   => HORIZ or VERT for horizontal or vertical (column) layout, respectively

function OverrideMenuImageDefaultExt()
{ return(".gif"); }

//should be initialized to NOMENUIX. IMGIX is set when menu is drawn (initial value is not used; set to -1 here).
var MenuItems = new Array(
//              HTMFILENAME IMGFILENAME  DISPLAYNAME HEIGHT WIDTH ALIGN IMGIX
      new Array( // MAINMENU
        new Array("index"    , "Home"     , "Home",     24, 68,  "LEFT", -1),
        new Array("Map"      , "Map"      , "Map",      24, 68,  "LEFT", -1),
        new Array("Menu"     , "Menu"     , "Menu",     24, 68,  "LEFT", -1),
        new Array("Photos"   , "Photos"   , "Photos",   24, 68,  "LEFT", -1),
        new Array("goods"   , "Webcam"   , "Goods",  24, 68,  "LEFT", -1),
        new Array("SiteMap"  , "SiteMap"  , "Site Map", 24, 68,  "LEFT", -1),
        new Array("Events"   , "Events"   , "Events",   24, 68,  "LEFT", -1),
        new Array("Feedback" , "Feedback" , "Feedback", 24, 68,  "LEFT", -1),
        new Array(NOMENUIX, HOMEIX, NOMENUIX, null, null, HORIZ)));


var BackgroundFile = (WindowWidth > 800 ? "images/Background.jpg" : "images/Background800.jpg");
var BodyInfo = "BACKGROUND=" + BackgroundFile + " TEXT=#000000 LINK=#0000FF VLINK=#FF0000 ALINK=#FF00FF";

function GetBodyInfo(MenuId)
{ return(BodyInfo); }

function FontFace(InColor, InFonts)
{ var Color = "BLACK";
  if (arguments.length >= 1) Color = InColor;

  var Fonts = "Verdana, Arial, Helvetica, Sans-Serif";
  if (arguments.length >= 2) Fonts = InFonts;

  return("<FONT FACE=" + Fonts + " COLOR=" + Color + ">"); 
}

function PreMenuData(Doc, MenuId)
{
  if (MenuId == MAINMENU)
    { 
      Doc.write("<BODY BACKGROUND=" + BackgroundFile + " TEXT=#000000 LINK=#0000FF VLINK=#FF0000 ALINK=#FF00FF>");
      Doc.write("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>");
      Doc.write("<TR><TD ALIGN=CENTER WIDTH=33%>");
      Doc.write("<A HREF=Events.htm>");
      Doc.write("<IMG SRC=images/wifi.gif NAME=HdrWebCam BORDER=0 WIDTH=130 HEIGHT=98></A>");
     //Doc.write("<BR><A HREF=wifi.htm>");
     // Doc.write("<FONT FACE=Arial SIZE=-1><B>LIVE WEB //CAM</B></FONT></A></TD>");
      Doc.write("<TD ALIGN=CENTER WIDTH=33%>");
      Doc.write("<IMG SRC=images/GarfLogo.gif>");
      Doc.write("<TD ALIGN=CENTER WIDTH=33% VALIGN=MIDDLE>");
      Doc.write("<FONT FACE=Arial SIZE=+1><B>3046 Bristol St.<BR>Costa Mesa, CA 92626");
      Doc.write("</B><BR></FONT><FONT SIZE=-1><B>phone:     (714) 435-4070</FONT></B><BR>");
      //Doc.write("<FONT SIZE=-1><B>fax:          (714) 435-0134</FONT></B><BR>");
      Doc.write("<BR>          <A HREF=Map.htm><FONT SIZE=-1><B>View Map</A></TD>");
      Doc.write("</TR></TABLE>");
    
      Doc.write("<TABLE BORDER=0 WIDTH=100%>");
      Doc.write("<TR><TD ALIGN=CENTER WIDTH = 10%><IMG SRC=images/Flagsm.gif></TD><TD WIDTH=80% ALIGN=CENTER>");
    }
}

function PostMenuData(Doc, MenuId)
{
  if (MenuId == MAINMENU)
    { 
      Doc.write("</TD><TD ALIGN=CENTER WIDTH=10%><IMG SRC=images/Flagsm.gif></TD></TR></TABLE><HR>");
      // St, Patrick's Day
      //Doc.write("<BR><TABLE WIDTH=100%><TR><TD ALIGN=CENTER WIDTH = 10%><IMG SRC=images/Shamrock.gif></TD>");
      //Doc.write("<TD ALIGN=CENTER WIDTH=80%><IMG SRC=images/Happy.gif></TD>");
      //Doc.write("<TD ALIGN=CENTER WIDTH=10%><IMG SRC=images/Leprechaun.jpg></TD>");
      //Doc.write("</TR></TABLE>");
    }
}

function PreFooterData(Doc, MenuId)
{
  if (MenuId == MAINMENU)
    { 
    }
}

function PostFooterData(Doc, MenuId)
{
  if (MenuId == MAINMENU)
    { 
      Doc.write("<CENTER><TABLE CELLSPACING=15><TR>");
      Doc.write("<TD ALIGN=CENTER><A HREF=http://pgatour.com/>");
      Doc.write("<IMG border=0 SRC=images/PGATour.gif>");
      Doc.write("<BR><FONT  SIZE=-1><B>PGA Tour</B></FONT></A></TD>");
      Doc.write("<TD ALIGN=CENTER><A HREF=http://sports.espn.go.com/sports/tvlistings/index>");
      Doc.write("<IMG border=0 SRC=images/ESPNLogo.gif>");
      Doc.write("<BR><FONT  SIZE=-1><B>TV Sports Listings From ESPN</B></FONT></A></TD>");
      Doc.write("<TD ALIGN=CENTER><A HREF=http://nfl.com/>");
      Doc.write("<IMG border=0 SRC=images/NFL_com.gif>");
      Doc.write("<BR><FONT  SIZE=-1><B>NFL.com</B></FONT></A></TD>");
      Doc.write("</TR></TABLE>");
    }
}

function CloseWindow()
{
  Popwin.close();
}

function NewSizeWin(Page, Width, Height, Override)
{
  var Now = new Date();
  var WindowOpts = "width=" + Width + ",height="+ Height + ",scrollbars=0," +
                   "resizable=1,status=0,menubar=0,toolbar=0," +
                   "location=0,directories=0,copyhistory=0"

  if (Override || ((Now.getHours() > 9) && (Now.getHours() < 23)))
    {
      Popwin = window.open(Page,"WebWindow", WindowOpts);
    }
  else
    {
      Popwin = window.open("WebCamOff.htm","WebWindow", WindowOpts);
    }

  Popwin.focus();
  setTimeout("CloseWindow();", 300000);
}
