/*================================================================================*/
/* fonction permettant d'ouvrir une image en grand dans un popup (sans ascenceur) */
/*================================================================================*/
/* AVANT : function afficheMaxi(chemin,titre) */
function afficheMaxiSA(chemin,titre)
	{
	if (navigateurMSIE ())
		{
		html = '<html><head><title>'+titre+'</title></head><body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0><center><img src="'+chemin+'" border=0 name=imageTest onLoad="window.resizeTo(document.imageTest.width+11,document.imageTest.height+32)"></center></body></html>';
		popupImage = window.open('','_blank','height=50,width=50,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,top=0,left=0');
		popupImage.document.open();
		popupImage.document.write(html);
        w = popupImage.document.width;
        h = popupImage.document.height;
/*                popupImage.document.moveTo ( (screen.width-w)/2, (screen.height-h)/2 ); */
		popupImage.document.close();
        popupImage.document.onmousedown = nonbis;
		}
	else
		{
		html = '<html><head><title>'+titre+'</title></head><body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0><center><img src="'+chemin+'" border=0 name=imageTest onLoad="window.resizeTo(document.imageTest.width+21,document.imageTest.height+34)"></center></body></html>';
		popupImage = window.open('','_blank','height=50,width=50,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,top=0,left=0');
		popupImage.document.open();
		popupImage.document.write(html);
		popupImage.document.close();
       	popupImage.document.onmousedown = nonbis;
		}
   	}

/*==============================================================================*/
/* fonction permettant d'ouvrir une image en grand dans un popup avec ascenceur */
/*==============================================================================*/
/* AVANT : function afficheMaxiAs(chemin,titre) */
function afficheMaxi(chemin,titre)
	{
	if (navigateurMSIE ())
		{
		html = '<html><head><title>'+titre+'</title></head><body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0><center><img src="'+chemin+'" border=0 name=imageTest onLoad="window.resizeTo(document.imageTest.width+50,document.imageTest.height+50)"></center></body></html>';
		popupImage = window.open('','_blank','height=50,width=50,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=1,top=0,left=0');
		popupImage.document.open();
		popupImage.document.write(html);
        w = popupImage.document.width;
        h = popupImage.document.height;
/*                popupImage.document.moveTo ( (screen.width-w)/2, (screen.height-h)/2 ); */
		popupImage.document.close();
        popupImage.document.onmousedown = nonbis;
		}
	else
		{
		html = '<html><head><title>'+titre+'</title></head><body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0><center><img src="'+chemin+'" border=0 name=imageTest onLoad="window.resizeTo(document.imageTest.width+20,document.imageTest.height+88)"></center></body></html>';
		popupImage = window.open('','_blank','height=50,width=50,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,top=0,left=0');
		popupImage.document.open();
		popupImage.document.write(html);
		popupImage.document.close();
       	popupImage.document.onmousedown = nonbis;
		}
   	}


/*=======================================================================================*/
/* fonction permettant d'afficher une vignette qui peut-être agrandie par un double clic */
/*=======================================================================================*/
function afficheVignette(cheminVignette,cheminMaxi,titre, position)
	{
   	document.write('<a href="javascript:afficheMaxi(\''+cheminMaxi+'\',\''+titre+'\')"><img src="'+cheminVignette+'" hspace=0 vspace=0 align='+position+' border=1 alt="'+titre+'"></a>');
   	}


/*========================================================================================================*/
/* fonction permettant d'afficher une vignette qui peut-être agrandie par un double clic (avec ascenceur) */
/*========================================================================================================*/
function afficheVignetteAs(cheminVignette,cheminMaxi,titre, position)
	{
   	document.write('<a href="javascript:afficheMaxiAs(\''+cheminMaxi+'\',\''+titre+'\')"><img src="'+cheminVignette+'" hspace=0 vspace=0 align='+position+' border=1 alt="'+titre+'"></a>');
   	}


/*===============================================================*/
/* fonction indiquant le temps pour atteindre une prochaine date */
/*===============================================================*/
function bientot() {
var date = new Date(2020,01,01); // MODIFIEZ ICI LA DATE DU COMPTE A REBOURS var description = date.getDate()+"."+date.getMonth()+"."+date.getFullYear();
var now = new Date();
var diff = Math.floor( (date.getTime()-now.getTime())/(1000*60*60*24)-30);
if (diff > 1) {
document.write("Il reste "+diff + " jours avant le " + description); } else if (diff == 1) { document.write("Demain c'est le " + description); } else if (diff == 0) { document.write("Aujourd'hui nous sommes le " + description); } else { document.write(""); } 
}



