/*
Set the display style to an element to block or none
*/
function DivOpenCloser(elementId)
{
   if(document.getElementById(elementId).style.display == "none")
    document.getElementById(elementId).style.display = "block";
   else document.getElementById(elementId).style.display = "none";
}

function ChangeMag(url, urlShop, title, date, alt)
{
  document.getElementById('urlShop').href = urlShop;
  document.getElementById('imgCouvMag').src = url;
  document.getElementById('imgCouvMag').alt = alt;
  document.getElementById('title').innerHTML = title;
  document.getElementById('date').innerHTML = date;
}
function popup(theURL,winName,features)
{ 
  window.open(theURL,winName,features);
}

function visio(magId) 
{
  window.open('http://webdata.ankama-games.com/visionneuses/magazine-dofus' + magId + '/BD.html','popWindow','scrollbars=no, resizable=yes, top=0,left=0,width=1000,height=700');
  return true;
}

function popupcenter(sUrl, sName, iWidth, iHeight, bScrollbar)
{
  var xPositionPopup = Math.round((screen.availWidth / 2) - (iWidth / 2));
  var yPositionPopup = Math.round((screen.availHeight / 2) - (iHeight / 2));
  window.open(sUrl, '', "top=" + yPositionPopup + ",left=" + xPositionPopup + ",resizable=no,scrollbars=" + (bScrollbar == 1 ? "yes" : "no" ) + ",width=" + iWidth + ",height=" + iHeight);
}