// JavaScript Document
//used on events booking page
function fnSwitchArtists(item){
	if(item.value =="Defected In the House"){
		document.getElementById("sr_artists").style.display = "none";
		document.getElementById("def_artists").style.display = "block";
	}else{
	document.getElementById("sr_artists").style.display = "block";
	document.getElementById("def_artists").style.display = "none";
	}
}

function expand_stock (tbody_id,btn_id){
	if (document.getElementById(tbody_id).style.display=="none"){
		Effect.SlideDown(tbody_id,{duration: 0.7}); 
		$(btn_id).className ="btn hideTracks";
	}else{
		Effect.SlideUp(tbody_id,{duration: 0.7}); 
		$(btn_id).className ="btn viewTracks";
	}
	return false;
}


function fnWriteBanner(id,pg,height,width) {
	//?rnd=" +  Math.round(Math.random()*1000)
	var so = new SWFObject(sitePath+"flash/bnr.swf", "bnr_"+id, height, width, "8", "#000000");
	so.addParam("menu", "false");
	so.addParam("play", "true");
	so.addParam("scale", "noscale");
	so.addParam("salign", "lt");
	so.addParam("wmode", "opaque");
	so.addVariable("sPath", sitePath);
	so.addVariable("itemId",id);
	so.addVariable("pg", pg);
	so.addVariable("nDelay", 10);
	so.useExpressInstall(sitePath+'flash/expressinstall.swf');
	//document.write(so.write(''));
	so.write("banner"+id);
}

function sendToFriendSwitch(){
	if ($('sendtoDisplay').style.display=="none"){
		Effect.SlideDown('sendtoDisplay',{duration: 0.7}); 
		$('stf').update("Hide");
	}else{
		Effect.SlideUp('sendtoDisplay',{duration: 0.7}); 
		$('stf').update("Show");
	}
	return false;
	
}

function GenericSwitch($id){
	if ($($id).style.display=="none"){
		Effect.SlideDown($id,{duration: 0.7}); 
		$($id+'-a').update("Hide");
	}else{
		Effect.SlideUp($id,{duration: 0.7}); 
		$($id+'-a').update("Show");
	}
	return false;
	
}

function cpSwitch(){
	if ($('cpDisplay').style.display=="none"){
		Effect.SlideDown('cpDisplay',{duration: 0.7}); 
		//$('stf').update("Hide");
	}else{
		Effect.SlideUp('cpDisplay',{duration: 0.7}); 
		//$('stf').update("Show");
	}
	return false;
	
}

function releaseShowHide($id,$lnk){
	if($($id).style.display=="none"){
		Effect.SlideDown($id,{duration: 0.7}); 
		$($lnk).update("Hide");
	}else{
		Effect.SlideUp($id,{duration: 0.7}); 
		$($lnk).update("Show");
	}
	return false;
}


function check_selected(fileIDs,item_id) {
	var files = fileIDs.split(",");
	if ($(files[0]).checked==false) { var check = true; var newclass = 'checked'; }
	else { var check = false;  var newclass = ''; }
	
	for (x=0; x<(files.length-1); x++) {
		$(files[x]).checked= check;	
		}
	
	if($('btn_dl_'+item_id).className =="selectAll btn"){
		$('btn_dl_'+item_id).className ="deSelectAll btn";
	}else{
		$('btn_dl_'+item_id).className ="selectAll btn";
	}
	return false;
}





