var movieWin = null
function openMovieWindow(url, width, height) {
	if(!movieWin || movieWin.closed)
	{
		movieWin = window.open(url, "myMovieWindow", "status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no,width="+width+",height="+height+",top=100,left=100")
	}
	else
	{
		movieWin.document.location.href = url;
		movieWin.focus();
	}
}

function doStartEndText(addTo){
	var urlString,newString,myViewCount,viewCount,start,end,docSubjects;
	urlString = window.location.href;
	newString = urlString.slice( Number(urlString.indexOf("Start=")+6), urlString.length);
	if( newString.indexOf("&") != -1){
		newString = newString.slice( 0, newString.indexOf("&"));
	}
	
	myViewCount = document.getElementById("viewCount");
	if(myViewCount)
	{
		viewCount = myViewCount.firstChild.data;
		start = document.getElementById("startCount");
		end = document.getElementById("endCount");
		
		if(!isNaN(newString)){
			start.firstChild.data = newString;
			end.firstChild.data = Number(newString) + addTo -1;
		}
		 
		if(isNaN(newString)){
			end.firstChild.data = addTo;
		} 
		
		if( Number(end.firstChild.data) > Number(viewCount)){
			end.firstChild.data = viewCount;
		}
	}
}
