var defhovClr = "#CED3A1";
var defoffClr = "#FFFFFF";

function openPopup(theURL) {
    popupWindow = window.open(theURL,"Microsite","scrollbars=yes,resizable=yes,width=640,height=480");
    popupWindow.focus();	
}

function changeBG() 
{
	if ( document.body ) { // ie +
		document.body.bgColor = "#FFCC99";
  		document.body.background = "https://content.clarica.com/canada/images/v3/clarica/microsite/women/english/background.jpg";
	} else { // netscape
		var BG = document.getElementById("BG_div");
		BG.style.display = "";
		BG.style.width = window.innerWidth + "px";
		BG.style.height = window.innerHeight + "px";
	}
}

function hover_on(layerNum)
{
  document.getElementById("leftnav"+layerNum).style.backgroundColor = defhovClr;
  document.getElementById("details"+layerNum).style.display = "";
  document.getElementById("details"+layerNum).style.left = document.getElementById("contentTbl").offsetLeft + document.getElementById("contentTbl").offsetParent.offsetLeft + 54 + document.getElementById("leftnav"+layerNum).offsetParent.offsetLeft + document.getElementById("leftnav"+layerNum).offsetWidth + 10;
  document.getElementById("details"+layerNum).style.top = 412 + 86 + document.getElementById("leftnav"+layerNum).offsetTop - ((document.getElementById("details"+layerNum).offsetHeight - document.getElementById("leftnav"+layerNum).offsetHeight) / 2);
}

function hover_off(layerNum)
{
  document.getElementById("leftnav"+layerNum).style.backgroundColor = defoffClr;
  document.getElementById('details'+layerNum).style.display = "none";
}

function tell_a_friend() 
{
  var mailStr="mailto:?subject=J'ai pens%82 que tu trouverais ce site Web int%82ressant - Bien Vivre&body=Bonjour, ce site contient des renseignements qui font r%82fl%82chir. Tu peux commander un livre gratuit. www.jevisbien.com";
  window.location.href=mailStr;
}

function drawTell_a_friend()
{
  document.write("<DIV id='dlgTell_a_friend' style='left:50%;top:50%;margin-top:-106px;margin-left:-222px;background-color:#FFFFFF;display:none;z-index:10;position:absolute;width:505px;text-align:center;border:#845984 solid 2px;padding:6px;'>");
  document.write("<FORM name='frmTell_a_friend' method='GET' enctype='text/plain'>");
  document.write("  <TABLE cellpadding='3' cellspacing='0' style='width:505;border:0px;'>");
  document.write("    <TR>");
  document.write("      <TD style='padding:0px;height:25px;vertical-align:middle;background-image:url(http://content.clarica.com/canada/images/v3/clarica/microsite/women/english/title_Tell_a_friend.jpg);' colspan='4'>");
  document.write("        <TABLE style='height:25px;width:100%;border:0px;' cellspacing='0' cellpadding='0'>");
  document.write("          <TR>");
  document.write("            <TD style='font-size:9pt;font-weight:bold;color:#FFFFFF;font-family:Verdana;vertical-align:middle;'>&nbsp;&nbsp;Utilisez cette formule pour envoyer un lien &agrave; Bien Vivre &agrave; vos amies.</TD>");
  document.write("            <TD style='vertical-align:middle;'><A href='javascript:closeTell_a_friend();'><IMG src='http://content.clarica.com/canada/images/v3/clarica/microsite/women/english/btnClose.gif' style='border:0px;width:29px;height:22px;'></A></TD>");
  document.write("          </TR>");
  document.write("        </TABLE>");
  document.write("      </TD>");
  document.write("    </TR>");
  document.write("    <TR>");
  document.write("      <TD colspan='4' style='font-size:8pt;color:#000000;font-family:Verdana;vertical-align:top;'>&nbsp;</TD>");
  document.write("    </TR>");
  document.write("    <TR>");
  document.write("	  <TD rowspan='2' style='width:10px;'>&nbsp;</TD>");
  document.write("      <TD style='width:285px;font-size:8pt;color:#000000;font-family:Verdana;vertical-align:top;'>");
  document.write("	    Adresse &eacute;lectronique de chaque amie : <BR>");
  document.write("        <INPUT type='text' name='txtEmail01' style='width:250px;background-color:#FFFFFF;'><BR>");
  document.write("        <INPUT type='text' name='txtEmail02' style='width:250px;background-color:#FFFFFF;'><BR>");
  document.write("        <INPUT type='text' name='txtEmail03' style='width:250px;background-color:#FFFFFF;'><BR>");
  document.write("        <INPUT type='text' name='txtEmail04' style='width:250px;background-color:#FFFFFF;'>");
  document.write("      </TD>");
  document.write("      <TD style='width:160px;vertical-align:top;text-align:center;' rowspan='2'><IMG src='http://content.clarica.com/canada/images/v3/clarica/microsite/women/english/mauve_flowers.JPG' alt='' style='width:68;height:123;'></TD>");
  document.write("	  <TD rowspan='2' style='width:10px;'>&nbsp;</TD>");
  document.write("    </TR>");
  document.write("    <TR>	  ");
  document.write("	  <TD style='text-align:center;height:40px;'><IMG  src='http://content.clarica.com/canada/images/v3/clarica/microsite/women/french/btnSend.gif' onclick='tell_a_friend()' style='width:83px;height:20px;cursor:hand;cursor:pointer;'></TD>	     </TR>");
  document.write("  </TABLE>");
  document.write("</FORM>");
  document.write("</DIV>");
}

function openTell_a_friend()
{
  document.getElementById('dlgTell_a_friend').style.display = "";
  return;
}

function closeTell_a_friend()
{
  document.getElementById('dlgTell_a_friend').style.display = "none";
  document.frmTell_a_friend.txtEmail01.value = "";
  document.frmTell_a_friend.txtEmail02.value = "";
  document.frmTell_a_friend.txtEmail03.value = "";
  document.frmTell_a_friend.txtEmail04.value = "";
  return;
}