// Rollo Extra JS
// Created: 10/10/10
// Updated: 18/10/10

var t="";
function startClear(){
	t=setTimeout("runCommand();",5000);
}
function cancelClear(){
	clearTimeout(t);
}
function runCommand(){
	fadeImgOut('artistsPreview');
	//var t=setTimeout("runCommand()",1000);
}

function showMenus(){
	document.getElementById("menuwrapper").style.visibility="visible";
	document.getElementById("menuSelected").style.visibility="visible";
}

function setArtistSubmenu(str_text){
	// Desc: Requires jQuery 1.3+
	$("#submenu2").html(str_text);
}
function hideSubNav(subnav){
	var nav=document.getElementById(subnav)
	nav.style.visibility="hidden";
}
function showSubNav(subnav){
	var nav=document.getElementById(subnav)
	nav.style.visibility="visible";
}
function fadeImgOut(obj) {
	// Created: 2008
	// Updated: 8/10/10
	// Desc: Requires jQuery 1.3+
	var showDiv = "#"+obj;
	$(showDiv).fadeTo(50, 0.0);
	$(showDiv).attr("src","res/spacer.gif");
}
function fadeImgIn(obj,imgpath,loadMsg) {
	// Created: 2008
	// Updated: 8/10/10
	// Desc: Requires jQuery 1.3+
	var showDiv = "#"+obj;
	$("#artistsIntroPreviewMsg").html(loadMsg);
	
	$(showDiv).fadeTo(250, 0.0,function() { 
		$("#artistsIntroPreviewMsg").html("");
		$(showDiv).attr("src",imgpath);
		$(showDiv).fadeTo(500, 1.0);
	});
}
function showArrows(){
	// Created: 10/10/10
	document.getElementById("leftArrow").style.visibility="visible";
	document.getElementById("rightArrow").style.visibility="visible";
}
function hideArrows(){
	// Created: 10/10/10
	document.getElementById("leftArrow").style.visibility="hidden";
	document.getElementById("rightArrow").style.visibility="hidden";
}

