var Access;
var Access2;
var Access3;

function NaVs(kaze) {
var Nom;
Nom = navigator.appName;
        switch (Nom)
        {
          case 'Netscape':
                if(kaze == 'pop'){
                Access  = window.opener.top.window.document;
                Access2 = window.opener.top.window.document.getElementById('ifra_viewver').contentDocument;
                Access3 = window.opener.top.window.document.getElementById('ifra_thumbnail').contentDocument;
                }else{
                Access  = top.window.document;
                Access2 = top.window.document.getElementById('ifra_viewver').contentDocument;
                Access3 = top.window.document.getElementById('ifra_thumbnail').contentDocument;
                }
            break;
          case 'Microsoft Internet Explorer':
                if(kaze == 'pop'){
                Access  = window.opener.top.window.document;            
                Access2 = window.opener.top.window.document.ifra_viewver.document;
                Access3 = window.opener.top.window.document.ifra_thumbnail.document;
                }else{
                Access  = top.window.document;
                Access2 = top.window.document.ifra_viewver.document;
                Access3 = top.window.document.ifra_thumbnail.document;
                }
            break;
        }
}

function goprint(zelst,zeid)
{//imprime la fenêtre active à 70%
NaVs();
var cheum;
   if(zelst || zelst==0){
   top.window.document.getElementById('PrintList').value = zelst;
   cheum = "print.htm";
        }else{
   top.window.document.getElementById('PrintList').value = top.window.document.getElementById('curseur').value;
   cheum = "templates/print.htm";
   }

   top.window.document.getElementById('Entitie').value = "-1";
   if(zeid || zeid==0){ 
   top.window.document.getElementById('Entitie').value = zeid;
   }

if (Access2.getElementById('swf')){
   statut = "toolbar = yes, menubar = yes, personalbar = no resizable = no, scrollbars=no, width=" + eval(gsFL) + ", height=" + eval(gsFH);
}else{
   statut = "toolbar = yes, menubar = yes, personalbar = no resizable = no, scrollbars=no, width=" + Access2.getElementById('pg_0').width + ", height=" + Access2.getElementById('pg_0').height;
}
   PrintWindow = window.open(cheum,"Print", statut)
   PrintWindow.focus();
}

function govignettes() {
NaVs();

                RefreshVisu(150);

switch (ThumbMod)
        {
          case 'ifr':
                if(Access.getElementById('thumbnail').style.display == "block" && Access3.location.href.search("thumbnail.htm") != -1){
                Access.getElementById('thumbnail').style.display = "none";
                }else{
                Access.getElementById('thumbnail').style.display = "block";
                }

                Access3.location.href = "templates/thumbnail.htm";

            break;
          case 'pop':
                   ThumbWindow = window.open("templates/thumbnail.htm","Thumb", "toolbar = no, menubar = no, personalbar = no, resizable = yes, scrollbars=yes, width=120, height=250")
                   ThumbWindow.focus();
            break;
        //  default:
            //Instruction_par_défaut
        //   break;
        }
}

function gov_basket(crit) {
NaVs();

                RefreshVisu(300);

                if(Access.getElementById('thumbnail').style.display == "block" && Access3.location.href.search("panier.htm") != -1 && crit != 1){
                Access.getElementById('thumbnail').style.display = "none";
                }else{
                Access.getElementById('thumbnail').style.display = "block";
                }
                
Access3.location.href = "templates/panier.htm";

return;
}

function gorech(crit) {
NaVs();

                RefreshVisu(300);

                if(Access.getElementById('thumbnail').style.display == "block" && Access3.location.href.search("recherche.htm") != -1 && crit != 1){
                Access.getElementById('thumbnail').style.display = "none";
                }else{
                Access.getElementById('thumbnail').style.display = "block";
                }
                
Access3.location.href = "templates/recherche.htm";

return;
}
