/*document.bgColor="#FAFAFA" F0FFFF 99CCCC F0FFFF #2F 4F 4F*/
document.bgColor="#00FFCC"
//Drop Menu Function
 function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
if (URL == "") {
alert("That's not a web page!")
}
else {
parent.location.href = URL;
}
}

//Display current date in footer

function showYear() {
var mydate= new Date()
var theyear=mydate.getFullYear()

document.write(theyear)
}


//Header Script   
    function header() {
		//document.write("<!--<body background='images/graphics/newyear.jpg'>--><table border='0' width='760' id='table1' align='center' style='border-collapse: collapse' bgcolor='white'><tr><td>")
		document.write("<table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' align='center' bordercolor='#111111' width='1000' id='Table' name=Table' height='71'>")
		document.write("<tr><td width='100%' bgcolor='#FFFFFF' height='42'>")
		document.write("<a href='../index.html'><img alt='WCOGA logo' src='../images/headersummer10_large.gif' border='0'></a></td>")
	 // document.write("<font face='Papyrus' size='2'><i><b>Nurturing Growth, Building Character</b></i></font><br>")
	  //document.write("<font face='Arial' size='1'>1056-B Serpentine Lane, Pleasanton, CA 94566 <a href='mailto:info@wcoga.com'>info@wcoga.com</a><br>")
	//  document.write("Phone: (925) 846-1010 | Fax: (925) 846-1010 | ")
	 //document.write("<a target='new' href='http://maps.yahoo.com/maps_result?ed=Ztg7Bup_0To0GGfWMIUvbLrMjgcebj8Y9YW9tLs-&csz=Pleasanton%2C+CA+94566&country=us'>Get Map<hr></a></font><font face='Verdana' size='1'>GYMNASTICS - CHEERLEADING - TUMBLING - DANCE</font></td></table>")

}
//Body Size
	function bodysize() {
		document.write("<table align='center' cellpadding='5' cellspacing='0' border='0' width='1000' id='table1'>")
		//document.write("<tr><td width='100%' bgcolor='#FFFFFF'>")
	}

//Bottom Links
function bottomlinks() {
	
		document.write("<table align='center' border='0' width='1000' bgcolor='#A6A6A6'><tr><td><center><font face='Verdana' size='1'>")
	document.write("<a href='../programs/index.html'><span style='text-decoration: none'> Programs</a> |")
	document.write("<a href='../teams/index.html'><span style='text-decoration: none'> Competitive Teams</a> |")
	document.write("<a href='../specialty\bday.html'><span style='text-decoration: none'> Birthday Parties</a> |")
	document.write("<a href='../reg/index.html'><span style='text-decoration: none'> Enroll Classes</a> |")
	document.write("<a href='../policies/index.html'><span style='text-decoration: none'> Policies/Sessions</a> |")
	document.write("<a href='../aboutus/staff.html'><span style='text-decoration: none'> Our Staff</a> |")
	document.write("<a href='../resources/index.html'><span style='text-decoration: none'> Resources</a> ")
	//document.write("<a href='corporate/index.html'><span style='text-decoration: none'> Corporate</a> |")
	document.write("</center></font></span></td></tr></table>")
}
//Footer Script
function footer() {
	document.write("<div align='center'><table border='0' width='1000' bgcolor='gray'><tr><td>")
      document.write("<center><font face='helvetica,arial' color='#000000' size='2'><small>Copyright © 2005-<script>showYear()</script> West Coast Olympic Gymnastics Academy, LLC.   All rights reserved.<br>")
           document.write("1056 Serpentine Lane, Suite A, Pleasanton, CA 94566 ")
           document.write("<a href='mailto:info@wcoga.com'>info@wcoga.com</a> Phone/Fax: (925) 846-1010<br>")
		   document.write(" Web Design & Maintenance by <a href='http://www.starbrightadvantage.com' target='_blank'>StarBright Advantage</a><br> ")
		 // document.write("<a href='http://wcoga.com/vdeck' target='new'>Site Admin</a>")
		document.write("<a href='http://www.thestudiodirector.com/wcoga/admin.jsp' target='new'>Reg Admin</a>")
		document.write(" | <a href='../privacy.htm'>Privacy Policy</a>") 
          document.write(" | <a href='../termsofuse.html'>Terms of Use</a> </small></font></center>") 
		  document.write("</tr></table></div>")
		  
		  //Google Analytics Code
document.write('<script type="text/javascript">')
document.write('var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");')
document.write('document.write(unescape("%3Cscript src=') 
document.write("'")
document.write('" + gaJsHost + ')
document.write('"google-analytics.com/ga.js')
document.write("' type='text/javascript'")
document.write('%3E%3C/script%3E"));')
document.write('</script>')
document.write('<script type="text/javascript">')
document.write('try {')
document.write('var pageTracker = _gat._getTracker("UA-11181660-2");')
document.write('pageTracker._trackPageview();')
document.write('} catch(err) {}</script>')
		  
}//Menu Navigation
		
				var Menu = new Array ()
