function makevisible(cur,which){
strength=(which==0)? 1 : 0.2

if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}


//-----------------
//Change Page
//-----------------
function changeWeather()
{
   var f = document.forms.doublecombo;
   var uri = f.stage3.options[f.stage3.selectedIndex].value;
   newPage = 

// These settings describe the pop-up browser
// window - you can edit them.

window.open(uri,target="weather","location=no,scrollbars=yes,menubar=no,toolbar=no,resizable=yes,status=yes");
   }


function changeRadio()
{
   var f = document.forms.dynamiccombo;
   var uri = f.stage2.options[f.stage2.selectedIndex].value;
   newPage = 

// These settings describe the pop-up browser
// window - you can edit them.
 
window.open(uri,target="channels","location=no,scrollbars=yes,menubar=no,toolbar=no,resizable=yes,status=yes");
   }


//------------------
//Copy Text
//-------------------

function copyit(theField) {
	var selectedText = document.selection;
	if (selectedText.type == 'Text') {
		var newRange = selectedText.createRange();
		theField.focus();
		theField.value = newRange.text;
	} else {
		alert('Please Pick A Team From The Previous Round');
	}
}

function copyitin(theField) {
	var selectedText = document.selection;
	if (selectedText.type == 'Text') {
		var newRange = selectedText.createRange();
		theField.focus();
		theField.value = newRange.text;
	} else {
		alert('Please Pick A Team From The Play-In Round');
	}
}




//------------------
//Clock
//__________________

var d = new Date()
var day=theDay=d.getDay()
var time = d.getHours()
var month=d.getMonth() + 1;
var year=d.getYear();
var date=d.getDate();

function startclock()
{
var thetime=new Date();

var nhours=thetime.getHours();
var nmins=thetime.getMinutes();
var nsecn=thetime.getSeconds();
var nday=thetime.getDay();
var nmonth=thetime.getMonth();
var ntoday=thetime.getDate();
var nyear=thetime.getYear();
var AorP=" ";

if (nhours>=12)
    AorP="P.M.";
else
    AorP="A.M.";

if (nhours>=13)
    nhours-=12;

if (nhours==0)
   nhours=12;

if (nsecn<10)
 nsecn="0"+nsecn;

if (nmins<10)
 nmins="0"+nmins;

if (nday==0)
  nday="Sun.";
if (nday==1)
  nday="Mon.";
if (nday==2)
  nday="Tue.";
if (nday==3)
  nday="Wed.";
if (nday==4)
  nday="Thu.";
if (nday==5)
  nday="Fri.";
if (nday==6)
  nday="Sat.";

nmonth+=1;

if (nyear<=99)
  nyear= "19"+nyear;

if ((nyear>99) && (nyear<2000))
 nyear+=1900;

document.clockform.clockspot.value=nhours+":"+nmins+":"+nsecn+" "+AorP+" "+nday+", "+nmonth+"/"+ntoday+"/"+nyear;

setTimeout('startclock()',1000);

} 





//-------------------------
//Hidden Items
//-------------------------

function toggle(targetId) {
target = document.all(targetId);
if (target.style.display == "none"){
target.style.display="";
}/* else {                         **this portion of script returns toggled item to original position**
target.style.display="none";
}*/
}

/*BODY OF TOGGLED SECTION
<a href="javascript:toggle('Link2')">Link 2</a>
<div id="Link2" style="display: none">
<div align="justify"><font color="#000000" size="2" face="Verdana">Here is the text you would like to show for Link 2.</font></div>
</div>
*/



//------------------
//New Tab Script
//------------------

//** Tab Content script- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Last updated: June 29th, 06

var enabletabpersistence=0 //enable tab persistence via session only cookies, so selected tab is remembered?

////NO NEED TO EDIT BELOW////////////////////////
var tabcontentIDs=new Object()

