	
	
	function Framed(loc){
		var href = "index.php";
		if(loc)
			href = loc;
		if (!parent.document.getElementById('contentFrame'))
			top.location.href = href;	
	}
	
	function changeFrameheight(){
		if((document.getElementById('max_h').offsetTop==-1)||(!parent.document.getElementById('contentFrame')))
			setTimeout('changeFrameheight()',100);
		else{
			parent.document.getElementById('contentFrame').height=document.getElementById('max_h').offsetTop;
			window.top.scrollTo(0,0);
		}
	}
	
	function writeFlash(src, width, height, id){
		
		var output ="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' name='"+id+"' width='"+width+"' height='"+height+"' id='"+id+"'>";
		output += "<param name='movie' value='"+src+"' />";
		output += "<param name='quality' value='high' />";
		output += "<param name='wmode' value='transparent'>";
		output += " <embed src='"+src+"' width='"+width+"' height='"+height+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent' name='"+id+"' swLiveConnect='true'></embed>";
		output += " </object>";
		document.writeln(output);
	}
	
	function menu_DoFSCommand(command, args){
		var frame = document.getElementById("contentFrame");
		var src_array = document.getElementById('contentFrame').src.split("/");
		var page = src_array[(src_array.length)-1];
		
		var path = "";
		var chLang = "_en";
		if(lang != "fr"){
			path = "_en";
			chLang = "";
		}
		
		if(command == "click"){
			switch(args){
				case "accueil"	: frame.src = "home"+path+".php";		break;
				case "djs"		: frame.src = "djs"+path+".php";		break;
				case "gallery"	: frame.src = "gallery"+path+".php";	break;
				case "location"	: frame.src = "location"+path+".php";	break;
				case "forum"	: frame.src = "forum/";					break;
				case "joindre"  : frame.src = "contactUs"+path+".php";	break;
				case "liens" 	: frame.src = "links"+path+".php";		break;
				case "english" 	: location.href = "index"+chLang+".php?p="+page;	break
				case "francais" : location.href = "index"+chLang+".php?p="+page;	break
				//default : alert(command + "=" + args);
			}
		}
	}
	
// WEEK ROLLOVERS
	// PRELOADING IMAGES
	var week_wednesday_ov = new Image();
	week_wednesday_ov.src = "img/week_wednesday_ov.jpg";
	var week_thursday_ov = new Image();
	week_thursday_ov.src = "img/week_thursday_ov.jpg";
	var week_friday_ov = new Image();
	week_friday_ov.src = "img/week_friday_ov.jpg";
	var week_saturday_ov = new Image();
	week_saturday_ov.src = "img/week_saturday_ov.jpg";
	var week_specialEvents_ov = new Image();
	week_specialEvents_ov.src = "img/week_specialEvents_ov.jpg";
	
	var btn_retour_ov = new Image();
	btn_retour_ov = "img/btn_retour_ov.gif";

	function rollover(obj, imgPath){
		var path = "img/";
		if(imgPath)
			path = imgPath;
		var ind = obj.src.lastIndexOf("/");
		var imgSrc = obj.src.substr(ind+1);
		var parts = imgSrc.split(".");
		if(parts[0].indexOf("_ov") > -1){
			parts[0] = parts[0].replace("_ov","");
			obj.src = path+parts[0]+"."+parts[1];
			return true;
		}
		else{
			obj.src = path+parts[0]+"_ov."+parts[1];
			return true;
		}
	}
	
	function changeFlyer(img){
		document.getElementById("flyerImg").src = img;
	}