//Fixed Variables

var turl = window.location.href;
var upr = turl.split('/');
var forum = upr[4];
var thread = upr[5];

var defaultMenuWidth="200px" //set default menu width.

var linkset=new Array();
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

linkset[0]='<a href="http://www.casinomeister.com/accredited_casinos.php" target="_blank">Accredited Casinos &raquo;</a>'
linkset[0]+='<a href="http://www.casinomeister.com/rogue/index.php" target="_blank">Rogue Casinos &raquo;</a>'
linkset[0]+='<hr>' //Optional Separator
linkset[0]+='<a href="http://www.casinomeister.com/problems.php" target="_blank">Pitch A Bitch &raquo;</a>'
linkset[0]+='<a href="http://www.casinomeister.com/casino-research/" target="_blank">Casino FAQ &raquo;</a>'

linkset[1]='<a href="http://www.azonlinecasinos.com/" target="_blank">A-Z of Online Casinos &raquo;</a>'
linkset[1]+='<hr styl="margin:0px;">'
linkset[1]+='<a href="http://www.onlinecasinouk.com/" target="_blank">Online Casino Reviews &raquo;</a>'
linkset[1]+='<hr styl="margin:0px;">'
linkset[1]+='<a href="http://www.slotjunkies.net/" target="_blank">SlotJunkies Video Vault &raquo;</a>'
linkset[1]+='<hr styl="margin:0px;">'
linkset[1]+='<a href="http://www.slotjunkies.info/" target="_blank">SlotJunkies Database &raquo;</a>'
linkset[1]+='<hr styl="margin:0px;">'
linkset[1]+='<a href="http://www.slottournaments.net/" target="_blank">Slot Tournaments Schedule &raquo;</a>'

linkset[2]='<a href="http://www.azonlinecasinos.com/best-online-casinos/" target="_blank">Where I Play... &raquo;</a>'
linkset[2]+='<a href="http://www.azonlinecasinos.com/microgaming-casinos/" target="_blank">Microgaming &raquo;</a>'
linkset[2]+='<a href="http://www.azonlinecasinos.com/usa-online-casinos/" target="_blank">US Facing &raquo;</a>'


/******************************************************************************************
								VARIABLE SETUPS (LINKS & TEXT)
******************************************************************************************/
//Link definitions - set pairs up here. Remember, variable names cannot start with numbers!
var DEFAULTlink1 = "http://www.azonlinecasinos.com";	// Default link
var DEFAULTanchor1 = "<strong>A-Z</strong> of Online Casinos"; // Default anchor text
var DEFAULTstrap1 = "Cashout & Reverse times, software, jurisdiction, ownership & more for 150+ reputable casinos."; // Default anchor text

var DEFAULTlink2 = "http://www.slotjunkies.net";	// Default link
var DEFAULTanchor2 = "<strong>Slotjunkies</strong>"; // Default anchor text
var DEFAULTstrap2 = "200 online slots videos & statistics: <em>IGT, WMS, Novomatic, Aristocrat, MG, Playtech</em> etc."

var DEFAULTlink3 = "http://www.onlinecasinouk.com";	// Default link
var DEFAULTanchor3 = "My UK Casino Reviews"; // Default anchor text
var DEFAULTstrap3 = "The positives & negatives of the casinos I play."


// Variable pairings to define other links: Use any variable names you like here but make sure 
// they each have an if () statement in the "MATCH STATEMENTS" section (below)
var SJlink = "http://www.slotjunkies.net";
var SJanchor = "SlotJunkies MK II";
var SJstrap = "Over 150 slot videos showing the bonus rounds.";

var UKlink = "http://www.onlinecasinouk.net/";
var UKanchor = "UK Casino Reviews";
var UKstrap = "Reviews & ratings for UK casinos I have played.";

var MGlink = "http://www.azonlinecasinos.com";
var MGanchor = "List Of Microgaming Casinos";
var MGstrap = "Owner, jurisdiction, cashout times and more.";

