function fenetre(ladater)
{PopUp('/ramadan.php?funky=no&ladater='+ladater, 'Ramadan_1430', 500, 380, 1, 0,1);
}

function MailUp (id,option)
{	PopUp('/mail.php?id='+id+'&funky=mail&option='+option, 'Mail', 500, 380, 1, 0);
}

function CommentUp (id,option)
{	PopUp('/comment.php?id='+id+'&funky=comment&option='+option, 'Mail', 500, 420, 1, 0);
}

function PopUp ( url, name, width, height, center, resize, scroll, posleft, postop ) {
    if (posleft != 0) { x = posleft }
    if (postop  != 0) { y = postop  }
    if (!scroll) { scroll = 0 }
    if (!resize) { resize = 0 } 

    if ((parseInt (navigator.appVersion) >= 4 ) && (center)) {
      X = (screen.width  - width ) / 2;
      Y = (screen.height - height) / 2;
    }

    if (scroll != 0) { scroll = 1 }

    var extra = 'width=' + width + ', height=' + height + ', top=' + Y + ', left=' + X + ', resizable=' + resize + ', scrollbars=' + scroll + ', location=no, directories=no, status=no, menubar=no, toolbar=no';
    window.open( url, name, extra );
  }

function printPreview(lien) {
var ArticlePreview = window.open(lien, 'ArticlePreview', 'status=no,menubar=yes,scrollbars=yes,width=600,height=470');
ArticlePreview.focus();}


function validatechamp()
{	var subject = document.getElementById("lestermes").value

	if ( subject.length == 0)
	{
		alert ("Une recherche ne peut s'effectuer sur une donnée vide.")
		document.getElementById("lestermes").focus ()
	}
	else
	{document.forms["re_easy2"].submit()}
}

function pasde ()
{
alert("Pour valider, cliquez sur la loupe")

}

function gopage(curr)
{	
	document.getElementById("curr2").value=curr
	document.forms["chgcurr"].submit()
}

function goarticle(newsid,newscat,date2,termes,type,curr)
{
	document.getElementById("cat1").value=newscat
	document.getElementById("nid1").value=newsid
	document.getElementById("ter1").value=termes
	document.getElementById("typ1").value=type
	document.getElementById("dde1").value=date2
	document.getElementById("cur1").value=curr
	document.vaarticle.submit()
}

function eff_select(vis)
{	var sele=document.getElementsByTagName("SELECT");
	if (vis==0)
		{visib='hidden';}
	else
		{visib='visible';	}
for (i=0;i<sele.length ;i++ )
	{sele[i].style.visibility=visib;}
}

function affiche()
{
	eff_select(0);
	divwin=dhtmlmodal.open('divbox', 'div', 'popUpDiv', 'DEUX LEGENDES, un grand concert', 'width=305px,height=455px,left=200px,top=50px,resize=0,scrolling=0')
	eff_select(1);
}