// Javascript Géront 2006 

// 00 - Variables
// 02 - Ouverture de Popup
// 03 - Popup images
// 04 - Layer partenaire /attente EN
// 05 - listeConference
// 06 - listeNouveaute

// 00 - Variables 
var actURL = window.location.href;




// 01 - Ajouter aux favoris
function addbookmark(){
	var bookmarktitle="GERONT EXPO-HANDICAP EXPO 2011"
	if (navigator.appName!="Microsoft Internet Explorer") { 
   		window.sidebar.addPanel(bookmarktitle, actURL,""); 
   	} 
   	else { 
   		window.external.AddFavorite(actURL, bookmarktitle); 
   	} 
}



// 02 - Ouverture de Popup
function popThis(url,nom,w,h,o){
	window.open(url,nom,'width='+w+',height='+h+','+o);
}




// 03 - Popup images
function popImg(img,w,h) {
		newPop=window.open('','popup','width='+w+',height='+h+',scrollbars=no');
		chaine='<html><head><title>Geront Expo</title>';
		chaine+='</head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="self.focus()" oncontextmenu="return false;"><img src="'+img+'" border="0" name="zoom"></body></html>';
		newPop.document.open();
		newPop.document.write(chaine);
		newPop.document.close();
}




// 04 - Layer partenaire /attente EN
function realisation(n, d) { 
	var b,a,g;  
	if(!d) 
		d=document; 
	if((b=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(b+1)].document; 
		n=n.substring(0,b);
	}
	if(!(g=d[n])&&d.all) 
		g=d.all[n]; 
	for (a=0;!g&&a<d.forms.length;a++) 
		g=d.forms[a][n];
	for(a=0;!g&&d.layers&&a<d.layers.length;a++) 
		g=realisation(n,d.layers[a].document);
	if(!g && d.getElementById) 
		g=d.getElementById(n); 
	return g;
}

function zones() { 
	var a,b,v,obj,args=zones.arguments;
	for (a=0; a<(args.length-2); a+=3) 
		if ((obj=realisation(args[a]))!=null) { 
			v=args[a+2];
		if (obj.style) { 
			obj=obj.style; 
			v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
		}
		obj.visibility=v; 
	}
}



// 05 - liste conférences
function showConf(){
	if(document.getElementById('confList').style.display == 'none'){
		document.getElementById('confList').style.display = 'block';
	} else {
		document.getElementById('confList').style.display = 'none';
	}
}


function liste_selection(type,rub)
{
	if (rub == 'A') url = "../../A_exposer/A2_recherche/liste_selection.asp";
	else if (rub == 'B') url = "../../B_visiter/B2_recherche/liste_selection.asp";
	
	if (type == 0)
	{
		if ((document.getElementById('add0') && document.getElementById('add0').checked) || (document.getElementById('add1') && document.getElementById('add1').checked) || (document.getElementById('add2') && document.getElementById('add2').checked) || (document.getElementById('add3') && document.getElementById('add3').checked) || (document.getElementById('add4') && document.getElementById('add4').checked))
		{
			popup = popThis(url,'selection',640,600,'scrollbars=yes');
			document.liste.action = url;
			document.liste.target = "selection";
			document.liste.submit();
			document.liste.action = ""; 
			document.liste.target = "";
		}
		else
		{
			alert('Veuillez choisir un exposant au moins');
		}
	}
	else
	{
		popup = popThis(url,'selection',640,600,'scrollbars=yes');
		document.liste.action = url;
		document.liste.target = "selection";
		document.liste.submit();
		document.liste.action = ""; 
		document.liste.target = "";
	}
	
}


// 06 - listeNouveaute
function showtheme(idlist){
	if(document.getElementById(idlist).style.display == ''){
		document.getElementById(idlist).style.display = 'none';
	} else {
		document.getElementById(idlist).style.display = '';
	}
}