/* author: raymond strachan */
/* Creation date: 13/04/2005 */

function printpage(newpage)
{child = window.open(newpage,'Squash Australia Regulations','width=580,height=890,resizable=yes,scrollbars=yes,status=0');}

function NewWindow(u,n,w,h,f,p,x,y){varws=window.screen?1:0,m=Math,C='center',R='random',M='custom',sw=screen.availWidth,sh=screen.availHeight,T=(p==C&&ws)?(sh-h)/2:(p==R&&ws)?(m.floor(m.random()*(sh-h))):(p==M)?y:20,L=(p==C&&ws)?(sw-w)/2:(p==R&&ws)?(m.floor(m.random()*(sw-w))):(p==M)?x:20,s='width='+w+',height='+h+',top='+T+',left='+L;s+=(!f||f=='')?'':','+f;win=window.open(u,n,s);if(win.focus)win.focus();}

/****************************************************
*	        DOM Image rollover:
*		by Chris Poole
*		http://chrispoole.com
*               Script featured on http://www.dynamicdrive.com
*		Keep this notice intact to use it :-)
****************************************************/

function init() {
  if (!document.getElementById) return
  var imgOriginSrc;
  var imgTemp = new Array();
  var imgarr = document.getElementsByTagName('img');
  for (var i = 0; i < imgarr.length; i++) {
    if (imgarr[i].getAttribute('hsrc')) {
        imgTemp[i] = new Image();
        imgTemp[i].src = imgarr[i].getAttribute('hsrc');
        imgarr[i].onmouseover = function() {
            imgOriginSrc = this.getAttribute('src');
            this.setAttribute('src',this.getAttribute('hsrc'))
        }
        imgarr[i].onmouseout = function() {
            this.setAttribute('src',imgOriginSrc)
        }
    }
  }
}

function ldiscuss(page)
{     //strt fnctn
url = 'http://www.squashgame.info/'+ page; 
sw = screen.width;
psw = (sw - 520);

 var win = window.open(url, 'ldiscuss', 'width=500, height=600, top=20, left=' + psw + ', menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes');
 win.focus();
if (!win.opener)
   win.opener = self;

}     //end fnctn

function ldnav(page, page2)
{     //strt fnctn
url = 'http://www.squashgame.info/'+ page; 
url2 = 'http://www.squashgame.info/'+ page2; 
sw = screen.width;
psw = (sw - 520);
 var win1 = window.open(url2, '_self');

 var win = window.open(url, 'ldiscuss', 'width=500, height=600, top=20, left=' + psw + ', menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes');
win1.focus();
 win.focus();
if (!win.opener)
   win.opener = self;

}     //end fnctn

function goforgold()
{     //strt fnctn
this.window.close();
window.open('http://www.squashgame.info/golden/20', 'sgi');
if (window.focus) {window.focus()}
}     //end fnctn

// GodMoon.com CSS Drop Down Menu

startList = function() { 
var nodes = document.getElementById("cssvertical").getElementsByTagName("LI"); 
for (var i=0; i<nodes.length; i++) { 
nodes[i].onmouseover = function() { 
this.className += " over"; 
} 
nodes[i].onmouseout = function() { 
this.className = this.className.replace(new RegExp(" over\\b"), ""); 
} 
} 
} 
if (window.attachEvent) window.attachEvent("onload", startList); 

/* Credits: Stu Nicholls */
/* URL: http://www.stunicholls.com/menu/pro_dropline_1/stuHover.js */

stuHover = function() {
 var cssRule;
 var newSelector;
 for (var i=0; i<document.styleSheets.length; i++)
  for (var x=0; x<document.styleSheets[i].rules.length ; x++)
   {
   cssRule = document.styleSheets[i].rules[x];
   if (cssRule.selectorText.indexOf("LI:hover") >= 0)
   {
     newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
    document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
   }
  }
 var getElm = document.getElementById("nav").getElementsByTagName("LI");
 for (var i=0; i<getElm.length; i++) {
  getElm[i].onmouseover=function() {
   this.className+=" iehover";
  }
  getElm[i].onmouseout=function() {
   this.className=this.className.replace(new RegExp(" iehover\\b"), "");
  }
 }
}
if (window.attachEvent) window.attachEvent("onload", stuHover);