var selected;

function selectRowEffect(object, buttonSelect) {
  if (!selected) {
    if (document.getElementById) {
      selected = document.getElementById('defaultSelected');
    } else {
      selected = document.all['defaultSelected'];
    }
  }

  if (selected) selected.className = 'moduleRow';
  object.className = 'moduleRowSelected';
  selected = object;

// one button is not an array
  if (document.checkout_address.shipping[0]) {
    document.checkout_address.shipping[buttonSelect].checked=true;
  } else {
    document.checkout_address.shipping.checked=true;
  }
}

function rowOverEffect(object) {
  if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
  if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function help_inscrip(name) { //v2.0
  MM_openBrWindow('/help_inscrip.php3?lang=<?echo $lang?>#'+name,'INFO','scrollbars=yes,resizable=yes,width=300,height=150');
}

function confirmcontact(name) { //v2.0
  MM_openBrWindow('/confirmcontact.php3?lang=<?echo $lang?>&mail='+name,'INFO','scrollbars=yes,resizable=yes,width=300,height=150');
}

function help_recherche(name) { //v2.0
  MM_openBrWindow('/help_search.php3?lang=<?echo $lang?>#'+name,'INFO','scrollbars=yes,resizable=yes,width=400,height=205');
}

function Retour()
{
history.go(-1);
}

function OpenPopUp(MyFile,MyWindow,MyWidth,MyHeight)
        {
        var ns4 = (document.layers)? true:false;         //NS 4
        var ie4 = (document.all)? true:false;            //IE 4
        var dom = (document.getElementById)? true:false; //DOM
        var xMax, yMax, xOffset, yOffset;

        if (ie4 || dom)
                {
                xMax = screen.width;
                yMax = screen.height;
                }
        else if (ns4)
                {
                xMax = window.outerWidth;
                yMax = window.outerHeight;
                }
        else
                {
                xMax = 800;
                yMax = 600;
                }
        xOffset = (xMax - MyWidth)/2;
        yOffset = (yMax - MyHeight)/2;
        window.open(MyFile,MyWindow,'width='+MyWidth
+',height='+MyHeight
+',screenX='+xOffset
+',screenY='+yOffset
+',top='+yOffset
+',left='+xOffset
+',scrollbars=yes,resizable=yes');
}

function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,left=150')
}
function popupImageWindow(url) {
  window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}


