function toggleLoginBox(header,box){
	
	if(document.getElementById(header).style.display=="none"){
		$("#left_login_box").slideDown("slow");
		//$(box).className = "boxopen";
	}else{
		$("#left_login_box").slideUp("slow");
		//$(box).className = "boxclosed";
	}
	return false;
}

// Nav
function toggleNavOn(which){
	if($("#"+which).css("display") == "none") {
		//$("ul#navigation_list li ul").hide("normal")
		$("ul.subnavitem").hide("normal")
		$("#"+which).show("normal")
	}
	menuInt=window.clearInterval(menuInt)
}


// Linked Content Display
function showcontent(linkedcontent){
	
	$("div#linked_content_" + currentcontent).hide();
	$("div#linked_content_" + linkedcontent).show();
		
	//THESE LINES (43,44) COMMENTED OUT FIX THE MAIN HEADING PROBLEM//
	//BUT CAUSE THE TEXT BODY HEADING TO STOP WORKING WITHIN FAQ//
	
	$("div#linked_bottom_item_" + currentcontent).hide();
	$("div#linked_bottom_item_" + linkedcontent).show();
		
	$("a#linked_top_link_" + currentcontent).toggleClass("linked_top_link_on");
	$("a#linked_top_link_" + linkedcontent).toggleClass("linked_top_link_on");
	
	currentcontent = linkedcontent;
	return false;
}

// Linked Content Display
function showsection(linkedsection,linkedcontent){
	$("div#linked_bottom_item_" + currentsection).hide();
	$("div#linked_bottom_item_" + linkedsection).show();
	
	$("div#linked_sections_" + currentsection).hide();
	$("div#linked_sections_" + linkedsection).show();
	
	$("div#linked_content_" + currentcontent).hide();
	$("div#linked_content_" + linkedcontent).show();
	
	$("a#linked_top_link_" + currentcontent).toggleClass("linked_top_link_on");
	$("a#linked_top_link_" + linkedcontent).toggleClass("linked_top_link_on");
	
	$("a#linked_top_link_" + currentsection).toggleClass("navsub_link_on");
	$("a#linked_top_link_" + currentsection).toggleClass("subID");
	$("a#linked_top_link_" + currentsection).toggleClass("nav_third_level");
	
	$("a#linked_top_link_" + linkedsection).toggleClass("navsub_link_on");
	$("a#linked_top_link_" + linkedsection).toggleClass("subID");
	$("a#linked_top_link_" + linkedsection).toggleClass("nav_third_level");
	
	currentcontent = linkedcontent;
	currentsection = linkedsection;
	return false;
}

function showpage(linkedsection,linkedcontent){
	$(".linked_top").hide();
	$("div#linked_page_" + linkedsection).show();
	
	showsection(linkedsection,linkedcontent);
	
	return false;
}



//		WINNERS
function fWinShowCredits() {
	$('#ebl_credits').show();
	$('#ebl_more').hide();
	$('#btn_more').attr("src","/winners/images/btn/btn_more.gif")
	$('#btn_credits').attr("src","/winners/images/btn/btn_credits_o.gif")
	
	
}
function fWinShowMore() {
	$('#ebl_credits').hide();
	$('#ebl_more').show();
	$('#btn_more').attr("src","/winners/images/btn/btn_more_o.gif")
	$('#btn_credits').attr("src","/winners/images/btn/btn_credits.gif")
}

 function fLoadFLV(flvURL,imgURL) {
	var flashvars = {};
	flashvars.width = "480";
	flashvars.height = "380";
	flashvars.file = flvURL;
	flashvars.image = imgURL;

	var params = {}; params.menu = "false"; params.allowfullscreen = "true";
	var attributes = {}; attributes.id = "flvPlayer"; attributes.name = "flvPlayer";
	
	swfobject.embedSWF("/winners/includes/flvplayer.swf", "mediaPlayer", "480", "380", "9.0.0","/scripts/swfobject/expressInstall.swf", flashvars, params, attributes);
 }
 
 function fLoadZoom(zoomURL) {
	var flashvars = {};
	flashvars.zoomifyImagePath = zoomURL;
	var params = {}; params.menu = "false"; params.allowfullscreen = "true";
	var attributes = {}; attributes.id = "flvPlayer"; attributes.name = "flvPlayer";
	swfobject.embedSWF("/winners/includes/zoomify_viewer.swf?VARIABLES.randomString=#VARIABLES.randomString#", "mediaPlayer", "480", "380", "9.0.0","/scripts/swfobject/expressInstall.swf", flashvars, params, attributes);
 }
 
 // AdModule
function fModAdChange(modId) {
	$("#admodCaption_"+modId+" span").hide(); // Hide all captions
	$("#nextButton"+mod_ad_current_panel).html('<img src="/images/icons/ad_sq_off.png" width="8" height="8" alt="" border="0" />'); // reset the current highlighted square
	
	// Increment the current panel count
	if (mod_ad_current_panel == mod_ad_max_panel) {mod_ad_current_panel = 0;} else { mod_ad_current_panel += 1; }
 	$("#admodCaption_"+modId+"_"+mod_ad_current_panel).show();
	$("#nextButton"+mod_ad_current_panel).html('<img src="/images/icons/ad_sq_on.png" width="8" height="8" alt="" border="0" />');
 }

function fModPagerClick(modId,pId) {
	$("#admodCaption_"+modId+" span").hide(); // Hide all captions
	$("#nextButton"+mod_ad_current_panel).html('<img src="/images/icons/ad_sq_off.png" width="8" height="8" alt="" border="0" />'); // reset the current highlighted square
	mod_ad_current_panel = pId-1;
}

// Hotel Favourites
function fHotelFav(vAction,hotelId) {
	$("#fav" + hotelId).load("/attend_fest/accommodation_ajax.cfm",{action:vAction, hotel_id: hotelId});
	return false;
}

// Entry Kit Logo
function fEntryKitLogo(n) {
	$(".entry_kit_logo div").hide();
	$("#entry_kit_logo_"+n).show();
}