/* patch ie swf__________________________________  */

function Bbij()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100" height="30" title="BIJ">\n');
    document.write('<param name="movie" value="http://www.imaj32.fr/img/anime/bij.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n'); 
	document.write('<embed src="http://www.imaj32.fr/img/anime/bij.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100" height="30">\n');
	document.write('</embed>\n');
	document.write('</object>\n');
}

function Bcriart()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="95" height="30" title="Cri Art">\n');
    document.write('<param name="movie" value="http://www.imaj32.fr/img/anime/criart.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n'); 
	document.write('<embed src="http://www.imaj32.fr/img/anime/criart.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="95" height="30">\n');
	document.write('</embed>\n');
	document.write('</object>\n');
}



function Bactions()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="150" height="30" title="Actions jeunes">\n');
    document.write('<param name="movie" value="http://www.imaj32.fr/img/anime/actionsB.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n'); 
	document.write('<embed src="http://www.imaj32.fr/img/anime/actionsB.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="30">\n');
	document.write('</embed>\n');
	document.write('</object>\n');
}

function Bcyber()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100" height="30" title="Cyberbase">\n');
    document.write('<param name="movie" value="http://www.imaj32.fr/img/anime/cyber.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n'); 
	document.write('<embed src="http://www.imaj32.fr/img/anime/cyber.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100" height="30">\n');
	document.write('</embed>\n');
	document.write('</object>\n');
}

function Beurope()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="105" height="30" title="Cyberbase">\n');
    document.write('<param name="movie" value="http://www.imaj32.fr/img/anime/europeB.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n'); 
	document.write('<embed src="http://www.imaj32.fr/img/anime/europeB.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="105" height="30">\n');
	document.write('</embed>\n');
	document.write('</object>\n');
}

function VV()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="800" height="500" title="Visite Virtuelle Imaj\'">\n');
    document.write('<param name="movie" value="http://www.imaj32.fr/img/anime/pano_imaj.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n'); 
	document.write('<embed src="http://www.imaj32.fr/img/anime/pano_imaj.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="500">\n');
	document.write('</embed>\n');
	document.write('</object>\n');
}

function FILM1()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="700" height="500" title="Stop Motion Film 1\'">\n');
    document.write('<param name="movie" value="http://www.imaj32.fr/cyberbase/flims/stopmotionvideofinale.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n'); 
	document.write('<embed src="http://www.imaj32.fr/cyberbase/flims/stopmotionvideofinale.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="500">\n');
	document.write('</embed>\n');
	document.write('</object>\n');
}

function FILM2()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="700" height="500" title="Stop Motion Film 2\'">\n');
    document.write('<param name="movie" value="http://www.imaj32.fr/cyberbase/flims/mrlegosurleweb.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n'); 
	document.write('<embed src="http://www.imaj32.fr/cyberbase/flims/mrlegosurleweb.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="500">\n');
	document.write('</embed>\n');
	document.write('</object>\n');
}

/* fonction pour les popups bij */
function popup(page) {
	window.open(page,popup,config='height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');	
}


/* fonction pour les menus du haut */
window.onload=montre;

function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}



/* liste fiche bij */

function sendData(param, page)
{
	if(document.all)
	{
		//Internet Explorer
		var XhrObj = new ActiveXObject("Microsoft.XMLHTTP") ;
	}//fin if
	else
	{
		//Mozilla
		var XhrObj = new XMLHttpRequest();
	}//fin else

	//définition de l'endroit d'affichage:
	var content = document.getElementById("contenu");
	
	XhrObj.open("POST", page);

	//Ok pour la page cible
	XhrObj.onreadystatechange = function()
	{
		if (XhrObj.readyState == 4 && XhrObj.status == 200)
			content.innerHTML = XhrObj.responseText ;
	}

	XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	XhrObj.send(param);
}


function sendFiche(param, page)
{
	if(document.all)
	{
		//Internet Explorer
		var XhrObj = new ActiveXObject("Microsoft.XMLHTTP") ;
	}//fin if
	else
	{
		//Mozilla
		var XhrObj = new XMLHttpRequest();
	}//fin else

	//définition de l'endroit d'affichage:
	var content = document.getElementById("fiche");
	
	XhrObj.open("POST", page);

	//Ok pour la page cible
	XhrObj.onreadystatechange = function()
	{
		if (XhrObj.readyState == 4 && XhrObj.status == 200)
			content.innerHTML = XhrObj.responseText ;
	}

	XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	XhrObj.send(param);
}


/* verif mail */

function check() {
	var msg = "";

		if (document.formMessage.mail.value != "")	{
		indexAroba = document.formMessage.mail.value.indexOf('@');
		indexPoint = document.formMessage.mail.value.indexOf('.');
		if ((indexAroba < 0) || (indexPoint < 0))		{
		document.formMessage.mail.style.backgroundColor = "#ccc";
			msg += "Votre mail est incorrect\n";
		}
	}
	else	{
		document.formMessage.mail.style.backgroundColor = "#ccc";
		msg += "Veuillez saisir votre mail\n";
	}

if (document.formMessage.nom.value == "")	{
		msg += "Veuillez saisir votre nom\n";
		document.formMessage.nom.style.backgroundColor = "#ccc";
	}
	
if (document.formMessage.demande.value == "")	{
		msg += "Veuillez saisir votre numéro adhérent\n";
		document.formMessage.demande.style.backgroundColor = "#ccc";
	}

	if (msg == "") return(true);
	else	{
		alert(msg);
		return(false);
	}
}


/* Affichage des logs */

function toggle(object_id){
 var obj=document.getElementById(object_id)	
 if(obj.style.display == '')
  obj.style.display='none'
 else
  obj.style.display=''
 }
 
//Masquer certains éléments lors du chargement de la page job
//function cache() {
//	for (var j = 1; j<=11000; j++) {
//		if (document.getElementById('det'+j)) {document.getElementById('det'+j).style.display='none';}
//	}
//}

/* resize popup */
function getRefToDivMod( divID, oDoc ) {
	if( !oDoc ) { oDoc = document; }
	if( document.layers ) {
		if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
			for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
				y = getRefToDivNest(divID,oDoc.layers[x].document); }
			return y; } }
	if( document.getElementById ) { return oDoc.getElementById(divID); }
	if( document.all ) { return oDoc.all[divID]; }
	return oDoc[divID];
}
 
function resizeWinTo( idOfDiv ) {
	var oH = getRefToDivMod( idOfDiv ); if( !oH ) { return false; }
	var x = window; x.resizeTo( screen.availWidth, screen.availWidth );
	var oW = oH.clip ? oH.clip.width : oH.offsetWidth;
	var oH = oH.clip ? oH.clip.height : oH.offsetHeight; if( !oH ) { return false; }
	x.resizeTo( oW + 200, oH + 200 );
	var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;
	if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }
	else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }
	else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }
	if( window.opera && !document.childNodes ) { myW += 16; }
	//second sample, as the table may have resized
	var oH2 = getRefToDivMod( idOfDiv );
	var oW2 = oH2.clip ? oH2.clip.width : oH2.offsetWidth;
	var oH2 = oH2.clip ? oH2.clip.height : oH2.offsetHeight;
	x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = oH + ( (oH + 200 ) - myH ) );
	var scW = screen.availWidth ? screen.availWidth : screen.width;
	var scH = screen.availHeight ? screen.availHeight : screen.height;
	x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2));
}

/* affichage auto pdf bij_info */
function goto_pdf(adresse_destination)
{
window.open(adresse_destination,'_self');
} 
