// JavaScript Document
<!-- title tag -->
var established = new Date("January 1, 1970 01:15:00");
var today = new Date();
var years = today.getFullYear() - established.getFullYear();
document.write("<title>David Deaton Karate Studios - Teaching for " + years + " years</title>")
	
function playVideo(thisMovie){
	document.write("<table border='0' cellpadding='0' cellspacing='0' bgcolor='#000000'>");
	document.write("<tr>");
	document.write("<td width='30'><img src='images/blackTopLeftCorner.gif' width='30' height='30' /></td>");
	document.write("<td>&nbsp;</td>");
	document.write("<td width='30'><img src='images/blackTopRightCorner.gif' width='30' height='30' /></td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td>&nbsp;</td>");
	document.write("<td><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'");
	document.write("codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='320' height='240' id='videoPlayer' align='middle'>");
	document.write("<param name='allowScriptAccess' value='sameDomain' />");
	document.write("<param name='movie' value='videoPlayer.swf?whichVideo=videos/" + thisMovie + ".flv' />");
	document.write("<param name='quality' value='high' /><param name='wmode' value='transparent' />");
	document.write("<param name='bgcolor' value='#000000' /><embed src='videoPlayer.swf?whichVideo=videos/" + thisMovie + ".flv' quality='high' wmode='transparent'");
	document.write("bgcolor='#000000' width='320' height='240' name='videoPlayer' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' ");
	document.write("pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object></td>");
	document.write("<td>&nbsp;</td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td><img src='images/blackBottomLeftCorner.gif' width='30' height='30' /></td>");
	document.write("<td>&nbsp;</td>");
	document.write("<td><img src='images/blackBottomRightCorner.gif' width='30' height='30' /></td>");
	document.write("</tr>");
	document.write("</table>");
}
<!-- hierarchial menus  //-->

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu
var menu1=new Array()
menu1[0]='<a href="karate.html">Karate Program</a>'
menu1[1]='<a href="blackbeltclub.html">Black Belt Club</a>'
menu1[2]='<a href="pricelist.html">Pricelist</a>'
menu1[3]='<a href="promotion.html">Belt Promotion</a>'
menu1[4]='<a href="rules.html#studentCreed">Creed</a>'
menu1[5]='<a href="schedule.html">Class Schedule</a>'


var menu2=new Array()
menu2[0]='<a href="execufit.html">Execufit Program</a>'
menu2[1]='<a href="rules.html#studentCreed">Creed</a>'
menu2[2]='<a href="schedule.html">Class Schedule</a>'

		
var menu3=new Array()
menu3[0]='<a href="littledragons.html">Little Dragons Program</a>'
menu3[1]='<a href="blackbeltclub.html">Black Belt Club</a>'
menu3[2]='<a href="pricelist.html">Pricelist</a>'
menu3[3]='<a href="promotion.html">Belt Promotion</a>'
menu3[4]='<a href="rules.html#littleDragonsCreed">Creed</a>'
menu3[5]='<a href="birthday.html">Birthday Parties</a>'
menu3[6]='<a href="notetoparents.html">Note To Parents</a>'
menu3[7]='<a href="schedule.html">Class Schedule</a>'


var menu4=new Array()
menu4[0]='<a href="calendar.html">Calendar</a>'
menu4[1]='<a href="rules.html">School Rules</a>'
menu4[2]='<a href="history.html">History</a>'
menu4[3]='<a href="blackbeltprinciples.html">Black Belt Principles</a>'
menu4[4]='<a href="glossary.html">Japanese Words</a>'
menu4[5]='<a href="howtotieyourbelt.html">Tie Your Belt</a>'
menu4[6]='<a href="tournament.html">Tournaments</a>'
menu4[7]='<a href="schedule.html">Class Schedule</a>'



var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes"){
document.onclick=hidemenu
}