function expandcontent(linkobj){
var ulid=linkobj.parentNode.parentNode.id //id of UL element
var ullist=document.getElementById(ulid).getElementsByTagName("li") //get list of LIs corresponding to the tab contents
for (var i=0; i<ullist.length; i++){
ullist[i].className=""  //deselect all tabs
if (typeof tabcontentIDs[ulid][i]!="undefined") //if tab content within this array index exists (exception: More tabs than there are tab contents)
document.getElementById(tabcontentIDs[ulid][i]).style.display="none" //hide all tab contents
}
linkobj.parentNode.className="selected"  //highlight currently clicked on tab
document.getElementById(linkobj.getAttribute("rel")).style.display="block" //expand corresponding tab content
saveselectedtabcontentid(ulid, linkobj.getAttribute("rel"))
}

function savetabcontentids(ulid, relattribute){// save ids of tab content divs
if (typeof tabcontentIDs[ulid]=="undefined") //if this array doesn't exist yet
tabcontentIDs[ulid]=new Array()
tabcontentIDs[ulid][tabcontentIDs[ulid].length]=relattribute
}

function saveselectedtabcontentid(ulid, selectedtabid){ //set id of clicked on tab as selected tab id & enter into cookie
if (enabletabpersistence==1) //if persistence feature turned on
setCookie(ulid, selectedtabid)
}

function getullistlinkbyId(ulid, tabcontentid){ //returns a tab link based on the ID of the associated tab content
var ullist=document.getElementById(ulid).getElementsByTagName("li")
for (var i=0; i<ullist.length; i++){
if (ullist[i].getElementsByTagName("a")[0].getAttribute("rel")==tabcontentid){
return ullist[i].getElementsByTagName("a")[0]
break
}
}
}

function initializetabcontent(){
for (var i=0; i<arguments.length; i++){ //loop through passed UL ids
if (enabletabpersistence==0 && getCookie(arguments[i])!="") //clean up cookie if persist=off
setCookie(arguments[i], "")
var clickedontab=getCookie(arguments[i]) //retrieve ID of last clicked on tab from cookie, if any
var ulobj=document.getElementById(arguments[i])
var ulist=ulobj.getElementsByTagName("li") //array containing the LI elements within UL
for (var x=0; x<ulist.length; x++){ //loop through each LI element
var ulistlink=ulist[x].getElementsByTagName("a")[0]
if (ulistlink.getAttribute("rel")){
savetabcontentids(arguments[i], ulistlink.getAttribute("rel")) //save id of each tab content as loop runs
ulistlink.onclick=function(){
expandcontent(this)
return false
}
if (ulist[x].className=="selected" && clickedontab=="") //if a tab is set to be selected by default
expandcontent(ulistlink) //auto load currenly selected tab content
}
} //end inner for loop
if (clickedontab!=""){ //if a tab has been previously clicked on per the cookie value
var culistlink=getullistlinkbyId(arguments[i], clickedontab)
if (typeof culistlink!="undefined") //if match found between tabcontent id and rel attribute value
expandcontent(culistlink) //auto load currenly selected tab content
else //else if no match found between tabcontent id and rel attribute value (cookie mis-association)
expandcontent(ulist[0].getElementsByTagName("a")[0]) //just auto load first tab instead
}
} //end outer for loop
}


function getCookie(Name){ 
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}

function setCookie(name, value){
document.cookie = name+"="+value //cookie value is domain wide (path=/)
}



// ------------------------
// Countdown Clock
// ------------------------
// Tick (countdownId, eventDate)
function CD_T(id, e) {
	var n	= new Date();
	CD_D(+n, id, e);
	setTimeout("CD_T('" + id + "', " + e + ")", 1100-n.getMilliseconds()); // We offset from 1100 so that our clock ticks every second (the millisecond correction each loop sees to that), but updates 0.1s after every whole second so that we don't accidentally read the same Date() twice in the same second
};

// Calculate time and update display (dateNow, countdownId, eventDate)
function CD_D(n, id, e) {
	var ms = e - n;
	if (ms <= 0) ms *= -1;
	var d = Math.floor(ms/864E5);
	ms -= d*864E5;
	var h = Math.floor(ms/36E5);
	ms -= h*36E5;
	var m = Math.floor(ms/6E4);
	ms -= m*6E4;
	var s = Math.floor(ms/1E3);

	// If you want to manually customise the counter display, then edit this line: (use CD_ZP(n) to insert 0 in front of single integer)
	CD_OBJS[id].innerHTML = d + " day" + (d == 1 ? ", " : "s, ") + (h) + " hr" + (h == 1 ? ", " : "s, ")  + (m) + " min" + (m == 1 ? ", " : "s, ") + CD_ZP(s) + " sec" + (s == 1 ? "" : "s");
};    

