/* Open picture in new WIndow... check for popupblocker...*/
function myShowPicture(path) {
	window.open(path);
}

/* Check referer*/
function refererCheck() {
	hasOption=window.location.href.split('?')[1];
	if (hasOption) {
		options=hasOption.split('&');
		if (options) {
			i=0;
			while(options[i]) {
				treatReferer(options[i]);
				i++;
			}
		}
		else {
			treatReferer(hasOption);
		}
	}
}
function treatReferer(option) {
	optionArg=option.split('=')[0];
	optionVal=option.split('=')[1];
	
	if (optionArg=='referer') {	
		switch (optionVal) {
			case 'comediens':
				show('comediens');
				break;
			case 'staff':
				show('staff');
				break;
			case 'about':
				show('about');
				break;
		}
	}
}


/*Stacking up categories behavior
function show(id) {
	if(document.getElementById(id).style.display=='none') {
		document.getElementById(id).style.display='';
		document.getElementById('pa'+id).src="/css/moins.gif";
		document.getElementById('a'+id).className='aNavBarSelected';
	}
	else {
		document.getElementById(id).style.display='none';
		document.getElementById('pa'+id).src="/css/plus.gif";
		document.getElementById('a'+id).className='aNavBar';
	}
}*/

// One category at a time behavior
//var old_id=null;

function show(id) {
	if(old_id!=null) hide(old_id);
	document.getElementById(id).style.display='';
	document.getElementById('pa'+id).src="/css/moins.gif";
	document.getElementById('a'+id).className='aNavBarSelected';
	old_id=id;
}

function hide(id){
	document.getElementById(id).style.display='none';
	document.getElementById('pa'+id).src="/css/plus.gif";
	document.getElementById('a'+id).className='aNavBar';
}
