

function boutique_playaudio(audioID)
{
  playMP3Item(audioID);
}


function boutique_playvideo(videoID)
{
  var videoid = 0;
  
  switch (videoID)
  {
    case "dvd04": videoid=2; break;
    case "dvd09": videoid=3; break;
    case "dvd10": videoid=1; break;
  }
  
  if ( videoid == 0 ) 
  {
    return;
  }
  
  if ( window.opener )
  {
    window.opener.location.href="/photos-videos.html?playvideo="+videoid;
    window.close();
  }
  else
  {
    document.location.href="/photos-videos.html?playvideo="+videoid;
  }
  
  //alert("play video "+videoID);
}

function open_paypal(paypal_url)
{
  
  window.open(paypal_url,'paypal','width=960,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');

}

function open_choosesize_popup(paypal_url, sizesArray)
{
  var html = "";
  
  html += "<div style=\"background-color:black;padding:10px;border:1px solid white;\">";
  html += "<font face=verdana size=3 color=#FFFFFF><b>Choisissez&nbsp;votre&nbsp;taille</b><br/></font>";
  html += "<font face=verdana size=2 color=#c0c0c0><b><i>Choose&nbsp;your&nbsp;size</i></b><br/></font>";
  
  html += "<table width=100%><tr>";
  
  for(siz in sizesArray)
  {
    html += "<td align=center style=\"border:1px solid white;\">";
    
    html += "<font face=verdana size=2 color=white><b>";
    html += "<span style=\"cursor:pointer;\" onclick=\"javascript:document.getElementById('popup_size').style.display='none';open_paypal('"+paypal_url+"&on0=Taille / Size&os0="+sizesArray[siz]+"');\">";
    html += sizesArray[siz];
    html += "</span>";
    html += "</b></font>";
    html += "</td>";
  }
  
  html += "</tr></table>";
  
  html += "<hr>";
  html += "<font face=verdana size=2 color=#ffffff><span style=\"cursor:pointer;\" onclick=\"javascript:document.getElementById('popup_size').style.display='none';\">annuler / cancel</span></a>";
  
  html += "</div>";
  
  var popup_size = document.getElementById('popup_size');

  
  popup_size.style.position="absolute";
  popup_size.style.top=tempY-120;
  popup_size.style.left=tempX-200;

  popup_size.innerHTML = html;
  
  popup_size.style.display="block";
  
}

function boutique_order(itemID)
{

  switch (itemID)
  {
    
    
    case "dvd":
            paypal_url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=262565";
            open_paypal(paypal_url);
            break;
            
    case "album":
            paypal_url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=262615";
            open_paypal(paypal_url);
            break;    
    
    case "poster_poulpy":
            paypal_url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=262648";
            open_paypal(paypal_url);
            break;    
            
    case "poster_huggy":
            paypal_url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=262673";
            open_paypal(paypal_url);
            break;    
            
    case "tshirt1":
            paypal_url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=263063";
            open_choosesize_popup(paypal_url, Array('M', 'L', 'XL'));
            break;    
            
    case "tshirt2":
            paypal_url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=263091";
            open_choosesize_popup(paypal_url, Array('M', 'L', 'XL'));
            break;   
            
    case "tshirt3":
            paypal_url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=262823";
            open_choosesize_popup(paypal_url, Array('S/M', 'L/XL'));
            break;   
            
    case "tshirt4":
            paypal_url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=262882";
            open_paypal(paypal_url);
            break;   
            
    case "tshirt5":
            paypal_url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=263110";
            open_choosesize_popup(paypal_url, Array('M', 'L', 'XL'));
            break;   
            
    default:
            alert("Cet objet n'est pas disponible pour l'instant.\nThis item is currently not available.");
            break;
  }

}

function show_tshirts(pageID)
{
  for (i=0;i<6;i++)
  {
    if ( pageID == i)
    {
      document.getElementById("div_tshirts_"+i).style.display = "block";
    }
    else
    {
      document.getElementById("div_tshirts_"+i).style.display = "none";
    }
  }
  
}


var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  

  return true
}