var subMenu = new Array ()



   Menu[0] = new Array("<p align='center'>Programs", "../programs/index.html","_top")
     subMenu[0] = new Array()    
	 
	 subMenu[0][0] = new Array ("Overview ", "../programs/index.html", "_top")

    subMenu[0][1] = new Array ("  Kindergym ", "../programs/kindergym.html", "_top")

     subMenu[0][2] = new Array (" Boys Recreational ", "../programs/boysrec.html", "_top")

     subMenu[0][3] = new Array (" Girls Recreational ", "../programs/girlsrec.html", "_top")
	
	 subMenu[0][4] = new Array (" Tramp 'n Tumble ", "../programs/tnt.html", "_top") 	 
	  
	  subMenu[0][5] = new Array (" Competitive ", "../team/index.html", "_top") 
	
	    subMenu[0][6] = new Array (" Summer Camps ", "../summercamps/index.html", "_top")  
  	  
	  subMenu[0][7] = new Array (" ENROLL ONLINE ", "http://www.thestudiodirector.com/wcoga/register.jsp?page=ClassSearch", "_blank")

Menu[1] = new Array("<p align='center'> Teams", "../team/index.html","_top") 
     subMenu[1] = new Array()
	 
	  subMenu[1][0] = new Array ("Overview ", "../team/index.html", "_top")

     subMenu[1][1] = new Array ("  Boys Highlights ", "../team/highlights.html", "_top")

 	subMenu[1][2] = new Array ("  Boys Scores ", "../team/meets.html", "_top")

     subMenu[1][3] = new Array (" Girls Team ", "../team/girlsteam.html", "_top")

     subMenu[1][4] = new Array (" Girls Results ", "../team/girlsteamresults.html", "_top")

     subMenu[1][5] = new Array (" In The News ", "../team/news.html", "_top")
	
	 subMenu[1][6] = new Array (" Photo Gallery ", "../team/photogallery.html", "_top") 	 
				
	subMenu[1][7] = new Array (" Video Gallery ", "../team/videogallery.html", "_top") 	 
				
	subMenu[1][8] = new Array (" Team Site Login ", "../teamsite/index.html", "_top")
	
	Menu[2] = new Array("<p align='center'>Summer Camps", "../summercamps/index.html","_top") 
     subMenu[2] = new Array()
	 
	 subMenu[2][0] = new Array (" Overview ", "../summercamps/index.html", "_top")

  	subMenu[2][1] = new Array ("  FAQs ", "../summercamps/faqs.html", "_top")

	
	