var RTGlink = "http://www.azonlinecasinos.com";
var RTGanchor = "List Of RTG Casinos";
var RTGstrap = "Owner, jurisdiction, cashout times and more.";

var RTGSLOTlink = "http://www.freeslotsforfun.net";
var RTGSLOTanchor = "RTG Slots";
var RTGSLOTstrap = "Freeplay versions of RTG slots";

var STRATlink = "http://www.slotjunkies.info/slot_strategies.php";
var STRATanchor = "Slot Strategies";
var STRATstrap = "Strategies I use for maximising play time";

var VPODDSlink = "http://www.onlinecasinouk.com/casino-games/video-poker-expected-returns.php";
var VPODDSanchor = "Video Poker Expected Returns Chart";
var VPODDSstrap = "";

var WWlink = "http://www.azonlinecasinos.com";
var WWanchor = "Wagerworks/IGT Casinos";
var WWstrap = "Owner, jurisdiction, cashout times and more.";

var OCSMlink = "http://www.onlinecasinoslotmachines.co.uk/";
var OCSManchor = "Slot Reviews";
var OCSMstrap = "";

var STNETlink = "http://www.slottournaments.net/";
var STNETanchor = "Guide To Slot Tournaments";
var STNETstrap = "";

var BJlink = "http://www.highlimitblackjack.com/blackjack-bet-limits/";
var BJanchor = "High Limit Blackjack Bet Limits + Cashout Limits";
var BJstrap = "";

var LIVElink = "http://www.livedealercasinos.net";
var LIVEanchor = "Live Dealer Casinos";
var LIVEstrap = "What games & where";

var POLITICSlink = "http://www.casinovas.com/";
var POLITICSanchor = "US Politics";
var POLITICSstrap = "Articles on US online gambling politics";

var BESTlink = "http://www.azonlinecasinos.com/best-online-casinos/";
var BESTanchor = "My Favourite Online Casinos";
var BESTstrap = "With cashout times and more";

/******************************************************************************************
								MATCH STATEMENTS
******************************************************************************************/
// Create default link for when no forum/thread matches
var op = "";

// Now add new if() statement for each match required. Each one overrides the last so 
// order is important. Put the forums first

//Forum matches
if (forum == 'america-beautiful') {
	op =  "";
	}
//...etc etc	

// Thread matches (one if statement per term required/variable pairing from above)
// NB: if the term you want starts with a number, precede it with a dash (ie "-32red")
if (thread.indexOf('-mg') != -1 || thread.indexOf('microgaming') != -1) {
	op += "<a href='"+MGlink+"' target='_blank'>"+MGanchor+" &raquo;</a> &nbsp; "+MGstrap;
	}
if (thread.indexOf('online-casinos') != -1) {
	op += "<a href='"+BESTlink+"' target='_blank'>"+BESTanchor+" &raquo;</a> &nbsp; "+BESTstrap;
	}
if (thread.indexOf('wagerworks') != -1 || thread.indexOf('wager-works') != -1 || thread.indexOf('-elvis') != -1 || thread.indexOf('multistrike') != -1 || thread.indexOf('multi-strike') != -1) {
	op += "<a href='"+WWlink+"' target='_blank'>"+WWanchor+" &raquo;</a> &nbsp;"+WWstrap;
	}
if (thread.indexOf('rtg') != -1 || thread.indexOf('real-time-gaming') != -1) {
	op += "<a href='"+RTGlink+"' target='_blank'>"+RTGanchor+" &raquo;</a> &nbsp; "+RTGstrap;
	}
if (thread.indexOf('17692') != -1 || thread.indexOf('slots') != -1 || thread.indexOf('free-spin') != -1 || thread.indexOf('variance') != -1 || thread.indexOf('hitman') != -1) {
	op += "<a href='"+SJlink+"' target='_blank'>"+SJanchor+" &raquo;</a> &nbsp; "+SJstrap+"<br>";
	op += "<a href='"+DEFAULTlink1+"' target='_blank'>"+DEFAULTanchor1+" &raquo;</a> &nbsp; "+DEFAULTstrap1;
	}
