// ---------------- WebFXMenuItem(sText, sHref, sToolTip, oSubMenu) ---------------
var dom = document.domain
//dom = "http://www.dsqf2.dk/jgp/menu/gif//"
//webfxMenuImagePath	= "../menu/gif/";
webfxMenuImagePath	= "http://jgp.dsqf2.dk/menu/gif/";
webIconNewWin = "<img src='http://jgp.dsqf2.dk/menu/gif/pages.gif' height='11' alt='Åbner i nyt vindue.' border='0' align='absmiddle'> ";
webIconHome = "<img src='http://jgp.dsqf2.dk/menu/gif/home.gif' height='11' alt='Tilbage til ranglisten.' border='0' align='absmiddle'> ";

////////////////////////// menuDSqF ///////////////////////////
var menuFotoArkiv = new WebFXMenu;
	menuFotoArkiv.add(new WebFXMenuItem(webIconNewWin+"DSqF Junior Squash Foto", "javascript:openNewWin(&quot;http://foto.dsqf2.dk&quot;,1,800,600)", ""));
	menuFotoArkiv.add(new WebFXMenuItem(webIconNewWin+"Gydes Junior Squash galleri", "javascript:openNewWin(&quot;http://picasaweb.google.dk/DSQFjunior&quot;,1,800,600)", ""));
var menuEuroSquash = new WebFXMenu;
	menuEuroSquash.add(new WebFXMenuItem(webIconNewWin+"ESF Junior Squash rangliste", "javascript:openNewWin(&quot;http://www.webartists.at/squash/index.php?action=rankings&sex=f&quot;,1,800,600)", ""));
	menuEuroSquash.add(new WebFXMenuItem(webIconNewWin+"ESF Junior Squash kalender", "javascript:openNewWin(&quot;http://www.webartists.at/squash/index.php?action=tournaments&subaction=tournamentslist&showall=1&quot;,1,800,600)", ""));

var menuDSqF = new WebFXMenu;
	menuDSqF.add(new WebFXMenuItem(webIconNewWin+"Dansk Squash Forbund", "javascript:openNewWin(&quot;http://www.dsqf.dk&quot;,1,800,600)", ""));
	menuDSqF.add(new WebFXMenuItem(webIconHome+"Junior Squash Rangliste", "javascript:openInTop(&quot;http://jgp.dsqf2.dk&quot;,1,800,600)", ""));
	menuDSqF.add(new WebFXMenuItem("Junior Squash Foto", "", "", menuFotoArkiv));
	menuDSqF.add(new WebFXMenuItem(webIconNewWin+"Danish Junior Open", "javascript:openNewWin(&quot;http://djo.dsqf2.dk&quot;,1,800,600)", ""));
	menuDSqF.add(new WebFXMenuItem("Europæisk Junior Squash", "", "", menuEuroSquash));
	menuDSqF.add(new WebFXMenuItem(webIconNewWin+"Squash baner i DK", "javascript:openNewWin(&quot;http://da.wikipedia.org/wiki/Squashbaner_i_Danmark&quot;,1,800,600)", ""));
////////////////////////// menuDSqF END ///////////////////////////
 
////////////////////////// menuRanglisten ///////////////////////////
var menuRanglisten = new WebFXMenu;
	menuRanglisten.add(new WebFXMenuItem(webIconHome+"Junior Squash Rangliste", "javascript:openInTop(&quot;http://jgp.dsqf2.dk&quot;,1,800,600)", ""));
	menuRanglisten.add(new WebFXMenuItem(webIconNewWin+"Regler for DSqF Junior Turneringer", "javascript:openNewWin(&quot;http://www.dsqf.dk/media(600,1030)/JGP_09_Regler_g%C3%A6ldende.pdf&quot;,1,800,600)", ""));
	menuRanglisten.add(new WebFXMenuItem(webIconNewWin+"Tildeling af point på Ranglisten", "javascript:openNewWin(&quot;http://www.dsqf.dk/media(601,1030)/JGP_09_Ranglisteregler_g%C3%A6ldende.pdf&quot;,1,800,600)", ""));
	menuRanglisten.add(new WebFXMenuItem("Pointscala", "javascript:openInMain(&quot;../intro/pointscala.php&quot;)", ""));
	menuRanglisten.add(new WebFXMenuItem(webIconNewWin+"Hjælp til Ranglisten", "javascript:openNewWin(&quot;../help/index.php&quot;,1,800,600)", ""));
////////////////////////// menuRanglisten END ///////////////////////////

////////////////////////// menuTurneringsleder ///////////////////////////
var menuTurneringsformer = new WebFXMenu;
	menuTurneringsformer.add(new WebFXMenuItem("Pulje", "", ""));
	menuTurneringsformer.add(new WebFXMenuItem("Monrad", "", ""));
var menuVejledninger = new WebFXMenu;
//	menuVejledninger.add(new WebFXMenuItem("Afholdelse af turnering", "", ""));
//	menuVejledninger.add(new WebFXMenuItem("Turneringsformer", "", "", menuTurneringsformer));
	menuVejledninger.add(new WebFXMenuItem("Seedning af spillere", "javascript:openInMain(&quot;../intro/info_seedning.php&quot;)", ""));
	menuVejledninger.add(new WebFXMenuItem("Indplacering af seedede spillere", "javascript:openInMain(&quot;../intro/info_seed_indplacering.php&quot;)", ""));
	menuVejledninger.add(new WebFXMenuItem("Turneringsformer", "javascript:openInMain(&quot;../intro/info_turneringsformer.php&quot;)", ""));
	menuVejledninger.add(new WebFXMenuItem("Indrapportering af resultater", "javascript:openInMain(&quot;../intro/info_resultater.php&quot;)", ""));
