	function getGraphContents( eventData, sport, randomnumber, adjust, isApplet, customSpread, customTotal, homeTeamName ) { 
	
		if ( customSpread != null ) {
			customSpread = parseFloat(customSpread);
		}
		if ( customTotal != null ) {
			customTotal = parseFloat(customTotal);
		}

		var bName = navigator.appName;
		var divWidth = 308;
		//var bVer = parseFloat(navigator.appVersion);
		if (bName.indexOf("Explorer")!=-1) {
			divWidth = 310;
		}

		var a = "<span onmouseover=\"overDiv(event, 'Graph"+eventData[0]+"')\" onmousedown=\"dragStart(event, 'Graph"+eventData[0]+"')\">";
		a = a + "  <div id='GraphHeader"+eventData[0]+"' class='hidden'>graph</div><div id='GraphPad"+eventData[0]+"' class='graphback"+eventData[0]+"' >";
		a = a + "    <style>";
		a = a + "      .graphback"+eventData[0]+" {background-image: url(images/loading.gif); position:absolute; width: 308px; height: 348px;}";
		a = a + "      .graphclose"+eventData[0]+" {position:absolute;top:0;right:0;padding:"+adjust+"px 5px 0px 0px;}";
		a = a + "      .graphhelp"+eventData[0]+" {position:absolute;top:0;right:13;padding:"+adjust+"px 5px 0px 0px;}";
		a = a + "    </style>";
		if ( isApplet == true ) {
			a = a + "    <style>";
			a = a + "      .graphhandle"+eventData[0]+" { border-width:1px; border-style:solid; font-family:Verdana;font-size:9px;font-weight:bold;background-color: #eeeeee;position:absolute;top:0;left:0;width:"+divWidth+"px;height:22px;padding:4px 0px 0px 0px;}";
			a = a + "    </style>";
			a = a + "	 <applet code=\"BetGraph.class\" name=\"BetGraphApplet"+eventData[0]+"\" id=\"BetGraphApplet"+eventData[0]+"\" width=\"310\" height=\"330\" vspace=\"20\" >"
			a = a + "		<param name=\"SourceXML\" value=\"http://www.covers.com/sports-scores/data/"+sport+"ScoresAndMatchup/Xml/"+eventData[4]+"/"+((sport=="NFL" || sport=="NCAAF")?eventData[2]:eventData[3])+"/"+eventData[0]+"_graph.xml?code="+randomnumber+"#1\">";
			a = a + "		<param name=\"League\" value=\""+sport+"\">"
			a = a + "		<param name=\"Spread\" value=\""+customSpread+"\">"
			a = a + "		<param name=\"Total\" value=\""+customTotal+"\">"
			a = a + "	 </applet>";
			//a = a + "	 <iframe id='showHelpDiv"+eventData[0]+"' src='about:blank' scrolling='no' frameborder='0' style='position:absolute;width:306px;height:20px;top:1;left:1px;border:none;display:block;z-index:0;'></iframe>"
			a = a + "    <div id='graphhandleContent"+eventData[0]+"' class='graphhandle"+eventData[0]+"'>";
			a = a + "      &#160;&#160;Odds: "+homeTeamName+" "+customSpread+", o/u "+customTotal;
			a = a + "    </div>";
		} else {
			a = a + "      <img src='data/"+sport+"ScoresAndMatchup/Shtml/"+eventData[4]+"/"+((sport=="NFL" || sport=="NCAAF")?eventData[2]:eventData[3])+"/"+eventData[0]+".jpg?code="+randomnumber+"#1' />";
		}
		a = a + "    <div class='graphclose"+eventData[0]+"'><a href='javascript:void(0);' onclick=\"turnOffGraph( '"+sport+"', '"+eventData[0]+"' )\">";
		a = a + "      <img src='/images/data/scores/close.gif' alt='close' border='0' /></a>";
		a = a + "    </div>";
		a = a + "    <div class='graphhelp"+eventData[0]+"'><a href='javascript:void(0);' onMouseOver=\"showHelp(event, '"+eventData[0]+"', '"+sport+"', 'Graph' );\" onMouseOut=\"hideHelp(event, '"+eventData[0]+"', '"+sport+"', 'Graph');\">";
		a = a + "      <img src='/sports-scores/images/question.gif' border='0' /></a>";
		a = a + "    </div>";
		a = a + "  </div>";
		a = a + "</span>";
		return a;	
	}
	
	var balloonHelpFadeCounter = 0;
	var balloonHelpFadeDirection = 0;

	function showHelp( event, id, sport, type ) {
	
		hideHelp( event, id, sport, type );
		
		var oDiv = document.createElement("DIV");
		var divId;
		oDiv.style.position = "absolute";

		if ( type == "Graph" ) {
		
			var graphDiv = document.getElementById("Graph"+id);
			var xLocDiv =  parseInt(graphDiv.style.left, 10);
			var yLocDiv =  parseInt(graphDiv.style.top, 10);
			oDiv.style.left = xLocDiv + 290; 
			oDiv.style.top = yLocDiv - 42; 
			divId = "HelpBalloon";
			if ( sport == "NFL" || sport == "NCAAF" ) {
				oDiv.innerHTML = "<img src='/sports-scores/images/football_bubble.gif' />";
			} else {
				oDiv.innerHTML = "<img src='/sports-scores/images/basketball_bubble.gif' />";
			}
			
		} else if ( type == "BetStatus" ) {
		

			var coord = getMouseCoord(event).split(",");
			var x = parseInt(coord[0]) + 10;
			var y = parseInt(coord[1]) - 155;
										

			oDiv.style.left = x; 
			oDiv.style.top = y; 
			divId = "HelpBetStatus";
			oDiv.innerHTML = "<img src='/sports-scores/images/betstatus.gif' />";
			//oDiv.innerHTML = "<iframe id='bal' src='/sports-scores/images/betstatus.gif' scrolling='no' frameborder='0' style='width:240px;height:85px;top:10;left:30;border:none;display:block;z-index:0'><img src='/sports-scores/images/betstatus.gif' /></iframe>";

		}
		oDiv.id = divId;
				
		oDiv.style.zIndex = 1000;
		oDiv.style.filter='alpha(opacity=50)';
		balloonHelpFadeCounter = 50;
		balloonHelpFadeDirection = 20;

		customScoreboardDiv.appendChild(oDiv);	
		/*
			var ifrm1 = document.getElementById("balloon"); 
			if ( ifrm1 != null ) {
				ifrm1.style.top = y + 80; 
				ifrm1.style.left = x; 
				ifrm1.style.width = 240; 
				ifrm1.style.height = 85; 
			}
			*/
		fadeBalloon( divId );	
	}
	
	
	function hideHelp( event, id, sport, type ) {
		if ( type == "Graph" ) {
			var oDiv = document.getElementById("HelpBalloon");
			if ( oDiv != null ) {
				customScoreboardDiv.removeChild(oDiv);
			}
		} else if ( type == "BetStatus" ) {
			var oDiv = document.getElementById("HelpBetStatus");
			if ( oDiv != null ) {
				customScoreboardDiv.removeChild(oDiv);
				balloonHelpFadeDirection = 0;
			}
		}
		var ifrm1 = document.getElementById("balloon"); 
		if ( ifrm1 != null ) {
			ifrm1.style.top = 0 + "px"; 
			ifrm1.style.left = -1000; 
		}
	}

	function fadeBalloon( divId ) {

		if ( balloonHelpFadeDirection != 0 ) {
			var oDiv = document.getElementById( divId );
			if ( oDiv != null ) {
			
				balloonHelpFadeCounter += balloonHelpFadeDirection;
				if ( balloonHelpFadeCounter >= 100 ) {
					balloonHelpFadeDirection = 0;
					oDiv.style.filter="alpha(opacity=100)";
				} else {
					window.setTimeout("fadeBalloon(\""+divId+"\");", 1 );
					oDiv.style.filter="alpha(opacity="+balloonHelpFadeCounter+")";
				}
				
			}
		}
	} 	

