function popupWindow(url) {
  window.open(url,'popupWindow','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')
}

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 checkBox(object) { /* pour account newsletter et account notifications */
  document.account_newsletter.elements[object].checked = !document.account_newsletter.elements[object].checked;
}

function HideShow(tag,action,self)
  {
  if(self != '')
    {
    if(return_checkbox_value(self)) action = 'show';
    else action = 'hide';
    }
  
  if (document.getElementById) 
    { // DOM3 = IE5, NS6 
    if(action == 'hide') document.getElementById(tag).style.display = 'none';
    if(action == 'show') document.getElementById(tag).style.display = 'block';
    }
  else
    {
    if (document.layers) 
      { // Netscape 4 
      if(action == 'hide') document.tag.display = 'none';
      if(action == 'show') document.tag.display = 'block';
      } 
    else 
      { // IE 4 
      if(action == 'hide') document.all.tag.style.display = 'none';
      if(action == 'show') document.all.tag.style.display = 'block';
      
      } 
    } 
    
  //alert(tag  + ' ' + action  + ' ' + self);
  }
  

function return_checkbox_value(tag) {
//tag = "'.$field_name.'";
taglen = tag.length;
theInputs = document.getElementsByTagName('input');
//string = "on cherche " + value + " dans les tag : " + tag ;
for(var y=0; y<theInputs.length; y++)
{
theName = theInputs[y].name;
theName = theName.substr(0,taglen);
if(
  theInputs[y].type == 'checkbox'
  && theName == tag
  )
  {
  return (theInputs[y].checked);
  } 
}
//alert(string);
}
    
    
  
  /*
function hideDiv() 
  { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
    document.getElementById('hideshow').style.visibility = 'hidden'; 
    } 
  else { 
    if (document.layers) { // Netscape 4 
      document.hideshow.visibility = 'hidden'; 
     } 
    else { // IE 4 
      document.all.hideshow.style.visibility = 'hidden'; 
      } 
      } 
  } 

function showDiv() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshow').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'visible'; 
} 
else { // IE 4 
document.all.hideshow.style.visibility = 'visible'; 
} 
} 
} */