// Prefix single integers with a zero
function CD_ZP(i) {
	return (i<10 ? "0" + i : i);
};


// Initialisation
function CD_Init() {
	var pref = "countdown";
	var objH = 1; // temp boolean true value
	if (document.getElementById || document.all) {
		for (var i=1; objH; ++i) {
			var id	= pref + i;
			objH	= document.getElementById ? document.getElementById(id) : document.all[id];

			if (objH && (typeof objH.innerHTML) != 'undefined') {
				var s	= objH.innerHTML;
				var dt	= CD_Parse(s);
				if (!isNaN(dt)) {
					CD_OBJS[id] = objH; // Store global reference to countdown element object
					CD_T(id, dt.valueOf());
					if (objH.style) {
						objH.style.visibility = "visible";
					}
				}
				else {
					objH.innerHTML = s + "<a href=\"http://andrewu.co.uk/clj/countdown/\" title=\"Countdown Error: Invalid date format used, check documentation (see link)\">*</a>";
				}
			}
		}
	}
};

// Get Date() object from 2006-01-01 00:00:00 GMT+00:00 date format
function CD_Parse(strDate) {
	// Pattern match to a countdown date
	var objReDte = /(\d{4})\-(\d{1,2})\-(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{0,2})\s+GMT([+\-])(\d{1,2}):?(\d{1,2})?/;

	if (strDate.match(objReDte)) {
		// Start with a default date and build it up into the countdown date through Date setter methods
		var d = new Date(0);

		d.setUTCFullYear(+RegExp.$1,+RegExp.$2-1,+RegExp.$3); // Set YYYY-MM-DD directly as UTC
		d.setUTCHours(+RegExp.$4,+RegExp.$5,+RegExp.$6); // Set HH:MM:SS directly as UTC

		// If there is a timezone offset specified then we need to compensate for the offset from UTC
		var tzs	= (RegExp.$7 == "-" ? -1 : 1); // Timezone sign
		var tzh = +RegExp.$8; // Get requested timezone offset HH (offset ahead of UTC - may be negative)
		var tzm = +RegExp.$9; // Get requested timezone offset MM (offset ahead of UTC - always positive)
		if (tzh) {
			d.setUTCHours(d.getUTCHours() - tzh*tzs); // Compensate for timezone HH offset from UTC
		}
		if (tzm) {
			d.setUTCMinutes(d.getUTCMinutes() - tzm*tzs); // Compensate for timezone MM offset, depending on whether the requested MM offset is ahead or behind of UTC
		}
		return d; // Date now correctly parsed into a Date object correctly offset from UTC internally regardless of users current timezone.
	}
	else {
		return NaN; // Didn't match required date format
	};
};

var CD_OBJS = new Object();

// Try not to commandeer the default onload handler if possible
if (window.attachEvent) {
	window.attachEvent('onload', CD_Init);
}
else if (window.addEventListener) {
	window.addEventListener("load", CD_Init, false);
}
else {
	window.onload = CD_Init;
}


// Compare two options within a list by VALUES
function compareOptionValues(a, b) 
{ 
  // Radix 10: for numeric values
  // Radix 36: for alphanumeric values
  var sA = parseInt( a.value, 36 );  
  var sB = parseInt( b.value, 36 );  
  return sA - sB;
}

// Compare two options within a list by TEXT
function compareOptionText(a, b) 
{ 
  // Radix 10: for numeric values
  // Radix 36: for alphanumeric values
  var sA = parseInt( a.text, 36 );  
  var sB = parseInt( b.text, 36 );  
  return sA - sB;
}

