/* Tous le code jQuery */
// Effet image
function deroul(idmembre,cont) {
	$('#mtest').animate({ height : '200px' },400,'swing'); 
$.ajax({
   type: "POST",
   url: "http://www.iball.fr",
   data: "name=John&location=Boston",
   error:function(msg){ alert( "Error !: " + msg ); },
   success: function(msg){
     alert( "Data Saved: " + msg );
   }
 });
}
$(document).ready(function() {
			$("a#imageSimple").fancybox({
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});
		});
		function pubCote() {
	$('.pubCote1').fadeOut("fast");
	$('.pub300x250_close').fadeOut("fast");//testpub
	$('.pubCote2').fadeIn("fast");
	$.ajax({ url: "../../club/pub_cote_session.php" });
}
function nPage(page) { window.open(page,"nPage",""); }
function newPub(page) { window.open(page,"newPub",""); }
function SimplePage(page,Pwidth,Pheight) {
var SPage = window.open(page,"Photo","menubar=no, status=no, scrollbars=no, resizable=yes, menubar=no, width="+Pwidth+", height="+Pheight);
SPage.focus();
	}
function FMatch(page) {
var FMPage = window.open(page,"FMatch","menubar=no, status=no, scrollbars=no, resizable=yes, menubar=no, width=586, height=670");
	}
   function photo(page) {
window.open(page,"Photo","menubar=no, status=no, scrollbars=no, resizable=yes, menubar=no, width=100, height=100");
	}
function popup(page,pageWidth,pageHeight) {
window.open(page,"Commentaire","menubar=no, status=no, scrollbars=yes, resizable=yes, menubar=no, width="+pageWidth+", height="+pageHeight);
   }
function vaide(page,pageWidth,pageHeight) {
window.open(page,"Aides","menubar=no, status=no, scrollbars=no, resizable=yes, menubar=no, width="+pageWidth+", height="+pageHeight);
   }
   function staff(page) {
window.open(page,"Organisation","menubar=no, status=no, scrollbars=no, resizable=yes, menubar=no, width=500, height=320");
   }
function partage(page) {
window.open(page,"Partage","menubar=no, status=no, scrollbars=yes, menubar=no, width=900, height=800");
	} 
function env_amis(page) {
window.open(page,"Envoi_Amis","menubar=no, status=no, scrollbars=yes, menubar=no, width=600, height=250");
	} 
function playerb1(page) {
window.open(page,"Joueur","menubar=no, status=no, scrollbars=no, resizable=yes, menubar=no, width=500, height=320");
	} 
function paper(page) { 
var pwidth = (screen.width/2)-100; var pheight = (screen.height/2)-100;
window.open(page,"Téléchargement","menubar=no, status=no, scrollbars=yes, resizable=yes, menubar=no, left=" + pwidth +" top=" + pheight +", width=100, height=100"); 
	}
function google_maps(page) {
window.open(page,"Google_Maps","menubar=no, status=no, scrollbars=no, menubar=no, width=480, height=320");
   }
// divInfo
function divInfo(divWidth,divHeight,page) {
	$(document).ready(function () {
		$('a.divInfoLien').click(function(e){ $('#divInfo').css('top',(e.pageY-50)+'px'); });
	});
	$('.divInfoC0').css('width',divWidth+'px');
	$('.divInfoC0').css('height',divHeight+'px');
	$('#divInfo').css('left',(($(window).width()/2)-(($('.divInfoC0').width()+10)/2))+'px');
	$('#divInfo').fadeIn("slow",function(){
		$.ajax({
				type: "GET",
				url: page,
				cache: false,
				success:function(html){$('#divInfoContenue').append(html);}
			});
		});
}
function divInfoClose() {
	$('#divInfoContenue').empty();
	$("#divInfo").fadeOut("fast");
}
// connexion
function conPseudo(par) {
	if(par == 'Pseudo') { document.connexion.pseudo.value = ""; document.connexion.pseudo.className = 'conNormal'; }
	else if(par == '') { document.connexion.pseudo.value = "Pseudo"; document.connexion.pseudo.className = 'conWait'; }
}
function conMdp(par) {
	if(par == 'Mot de passe') { document.connexion.mdp0.style.display = 'none'; document.connexion.mdp.style.display = 'inline'; document.connexion.mdp.focus(); }
	else if(par == '') { document.connexion.mdp0.style.display = 'inline'; document.connexion.mdp.style.display = 'none'; }
}
// connexionHeader
function conPseudoHeader(par) {
	if(par == 'Pseudo') { document.connexionHeader.pseudoHeader.value = ""; document.connexionHeader.pseudoHeader.className = 'conNormal'; }
	else if(par == '') { document.connexionHeader.pseudoHeader.value = "Pseudo"; document.connexionHeader.pseudoHeader.className = 'conWait'; }
}
function conMdpHeader(par) {
	if(par == 'Mot de passe') { document.connexionHeader.mdp0Header.style.display = 'none'; document.connexionHeader.mdpHeader.style.display = 'inline'; document.connexionHeader.mdpHeader.focus(); }
	else if(par == '') { document.connexionHeader.mdp0Header.style.display = 'inline'; document.connexionHeader.mdpHeader.style.display = 'none'; }
}