Menu[3] = new Array("<p align='center'>Birthday Parties", "../specialty/bday.html","_top") 
     subMenu[3] = new Array()
	
		
   Menu[4] = new Array("<p align='center'>Enroll Classes", "../reg/index.html","_top") 
     subMenu[4] = new Array()
	 
	subMenu[4][0] = new Array (" Overview ", "../reg/index.html", "_top")
	 
	subMenu[4][1] = new Array (" Class Schedules ", "http://www.thestudiodirector.com/wcoga/register.jsp?page=ClassSearch", "_blank")

	 subMenu[4][2] = new Array (" Online Registration ", "https://www.thestudiodirector.com/wcoga/register.jsp", "_blank")
	
Menu[5] = new Array("<p align='center'>Sessions", "../policies/index.html","_top") 
     subMenu[5] = new Array()
	 subMenu[5][0] = new Array (" Sessions & Policies ", "../policies/index.html", "_top")
	 subMenu[5][1] = new Array (" FAQs ", "../policies/faqs.html", "_top")
	
//	 subMenu[4][5] = new Array (" Pay Tuition Online ", "policies/payment.html", "_top")
	
  Menu[6] = new Array("<p align='center'>Our Staff", "../aboutus/staff.html","_top")

     subMenu[6] = new Array()	   
	   
  Menu[7] = new Array("<p align='center'>About Us", "../aboutus/index.html","_top")

     subMenu[7] = new Array()
	 
     subMenu[7][0] = new Array (" Foundations & Philosophy ", "../aboutus/index.html", "_top")
	 
	 subMenu[7][1] = new Array (" Location ", "../aboutus/location.html", "_top")

     subMenu[7][2] = new Array (" Our Facility  ", "../aboutus/facility.html", "_top")
	 
	subMenu[7][3] = new Array (" Our Staff ", "../aboutus/staff.html", "_top") 
	
	//  subMenu[4][4] = new Array (" ProShop ", "specialty/proshop.html", "_top")
	  
	  subMenu[7][4] = new Array (" Contact Us ", "../aboutus/contact.html", "_top") 
  
  Menu[8] = new Array("<p align='center'>Resources", "../resources/index.html","_top") 

     subMenu[8] = new Array()
	 
	 subMenu[8][0] = new Array (" Overview ", "../resources/index.html", "_top")
	 
	 subMenu[8][1] = new Array (" Why Gymnastics? ", "../resources/whygymnastics.html", "_top")
	 
	 subMenu[8][2] = new Array(" Links ", "../resources/links.html", "_top")
	
	subMenu[8][3] = new Array(" Photo Gallery ", "../resources/photos.html", "_top")
	
	//subMenu[7][4] = new Array(" Calendar ", "resources/calendar.html", "_top")
	
	// subMenu[7][5] = new Array(" Overview ", "corporate/index.html","_top")

	 subMenu[8][4] = new Array(" Press Releases ", "../corporate/pressreleases.html","_top")
	 
	 subMenu[8][5] = new Array(" Employment ", "../corporate/employment.html", "_top")
	 
	// subMenu[6][3] = new Array(" Staff Webmail ", "http://wcoga.com/webmail", "_blank")
	
orientation = "horizontal"                 
cellPadding = 5
//1
cellBorder = 1                          
verticalOffset = 25                    
horizontalOffset = 0                  
//93
subMenuDelay = .5                           


borderColor = "#00005A"                  
//#A6A6A6
menuBackground = "#00005A"              
//
menuHoverBackground = "808080"        
//#00005A
fontFace = "Verdana"                         

fontColour = "#FFFFFF"                    
//#FFFFFF
fontHoverColour = "#00005A"              
//
fontSize = "9pt"                          

fontDecoration = "none"                   

fontWeight = "bold"                    



sborderColor = "black"               

smenuBackground = "white"                 
//silver #FFFCCC
smenuHoverBackground = "808080"          

sfontFace = "Verdana"                        

sfontColour = "navy"              
//
sfontHoverColour = "#FFFFFF"              

sfontSize = "9pt"                          

sfontDecoration = "none"                   

sfontWeight = "none"                     

// Browser Sniffer
var isIE = (document.getElementById && document.all)?true:false;
var isNS4 = (document.layers)?true:false;
var isNS6 = (document.getElementById && !document.all)?true:false;

