function loadStory (basketId, storyId) {

		var targetUrl = "";
		targetUrl = '/story/0,19528,thisisnotanoid,00.html';

		//this will replace thisisnotanOID with the id passed in
		if (targetUrl.length > 0 && basketId !="") {
			if (storyId == 0) {
				//this allows us to cope with going to a story page, with just the basket
				//ideal for profiles et al
				targetUrl = targetUrl.replace("thisisnotanoid", basketId);
			} else {
				targetUrl = targetUrl.replace("thisisnotanoid", basketId + "_" + storyId );
			}
			window.location.href = targetUrl;
		}
}

function loadIndex (basketId) {

		var targetUrl = "";
		targetUrl = '';		

		//this will replace thisisnotanOID with the id passed in
		if (targetUrl.length > 0) {
			targetUrl = targetUrl.replace("thisisnotanoid", basketId);
			window.location.href = targetUrl;
		}

}

function loadGalleryStory (basketId,storyId) {

		var targetUrl = "";
		
		targetUrl = '/gallery/detail/0,20501,thisisnotanoid,00.html';

		//this will replace thisisnotanOID with the id passed in
		if (targetUrl.length > 0) {
			targetUrl = targetUrl.replace("thisisnotanoid", basketId + "_" + storyId );
			window.location.href = targetUrl;
		}
}

function loadVideoStory (basketId,storyId) {
		var targetUrl = "";	
		targetUrl = '/video/clips/0,23791,thisisnotanoid,00.html';

		//this will replace thisisnotanOID with the id passed in
		if (targetUrl.length > 0) {
			targetUrl = targetUrl.replace("thisisnotanoid", basketId + "_" + storyId );
			window.location.href = targetUrl;
		}
}
speedLeft=""
speedRight=""
scrollSpeed=1

function moveRight(id){
  document.getElementById(id).scrollLeft=300;
}

function moveLeft(id){
  document.getElementById(id).scrollLeft=0;
}

function pagPause(){
  clearTimeout(speedRight);
  clearTimeout(speedLeft);
}

function movePrevious(id){
  clearTimeout(speedRight);
  document.getElementById(id).scrollLeft+=scrollSpeed;
  speedRight=setTimeout("movePrevious('"+id+"')",5);
}

function moveNext(id){
  clearTimeout(speedLeft);
  document.getElementById(id).scrollLeft-=scrollSpeed;
  speedLeft=setTimeout("moveNext('"+id+"')",5);
}



