

url_a = new Array;
imageUrl_a = new Array;

// Image 0
url_a[0] = "http://www.cibleclick.com/cibles/clicks/symp.cfm?site_id=889535550&friend_id=846463120&banniere_id=10902";
imageUrl_a[0] = "http://www.cibleclick.com/cibles/banniere/symp.cfm?site_id=889535550&friend_id=846463120&banniere_id=10902";

// Image 1
url_a[1] = "http://www.cibleclick.com/cibles/clicks/symp.cfm?site_id=889535550&friend_id=846463120&banniere_id=10901";
imageUrl_a[1] = "http://www.cibleclick.com/cibles/banniere/symp.cfm?site_id=889535550&friend_id=846463120&banniere_id=10901";

// Image 2
url_a[2] = "http://www.cibleclick.com/cibles/clicks/symp.cfm?site_id=889535550&friend_id=846463120&banniere_id=10900";
imageUrl_a[2] = "http://www.cibleclick.com/cibles/banniere/symp.cfm?site_id=889535550&friend_id=846463120&banniere_id=10900";

// Image 3
url_a[3] = "http://www.cibleclick.com/cibles/clicks/symp.cfm?site_id=889535550&friend_id=846463120&banniere_id=11281";
imageUrl_a[3] = "http://www.cibleclick.com/cibles/banniere/symp.cfm?site_id=889535550&friend_id=846463120&banniere_id=11281";


displayed_a = false;

function display_a()
{
  var numImage;

  if(!displayed_a)
  {
    numImage = Math.round(Math.random()*(url_a.length-1));
    document.write('<table width="100%" border="0"><tr><td align="center">');
    document.write('</td><td width="480" align="center">');
    document.write('<A HREF="#"');
    document.write(' onClick="window.open(\'');
    document.write(url_a[numImage]);
    document.write('\',\'_blank\');"');
    document.write('><IMG src="');
    document.write(imageUrl_a[numImage]);
    document.write('" border=0 alt=\'Cliquez ici\'></A>');
    document.write('</td></tr></table>');

    displayed_a = true;    
  }
//  else
//  {
//    if(numImage == (url_a.length-1))
//      numImage = 0;
//    else
//      numImage++;
//  }

//  setTimeout("display_a()",60000);
}





// ========================================================













