function getRadioButtonValue (radio)
{
    var strValue = '';
    
    if(radio.length == undefined && radio.checked)
    {
      strValue = radio.value;      
    }
    else
    {
      for (var i = 0; i < radio.length; i++)
      {
          if(radio[i].checked)
          {
              strValue = radio[i].value;
              break
          }
      }
    }
    
    return(strValue);
}

function gotoPage(str)
{
	window.location.href = str
}

function confirmDel()
{
  var where_to= confirm("Voulez-vous vraiment enlever cette item?");

  if (where_to== true)
  {
	  return true;
  }
  else
  {
	  return false;
  }
}

function confirmEmptyBasket()
{
  var where_to= confirm("Voulez-vous vraiment vidé votre panier?");

  if (where_to== true)
  {
	  return true;
  }
  else
  {
	  return false;
  }
}

function PrintPage()
{
  var objWin = window.open("_blank","print","width=800,height=600,scrollbars=yes,toolbar=no,status=no,location=no,resizable=yes")
  var objMainSection = window.document.getElementById("BodySection");
  var strHTML = objMainSection.innerHTML;

  objWin.document.open("text/html",true);
  objWin.document.write("<head><title>" + document.title + "</title></head>");
  objWin.document.write("<link href=styles/main.css rel=stylesheet title=main type=text/css>");      
  objWin.document.write("<body>" + strHTML + "</body>");
  objWin.document.close();
  objWin.print();
}

function showBasket(strURL, intWidth, intHeight)
{
  var intTop = (screen.height - intHeight) / 2;
  var intLeft = (screen.width - intWidth) / 2;

  objWin = window.open('basket','','top=' + intTop + ',left=' + intLeft + ',width=' + intWidth + ',height=' + intHeight + ',status=yes,scrollbars=yes,resizable=yes');  
  
  objWin.document.open();
  objWin.document.write("<body bgcolor=ivory><h3 align=center valign=middle>Wait while page is loading ...</h3></body>");
  objWin.document.close();

  objWin.focus();
    
  objWin.location.replace(strURL);
  
  return(objWin);
}

