function toggleSideMenuSubItems(subItem){if(jQuery(subItem).hasClass("sub-arrow-up")){jQuery(subItem).removeClass("sub-arrow-up");jQuery(subItem).addClass("sub-arrow-down");}else{jQuery(subItem).removeClass("sub-arrow-down");jQuery(subItem).addClass("sub-arrow-up");}
jQuery(subItem).parent().find("ul.sub").slideToggle("fast");};function updateFeaturedStatus(actionVal,etidVal,eidVal,featureVal,divId)
{var postTarget="/intranet/updateLastFeatured";jQuery.post(postTarget,{action:actionVal,etid:etidVal,eid:eidVal},function(data){handleFeaturedStatusResponse(eidVal,featureVal,divId);});jQuery("#featured_ajax_loader").show();};function handleFeaturedStatusResponse(eidVal,featureVal,divId)
{var spanTxt=document.getElementById(eidVal);var featureDiv=document.getElementById(divId+'_featureContent');var unfeatureDiv=document.getElementById(divId+'_unfeatureContent');if(featureVal=='true')
{var time=new Date();var lmonth=time.getMonth()+1;var date=time.getDate();var year=computeYear(time);var minutes=time.getMinutes();var hours=time.getHours();if(minutes<10)
{minutes='0'+minutes;}
spanTxt.innerHTML="<font color='green'>"+lmonth+"/"+date+"/"+year+" "+
hours+":"+minutes+"</font>";featureDiv.style.display="none";unfeatureDiv.style.display="block";}
else
{spanTxt.innerHTML="No longer featured";featureDiv.style.display="block";unfeatureDiv.style.display="none";}};function computeYear(theDate)
{x=theDate.getYear();var y=x%100;y+=(y<38)?2000:1900;return y;};String.prototype.trimStr=function(){a=this.replace(/^\s+/,'');return a.replace(/\s+$/,'');};function enableCalSelectDateField(calIconId,monthId,dayId,yearId,beginYear,endYear){jQuery('#'+calIconId).datePicker({createButton:false,startDate:'01/01/'+beginYear,endDate:'31/12/'+endYear}).bind('click',function()
{jQuery(this).dpDisplay();return false;}).bind('dateSelected',function(e,selectedDate,$td,state)
{updateSelects(selectedDate);}).bind('dpClosed',function(e,selected)
{updateSelects(selected[0]);});var updateSelects=function(selectedDate)
{selectedDate=new Date(selectedDate);var d=selectedDate.getDate();var m=selectedDate.getMonth();var y=selectedDate.getFullYear();jQuery('#'+dayId).val(d);jQuery('#'+monthId).val(m+1);jQuery('#'+yearId).val(y);}
jQuery('#'+dayId+', #'+monthId+', #'+yearId).bind('change',function()
{var d=new Date(jQuery('#'+yearId).val(),jQuery('#'+monthId).val(),jQuery('#'+dayId).val());jQuery('#'+calIconId).dpSetSelected(d.asString());});};function initToolTip(){jQuery(".cTip").hover(function(){jQuery(this).find("span").css("display","block");},function(){jQuery(this).find("span").css("display","none");});};var JsMap=function(){var _internalMap={};this._put=function(key,value){_internalMap[key]=value;};this._get=function(key){return _internalMap[key];};this._remove=function(key){if(_internalMap[key]!=null){delete(_internalMap[key]);}};this.size=function(){count=0;for(var i in _internalMap){count++;}
return count;};};JsMap.prototype.put=function(key,value){this._put(key,value);};JsMap.prototype.get=function(key){return this._get(key);};JsMap.prototype.remove=function(key){this._remove(key);};function IECheck(){if(jQuery.browser.msie&&jQuery.browser.version==6){$("body").prepend("<div id=\"ie6-notice\"><p><strong>Welcome! Looks like you're using Internet Explorer 6?</strong> We try to support all browsers, but some features are not possible with IE6.<br />To access all of Sportsvite's features, consider upgrading to <a href=\"http://www.mozilla.com\">Firefox</a>, <a href=\"http://www.apple.com/safari/download/\">Safari</a>, or <a href=\"http://www.google.com/chrome\">Google Chrome</a>. (They're all free!)</p></div>");}};