var timer
var obj = (isIE)?"document.all":"document.getElementById"

// Default horizontal and vertical offsets
if (verticalOffset == 0 || verticalOffset == "") 
{
  verticalOffset = (orientation=="horizontal")?20:5
}

if (horizontalOffset == 0 || horizontalOffset == "") 
{
  horizontalOffset = (orientation=="horizontal")?-1:70
}

// Menu Styles
document.writeln ('<style>');
document.writeln ('.rcMenuStatic {font-family:'+fontFace+';font-size:'+fontSize+';color:'+fontColour+';font-weight:'+fontWeight+';background-color:'+menuBackground+'; cursor:hand; text-decoration:'+fontDecoration+'}');
document.writeln ('.rcMenuHover  {font-family:'+fontFace+';font-size:'+fontSize+';color:'+fontHoverColour+';font-weight:'+fontWeight+';background-color:'+menuHoverBackground+'; cursor:hand; text-decoration:'+fontDecoration+'}');
document.writeln ('.rcSubMenuStatic {font-family:'+sfontFace+';font-size:'+sfontSize+';color:'+sfontColour+';font-weight:'+sfontWeight+';text-decoration:'+sfontDecoration+';background-color:'+smenuBackground+'; cursor:hand}');
document.writeln ('.rcSubMenuHover  {font-family:'+sfontFace+';font-size:'+sfontSize+';color:'+sfontHoverColour+';font-weight:'+sfontWeight+';text-decoration:'+sfontDecoration+';background-color:'+smenuHoverBackground+'; cursor:hand}');
document.writeln ('</style>');

// Build and show the main menu items
function showMenus()
{
	//modifies the table in which the menu bar is in
	document.write("<tr><td bgcolor='#00005A' height='29' align='left'><p align='center'>")
	
	//added here end
	
  if (orientation == "vertical")
  {
    document.writeln ('<table border="0" cellpadding="0" cellspacing="'+cellBorder+'" bgColor="'+borderColor+'">')
  }
  else
  {
    document.writeln ('<table border="0" cellpadding="0" cellspacing="'+cellBorder+'" bgColor="'+borderColor+'"><tr>')
  }  
  for (x=0; x<Menu.length; x++)
  {
    if (orientation=="vertical") document.writeln('<tr>')
    document.writeln ('<td onclick="tdMouseClick(\'mainLink'+x+'\')" onMouseOver="hoverMenu(); popDown('+x+', \'button'+x+'\'); " onMouseOut="clearMenu('+x+')" ><div id="button'+x+'"><table border="0" cellpadding="'+cellPadding+'" cellspacing="0" width="100%"><tr><td class="rcMenuStatic" id="cell'+x+'" nowrap>');
    document.writeln ('<a id="mainLink'+x+'" href="'+Menu[x][1]+'" target="'+Menu[x][2]+'" class="rcMenuStatic">'+Menu[x][0]+'</a></td>');
    document.writeln ('</tr></table></div></td>');    
    if (orientation=="vertical") document.writeln('</tr>')
  }
  if (orientation == "vertical")
  {
    document.writeln ('</table>');
  }
  else
  {
      document.writeln ('</tr></table>');
  }   
//close of table
	document.write("</tr></table>")

}  

// Build the sub menu items
  for (x=0; x<Menu.length; x++)
  { 
    if (subMenu[x].length > 0)
    {     
      document.writeln ('<div id="MENU'+x+'" style="visibility:hidden; position:absolute; z-index:2" >');
      document.writeln ('<table border="0" cellpadding="'+cellPadding+'" cellspacing="'+cellBorder+'" bgColor="'+sborderColor+'">');
      for (y=0; y<subMenu[x].length; y++)
      {
        document.writeln ('<tr><td id="subMenu'+x+y+'" class="rcSubMenuStatic" onMouseOver="hoverMenu(); highlightMenu(\'sub\','+x+','+y+')" onMouseOut="clearMenu('+x+');" onclick="tdMouseClick(\'subLink'+x+y+'\')" nowrap><a id="subLink'+x+y+'" href="'+subMenu[x][y][1]+'" target="'+subMenu[x][y][2]+'" class="rcSubMenuStatic">'+subMenu[x][y][0]+'</a></td></tr>');
      }
      document.writeln ('</table></div>');
    }
  }
 