if (thread.indexOf('tomb-raider') != -1 || thread.indexOf('tombraider') != -1) {
	op += "<a href='"+SJlink+"' target='_blank'>"+SJanchor+" &raquo;</a> &nbsp; "+SJstrap;
	}	
if (thread.indexOf('18134') != -1 || thread.indexOf('uk') != -1) { // match thread 17692
	op += "<a href='"+UKlink+"' target='_blank'>"+UKanchor+" &raquo;</a> &nbsp; "+UKstrap;
	}	
if (thread.indexOf('18108') != -1 || thread.indexOf('grand-prive') != -1 || thread.indexOf('reverse') != -1) { // match thread 18108
	op += "<a href='"+RTlink+"' target='_blank'>"+RTanchor+" &raquo;</a> &nbsp; "+RTstrap;
	}
if (thread.indexOf('screenshot') != -1) {
	op += "<a href='"+SJlink+"' target='_blank'>"+SJanchor+" &raquo;</a> &nbsp; "+SJstrap;
	}
if (thread.indexOf('strategy') != -1 || thread.indexOf('strategies') != -1) {
	op += "<a href='"+STRATlink+"' target='_blank'>"+STRATanchor+" &raquo;</a> &nbsp; "+STRATstrap;
	}
if (thread.indexOf('videopoker') != -1 || thread.indexOf('video-poker') != -1 || thread.indexOf('bonus-poker') != -1 || thread.indexOf('royal-flush') != -1 || thread.indexOf('vp') != -1 || thread.indexOf('deuces') != -1) {
	op += "<a href='"+VPODDSlink+"' target='_blank'>"+VPODDSanchor+" &raquo;</a> &nbsp; "+VPODDSstrap;
	}
if (thread.indexOf('-bj') != -1 || thread.indexOf('blackjack') != -1) {
	op += "<a href='"+BJlink+"' target='_blank'>"+BJanchor+" &raquo;</a> &nbsp; "+BJstrap;
	}
if (thread.indexOf('live-dealer') != -1 || thread.indexOf('livedealer') != -1) {
	op += "<a href='"+LIVElink+"' target='_blank'>"+LIVEanchor+" &raquo;</a> &nbsp; "+LIVEstrap;
	}
if (thread.indexOf('legalisation') != -1 || thread.indexOf('barney') != -1) {
	op += "<a href='"+POLITICSlink+"' target='_blank'>"+POLITICSanchor+" &raquo;</a> &nbsp; "+POLITICSstrap;
	}

//...etc etc
	
if (!op) {
	op = "<a href='"+DEFAULTlink1+"' target='_blank'>"+DEFAULTanchor1+" &raquo;</a> &nbsp; "+DEFAULTstrap1+"<br>";
	op += "<a href='"+DEFAULTlink2+"' target='_blank'>"+DEFAULTanchor2+" &raquo;</a> &nbsp; "+DEFAULTstrap2;
	//op += " &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href='"+DEFAULTlink3+"' target='_blank'>"+DEFAULTanchor3+" &raquo;</a> &nbsp; "+DEFAULTstrap3;
	}

// write link to signature

/* POPUP MENU (BReaks on multiple posts)
document.write('<LINK rel="stylesheet" href="/casino-research/meister.css" type="text/css">');
document.write('<br><a href="#" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">Meister Links (popup)</a>');
document.write(' &nbsp;|&nbsp; <a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Simmo Sites (popup)</a>');
document.write('<br><font style="font-size:10px;">[mouse-over links for options]</font>');
document.write('<br><font style="font-size:10px;"><a href="http://www.azonlinecasinos.com/" target="_blank">Compare cashout times at 140 online casinos &raquo;</a></font>');
*/

document.write(op);
//document.write ("<br><iframe width=\"500\" frameborder=\"0\" src=\"http://www.slotseek.com/searchframe.php?bg=F5F5F5\" scrolling=\"no\" style=\"margin-left:30px;border:1px;height:50px;width:500px;\"></iframe>"); 

/***********************************************
* Pop-it menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie5||ns6)
document.onclick=hidemenu
