function pleinEcran() {

window.moveTo(0,0);
if (document.getElementById || document.all) 
  {
  window.resizeTo(screen.availWidth, screen.availHeight);
  }
else if (document.layers) 
  {
	 if (window.outerHeight<screen.availHeight || window.outerWidth<screen.availWidth)
		{
		window.outerHeight = screen.availHeight;
		window.outerWidth = screen.availWidth;
		}
   }
 }


function testConfig()
{
 var hauteurEcran;
 var ecran=false;
 var navigateur=false;
 hauteurEcran=screen.height;

 if (hauteurEcran<768) ecran=true; // Test de la résolution < 1024/768
 if (navigator.appName.indexOf("Microsoft")==-1) navigateur=true;
 
 // on ne gère que le contrôle de la taille de l'écran
 //if (navigateur==true)
 //window.open('navig.htm','ecran','width=150,height=130,top=200,left=300');
 //if ((ecran==true) && (navigateur==false)) au lieu de la ligne ci-dessous
 if (ecran==true) 
 window.open('config.htm','ecran','width=150,height=130,top=200,left=300');
}

// test du navigateur (à compléter si on veut tester les niveaux de version ou autre)
function Navig(){
  app=navigator.appName;
  ver=eval(navigator.appVersion.charAt(0));
  ns="Netscape";
  msie="Microsoft Internet Explorer";
  if ( app==ns) {return 2}
  else if (app==msie) {return 1}
  else {return 0}
}

function testNavig()
{
 if (navigator.appName.indexOf("Microsoft")==-1) { return true; } else {return false;}
}

function mailpage()
{
 chaine_mail = "mailto:?subject=OGM Bodyboard Shop - vente de matériel et accessoires bodyboard"; 
 chaine_mail += "&body= OGM Bodyboard Shop vous ouvre les portes de son shop en ligne ";
 chaine_mail += "à l'adresse : " + "http://www.ogmbodyboardshop.com "; 
 chaine_mail += " ... Retrouvez-y toutes les marques de bodyboards, combis, lycras, leashes, palmes, housses, maillots, t-shirts, sweat, ... " ; 
 location.href = chaine_mail;
}
function mailnews()
{
 chaine_mail = "mailto:contact@ogmbodyboardshop.com?subject=OGM Bodyboard Shop - Inscription aux news"; 
 chaine_mail += "&body= Je souhaite être informé par e-mail des nouveautés de OGM Bodyboard Shop. A tout moment, j'aurai la possibilité de ";
 chaine_mail += "me désinscrire en envoyant un mail à l'adresse nonews@ogmbodyboardshop.com"; 
 location.href = chaine_mail;
}

// création d'un tableau de n postes
function MakeArray(n){
this.length = n
for (var i=1; i<=n ; i++){
	this[i] = ""}
return this
}

// on indique la table qui va servir à rempir la liste et le poste de départ de la 
// table. C'est également celui qui sera préselectionné dans la liste. 
function Liste(tab, depart) {
for (var n=depart; n<=tab.length; n++){
	if (n==depart)
	document.write("<option value='" + n + "' selected>" + tab[n] + "</option>")
	else
	document.write("<option value='" + n + "'>" + tab[n] + "</option>")
	}
}

function choixListe(nomListe) {
for (var i = 0; i < nomListe.length; i++) {
      if (object.options[i].selected == true) {
         return i
      }
   }
}


// jour est au format Date
function DateJour(jour) {
datA = jour.getYear()
datA = (datA % 100) + 2000
numM = jour.getMonth()+1
datJ = jour.getDate()
numJ = jour.getDay()
}

// dateJ est une chaîne de caract au format aaaammjj
function AfficherJour(dateJ) {
	aaaa = eval(dateJ.substring(0,4))
	mm = eval(dateJ.substring(4,6)) - 1
	jj = eval(dateJ.substring(6,8))
	leJour = new Date(aaaa, mm, jj)
	numMM = leJour.getMonth()+ 1
	numJJ = leJour.getDay()
	document.write(jour[numJJ] + " " + jj + " " + mois[numMM] + " " + aaaa)
}

function ChampObligatoire(nomChamp)	 { 
     if (nomChamp.value.length > 0) 
	   return false
     else 
       return true 
}

function Bouton(s) {
    if ("INPUT"==event.srcElement.tagName)
      event.srcElement.className=s;
}

function ConvText(txt){
	while (txt.indexOf("<")>-1){
		 pos=txt.indexOf("<");
		 txt=txt.substring(0,pos)+"&lt;"+txt.substring(pos+1,txt.length); 
	}	
	while (txt.indexOf(">")>-1){
		pos=txt.indexOf(">");
		txt=txt.substring(0,pos)+"&gt;"+txt.substring(pos+1,txt.length);
	}
return txt;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
 	

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
  
texteStatusBar = 'PLANCHAS CASTEY ET POELES CASTEY - vente de planchas d\'intérieur Castey, de poêles Castey et ustensiles de cuisson ... ';
x = texteStatusBar.length-1;
place = 0;
function defilStat()
	{
	if (place == texteStatusBar.length)
		place = 0;
		if (place <= x)
		{
		texteDef = texteStatusBar.substring((texteStatusBar.length-(x-place)),texteStatusBar.length) + texteStatusBar.substring(0,place);
		place++;
		}
	window.status = texteDef;
	tempo22 = setTimeout("defilStat()", 200);
	}
 

