/* AUTEUR:Atmosphere.fr */
/* Modification=18-01-2001 */
/* version=2.3 */

// Favoris ctrld
nav=navigator.appName.substring(0,3);ver=navigator.appVersion.substring(0,1)
function addFav()
{if(nav=="Mic"&&ver>=4)
{url_site="http://www.pme-berry.com";titre_site="Les PME DU BERRY";document.write('<A HREF="#"onClick="window.external.AddFavorite(url_site,titre_site);return(false);">Ajoutez cette page aux favoris</A><BR>')
}else
{document.write('Faites CTRL+D pour ajouter cette page &agrave; vos favoris!')
}}
//dans doc -> <SCRIPT language="JavaScript">addFav();</SCRIPT>

//script de navigation
function na_change_img_src(name, nsdoc, rpath, preload)
{ 
  var img = eval((navigator.appName == 'Netscape') ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  } 
}

function na_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName == 'Netscape') ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  } 
}

// fin navigation




// page avec top
function top()
{if (parent.frames.length < 1)
{
document.location.href = '../index.htm';
}}

function top1()
{if (parent.frames.length < 1)
{
document.location.href = 'index.htm';
}}

function top2()
{if (parent.frames.length < 1)
{
document.location.href = 'index.html';
}}

// Fenetre
function closeWindow() {
	window.close();
}
// dans page  <a href="javascript:closeWindow()">   </a>

function na_call(str)
{
  eval(str);
}

function openvote() {
newWindow = window.open('../divers/vote.html', 'promo', 'toolbar=no,menubar=no,scrollbars=no,resizable=no,width=188,height=142');
}
//dans doc -> onload="openvote()">

function openit2() {
url="../divers/vote.html";
win="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=188,height=142";
window.open(url,"top",win);
}

// open fenetre whois-dom
function opendom() {
newWindow = window.open('', 'domaine', 'toolbar=no,menubar=no,scrollbars=no,resizable=no,width=280,height=261');
}

// open fenetre connaitre -non utilisé ///////
function openconnaitre() {
newWindow = window.open('', 'connaitre', 'toolbar=no,menubar=no,scrollbars=no,resizable=no,width=260,height=300');
}
// dans page <A HREF="javascript:OpenWin('dabert-citernes.com')"><IMG SRC="images//i2.gif" BORDER=0 WIDTH=17 HEIGHT=17 ALT="info"></A>

// ouvir fenetre général
function openWing(url, windowname, w, h) {
  newWin=window.open(url, windowname, "scrollbars=no,width=" + w + ",height=" + h)
  newWin.focus()
}
// dans page  <a href="javascript:openWing('../divers/faites-conaitre-pme.htm','newWindow','260','300')">img ou txt</a>

// open fenetre trace
function opentrace() {
newWindow = window.open('', 'trace', 'toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=565,height=260');
}

//
// date   
function initArrayDate () {	   
   for(i=0;i<initArrayDate.arguments.length; i++)
   this[i] = initArrayDate.arguments[i];    }
function CalculDate () {	      
var Months= new initArrayDate("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Aout","Sept","Octobre","Novembre","Décembre");
var Days  = new initArrayDate("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche");
var today = new Date();
var annee= today.getYear()+1900;

//	      return (Days[today.getDay()]+" "+today.getDate()+" "+Months[today.getMonth()]+" "+today.getYear());  }
//	      return (Days[today.getDay()]+" "+today.getDate()+" "+Months[today.getMonth()]+" "+annee);  }
	      return (Days[today.getDay()]+" "+today.getDate()+" "+Months[today.getMonth()]+" "+2001);      }
//    document.write (CalculDate ());
// dans doc -> <SCRIPT language=JavaScript> document.write(CalculDate ()) </SCRIPT>

	
//email
function validEmail (Formulaire)
		{
		var boite= document.Formulaire.Email.value;
		if (boite.indexOf("@")!= -1&& boite.indexOf(".") != -1 && boite.length > 5) return true;
		else alert("Votre adresse électronique est erronée. Veuillez la réinscrire");
		document.Formulaire.Email.value="";
		document.Formulaire.Email.focus();
		return false;
		}

//
// date   
function initArrayDate1 () {	   
   for(i=0;i<initArrayDate1.arguments.length; i++)
   this[i] = initArrayDate1.arguments[i];    }
function CalculDate1 () {	      
var Months= new initArrayDate1("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Aout","Sept","Octobre","Novembre","Décembre");
var Days  = new initArrayDate1("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche");
var today = new Date();
var annee= today.getYear()+1900;

	      return (today.getDate()+" "+Months[today.getMonth()]);      }


// The JavaScript Source!! http://javascript.internet.com Fonction right

function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Impossible d utiliser cette fonction.");
return false;
}
return true;
}
document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;

//
