/* Created by: Jeremy Keith / Anonymous | http://www.alistapart.com/articles/imagegallery/ */
function showPic(whichpic) {
  if (document.getElementById) {
    document.getElementById('placeholder').src = whichpic.href;
    if (whichpic.title) {
      document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
    } else {
      document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
    }
    return false;
  } else {
  return true;
  }
}

var previousToggle=null;
function toggleMe(a){
  var e=document.getElementById(a);
  if(!e)return true;
  if(e.style.display=="none"){
    e.style.display="block";
    if(previousToggle)previousToggle.style.display="none";
    previousToggle=e;
  }
  return true;
}

/* ------------------------ */

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}

/* ------------------------ */

function lastmodified() {
var dateObj = new Date(document.lastModified)
var lmonth = dateObj.getMonth()+1
var lday = dateObj.getDate()
var lyear = dateObj.getYear()
if (lyear < 2000) lyear = lyear + 1900
document.write("Page last updated " + lday + "/" + lmonth + "/" + lyear)
}

/* ------------------------ */
/* display the copyright statement */

function copyright() {
var dateObj = new Date()
var cyear = dateObj.getYear()
if (cyear < 2000) cyear = cyear + 1900
document.write("Copyright © 1991-" + cyear + " Fight Back Ju-Jitsu Academy")
}


/* ------------------------ */

function addbookmark()
{
bookmarkurl="http://www.fightbackjujitsu.co.uk"
bookmarktitle="Fight Back Ju-Jitsu Academy"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

/* ------------------------ */

<!-- Image popup !-->
function popup(image){
cuteLittleWindow = window.open('', "littleWindow", "location=0,scrollbars=auto");
cuteLittleWindow.document.focus();
cuteLittleWindow.document.write('<div style="position: absolute; width: 100%; height: 100%; z-index: 1; left:0px; top:0px"><table cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center"><img title="Click To Close Window" id="IMG" onclick="window.close();" onload="window.resizeTo(this.width+10,this.height+30);" src="'+image+'"></td></tr></table></div>');
}

/* ------------------------ */


//SuckerTree Vertical Menu 1.1 (Nov 8th, 06)
//By Dynamic Drive: http://www.dynamicdrive.com/style/
var menuids=["navmenutree"] //Enter id(s) of SuckerTree UL menus, separated by commas
function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
for (var t=0; t<ultags.length; t++){
ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
else //else if this is a sub level submenu (ul)
ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
ultags[t].parentNode.onmouseover=function(){
this.getElementsByTagName("ul")[0].style.display="block"
}
ultags[t].parentNode.onmouseout=function(){
this.getElementsByTagName("ul")[0].style.display="none"
}
}
for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
ultags[t].style.visibility="visible"
ultags[t].style.display="none"
}
}
}
if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)


