
function gotoPage(url) {

	var bsubmit = true;

	if(url == 'search') {
		document.topForm.action = '/newlobby/search/query.asp';
	} else {
		if(document.topForm.email.value == '' || document.topForm.email.value == 'Your email address') {
			alert("Please enter your email address to login to your available Partner Centers");
			bsubmit = false;
		}
	}
	if(bsubmit) { document.topForm.submit(); }
}

function checkCountry(countryid) {
	if(countryid == '') {
		alert("Please select a country");
		return false;
	} else {
		document.location = '/newlobby/network/locations_detail.asp?country=' + countryid;
	}
}


function openWindow(url) {
	popupWin = window.open(url, 'newWin', 'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,dependent,titlebar=no,width=450,height=575,top=100,left=200');
}

function goMenu(url) {
	if (url != '') {
		document.location = url;	
	}
}

// Browser Detect Lite  v2.1.1
// http://www.dithered.com/javascript/browser_detect/index.html
// modified by Chris Nott (chris@NOSPAMdithered.com - remove NOSPAM)


function BrowserDetectLite() {
	var ua = navigator.userAgent.toLowerCase(); 

	// browser name
	this.isGecko     = (ua.indexOf('gecko') != -1);
	this.isMozilla   = (this.isGecko && ua.indexOf("gecko/") + 14 == ua.length);
	this.isNS        = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
	this.isIE        = ( (ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1) ); 
	this.isOpera     = (ua.indexOf("opera") != -1); 
	this.isKonqueror = (ua.indexOf("konqueror") != -1); 
	this.isIcab      = (ua.indexOf("icab") != -1); 
	this.isAol       = (ua.indexOf("aol") != -1); 
	this.isWebtv     = (ua.indexOf("webtv") != -1); 
	
	// spoofing and compatible browsers
	this.isIECompatible = ( (ua.indexOf("msie") != -1) && !this.isIE);
	this.isNSCompatible = ( (ua.indexOf("mozilla") != -1) && !this.isNS && !this.isMozilla);
	
	// browser version
	this.versionMinor = parseFloat(navigator.appVersion); 
	
	// correct version number
	if (this.isNS && this.isGecko) {
		this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );
	}
	else if (this.isIE && this.versionMinor >= 4) {
		this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
	}
	else if (this.isOpera) {
		if (ua.indexOf('opera/') != -1) {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera/') + 6 ) );
		}
		else {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera ') + 6 ) );
		}
	}
	else if (this.isKonqueror) {
		this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
	}
	else if (this.isIcab) {
		if (ua.indexOf('icab/') != -1) {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab/') + 6 ) );
		}
		else {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab ') + 6 ) );
		}
	}
	else if (this.isWebtv) {
		this.versionMinor = parseFloat( ua.substring( ua.indexOf('webtv/') + 6 ) );
	}
	
	this.versionMajor = parseInt(this.versionMinor); 
	this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
	
	// dom support
   this.isDOM1 = (document.getElementById);
	this.isDOM2Event = (document.addEventListener && document.removeEventListener);
   
   // css compatibility mode
   this.mode = document.compatMode ? document.compatMode : 'BackCompat';

	// platform
	this.isWin   = (ua.indexOf('win') != -1);
	this.isWin32 = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1) );
	this.isMac   = (ua.indexOf('mac') != -1);
	this.isUnix  = (ua.indexOf('unix') != -1 || ua.indexOf('linux') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)
	
	// specific browser shortcuts
	this.isNS4x = (this.isNS && this.versionMajor == 4);
	this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
	this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);
	this.isNS4up = (this.isNS && this.versionMinor >= 4);
	this.isNS6x = (this.isNS && this.versionMajor == 6);
	this.isNS6up = (this.isNS && this.versionMajor >= 6);
	
	this.isIE4x = (this.isIE && this.versionMajor == 4);
	this.isIE4up = (this.isIE && this.versionMajor >= 4);
	this.isIE5x = (this.isIE && this.versionMajor == 5);
	this.isIE55 = (this.isIE && this.versionMinor == 5.5);
	this.isIE5up = (this.isIE && this.versionMajor >= 5);
	this.isIE6x = (this.isIE && this.versionMajor == 6);
	this.isIE6up = (this.isIE && this.versionMajor >= 6);
	
	this.isIE4xMac = (this.isIE4x && this.isMac);
}


// Original:  Dion (yobo42@hotmail.com) // 
// Web Site:  http://www.iinet.net.au/~biab/ // 

// This script and many more are available free online at // 
// The JavaScript Source!! http://javascript.internet.com // 

// Begin // 

// change this to where you store the blank.gif image
var blank = "/omd/images2/s.gif";

topedge = 150;  // location of news box from top of page
leftedge = 10;  // location of news box from left edge
boxheight = 150;  // height of news box
boxwidth = 200;  // width of news box
scrollheight = 240; // total height of all data to be scrolled