// Dual list move function
function moveDualList( srcList, destList, moveAll ) 
{
  // Do nothing if nothing is selected
  if (  ( srcList.selectedIndex == -1 ) && ( moveAll == false )   )
  {
    return;
  }

  newDestList = new Array( destList.options.length );
  var len = 0;

  for( len = 0; len < destList.options.length; len++ ) 
  {
    if ( destList.options[ len ] != null )
    {
     newDestList[ len ] = new Option( destList.options[ len ].text, destList.options[ len ].value, destList.options[ len ].defaultSelected, destList.options[ len ].selected );
    }
  }

  for( var i = 0; i < srcList.options.length; i++ ) 
  { 
    if ( srcList.options[i] != null && ( srcList.options[i].selected == true || moveAll ) )
    {
       // Statements to perform if option is selected
       // Incorporate into new list
       newDestList[ len ] = new Option( srcList.options[i].text, srcList.options[i].value, srcList.options[i].defaultSelected, srcList.options[i].selected );
       len++;
    }
  }

  // Sort out the new destination list
  newDestList.sort( compareOptionValues );   // BY VALUES
  //newDestList.sort( compareOptionText );   // BY TEXT
  // Populate the destination with the items from the new array
  for ( var j = 0; j < newDestList.length; j++ ) 
  {
    if ( newDestList[ j ] != null )
    {
      destList.options[ j ] = newDestList[ j ];
    }
  }

  // Erase source list selected elements
  for( var i = srcList.options.length - 1; i >= 0; i-- ) 
  { 
    if ( srcList.options[i] != null && ( srcList.options[i].selected == true || moveAll ) )
    {
       // Erase Source
       //srcList.options[i].value = "";
       //srcList.options[i].text  = "";
       srcList.options[i]       = null;
    }
  }

}



//***********************************NEEDED FOR SCORES TABLE**********************************************************



// ------------------------
// Browser / OS Detection -
// ------------------------
var IE = (document.all) ? 1 : 0;
var DOM = (document.getElementById) ? 1 : 0;
var NS4 = (document.layers) ? 1 : 0;
var MAC = ((navigator.appVersion.indexOf("PPC") >0) || (navigator.appVersion.indexOf("Mac") >0)) ? 1 : 0;

var ua = navigator.userAgent;
var OPERA = (ua.indexOf("Opera") > 0) ? 1 : 0;
var SAF = (navigator.appVersion.indexOf("Safari") >0) ? 1 : 0;

if (ua.indexOf("AOL") > 0) {
	var s_prop9="AOL"; // for Omniture
	var dclk_seg="aol"; // for Doubleclick
    }


function getEl(el) {
    return document.all ? document.all[el] : document.getElementById(el);
    }


// --------------------------------------------------------------------------
// AJAX and other scripts for the tab-sets on home page, arenas, and other  -
// --------------------------------------------------------------------------

function getHTTPObject() {
	var xmlhttp;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		 try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		 } catch (E) {
				xmlhttp = false;
		 }
	}

	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp = false;
		}
	}

	return xmlhttp;
}
<!-- scripts-tab -->
function tabSetParent(){
    this.newSet = function( name ){
        eval( 'this.' + name + '= new tabSetObj("'+ name +'");' );
    }
}