/*==============================================*/
/* fonction interdisant le clic du bouton droit */
/*==============================================*/
function non(clic) {
/*
var msg="Désolé, le clic droit sur les pages est interdit !";
	if (navigator.appName == 'Netscape' && clic.which==3) {
		alert(msg);
		return false;
	} 
	if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
		alert(msg);
		return false;
	}
*/
	return true;
}

/*============================================================*/
/* fonction interdisant le clic du bouton droit dans un popup */
/*============================================================*/
function nonbis(clic) {
/*
var msg="Désolé, le clic droit sur les pages est interdit !";
	if (navigator.appName == 'Netscape' && popupImage.clic.which==3) {
		alert(msg);
		return false;
	} 
	if (navigator.appName == 'Microsoft Internet Explorer' && popupImage.event.button==2) {
		alert(msg);
		return false;
	}
*/
	return true;
}

/*==========================================*/
/* fonction retournant le nom du navigateur */
/*==========================================*/
function nomNavigateur()
	{
	alert (navigator.appName);
	}

/*=====================================================================*/
/* fonction indiquant si le navigateur est Microsoft Internet Explorer */
/*=====================================================================*/
function navigateurMSIE()
	{
	var navMSIE = "Microsoft Internet Explorer";
	if (navigator.appName == navMSIE)
		{
		return (true);
		}
	else
		{
		return (false);
		}
	}



/*===================================================*/
/* fonction permettant d'ouvrir une page html dans un popup */
/*===================================================*/
function popup(page, largeur, hauteur)
	{
   	window.open(page,'','resizable=no, menubar=no, status=no, location=no, copyhistory=0, scrollbars=no, directories=no, height='+hauteur+', width='+largeur+', left=50, top=50');
  	}
  	
/*==================================================================*/
/* fonction permettant d'ouvrir une page html dans un popup (avec ascenseur) */
/*==================================================================*/
  	
function popupasc(page, largeur, hauteur)
	{
   	window.open(page,'','resizable=no, menubar=no, status=no, location=no, copyhistory=0, scrollbars=yes, directories=no, height='+hauteur+', width='+largeur+', left=50, top=50');
  	}




/*=================================================================*/
/* fonction texte clignotant dans la ligne de statut du navigateur */
/*=================================================================*/
texte2 = '       CAP Breizh.com   Le site des bateaux pneumatiques et semi-rigides en Bretagne et Normandie            ';

x = texte2.length-1;
place = 0;

function defiletexte()
	{
	if (place == texte2.length)
		{
		place = 0;
		}
if (place <= x)
		{
		texteDef = texte2.substring((texte2.length-(x-place)),texte2.length) + texte2.substring(0,place);
		place++;
		}
	window.status = texteDef;
	tempo22 = setTimeout("defilStat()", 210);
}

var msg="";
var delay1=0;
var delay2=0;
var alt=0

function cligno() {
	var delay=0
	if (alt==0) {
		parent.status=msg; 
		alt=1;
		delay=delay1
	} else {
		parent.status=' ';
		alt=0;
		delay=delay2;
	}
	setTimeout("cligno()",delay);
}

function clignoter(txt,tps1,tps2) {
	// txt est le texte à afficher dans la ligne de statut du navigateur
	// tps1 est en millisecondes la durée d'affichage du message
	// tps2 est en millisecondes la durée ou le message est caché
	msg=txt;
	delay1=tps1; 
	delay2=tps2;
	cligno();
}

/*===========================================================*/
/* fonction texte fixe dans la ligne de statut du navigateur                 */
/*===========================================================*/
var msg="";

function textestatut(txt) {
	// txt est le texte à afficher dans la ligne de statut du navigateur
	msg=txt;
        parent.status=msg; 
}


/*===========================================================*/
/* fonction moteur de recherche sur CAPBREIZH.COM                        */
/*===========================================================*/
function cherch(form) {
var adres = "http://www.google.com/search?hl=fr&ie=UTF-8&oe=UTF-8&q="+form.q.value +"+site%3Acapbreizh.com&btnG=Recherche+Google&lr="
window.open(adres,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
}
