var menu_timer = null;
var menu_timer_el = null;
function show_menu() {
	if ( menu_timer!=null ) {
		clearTimeout(menu_timer);
		menu_timer = null;
	}
	var menu = document.getElementById('fullmenu');
	menu.style.display = 'block';
	menu.style.left = hhgetelementposition(menu.parentNode) + 'px';
}
function hide_menu(timer) {
	if ( timer ) {
		var menu = document.getElementById('fullmenu');
		menu.style.display = 'none';
	} else {
		menu_timer=setTimeout('hide_menu(true)',500);
	}
}
function print_banner (width, height, banners) {
	var ad = (new Date().getSeconds()) % banners.length;
	var srcvalue=banners[ad][0];
	var hrefvalue=banners[ad][1];
	var type = banners[ad][2];

	document.write("<center><a href=\"" + hrefvalue + "\" target=\"_blank\">");
	if ( type=="image" ) {
		document.write("<img src=\"" + srcvalue + "\" width=\"" + width + "\" height=\"" + height + "\" border=\"0\">");
	} else if ( type=="flash" ) {
		document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\""+width+"\" height=\""+height+"\" id=\"fl_"+width+"x"+height+"\" align=\"\">");
		document.write("<param name=\"movie\" value=\""+srcvalue+"\"> <param name=\"quality\" value=\"best\"> <param name=\"wmode\" value=\"transparent\"> <param name=\"bgcolor\" value=\"#000000\"> <embed wmode=\"transparent\" src=\""+srcvalue+"\" quality=\"best\" bgcolor=\"#000000\" width=\""+width+"\" height=\""+height+"\" name=\"fl_"+width+"x"+height+"\" align=\"\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed></object>");
	}
	document.write("</a>");
	document.write("</center>");
}
function hh_togglereporterdetails(item,show){
	if (item==null) return;
	while (item!=null ) {
		var tag = item.tagName;
		if ( tag!=null ) {
			if ( tag.toLowerCase()=='tr' ) {
				break;
			}
		}
		item = item.parentNode;
	}
	if (item==null) return;
	if ( item.className=='' ) {
		item = item.nextSibling;
		while ( item!=null ) {
			if ( item.nodeType!=1) {
				item = item.nextSibling;
			}
			break;
		}
		if ( item==null ) return;
	}
	if ( item.className=='' ) {
		var cell = item.firstChild;
		while ( cell!=null ) {
			if ( cell.nodeType==1 ) {
				var tag = cell.tagName;
				if ( tag.toLowerCase()=='td' ) {
					break;
				}
			}
			cell = cell.nextSibling;
		}
		if ( cell.className=='hhreportersdetails' ) {
			item.className='hhreportersdetails';
			cell.className='';
		}
	}
	if ( item.className!='hhreportersdetails' && item.className!='hhreportersdetails2' ) return;
	if ( menu_timer!=null && menu_timer_el==item ) {
		clearTimeout(menu_timer);
		menu_timer_el = null;
		menu_timer = null;
	}
	if ( show ) {
		if ( item.className!='hhreportersdetails2' ) item.className='hhreportersdetails2';
	} else {
		if (item.className!='hhreportersdetails') {
			menu_timer=setTimeout(function(){if (item.className!='hhreportersdetails') item.className='hhreportersdetails';},500);
			menu_timer_el=item;
		}
	}
}

