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 = '$User_Agent';
var OPERA = (ua.indexOf("Opera") > 0) ? 1 : 0;

if (ua.indexOf("AOL") > 0) {
	var s_prop9="AOL"; // for Omniture
	var dclk_seg="aol"; // for Doubleclick
    }

function openPopup(arg1,arg2,arg3,arg4) {
	if (arguments.length == 3) {var url = arg1; var name='GolfPopup'; var width = arg2; var height = arg3;	}
	if (arguments.length == 4) {var url = arg1; var name=arg2; var width = arg3; var height = arg4;}
	popupWin = window.open(url, name, 'menubar=0,toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,width=' +width +',height=' +height +',left=50,top=50');
}

// anchor detection
function psuedoGetElementById(elm,d){ 
    var p,i,x; if(!d) d=document; if((p=elm.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; elm=elm.substring(0,p);
        }
    if(!(x=d[elm])&&d.all) x=d.all[elm]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][elm];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=document.getElementById(elm,d.layers[i].document);
    return x;
	}
	
function getCoordinates(obj) {
    var point = { x: 0, y: 0 };
    while(obj) {
        point.x += obj.offsetLeft;
        point.y += obj.offsetTop;
        obj = obj.offsetParent;
        }
    return point;
    }

function whereami(anchorid) {
    var locarr = new Array();
    if(NS4) {
        if (document.anchors[anchorid]){
            locarr[0] = document.anchors[anchorid].x;
            locarr[1] = document.anchors[anchorid].y;
            }
        }
    else if(DOM) {
        var myanchor = document.getElementById(anchorid);
        var coordinates = getCoordinates(myanchor)
        if (myanchor){
            locarr[0] = coordinates.x;
            locarr[1] = coordinates.y;
            }
        }
    else {
	var myanchor = psuedoGetElementById(anchorid);
    var coordinates = getCoordinates(myanchor)
    if(myanchor.offsetLeft&&myanchor.offsetTop){
        locarr[0] = coordinates.x;
        locarr[1] = coordinates.y;
        }
    }
	return locarr;
	}

function getEl(el) {
    return document.all ? document.all[el] : document.getElementById(el);
	}



function setCookie (name, value, expires) {
	if (!expires) expires = new Date();
	document.cookie = name +"=" + value +"; expires=" +expires.toGMTString() +";domain=" +cDomain +"; path=/";
	}

function readCookie(name) {
	if(document.cookie == '') {return false;} 
	else { 
		var firstChar, lastChar;
		var theBigCookie = document.cookie;
		name = name + '=';
		firstChar = theBigCookie.indexOf(name);	
		if (firstChar != -1) {
			firstChar += name.length;
			lastChar = theBigCookie.indexOf(';', firstChar); 
			if(lastChar == -1) lastChar = theBigCookie.length;
			return unescape(theBigCookie.substring(firstChar, lastChar));
			}
		else {return false;}
		}
	}

function getValue(cookieName,name) {
	cookieValue=readCookie(cookieName)
	findString=name;
	if (cookieValue) {
		namePos=cookieValue.indexOf(findString,0);
		if (namePos==-1) {return false;}
		valueStart=(cookieValue.indexOf('&',namePos+1)+1);
		valueEnd=cookieValue.indexOf('&',valueStart+1);
		if (valueEnd==-1)  valueEnd=cookieValue.length;
		valueIs=cookieValue.substring(valueStart,valueEnd)
		if (namePos!=null) {return valueIs;}
	}
	else {return false;}
}