var menuStatistik = new WebFXMenu;
	menuStatistik.add(new WebFXMenuItem("Deltagere pr turnering", "javascript:openInMain(&quot;../admin/statistik/index.php?type=Deltagere&quot;)", ""));
	menuStatistik.add(new WebFXMenuItem("Piger pr kategori pr turnering", "javascript:openInMain(&quot;../admin/statistik/index.php?type=Piger&quot;)", ""));
	menuStatistik.add(new WebFXMenuItem("Drenge pr kategori pr turnering", "javascript:openInMain(&quot;../admin/statistik/index.php?type=Drenge&quot;)", ""));
	menuStatistik.add(new WebFXMenuItem("Klubber pr turnering", "javascript:openInMain(&quot;../admin/statistik/index.php?type=Klubber&quot;)", ""));
	menuStatistik.add(new WebFXMenuItem("Deltagere pr klub", "javascript:openInMain(&quot;../admin/klubtilskud/index.php&quot;)", ""));
var menuTurneringsleder = new WebFXMenu;
	menuTurneringsleder.add(new WebFXMenuItem("Vejledninger", "", "", menuVejledninger));
	menuTurneringsleder.add(new WebFXMenuItem("Søg efter spillere", "javascript:openInMain(&quot;../admin/search.php&quot;)", ""));
	menuTurneringsleder.add(new WebFXMenuItem("Turnerings statistikker", "", "", menuStatistik));
////////////////////////// menuTurneringsleder END ///////////////////////////

////////////////////////// menuAdministrator ///////////////////////////
var menuAdministrator = new WebFXMenu;
	menuAdministrator.add(new WebFXMenuItem("<b>Administrator Logon</b><br><p align='right'>E-mail <input type='text' name='id' style='width=120'><br>Password <input type='text' name='pw' style='width=120'></p><p align='center'><input type='button' value='Logon' style='width=120'><br>Har du glemt dit password?<br><input type='button' value='Send password?' style='width=120'></p>", "", ""));
	menuAdministrator.add(new WebFXMenuItem("Besøgsstatistik", "javascript:openInMain(&quot;../admin/visitors.php&quot;)", ""));
////////////////////////// menuAdministrator END ///////////////////////////

////////////////////////// menuDiverse ///////////////////////////
var menuDiverse = new WebFXMenu;
	menuDiverse.add(new WebFXMenuItem("Squash Busters", "javascript:openInMain(&quot;../SquashBusters/squashbusters.php&quot;)", ""));
	menuDiverse.add(new WebFXMenuItem("Link til Ranglisten", "javascript:openInMain(&quot;../intro/link_to_jgp.php&quot;)", ""));
////////////////////////// menuAdministrator END ///////////////////////////

////////////////////////// menuSprog ///////////////////////////
var menuSprog = new WebFXMenu;
	menuSprog.add(new WebFXMenuItem("<img src='http://jgp.dsqf2.dk/menu/gif/dk.gif' height='10' border='0' align='absmiddle'> Ranglisten på dansk", "javascript:openInTop(&quot;http://jgp.dsqf2.dk/index.php?lang=DK&quot;)", ""));
	menuSprog.add(new WebFXMenuItem("<img src='http://jgp.dsqf2.dk/menu/gif/gb.gif' height='10' border='0' align='absmiddle'> The Rankings in english", "javascript:openInTop(&quot;http://jgp.dsqf2.dk/index.php?lang=UK&quot;)", "Only the main part of the page are in english."));
////////////////////////// menuSprog END ///////////////////////////


// LAV BAREN
var myBar = new WebFXMenuBar;

myBar.add(new WebFXMenuButton("Junior Squash", "", "", menuDSqF));
myBar.add(new WebFXMenuButton("Ranglisten", "", "", menuRanglisten));
myBar.add(new WebFXMenuButton("Turneringsleder", "", "", menuTurneringsleder));
myBar.add(new WebFXMenuButton("Administrator", "", "", menuAdministrator));
myBar.add(new WebFXMenuButton("Diverse", "", "", menuDiverse));
myBar.add(new WebFXMenuButton("<img src='http://jgp.dsqf2.dk/menu/gif/dk.gif' height='10' border='0' align='absmiddle'><img src='http://jgp.dsqf2.dk/menu/gif/gb.gif' height='10' border='0' align='absmiddle'>", "", "", menuSprog));

function co(element,mode) {
	if (mode=="in") {
		cursortype = 'hand'
		colorval = '#FF771C'
	} else if (mode=="out") {
		cursortype = ''
		colorval = '#FFD36E'
	}
	element.style.background=colorval;
	element.style.cursor=cursortype;
}

function NewWindow(url, width, height){
	var Win = window.open(url,"NewWindow",'width=' + width + ',height=' + height + ',resizeable=0,scrollbars=yes' );
}

function openNewWin(url,target,op_wid,op_heigh) {
	var address    = url;
	calc = ( window.screen.width / 8) - ( op_wid / 8);
	op_left = calc;
	op_top = 100;
	if (op_left < 10) 
		op_left = 10;

	if (op_top < 10) 
		op_top = 10;
    
	var option     = "top="+op_top+",left="+op_left+",toolbar=yes,location=yes,directories=yes" + 
	",status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=" + op_wid + ",height=" + op_heigh;

	if (navigator.appVersion.substring(0,1) == "3"){
		window.location.url = url;
	} else {
		var win4 = window.open(address, "", option);
		mani_win = win4;
		mani_win.focus;
	}
}

function openInFrame(url){	window.frames['f_ranking'].location.href = url;	}
function openInMain(url){	parent.Main.location.href = url;	}
function openInTop(url){	window.top.location.href = url;	}

