/** * Updates the top menu frame with the activated menus, the left frame and the contenttop frame. * The top and subsection parameter may be null but the URL may not be null. */var globalBetsControl;var globalTopSection;var inLeft = false;function betsControl(topSection, subSection, leftURL, ctopURL) {	// Only try to update the menu when this script has been loaded in the bets frame	if (window.top.frames['bets'] != null && window.top.frames['bets'] == self)	{		if (window.top.frames['menu'] != null) {			if (!window.top.frames['menu'].menuGenerated) {				setTimeout("betsControl('" + topSection + "','" + subSection + "', '" + leftURL + "')", 300);			} else {				window.top.frames['menu'].updateMenu(topSection, subSection);			}		}        		if (betsControlFrameAddressChange('left', leftURL))			window.top.frames['left'].location = leftURL;		if (betsControlFrameAddressChange('contenttop', ctopURL))			window.top.frames['contenttop'].location = ctopURL;	}}/** * Inputs: * frameName, the name of the frames in the DHTML frames collection * checkURL, the input URL which to compare the frame's location with * * This function compares if the named frame refers to a different URL in comparison * with an input URL (checkURL).  If the frame has changed address in comparison with * checkURL true is returned.  When the frame refers to the same URL as the input * checkURL variable, false is returned. */function betsControlFrameAddressChange(frameName, checkURL) {    if (window.top.frames != null && window.top.frames[frameName] != null && checkURL != null && checkURL != 'null') {        /* Do a "endsWith" which doesn't exist in JavaScript */        if (window.top.frames[frameName].location.href.substr(            window.top.frames[frameName].location.href.length - checkURL.length,            window.top.frames[frameName].location.href.length) != checkURL) {            return true;        } else {            return false;        }    }}