// Change colour or menu and submenu items when the mouse hovers over.  
function highlightMenu(element,mainMenu,dropMenu,state)
{
  state=(state == "hover")?"rcMenuHover":"rcMenuStatic"
  if (element == "sub")
  {
    for (x=0; x < subMenu[mainMenu].length; x++)
    {
      eval(obj+'("subMenu'+mainMenu+x+'").className = "rcSubMenuStatic"')
      eval(obj+'("subLink'+mainMenu+x+'").className = "rcSubMenuStatic"')
    }   
    eval(obj+'("subMenu'+mainMenu+dropMenu+'").className="rcSubMenuHover"')
    eval(obj+'("subLink'+mainMenu+dropMenu+'").className="rcSubMenuHover"')
  }
  else
  {
    eval(obj+'("cell'+mainMenu+'").className = "'+state+'"')
    eval(obj+'("mainLink'+mainMenu+'").className = "'+state+'"')
  }
}

// Find positioning for sub menus
function getOffset(obj, dim) 
{
  if(dim=="left") 
  {
    oLeft = obj.offsetLeft;      
    while(obj.offsetParent!=null) 
    {   
      oParent = obj.offsetParent    
      oLeft += oParent.offsetLeft 
      obj = oParent 	
    }
    return oLeft;
  }
  else if(dim=="top")
  {
    oTop = obj.offsetTop;
    while(obj.offsetParent!=null) 
    {
      oParent = obj.offsetParent
      oTop += oParent.offsetTop
      obj = oParent 	
    }
    return oTop
  }
  else
  {
    alert("Error: invalid offset dimension '" + dim + "' in getOffset()")
    return false;
  }
}

// Show sub menus
function popDown(param, id)
{
  var menu;
  var button;

  if (id)
  {    
    getOffset(eval(obj+'(id)'),'left');
    getOffset(eval(obj+'(id)'),'top');
  }  
  n = 0;    
  while (n < Menu.length)
  {      
    
    //button = eval(obj+'("cell'+n+'")')
    menu = "MENU"+n
    if (param == n)
    {
        if (eval(obj+'(menu)'))
        {
          eval(obj+'(menu).style.visibility = "visible"')
          eval(obj+'(menu).style.left = oLeft + horizontalOffset;')
          eval(obj+'(menu).style.top = oTop + verticalOffset;')
        }
         highlightMenu('main',n,'','hover')
         if (subMenu[param].length > 0)
         {
           for (x=0; x<subMenu[param].length; x++)
           {
             eval (obj+'("subMenu'+param+x+'").className = "rcSubMenuStatic"')
             eval (obj+'("subLink'+param+x+'").className = "rcSubMenuStatic"')         
           }
         }
      }
      else 
      {          
        if (eval(obj+'(menu)'))
        {
          eval(obj+'(menu).style.visibility = "hidden"')            
        }
        highlightMenu ('main',n,'','static')

      }
    n++
  }  
}

// Re-set timer for sub menus
function hoverMenu()
{
  if(timer)
  clearTimeout(timer)
}

// Set timer for sub menus
function clearMenu(menu)
{
  setDelay = subMenuDelay*1000
  delay = (subMenu[menu].length > 0)?setDelay:1
  
  timer = setTimeout("popDown("+(Menu.length + 1)+")",delay)
}

// when you click the box, perform the same function as if the user had clicked the hyperlink
function tdMouseClick(theElement)
{
  eval(obj+'(theElement).click()')
}