function scrollnews(cliptop) {
if (document.layers) {
newsDiv = document.news;
newsDiv.clip.top = cliptop;
newsDiv.clip.bottom = cliptop + boxheight;
newsDiv.clip.left = 0;
newsDiv.clip.right = boxwidth + leftedge;
newsDiv.left = leftedge;
newsDiv.top = topedge - cliptop;
}
else {
newsDiv = news.style;
newsDiv.clip = "rect(" + cliptop + "px " + (boxwidth + leftedge) + "px " + (cliptop + boxheight) + "px 0px)";
newsDiv.pixelLeft = leftedge;
newsDiv.pixelTop = topedge - cliptop;
}
cliptop = (cliptop + 1) % (scrollheight + boxheight);
newsDiv.visibility='visible';
setTimeout("scrollnews(" + cliptop + ")", 50);
}


/* ********************************************************************************** 
    * This code was created by Jim Young of www.requestcode.com .                *
    * You may use this code at no charge.  All I ask is that you give me             *
    * credit.  Please visit my site for more scripts like this one.                          *
    **********************************************************************************
*/

/*
   The variables divincbt, divinctb, divincrl and divinclr set the increment in pixels that the div that contains the text
    or links is moved.  Which one is used is determined by the direction that you pick in the variable whichscroll.
    The variable divinctb would be used if you set whichscroll to 1, divinctb if you set whichscroll to 2, divincrl if
     you set whichscroll to 3 and divinclr if you set whichscroll to 4.  You can change these variables to speed up
     or slow down the movement of the scroll.
*/

function Scrollboxa(obja)
{
    savobja=obja;
    posa=posa-divinc;
    if(((whichscroll=="1" || whichscroll=="3")&&(posa<=stopposa))||
      ((whichscroll=="2" || whichscroll=="4")&&(posa>=stopposa)))
      {
       clearTimeout(scrollmsga);
       setTimeout("scrollit()",divpause);
      } 
    else
        {
         if(document.getElementById) // IE5 and NS6
           {
            eval("elma.style."+divprop+"=posa");
            elma.style.visibility="visible";
           }
         if(document.layers)    // NS4+
           {
            eval("obja."+divprop+"=posa");
            document.main.visibility="show";
           }
         scrollmsga=setTimeout("Scrollboxa(savobja)",speed);
        }
}
function Scrollboxb(objb)
{
    savobjb=objb;
    posb=posb-divinc;
    if(((whichscroll=="1" || whichscroll=="3")&&(posb<=stopposb))||
       ((whichscroll=="2" || whichscroll=="4")&&(posb>=stopposb)))
      {
       clearTimeout(scrollmsgb);
      }
    else
         {
          if(document.getElementById) // IE5 and NS6
            {
             eval("elmb.style."+divprop+"=posb");
            }
          if(document.layers)  // NS4+
            {
             eval("objb."+divprop+"=posb");
             objb.visibility="show";
            }
          scrollmsgb=setTimeout("Scrollboxb(savobjb)",speed);
         }
}
function scrollit()
 {
  i++;
  if(i>=msg.length)
    {i=0}
  posa=stopposb*-1;
  posb=0;
  if(firsttime=="y")
    {
     firsttime= "n";
     if(document.getElementById)      // IE5 and NS6
       {
        elma=document.getElementById(divname1);
        elma.innerHTML=msg[i];
       }
    else if(document.layers)   // NS4+
      {
       thediva=eval("document.main.document."+divname1);
       thediva.document.write(msg[i]);
       thediva.document.close();
      }
     Scrollboxa(thediva);
    }
  else
    {
     if(whichdiv==divname1)
       {
        if(document.getElementById)  // IE5 and NS6
          {
           elmb=document.getElementById(divname1);
           elma=document.getElementById(divname2);
           elma.innerHTML=msg[i];
          }
        if(document.layers)  //  NS4+
          {
           thedivb=eval("document.main.document."+divname1);
           thediva=eval("document.main.document."+divname2) ; 
           thediva.document.write(msg[i]);
           thediva.document.close();
          }
        Scrollboxb(thedivb);
        whichdiv=divname2;
        Scrollboxa(thediva);
       }
     else
       {
        if(document.getElementById)   // IE5 and NS6
          {
           elmb=document.getElementById(divname2);
           elma=document.getElementById(divname1);
           elma.innerHTML=msg[i];
           }
        if(document.layers)  // NS4+
          {
           thedivb=eval("document.main.document."+divname2);
           thediva=eval("document.main.document."+divname1);
           thediva.document.write(msg[i]);
           thediva.document.close();
           }
        Scrollboxb(thedivb);
        whichdiv=divname1;
        Scrollboxa(thediva);
       }
    }
}
