// 
function go(where){
	if(where!="") window.location=where;
}

function openVid(id){
	openWin(id,'foxVideoPlayer','656','680');
}
function openPhoto(set){
	if(set==undefined){
		var set="";
	}
	openWin('/justice/photo/index.htm?id='+set,'foxPhotoViewer','790','468');
}
function getSectionImage(){
	document.write("<img src='/justice/images/main_sub"+Math.floor(Math.random()*3)+".jpg' alt='The Loop' />");
}

function goMusic(){
	var fileName = location.pathname.substring(location.pathname.lastIndexOf('/')+1);
	var url = '/justice/features/music_'+fileName;
	location.href = url;
}

function episodeNum(){
var episode = location.pathname.substring(location.pathname.lastIndexOf('/')+1);
var episode= episode.substring(0, 3) ;
openPhoto(episode);

}

function makePageNav(page,total,thispage){
	var path="/justice/recaps/"+page+"_";
	var str="";
	str+="<div id='recapPageNavDiv'><a href=\""+page+"_print.htm\" target=\"_blank\">print recap</a>&nbsp;&nbsp;&nbsp;<ul>";
	if(thispage>1){
		str+="<li><a href='"+path+Number(thispage-1)+".htm'>prev</a></li>";
	}
	for(var i =1; i<=total;i++){
		if(thispage==i){
			str+="<li>"+i+"</li>";
		}else{
			str+="<li><a href='"+path+i+".htm'>"+i+"</a></li>";
		}
	}
	if(thispage<total){
		str+="<li><a href='"+path+Number(thispage+1)+".htm'>next</a></li>";
	}
	str+="</ul></div>";
	document.write(str);
}