function top_banner(id) {

  if ( id == 00 ) {		// Welcome
    document.write('<a href="http://www.physics-on-line.org">'
                     + '<img src="./scripts/banners/images/physicsonline.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 01 ) {	// Contents
    document.write('<a href="../download/download.html">'
                     + '<img src="../scripts/banners/images/default.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 02 ) {	// Manual

  }
  else if ( id == 03 ) {	// Download
    document.write('<a href="http://www.physics-on-line.org">'
                     + '<img src="../scripts/banners/images/physicsonline.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 04 ) {	// Exonline
    document.write('<a href="../download/download.html">'
                     + '<img src="../scripts/banners/images/default.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 05 ) {	// Clients/Download
    document.write('<a href="http://www.physics-on-line.org">'
                     + '<img src="../../scripts/banners/images/physicsonline.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 06 ) {	// Training
    document.write('<a href="../download/download.html">'
                     + '<img src="../scripts/banners/images/default.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 07 ) {	// Clients
    document.write('<a href="http://www.physics-on-line.org">'
                     + '<img src="../scripts/banners/images/physicsonline.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 08 ) {	// Inter
    document.write('<a href="../download/download.html">'
                     + '<img src="../scripts/banners/images/default.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 09 ) {	// Services
    document.write('<a href="http://www.physics-on-line.org">'
                     + '<img src="./scripts/banners/images/physicsonline.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 10 ) {	// Books
    document.write('<a href="../download/download.html">'
                     + '<img src="../scripts/banners/images/default.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 11 ) {	// College
    document.write('<a href="http://www.physics-on-line.org">'
                     + '<img src="../../scripts/banners/images/physicsonline.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 12 ) {	// High School
    document.write('<a href="../../download/download.html">'
                     + '<img src="../../scripts/banners/images/default.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 13 ) {	// University
    document.write('<a href="http://www.physics-on-line.org">'
                     + '<img src="../../scripts/banners/images/physicsonline.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 14 ) {	// Teacher
    document.write('<a href="../../download/download.html">'
                     + '<img src="../../scripts/banners/images/default.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 15 ) {	// High Level
    document.write('<a href="http://www.physics-on-line.org">'
                     + '<img src="../../scripts/banners/images/physicsonline.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
  else if ( id == 16 ) {	// Popularization
    document.write('<a href="../../download/download.html">'
                     + '<img src="../../scripts/banners/images/default.gif" alt="Cliquez ici" border="0" vspace="2"></a>');
  }
}



function bottom_banner(id) {

  if ( id == 00 ) {
//    document.write("<table width='100%' border='0'><tr><td align='center'>"
//                     + "<!--Code à insérer CibleClick : A3Formation -->"
//                     + "<a href='http://www.cibleclick.com/cibles/clicks/symp.cfm?site_id=114549507&friend_id=846463120&banniere_id=11217' target='_blank'>"
//                     + "<img src=http://www.cibleclick.com/cibles/banniere/symp.cfm?site_id=114549507&friend_id=846463120&banniere_id=11217  border=0 alt=></a>"
//                     + "<!--Code à insérer CibleClick : A3Formation --></td>"
//                     + "<td width='480' align='center'><!--Code à insérer CibleClick : Bestofmicro -->"
//                     + "<a href='http://www.cibleclick.com/cibles/clicks/symp.cfm?site_id=398416505&friend_id=846463120&banniere_id=4143' target='_blank'>"
//                     + "<img src=http://www.cibleclick.com/cibles/banniere/symp.cfm?site_id=398416505&friend_id=846463120&banniere_id=4143  border=0 alt=></a>"
//                     + "<!--Code à insérer CibleClick : Bestofmicro --></td></tr></table>");
    display_a();
  }
  else if ( id == 01 ) {	// Contents
    display_a();
  }
  else if ( id == 02 ) {	// Manual

  }
  else if ( id == 03 ) {	// Download
    display_a();
  }
  else if ( id == 04 ) {	// Exonline
    display_a();
  }
  else if ( id == 05 ) {	// Clients/Download
    display_a();
  }
  else if ( id == 06 ) {	// Training
    display_a();
  }
  else if ( id == 07 ) {	// Clients
    display_a();
  }
  else if ( id == 08 ) {	// Inter
    display_a();
  }
  else if ( id == 09 ) {	// Services

  }
  else if ( id == 10 ) {	// Books
    display_a();
  }
  else if ( id == 11 ) {	// College
    display_a();
  }
  else if ( id == 12 ) {	// High School
    display_a();
  }
  else if ( id == 13 ) {	// University
    display_a();
  }
  else if ( id == 14 ) {	// Teacher
    display_a();
  }
  else if ( id == 15 ) {	// High Level
    display_a();
  }
  else if ( id == 16 ) {	// Popularization
    display_a();
  }
}



function left_side(id) {

  if ( id == 00 ) {		// Welcome

  }
  else if ( id == 01 ) {	// Contents

  }
  else if ( id == 02 ) {	// Manual

  }
  else if ( id == 03 ) {	// Download

  }
  else if ( id == 04 ) {	// Exonline

  }
  else if ( id == 05 ) {	// Clients/Download

  }
  else if ( id == 06 ) {	// Training

  }
  else if ( id == 07 ) {	// Clients

  }
  else if ( id == 08 ) {	// Inter

  }
  else if ( id == 09 ) {	// Services

  }
  else if ( id == 10 ) {	// Books

  }
  else if ( id == 11 ) {	// College

  }
  else if ( id == 12 ) {	// High School

  }
  else if ( id == 13 ) {	// University

  }
  else if ( id == 14 ) {	// Teacher

  }
  else if ( id == 15 ) {	// High Level

  }
  else if ( id == 16 ) {	// Popularization

  }
}



function right_side(id) {

  if ( id == 00 ) {		// Welcome

  }
  else if ( id == 01 ) {	// Contents
//    document.write("<br><br><!--Code à insérer CibleClick : Bestofmicro -->"
//                     + "<a href='http://www.cibleclick.com/cibles/clicks/symp.cfm?site_id=398416505&friend_id=846463120&banniere_id=7929' target='_blank'>"
//                     + "<img src=http://www.cibleclick.com/cibles/banniere/symp.cfm?site_id=398416505&friend_id=846463120&banniere_id=7929  border=0 alt=></a>"
//                     + "<!--Code à insérer CibleClick : Bestofmicro -->");
  }
  else if ( id == 02 ) {	// Manual

  }
  else if ( id == 03 ) {	// Download

  }
  else if ( id == 04 ) {	// Exonline

  }
  else if ( id == 05 ) {	// Clients/Download

  }
  else if ( id == 06 ) {	// Training

  }
  else if ( id == 07 ) {	// Clients

  }
  else if ( id == 08 ) {	// Inter

  }
  else if ( id == 09 ) {	// Services

  }
  else if ( id == 10 ) {	// Books

  }
  else if ( id == 11 ) {	// College

  }
  else if ( id == 12 ) {	// High School

  }
  else if ( id == 13 ) {	// University

  }
  else if ( id == 14 ) {	// Teacher

  }
  else if ( id == 15 ) {	// High Level

  }
  else if ( id == 16 ) {	// Popularization

  }
}





// ---------------------------------------------------------------------

function setCookie(name,value,path,duration) {
  // duration is given in seconds: lifetime of the cookie
  var actDate = new Date();
  var ms = actDate.getTime() + duration * 1000;
  var dateExp = new Date();
  dateExp.setTime(ms);
  dateExp = dateExp.toGMTString();
  document.cookie = name + "=" + escape(value) + '; expires=' + dateExp + '; path=' + path;
}

function getCookieValue(offset) {
  var endstr = document.cookie.indexOf (";",offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset,endstr));
}

function getCookie(name) {
  var arg = name + "=";
  var arglen = arg.length;
  var cooklen = document.cookie.length;
  var i = 0;

  while ( i < cooklen ) {
    var j = i + arglen;
    if ( document.cookie.substring(i,j) == arg )
      return getCookieValue(j);
    i = document.cookie.indexOf(" ",i) + 1;
    if ( i == 0 ) break;
  }
  return null;
}

function popunder() {

  var rooturl = "http://www.quantohm.com";

  if ( navigator.cookieEnabled && getCookie("id") != "1" ) {
    popunder=window.open("about:blank","iisp","scrollbars=0,resizable=0,toolbar=0,location=0,status=0,menubar=0,width=300,height=300");
    popunder.blur();
    window.focus();
    popunder.document.write('<html><head><title>Quantohm - Adh&eacute;rez &agrave; l\'IISP</title>');
    popunder.document.write('<link rel="stylesheet" href="' + rooturl + '/css/quantohm.css" type="text/css" /></head>');
    popunder.document.write('<body background="' + rooturl + '/images/shared/bkground.gif" leftmargin="2" topmargin="2" >');
    popunder.document.write('<table width="100%"><tr><td width="90" valign="top" align="center" rowspan="2">');
    popunder.document.write('<img src="' + rooturl + '/images/common/framqohm.gif" hspace="0" vspace="0"></td>');
    popunder.document.write('<td height="200" align="center" valign="middle" class="white12px"><b>Obtenez<br><br>des versions compl&egrave;tes<br><br>gratuites<br><br>des logiciels Quantohm<br><br>en adh&eacute;rant<br><br>&agrave; l\' association IISP</b></td></tr>');
    popunder.document.write('<tr><td height="90" align="center"><a href="#" onClick=window.open("' + rooturl + '/clients/members.html","IISP","scrollbars=1,resizable=1,toolbar=1,location=0,status=0,menubar=0,width=640,height=480"); ><img src="' + rooturl +'/images/common/moreinfo.gif" border="0"></a></td></tr></table>');
    popunder.document.write('</body></html>');
    return true;
  }

  return false;
}

function popup(id) {
  if ( id == 00 ) {
    if ( popunder() == true )
      setCookie('id','1','/',3600);
  }
}