function mTrack(mTrackName,mTrackMax,cName,cExpires) {

    if (arguments.length == 2) {var cName='mediaTrack';}
    var newExp = (cExpires) ? ';expires='+cExpires : '';

    var showAd=true;
    if (!readCookie(cName)) {
        newCook=mTrackName +'|' +1;
        document.cookie=(cName +'='  + newCook +";domain=" +cDomain +";path=/" +newExp);
    	}
    else if (readCookie(cName)) {
        oldCook = readCookie(cName);
        var thisAH = oldCook.indexOf(mTrackName);
        if (thisAH==-1) {
            newCook=oldCook +'|' +mTrackName +'|' +1;
            document.cookie=(cName +'=' + newCook +";domain=" +cDomain +";path=/" +newExp);
            }
        else {
            var splitCook = oldCook.split('|');
            var cookPlus; var plusOne;
            for (i=0; i < splitCook.length; i+=2 ) {
                plusOne = i+1;
                if (splitCook[i]==mTrackName) {
                    cookPlus = parseInt(splitCook[plusOne])+1;
                    splitCook[plusOne]=cookPlus;
                    if (cookPlus > mTrackMax) showAd = false;
                    }
                }
            newCook="";
            for (var j=0; j < splitCook.length-1; j+=2) {
                newCook += splitCook[j] + '|' +splitCook[j+1];
                if (j+2 < splitCook.length) {newCook += '|';}
                }
            document.cookie=(cName +'=' + newCook +";domain=" +cDomain +";path=/" +newExp );
            }
        }
    return showAd;
    }



<!-- 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="http://images.pgatour.com/images/spacer.gif" width="1" height="1">';

    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.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>';
            // For each Tab in a Specified row
            for( cell=0; cell<label.length; cell++ ){
                className = (( this.defaultRow == row ) && ( this.defaultCell == cell )) ? this.classOn : this.classOff ;
                rowHtml += '<td';
                rowHtml += ' class="'+ className +'"';
                rowHtml += ' onclick="javascript:tabSet.' + this.name + ".click(" + row + "," + cell + ')"';
                //rowHtml += ' title="Row('+ row +') Cell('+ cell +')"';
                rowHtml += '>';
                //rowHtml += '<a style="text-decoration:none;" href="javascript:tabSet.' + this.name + ".click(" + row + "," + cell + ')">';
                rowHtml += label[cell];
                //rowHtml += '</a>';
                rowHtml += '</td>';
                if( this.tabHSpace ) rowHtml += '<td width="'+ this.tabHSpace +'">' + this.spacer + '</td>';
            }
            rowHtml+= '</tr>';

            if( this.defaultRow == row ){
                rowHtml += '<tr>';
                for( cell=0; cell<label.length; cell++ ){
                    className = (( this.defaultRow == row ) && ( this.defaultCell == cell )) ? this.footClassOn : this.footClassOff ;
                    rowHtml += '<td';
                    rowHtml += ' class="'+ className +'"';
                    rowHtml += '>';
                    rowHtml += this.spacer;
                    rowHtml += '</td>';
                    if( this.tabHSpace ) rowHtml += '<td width="'+ this.tabHSpace +'">' + 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 = this.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;" );
        }
    }

    this.getHTTPObject = function() {
        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;
    }


}
var tabSet = new tabSetParent();




function countdownCounter( dateObj ){

	/*
	Creating countdownCounter Object
	  - month, day, year. hh, mm, ss
	 Example (Create Object):
	    var fedexCupCountdown = new countdownCounter( {month:6, day:16, year:2006, hh:11, mm:00, ss:00} );
		
	 Example (Call the time function):
	    document.getElementById('countdown_d1').innerHTML = fedexCupCountdown.time( 'day', 0, 1 );
	*/

	this.targetDate = new Date( dateObj.year, dateObj.month-1, dateObj.day, dateObj.hh, dateObj.mm, dateObj.ss );
	
	this.time = function( timeUnit, start, length ){
		start ++;
		var nowDate = new Date();
		var diff = this.targetDate.getTime() - nowDate.getTime();
		diff = Math.ceil(diff / 1000);
		var output = new Object();
		
		output.addition    = 0;
		output.day         = String( Math.floor( diff / 60 / 60 / 24 ) );
		output.addition   += parseFloat(output.day*24*60*60);
		output.hh          = String( Math.floor( (diff - output.addition) / 60 / 60  ) );
		output.addition   += parseFloat(output.hh*60*60);
		output.mm          = String( Math.floor( (diff - output.addition) / 60 ) );
		output.addition   += parseFloat(output.mm*60);
		output.ss          = String( Math.floor( (diff - output.addition) ) );
		if( ! length ) length = output[timeUnit].length;
		if( ! start ) start = output[timeUnit].length;
		return ( start <= output[timeUnit].length ) ? output[timeUnit].substr( output[timeUnit].length-start, length) : '0';
	}
}
