
blocselection = 0;
inscr_log = 0;
inscr_pwd = 0;

function lance(section) {
location.href= "index.php?page="+section;
}

function couv(num) {
Schema=window.open('','Schema','statusbar=no, scrollbars=no, location=no,toolbar=no,menubar=no,resizable=no,width=320,height=460');
Schema.document.write("<html><head><title>Couverture</title></head>");
Schema.document.write('<BODY BGCOLOR="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% HEIGHT=100%>');
Schema.document.write('<TR><TD align="center">');
Schema.document.write('<img src="upload/books/'+num+'.jpg" id="mainpic">');
Schema.document.write('</TD></TR></BODY>');
Schema.document.write('</HTML>');
Schema.document.close();
Schema.focus();
}

function couv_b(num) {
Schema=window.open('','Schema','statusbar=no, scrollbars=no, location=no,toolbar=no,menubar=no,resizable=no,width=420,height=420');
Schema.document.write("<html><head><title>Reference</title></head>");
Schema.document.write('<BODY BGCOLOR="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% HEIGHT=100%>');
Schema.document.write('<TR><TD align="center">');
Schema.document.write('<img src="upload/alt_product/'+num+'.jpg" id="mainpic">');
Schema.document.write('</TD></TR></BODY>');
Schema.document.write('</HTML>');
Schema.document.close();
Schema.focus();
}

function afficherub(nrrub) {
if(document.images['main'+nrrub].src.indexOf('on') != -1)
{document.images['main'+nrrub].src = "data/off.gif"; sty = "cache"; nodisp = 1;} else
{document.images['main'+nrrub].src = "data/on.gif"; sty = "montre"; nodisp = 0;}

var i=1;
   for( i=1; i<600; i++) {
    if(document.getElementById('rub' + nrrub +'_'+ i)) {
    document.getElementById('rub' + nrrub +'_'+ i).className=sty;
    }
   }

}


function affichecomm(nrrub) {
with (document.getElementById('comm' + nrrub))
{
 if(className != "cache") {className = "cache";} else {className = "corpsmsg";}
}
}


function getRealTop() {
  yPos = this.offsetTop;
  tempEl = this.offsetParent;
  while (tempEl != null)
    {
     yPos += tempEl.offsetTop;
     tempEl = tempEl.offsetParent;
    }
  return yPos;
}


function position() {
  document.images['pic1'].getRealTop = getRealTop;
  y1 = document.images['pic1'].getRealTop();
  document.images['pic2'].getRealTop = getRealTop;
  y2 = document.images['pic2'].getRealTop();
  dim = y2-y1-228;
  document.getElementById('pic1').style.height=dim;
}


function checkpost() {
if(document.newpost.forum_topic.value != "") {document.newpost.submit();} else {alert("Indiquez le sujet de votre participation");}
}

function identite(verbe) {
verifie = confirm("Il vous faut prealablement vous identifier pour "+verbe+". \nSi vous n'avez pas ouvert de compte, souhaitez-vous en ouvrir gratuitement un maintenant ?");
if(verifie) {lance("client_new");}
}

function lshow(num) {
 with (document.getElementById('lien'+num).style)
 {
  visibility = "visible";
  left       = tempX - 150;
  top        = tempY + 20;
 }

}

function lhide(num) {
 document.getElementById('lien'+num).style.visibility="hidden";
}


var tempX = 0
var tempY = 0
document.onmousemove = getMouseXY;


function getMouseXY(e) {
  if (document.all) { 
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else { 
    tempX = e.pageX
    tempY = e.pageY
  }  
 }

function alphaswitch(num) 
{
 if(document.getElementById('alphabooks'+num).style.display == "none" || document.getElementById('alphabooks'+num).style.display == "")
 {
  document.getElementById('alphabooks'+num).style.display = "block";
 }
 else
 {
  document.getElementById('alphabooks'+num).style.display = "none";
 }
}