function tabSetObj( name ){

    if(IE && MAC){return;}
    
    this.name = name;
    this.spacer = '<img src="/~thehelsdons/images/spacer.gif" width="1" height="1">';
	this.preTabCell  = function(){return ''}
	this.postTabCell = function(){return ''}
	this.preTabFoot  = function(){return ''}
	this.postTabFoot = function(){return ''}
    this.addId        = function(){return ''}
    this.addMouseOver = function(){return ''}
    this.addMouseOut  = function(){return ''}

    this.arrayPush = function( array, value ){
        array[array.length] = value;
        return;
    }
	
    // addTab to TabSet
    this.addTab = function( label, url, row, def ){
        if( row == null ) row = 0;
        this.row = new Array();
		
        if( def ) this.defaultRow = row;

        if( this.label ){
            if( this.label[row] )
            {                    
                this.arrayPush( this.label[row], label )
                this.arrayPush( this.url[row], url );
            }else{                                    
                this.label[row] = Array( label );
                this.url[row] = Array( url );
            }
        }else{
            this.label = new Array();
            this.label[row] = Array( label );
            this.url = new Array();
            this.url[row] = Array( url );
        }
        this.row[row] = true;
        if( def ) this.defaultCell = this.label[row].length - 1;

    }

     this.getClassName = function(){
        return (( this.defaultRow == row ) && ( this.defaultCell == cell )) ? this.classOn : this.classOff ;
    }
    
    this.drawTabSet = function( dRow, dCell ){
        if( dRow != null ) this.defaultRow = dRow;
        if( dCell != null ) this.defaultCell = dCell;

        var tabSetHtml = '';
        // For Each Row
        for( row=this.row.length-1; row>=0; row-- ){
            rowHtml = '';
            label = this.label[row]
            rowHtml+= '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
            
			if( this.tabVSpace ){
				rowHtml+= '<td height="'+ this.tabVSpace +'"></td></tr><tr>';
			}
						
			// For each Tab in a Specified row
            for( cell=0; cell < label.length; cell++ ){
                className = this.getClassName(cell);
                mouseOver = this.addMouseOver(cell,className);
                mouseOut = this.addMouseOut(cell,className);
                addId = this.addId(cell);
                rowHtml += this.preTabCell();
				rowHtml += '<td';
                rowHtml += ' class="'+ className +'"';
                rowHtml += ' onclick="javascript:tabSet.' + this.name + ".click(" + row + "," + cell + ')"';
                //rowHtml += ' title="Row('+ row +') Cell('+ cell +')"';
                rowHtml += addId + mouseOver + mouseOut;
                rowHtml += '>';
                // rowHtml += '<a style="text-decoration:none;" href="javascript:tabSet.' + this.name + ".click(" + row + "," + cell + ')">';
                rowHtml += label[cell];
                // rowHtml += '</a>';
                rowHtml += '</td>';
				rowHtml += this.postTabCell();
                if( this.tabHSpace ) rowHtml += '<td width="'+ this.tabHSpace +'">' + this.spacer + '</td>';
            }
            rowHtml+= '</tr>';
			rowHtml+= "\n\n\n";
			
            // Footer Row
		    if( this.defaultRow == row && this.footer != false){
                rowHtml += '<tr>';
                for( cell=0; cell < label.length; cell++ ){
                    className = (( this.defaultRow == row ) && ( this.defaultCell == cell )) ? this.footClassOn : this.footClassOff ;
                    rowHtml += this.preTabFoot();
					rowHtml += '<td';
                    rowHtml += ' class="'+ className +'"';
                    rowHtml += '>';
                    rowHtml += this.spacer;
                    rowHtml += '</td>';
					rowHtml += this.postTabFoot();
                    if( this.tabHSpace ) rowHtml += '<td width="'+ this.tabHSpace +'" class="' + this.hSpace + '">' + this.spacer + '</td>';
                }
                rowHtml += '</tr>';
            }        
            rowHtml+= '</table>';
            if( this.defaultRow == row ){
                bottomRow = rowHtml;
            }else{
                tabSetHtml += rowHtml;
            }

        }
        document.getElementById(this.tabDivName).innerHTML = tabSetHtml + bottomRow;
    }

    this.renderTabs = function( dRow, dCell ){

		this.tabDivName = 'tabSet-tab-'+ this.name;
        var div = '<div id="'+ this.tabDivName +'"></div>';
        document.write( div );

        this.drawTabSet();

    }

    this.click = function( row, cell ){
		this.changeContents( this.url[row][cell] );
        this.drawTabSet( row, cell );
    }

    this.changeContents= function( url ){
        http = getHTTPObject();
        http.open( "GET", url, true);
        http.onreadystatechange = this.onreadystatechange;
        tabSet.tabDestination = this.name;
        http.send(null);
    }        

    this.onreadystatechange = function(){
        if (http.readyState == 4) {
            eval( "document.getElementById('tabSet_" + tabSet.tabDestination + "_div').innerHTML = http.responseText;" );
        }
    }

}
var tabSet = new tabSetParent();

//---------------------------------
//Disable right mouse click Script
//--------------------------------

var message="You Can't Do That";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

//Break-out-of-frames script
//By JavaScript Kit (http://javascriptkit.com)
//Over 400+ free scripts here!

//if not in frames
function kif(){if (parent.frames.length==0)
window.location.replace("http://thehelsdons.tripod.com/sports")
}

