function clearSearch() {
	return (document.getElementById("txt4").value == "Search...") ? "" : document.getElementById("txt4").value;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

/* Top-Ad functions */
function GrowBanner() { document.getElementById("banner").style.height = 75; }
function ShrinkBanner() { document.getElementById("banner").style.height = 35; }

function headerInit() {
	MM_preloadImages(
		'http://hrssports.com/live/img/header/r4_c12_f2.jpg',
		'http://hrssports.com/live/img/header/r4_c15_f2.jpg',
		'http://hrssports.com/live/img/header/r5_c2_f2.jpg',
		'http://hrssports.com/live/img/header/r5_c3_f2.jpg',
		'http://hrssports.com/live/img/header/r5_c5_f2.jpg',
		'http://hrssports.com/live/img/header/r5_c6_f2.jpg',
		'http://hrssports.com/live/img/header/r5_c7_f2.jpg',
		'http://hrssports.com/live/img/header/r5_c9_f2.jpg',
		'http://hrssports.com/live/img/header/r5_c11_f2.jpg',
		'http://hrssports.com/live/img/header/r5_c14_f2.jpg',
		'http://hrssports.com/live/img/header/r5_c16_f2.jpg',
		'http://hrssports.com/live/img/header/r2_c18_f2.jpg',
		'http://hrssports.com/live/img/header/r2_c21_f2.jpg',
		'http://hrssports.com/live/img/header/r3_c2_f2.jpg',
		'http://hrssports.com/live/img/header/r3_c4_f2.jpg',
		'http://hrssports.com/live/img/header/r3_c7_f2.jpg',
		'http://hrssports.com/live/img/header/r3_c9_f2.jpg',
		'http://hrssports.com/live/img/header/r3_c11_f2.jpg',
		'http://hrssports.com/live/img/header/r3_c13_f2.jpg',
		'http://hrssports.com/live/img/header/r3_c15_f2.jpg',
		'http://hrssports.com/live/img/header/r3_c17_f2.jpg',
		'http://hrssports.com/live/img/header/r3_c20_f2.jpg',
		'http://hrssports.com/live/img/bkgd/go2.jpg',
		'http://hrssports.com/live/img/footer/social_r2_c2_f2.png',
		'http://hrssports.com/live/img/footer/social_r2_c4_f2.png',
		'http://hrssports.com/live/img/footer/social_r2_c6_f2.png',
		'http://hrssports.com/live/img/footer/social_r2_c8_f2.png',
		'http://hrssports.com/live/img/footer/social_r2_c10_f2.png',
		'http://hrssports.com/live/img/footer/social_r2_c11_f2.png',
		'http://hrssports.com/live/img/footer/social_r2_c12_f2.png',
		'http://hrssports.com/live/img/footer/social_r2_c14_f2.png',
		'http://hrssports.com/live/img/footer/social_r2_c16_f2.png',
		'http://hrssports.com/live/img/footer/social_r2_c18_f2.png',
		'http://hrssports.com/live/productpg/img/btn/descriptionTab-on.png',
		'http://hrssports.com/live/productpg/img/btn/descriptionTab-off.png',
		'http://hrssports.com/live/productpg/img/btn/descriptionTab-hover.png',
/* 		'http://hrssports.com/live/productpg/img/btn/reviewsTab-on.png',
		'http://hrssports.com/live/productpg/img/btn/reviewsTab-off.png',
		'http://hrssports.com/live/productpg/img/btn/reviewsTab-hover.png', */
		'http://hrssports.com/live/productpg/img/btn/specsTab-on.png',
		'http://hrssports.com/live/productpg/img/btn/specsTab-off.png',
		'http://hrssports.com/live/productpg/img/btn/specsTab-hover.png',
		'http://hrssports.com/live/productpg/img/btn/videosTab-on.png',
		'http://hrssports.com/live/productpg/img/btn/videosTab-off.png',
		'http://hrssports.com/live/productpg/img/btn/videosTab-hover.png');
}

// BEGIN Christmas Countdown
function targetDate() {
	if (document.getElementById("countdowncontainer")) {
	var d=new Date();

	var month=new Array(12);
	month[0]="January";
	month[1]="February";
	month[2]="March";
	month[3]="April";
	month[4]="May";
	month[5]="June";
	month[6]="July";
	month[7]="August";
	month[8]="September";
	month[9]="October";
	month[10]="November";
	month[11]="December";
	
	return month[d.getMonth()]+" "+d.getDate()+", "+d.getFullYear()+" 15:00:00";
	}

}

function cdtime(container, weekday){
	if (document.getElementById("countdowncontainer")) {
		var targetdate = targetDate();
		if (!document.getElementById || !document.getElementById(container)) return;
		this.container=document.getElementById(container);
		this.currentTime=new Date();
		this.targetdate=new Date(targetdate);
		this.timesup=false;
		this.updateTime();
	}
}

	cdtime.prototype.updateTime=function(){
		var thisobj=this;
		this.currentTime.setSeconds(this.currentTime.getSeconds()+1);
		setTimeout(function(){thisobj.updateTime()}, 1000);
	}

	cdtime.prototype.displaycountdown=function(baseunit, functionref){
		this.baseunit=baseunit;
		this.formatresults=functionref;
		this.showresults();
	}

	cdtime.prototype.showresults=function(){
		var thisobj=this;
		var timediff=(this.targetdate-this.currentTime)/1000 ;
		var weekday = new Date();
		if (weekday.getDay() == 0 || weekday.getDay() == 6 || timediff < 0) { 
			this.timesup=true;
			this.container.innerHTML=this.formatresults();
			return;
		}

		var oneMinute=60; 
		var oneHour=60*60;
		var oneDay=60*60*24;
		var dayfield=Math.floor(timediff/oneDay);
		var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour);
		var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute);
		var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute));
			
		switch (this.baseunit) {
			case "hours":
				hourfield = dayfield*24+hourfield;
				dayfield = false;
				break;
			case "minutes":
				minutefield = dayfield*24*60+hourfield*60+minutefield;
				dayfield = hourfield = false;
				break;
			case "seconds":
				var secondfield = timediff;
				dayfield = hourfield = minutefield = false;
				break;
		}

		this.container.innerHTML = this.formatresults(dayfield, hourfield, minutefield, secondfield);
		setTimeout(function(){thisobj.showresults()}, 1000);
	}

function formatresults(dayfield, hourfield, minutefield, secondfield){
	if (document.getElementById("countdowncontainer")) {
		if (this.timesup == false){
			var displaystring = "<span class=\"countdown\">Hurry! We process today's orders in  ";
			displaystring += (dayfield) ? "<span class=\"countdownTime\">"+dayfield+"</span> days " : "";
			displaystring += (hourfield) ? "<span class=\"countdownTime\">"+hourfield+"</span> hour"+((hourfield == 1)?" ":"s ") : "";
			displaystring += (minutefield) ? "<span class=\"countdownTime\">"+minutefield+"</span> minute"+((minutefield == 1)?" ":"s ")+"and " : "";
			displaystring += "<span class=\"countdownTime\">"+secondfield+"</span> second"+((secondfield == 1)?"":"s")+"!</span>";
		} else{ 
			var weekday = new Date();
			if (weekday.getDay() == 0 || weekday.getDay() == 6) {
				var displaystring = "<span class=\"countdown\">Orders placed today will be processed the next business day.</span>";
			} else {
				var displaystring = "<span class=\"countdown\">Orders placed after <span class=\"countdownTime\">3pm CST</span> will be processed next business day.</span>";
			}
		}
		return displaystring;
	}
}
// END Christmas Countdown