function popup(popupURL,popupWidth,popupHeight,popupLeft,popupTop)
{
  if(window.Details)
  {
    if(window.Details.closed != true)
    {
        window.Details.close();
    }
  }
  Details = window.open(popupURL,"Details",'toolbar=no,location=no,dependent=yes,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+popupWidth+',height='+popupHeight+',left='+popupLeft+',top='+popupTop);
  window.Details.focus();
} 

function startLyteBox(title, url, art_group) 
{
  var anchor = this.document.createElement('a');
  
  anchor.setAttribute('title', title);
  anchor.setAttribute('href', url);
  anchor.setAttribute('rel', art_group);
  
  myLytebox.start(anchor, false, false);
  return false;
}

function linkto(scriptsrc)
{
  window.location.href=scriptsrc;
}

function userQuestion(question,transmission)
{
  if(confirm(question))
  {
    document.location.href=transmission;
  }
}

function userQuestionSubmit(question,formular)
{
  if(confirm(question))
  {
    formular.submit();
  }
}

function showObject(object_id)
{
  document.getElementById(object_id).style.display='';
}

function hideObject(object_id)
{
  document.getElementById(object_id).style.display='none';
}

function setObject_IH(object_id,content)
{
  document.getElementById(object_id).innerHTML=content;
}

// ProductGallery //
var pictureId_Last=0;

imgload = new Image();
imgload.onload = function()
{
  $('slideshowMainImage').hide();
  new Effect.Appear('slideshowMainImage',{duration:2.0});
  $('slideshowMainImage').src = imgload.src;
  
  $('slideshowMainLytebox').setAttribute("rel","lytebox");
  $('slideshowMainLytebox').href = $('imgid_'+pictureId_Last).getAttribute('nameBig');
}

function loadProductPicture(picture_id)
{
  pictureId_Last = picture_id;
  
  $('slideshowMainImage').src = 'images/ajax-loader.gif';
  $('slideshowMainLytebox').removeAttribute("rel");
  $('slideshowMainLytebox').href = "#";
  
  var picture_middle = $('imgid_'+picture_id).getAttribute('nameMiddle');
  imgload.src = picture_middle;
}
