

/***********************************************
* 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 1
var menu1=new Array()
menu1[0]='<a href="/headlines.asp">:: Season 2008-09</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="/club/club-all.asp">:: ALL Club Info Listing</a>'
menu2[1]='<a href="/club/club-aviemore.asp">:: Aviemore Squash Club</a>'
menu2[2]='<a href="/club/club-buckpool.asp">:: Buckpool Squash Club</a>'
menu2[3]='<a href="/club/club-elgin.asp">:: Elgin Squash Club</a>'
menu2[4]='<a href="/club/club-forres.asp">:: Forres Squash Club</a>'
menu2[5]='<a href="/club/club-gord.asp">:: Gordonstoun Squash Club</a>'
menu2[6]='<a href="/club/club-invergordon.asp">:: Invergordon Squash Club</a>'
menu2[7]='<a href="/club/club-inverness.asp">:: Inverness Tennis &amp; Squash Club</a>'
menu2[8]='<a href="/club/club-keith.asp">:: Keith Squash Club</a>'
menu2[9]='<a href="/club/club-kirkwall.asp">:: Kirkwall Squash Club</a>'
menu2[10]='<a href="/club/club-loch.asp">:: Lochaber Squash Club</a>'
menu2[11]='<a href="/club/club-nairn.asp">:: Nairn Squash Club</a>'
menu2[12]='<a href="/club/club-raf-kinloss.asp">:: RAF Kinloss Squash Club</a>'
menu2[13]='<a href="/club/club-raf-lossie.asp">:: RAF Lossiemouth Squash Club</a>'
menu2[14]='<a href="/club/club-shetland.asp">:: Shetland Squash Association</a>'
menu2[15]='<a href="/club/club-stornoway.asp">:: Stornoway Squash Club</a>'
menu2[16]='<a href="/club/club-sutherland.asp">:: Sutherland Squash Club</a>'
menu2[17]='<a href="/club/club-thurso.asp">:: Thurso Squash Club</a>'
menu2[18]='<a href="/club/club-wick.asp">:: Wick Squash Club</a>'


//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="/photo0910.asp">:: Season 2009-10</a>'
menu3[1]='<a href="/photo0809.asp">:: Season 2008-09</a>'

//Contents for menu 4
var menu4=new Array()
menu4[1]='<a href="/league/leag-fixtures.asp">:: ALL League Fixtures</a>'
menu4[2]='<a href="/league/leag-archive.asp">:: Archived Leagues</a>'
menu4[3]='<a href="/league/leag-prem.asp">:: Division Premier</a>'
menu4[4]='<a href="/league/leag-div1.asp">:: Division 1</a>'
menu4[5]='<a href="/league/leag-div2.asp">:: Division 2</a>'
menu4[6]='<a href="/league/leag-div3.asp">:: Division 3</a>'
menu4[7]='<a href="/league/rules.asp">:: Rules</a>'
menu4[8]='<a href="/league/leag-scorecard.pdf" target="_blank">:: Scorecard (PDF file)</a>'
menu4[9]='<a href="/league/masters.asp">:: Other - Masters Fixtures</a>'


var menuwidth='200px' //default menu width
var menubgcolor='#ffffff'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editing 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


/* -------------- SLIDESHOW -------------- */

<!--

//*****************************************
// Blending Image Slide Show Script- 
// © Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************

//specify interval between slide (in mili seconds)
var slidespeed=4000

//specify images
var slideimages=new Array("/images/slide7.jpg","/images/slide1.jpg","/images/slide4.jpg","/images/slide5.jpg","/images/slide3.jpg","/images/slide6.jpg","/images/slide2.jpg")

//specify corresponding links
var slidelinks=new Array(
"/09-10/junior-national.asp",
"http://www.squashsite.co.uk/bspa/edinburgh.htm",
"/09-10/junior-sju.asp",
"/09-10/billy.asp",
"http://www.inthewinningzone.com/wz/News/Squash/Clyne-loses-in-Spanish-thriller-/8379/",
"/09-10/junior-silver.asp",
"/09-10/team-event.asp")

var newwindow=0 //open links in new window? 1=yes, 0=no

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}

//-->

/* -------------- BANNER AD ROTATOR -------------- */


function banner(img_source,url,alt,chance) {
   this.img_source = img_source;
   this.url = url;
   this.alt = alt;
   this.chance = chance;
}
function display() {
   with (this) document.write("<a href=" + url + "><img src='" + img_source + "' width=556 height=70 border=0 alt='" + alt + "'></a>");
}
banner.prototype.display = display;
banners = new Array();
banners[0] = new banner("/images/kdf.jpg",
                        "http://www.hisa.co.uk",
                        "Kitchens - Doors and Floors - Halkirk.  Give them a call for a quote on the number provided.",
                        10);
banners[1] = new banner("/images/pb-ltd.jpg",
                        "http://www.precisionblinds.co.uk target='_blank'",
                        "Precision Blinds Limited.  Click here to access website.",
                        10);
banners[2] = new banner("/images/pollard.jpg",
                        "http://www.pollardmortgageshop.co.uk target='_blank'",
                        "Pollard Mortgage Shop.  Click here to access website.",
                        10);
sum_of_all_chances = 0;
for (i = 0; i < banners.length; i++) {
   sum_of_all_chances += banners[i].chance;
}
function display_banner() {
   chance_limit = 0;
   randomly_selected_chance = Math.round((sum_of_all_chances - 1) * Math.random()) + 1;
   for (i = 0; i < banners.length; i++) {
      chance_limit += banners[i].chance;
      if (randomly_selected_chance <= chance_limit) {
         document.write("<a href=" + banners[i].url + "><img src='" + banners[i].img_source + "' width=556 height=70 border=0 alt='" + banners[i].alt + "'></A>");
         return banners[i];
         break;
      }
   }
}