//pop-up membre pour changer d'identité
/*js placé en externe par SS inclus dans:
SaisieCommentaire/page_formulaire.tpl
SaisieCommentaire/page_formulaire.tpl
contribution/contribution.tpl
dossier/ListeArticle.tpl
dossier/DossierAccueil.tpl
int/templatepage.tpl
*/
	function PopWin(theURL,winName,features) {
		window.open(theURL,winName,features);
	}
	
	
	function valideReaction(myForm) {
	
	var reactionTitre = myForm.strTitre.value;
	var reactionTexte = myForm.strTexte.value;
	
		GetLeDevoirCookieValue (GetCookie("userinfo"));
		if ((oCurrentCookie["email"] != "na") && (oCurrentCookie["email"] != '')) {
		
			if (reactionTitre == "") {
				alert("Veuillez donner un titre à votre réaction.")
				myForm.strTitre.style.background = "#ffd2d2";
				myForm.strTitre.focus();
				return false;
			}
			
			if (reactionTexte == "") {
				alert("Veuillez écrire votre réaction.")
				myForm.strTexte.style.background = "#ffd2d2";
				myForm.strTexte.focus();
				return false;
			}		
		
			return true;
		}
		
		else {
			alert("Pour réagir à ce texte, vous devez être membre.");
			location = location;
			return false;			
		}
	}
	
	//open pop-up, center window on screen
	function popUp(url,name,vwidth,vheight,scroll) {	
		
	var w = vwidth;
	var h = vheight;
	var x = (screen.width - w)/2;
	var y = (screen.height - h)/2;			
	var s = scroll;
	
	if ((s == 0) || (s == "") || (s == null)) {
		s = "no"
	}
	else {
		s = "yes"
	}
			
	popupWin = window.open(url, name,  'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars='+s+',resizable=no,dependent,width='+w+',height='+h+',left='+x+',top='+y+'')
	}	
	
	var windowHandle;
	function monId(email) {
		var ffsubmit="/cgi-bin/ledevoirnav?usfrom2=accu&email=" + email
	    windowHandle = window.open(ffsubmit,'windowName','width=500,height=500');
	    if (!windowHandle.opener)
	        windowHandle.opener = self;
	    return false;
	}	
	
