//  ********************************************************************************
//  * PHP My Pub                                                                   *
//  * crée par Frank JAMOIS                                                        *
//  * sur les bases de "la Regie Pub" de François L.                               *
//  * Site : http://www.phpmypub.net/                                              *
//  * E-mail : aide@phpmypub.net                                                   *
//  *                                                                              *
//  * Copyright (C) 2003   Frank JAMOIS                                            *
//  *                                                                              *
//  *    This file is part of phpMyPub.                                            *
//  *                                                                              *
//  *    phpMyPub is free software; you can redistribute it and/or modify          *
//  *    it under the terms of the GNU General Public License as published by      *
//  *    the Free Software Foundation; either version 2 of the License, or         *
//  *    (at your option) any later version.                                       *
//  *                                                                              *
//  *    phpMyPub is distributed in the hope that it will be useful,               *
//  *    but WITHOUT ANY WARRANTY; without even the implied warranty of            *
//  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
//  *    GNU General Public License for more details.                              *
//  *                                                                              *
//  *    You should have received a copy of the GNU General Public License         *
//  *    along with Foobar; if not, write to the Free Software                     *
//  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *
//  *                                                                              *
//  *                                                                              *
//  *    phpMyPub est un logiciel libre; vous pouvez le redistribuer               *
//  *    et/ou le modifier selon les termes de la GNU General Public               *
//  *    License (Licence Publique Générale GNU) telle qu'elle a été               *
//  *    publiée par la Free Software Foundation; soit la version 2 de de          *
//  *    la licence, soit (comme vous le souhaitez) toute version                  *
//  *    ultérieure.                                                               *
//  *                                                                              *
//  *    phpMyPub est distribué dans l'espoir qu'il sera utile, mais               *
//  *    SANS LA MOINDRE GARANTIE; pas même la garantie implicite de               *
//  *    COMMERCIABILITE ou d'ADEQUATION A UN BUT PARTICULIER. Voir la GNU         *
//  *    General Public License pour plus de détails.                              *
//  *                                                                              *
//  *    Vous devriez avoir reçu une copie de la GNU General Public License        *
//  *    en même temps que ce programme; sinon, merci d'écrire à la Free           *
//  *    Software Foundation, Inc, 59 Temple Place, Suite 330, Boston, MA          *
//  *    02111-1307 USA                                                            *
//  *                                                                              *
//  * il ne faut pas modifier cette page                                           *
//  ********************************************************************************


function popupcentree(page,largeur,hauteur,options)
	{
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
	}

function supprimer(IdBan)
	{
	if(confirm('Voulez-vous supprimer la campagne ?'))
	document.location.href='?rub=sup&IdBan='+IdBan
	}

function raz(IdBan)
	{
	if(confirm('Voulez-vous remettre les compteurs de la campagne à zéro ?'))
	document.location.href='?rub=raz&IdBan='+IdBan
	}

function verifformconfig()
	{
 	if (document.phpmypubformulaire.nserveur.value=="")
 		{
  		alert("Vous n\'avez pas entré l\'url du serveur");
  		document.phpmypubformulaire.nserveur.focus();
  		return false;
 		}
 	if (document.phpmypubformulaire.nuser.value=="")
 		{
  		alert("Vous n\'avez pas entré le nom d\'utilisateur.");
  		document.phpmypubformulaire.nuser.focus();
  		return false;
 		}
 	if (document.phpmypubformulaire.nbase.value=="")
 		{
  		alert("Vous n\'avez pas entré le nom de la base de données.");
  		document.phpmypubformulaire.nbase.focus();
  		return false;
 		}
 	if (document.phpmypubformulaire.ntable.value=="")
 		{
  		alert("Vous n\'avez pas entré le nom de table pour les banières.");
  		document.phpmypubformulaire.ntable.focus();
  		return false;
 		}
 	if (document.phpmypubformulaire.ntable_stat.value=="")
 		{
  		alert("Vous n\'avez pas entré le nom de table pour les statistiques.");
  		document.phpmypubformulaire.ntable_stat.focus();
  		return false;
 		}
	return true;
	}
function verifformcampagne()
	{
 	if (document.phpmypubformulaire.NomBan.value=="")
 		{
  		alert("Vous n\'avez pas entré de nom pour cette campagne.");
  		document.phpmypubformulaire.NomBan.focus();
  		return false;
 		}
	if (document.phpmypubformulaire.IdCategorie.value=="")
 		{
  		alert("Vous n\'avez pas entré de catégorie pour cette campagne.");
  		document.phpmypubformulaire.IdCategorie.focus();
  		return false;
 		}
	return true;
	}