var hhpagebeginloaded = false;
var pageTracker = null;
function hhdartsect() {
	var upath = window.location.pathname;
	var sect='ros';
	if ( upath==null ) return sect;
	if ( upath=='/rumors.htm' ) {
		sect='rumors';
	} else if ( upath=='/' || upath=='/home.htm' ) {
		sect = 'home';
	}
	return sect;
}
function hhgetelementposition(element) {
	var posx=0;
	while ( element!=null ) {
		posx += element.offsetLeft;
		element = element.offsetParent;
	}
	return posx;
}
function hhcalcmaxheight(el,maxw,maxh) {
	var h = el.clientHeight;
	var w = el.clientWidth;
	if ( h<=maxh&&w<=maxw) return '';
	var maxr=maxw/maxh;
	var r = w/h;
	if ( r>maxr ) return maxw/r;
	return maxh;
}
function hhcalcmaxwidth(el,maxw,maxh) {
        var h = el.clientHeight;
        var w = el.clientWidth;
	if ( h<=maxh&&w<=maxw) return '';
	var maxr=maxw/maxh;
	var r = w/h;
	if ( r<maxr ) return maxh/r;
	return maxw;
}
function hhpagebegin(mode) {
	if ( random_number==null ) return;
	//if ( mode!='noskin' )
	//	hhskinbegin('dartgeneric', null, null, null);
	//hhpagebeginloaded = true;
	hhfsvnavbar();
	ganalytics();
}
function hhpageend(mode) {
	if ( random_number==null ) return;
	ganalytics2();
	kontera();
	hh_quantcast();
	hh_comscore();
	//if ( !hhpagebeginloaded ) return;
	//if ( mode!='noskin' )
	//	hhskinend('dartgeneric', 'dart', null, null);
}
function hhskinbegin(skinname, skintype, turl, timg) {
	if ( skinname==null || skinname.length==0 ) return;
	document.write('<table cellspacing="0" cellpadding="1" border="0"><tr>');
	if ( skintype!=null ) document.write('<td valign="top">');
	if ( skintype=='local' ) {
		if ( turl!=null && turl.length>0 ) document.write('<a href="' + turl + '" target="_blank">');
		document.write('<img src="http://hoopshype.com/ads/' + skinname + '_skin_left.jpg" border="0" />');
		if ( turl!=null && turl.length>0 ) document.write('</a>');
	} else if ( skintype=='dart' ) {
		var dartsect = hhdartsect();
		document.write('<iframe width="120" height="1000" noresize="noresize" scrolling="no" frameborder="0" marginheight="0" marginwidth="0" src="http://ad.doubleclick.net/adi/hoopshype.fsv/' + dartsect + ';sect=' + dartsect + ';fantasy=no;game=no;tile=7;sz=120x701;ord=' + random_number + '"></iframe>');
	}
	if ( timg!=null && timg.length>0 ) document.write('<img src="' + timg + '" border="0" height="1" width="1" />');
	if ( skintype!=null ) document.write('</td>');
	document.write('<td valign="top">');
}
function hhskinend(skinname, skintype, turl, timg) {
	if ( skinname==null || skinname.length==0 ) return;
	if ( timg!=null && timg.length>0 ) document.write('<img src="' + timg + '" border="0" height="1" width="1" />');
	document.write('</td>');
	if ( skintype!=null ) document.write('<td valign="top">&nbsp;&nbsp;</td><td valign="top">');
	if ( skintype=='local' ) {
		if ( turl!=null && turl.length>0 ) document.write('<a href="' + turl + '" target="_blank">');
		document.write('<img src="http://hoopshype.com/ads/' + skinname + '_skin_right.jpg" border="0" />');
		if ( turl!=null && turl.length>0 ) document.write('</a>');
	} else if ( skintype=='dart' ) {
		var dartsect = hhdartsect();
		document.write('<iframe width="120" height="1000" noresize="noresize" scrolling="no" frameborder="0" marginheight="0" marginwidth="0" src="http://ad.doubleclick.net/adi/hoopshype.fsv/' + dartsect + ';sect=' + dartsect + ';fantasy=no;game=no;tile=8;sz=120x701;ord=' + random_number + '"></iframe>');
	}
	if ( skintype!=null ) document.write('</td>');
	document.write('</tr></table>');
}
function hhfsvnavbar(navurl) {
	document.write('<!-- FPN BANNER FOR 1024PX LAYOUT (FULL WINDOW WIDTH) BEGINS -->');
	document.write('<iframe width="1000" height="56" noresize="noresize" scrolling="no" frameborder="0" marginheight="0" marginwidth="0" src="http://www.fantasyplayers.com/templates/banner_code.asp">');
	document.write('<script type="text/javascript" src="http://www.fantasyplayers.com/templates/banner1024.js.asp"></script>');
	document.write('<noscript>');
	document.write('<div style="background: #111; text-align: center; border-bottom: 1px #eee solid;"> <a href="http://www.fantasyplayers.com/"><img src="http://www.fantasyplayers.com/images/banner/fantasyplayersnetwork.gif" alt="Fantasy Players Network" border="0" /></a><br/></div>');
	document.write('<div style="background: #ccc; text-align: center;"><table style="font-family: Verdana,Geneva,sans-serif; margin: 0 auto;" cellpadding="0" cellspacing="0"><tr><td><a href="http://www.fantasyplayers.com"><img src="http://www.fantasyplayers.com/images/banner/logo.gif" alt="Fantasy Players Network" /></a></td></tr></table></div>');
	document.write('</noscript>');
	document.write('</iframe>');
	document.write('<!-- FPN BANNER ENDS -->');
}
function ganalytics() {
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
}
function ganalytics2() {
	if ( pageTracker==null && _gat!=null ) {
		pageTracker = _gat._getTracker("UA-5226424-1");
		pageTracker._setDomainName(".hoopshype.com");
		pageTracker._trackPageview();
	}
}
// kontera begin
var dc_UnitID = 14;
var dc_PublisherID = 50413;
var dc_AdLinkColor = 'blue';
var dc_isBoldActive = 'no';
var dc_adprod='ADL';
function kontera() {
	var hostn = window.location.hostname;
	var upath = window.location.pathname;
	if ( upath==null || upath.length<3 || upath=='/home.htm' || upath=='/rumors.htm' || hostn=='blogs.hoopshype.com' || upath.indexOf('/archive/')==0 ||  hostn=='forums.hoopshype.com' || upath=='/twitter.html' ) return;
	document.write(unescape('%3Cscript src="http://kona.kontera.com/javascript/lib/KonaLibInline.js" type="text/javascript"%3E%3C/script%3E'));
}
// kontera end
// Quantcast begin
_qoptions={
qacct:"p-e0xLGBKwOQ9o2"
};
function hh_quantcast() {
	var upath = window.location.pathname;
	if ( upath==null || upath.length<3 || upath=='/home.htm' || upath=='/rumors.htm' ) return;
	document.write(unescape('%3Cscript src="http://edge.quantserve.com/quant.js" type="text/javascript"%3E%3C/script%3E'));
}
// Quantcast end
// comscore begin
function hh_comscore() {
	var upath = window.location.pathname;
	if ( upath==null || upath.length<3 || upath=='/home.htm' || upath=='/rumors.htm' ) return;
	var h = document.getElementsByTagName('head');
	if ( h!=null && h.length==1 ) {
		h = h[0];
		sc = document.createElement('script');
		sc.setAttribute('id', 'cmscr');
		sc.setAttribute('type', 'text/javascript');
		sc.setAttribute('src', 'http://b.scorecardresearch.com/beacon.js');
		h.appendChild(sc);
	}
	setTimeout(function(){ COMSCORE.beacon({c1:2,c2:"6035210",c3:"",c4:"www.hoopshype.com",c5:"",c6:"",c15:""});}, 2000);
}
// comscore end