function connexion() {
document.getElementById("connection").style.display = 'none';
document.getElementById("connect_choix").style.display = 'block';
   }	
function connection2() {
document.getElementById("connection").style.display = 'block';
document.getElementById("connect_choix").style.display = 'none';
   }	
function newPage(page) { window.open(page,"newPage",""); }
//=================================================================================================================================================
//================================================================= Mon compte ====================================================================
//=============================== Ajouter un article ===========================
function txt_droite() { 
		document.getElementById('txt_droite').style.display='block'; document.getElementById('txt_gauche').style.display='none'; 
		document.getElementById('txt_bas').style.display='none'; document.getElementById('txt_haut').style.display='none'; }
function txt_gauche() { 
		document.getElementById('txt_droite').style.display='none'; document.getElementById('txt_gauche').style.display='block'; 
		document.getElementById('txt_bas').style.display='none'; document.getElementById('txt_haut').style.display='none'; }
function txt_bas() { 
		document.getElementById('txt_droite').style.display='none'; document.getElementById('txt_gauche').style.display='none'; 
		document.getElementById('txt_bas').style.display='block'; document.getElementById('txt_haut').style.display='none'; }
function txt_haut() { 
		document.getElementById('txt_droite').style.display='none'; document.getElementById('txt_gauche').style.display='none'; 
		document.getElementById('txt_bas').style.display='none'; document.getElementById('txt_haut').style.display='block'; }

function aj_photo() { 
		document.images["ajout1"].src="/admin/picture/onglet/art_photoA_min.jpg"; document.images["ajout2"].src="/admin/picture/onglet/art_video_ytB_min.jpg";
		document.getElementById('aj_photo').style.display='block'; document.getElementById('aj_videoyt').style.display='none'; document.getElementById('aj_videodm').style.display='none'; }
function aj_videoyt() { 
		document.images["ajout1"].src="/admin/picture/onglet/art_photoB_min.jpg"; document.images["ajout2"].src="/admin/picture/onglet/art_video_ytA_min.jpg";
		document.getElementById('aj_photo').style.display='none'; document.getElementById('aj_videoyt').style.display='block'; document.getElementById('aj_videodm').style.display='none'; }
function aj_videodm() { 
		document.images["ajout1"].src="/admin/picture/onglet/art_photoB_min.jpg"; document.images["ajout2"].src="/admin/picture/onglet/art_video_ytB_min.jpg";
		document.getElementById('aj_photo').style.display='none'; document.getElementById('aj_videoyt').style.display='none'; document.getElementById('aj_videodm').style.display='block'; }
function getFM() {
	if(document.getElementById('dark_div').style.display=='none') {
			document.getElementById('dark_div').style.display='block';
			document.getElementById('feuille_match').style.display='block';
	} else {	
			document.getElementById('dark_div').style.display='none';
			document.getElementById('feuille_match').style.display='none';
}}
function ieTrick(sep) { 
  d = new Date(); 
  trick = d.getYear() + "ie" + d.getMonth() + "t" + d.getDate() + "r" + d.getHours() + "i" + d.getMinutes() + "c" + d.getSeconds() + "k" + d.getMilliseconds(); 
if (sep != "?") { sep = "&"; } 
   return sep + "ietrick=" + trick; }
// Notation fiche equipe
function Onote(idnote) {
if(idnote == 1) { 
		document.getElementById("note2").style.background = "none"; 
		document.getElementById("note3").style.background = "none";
		document.getElementById("note4").style.background = "none"; 
		document.getElementById("note5").style.background = "none";		}
if(idnote == 2) { 
		document.getElementById("note2").style.background = "url(/club/images/notef.png) 1px 1px no-repeat"; 
		document.getElementById("note3").style.background = "none";
		document.getElementById("note4").style.background = "none"; 
		document.getElementById("note5").style.background = "none";		}
if(idnote == 3) { 
		document.getElementById("note2").style.background = "url(/club/images/notef.png) 1px 1px no-repeat"; 
		document.getElementById("note3").style.background = "url(/club/images/notef.png) 1px 1px no-repeat";
		document.getElementById("note4").style.background = "none"; 
		document.getElementById("note5").style.background = "none";		}
if(idnote == 4) { 
		document.getElementById("note2").style.background = "url(/club/images/notef.png) 1px 1px no-repeat"; 
		document.getElementById("note3").style.background = "url(/club/images/notef.png) 1px 1px no-repeat";
		document.getElementById("note4").style.background = "url(/club/images/notef.png) 1px 1px no-repeat"; 
		document.getElementById("note5").style.background = "none";		}
if(idnote == 5) { 
		document.getElementById("note2").style.background = "url(/club/images/notef.png) 1px 1px no-repeat"; 
		document.getElementById("note3").style.background = "url(/club/images/notef.png) 1px 1px no-repeat";
		document.getElementById("note4").style.background = "url(/club/images/notef.png) 1px 1px no-repeat"; 
		document.getElementById("note5").style.background = "url(/club/images/notef.png) 1px 1px no-repeat";		}
}	
