var highSlideBox;

function highSlide (elm, noClose, sonFor) {
  var url = elm.href;

  $('containerDiv').style.width = '840px';
  
  $('divContainer').style.width = '840px';
  $('divContainer').style.height = '640px';
  
  $('containerDivContent').style.width = '820px';
  $('containerDivContent').style.height = '620px';
  $('closeLink').show();

  if(noClose == 'noClose') $('closeLink').hide();  
  if(sonFor == 'sonFor') {
    $('containerDiv').style.width = '440px';
    
    $('divContainer').style.width = '440px';
    $('divContainer').style.height = '240px';
    
    $('containerDivContent').style.width = '420px';
    $('containerDivContent').style.height = '220px';
  }
  new Ajax.Request(url, {
    method: 'get',
    onSuccess: function(transport) {
      var content = $('containerDivContent');
      content.update(transport.responseText);
      highSlideBox.open();
    }
  });
  return false;
}
function highSlideURL (url, w, h) {
  $('closeLink').show();
  $('containerDiv').style.width = '840px';
  
  $('divContainer').style.width = '840px';
  $('divContainer').style.height = '640px';
  
  $('containerDivContent').style.width = '820px';
  $('containerDivContent').style.height = '620px';
  
  if( typeof w != 'undefined') {
    $('containerDiv').style.width = w + 'px';
    $('divContainer').style.width = w + 'px';
    $('containerDivContent').style.width = (w*1-20) + 'px';
  }
  if( typeof h != 'undefined') {
    $('divContainer').style.height = h + 'px';
    $('containerDivContent').style.height = (h*1-20) + 'px';
  }
  
  new Ajax.Request(url, {
    method: 'get',
    onSuccess: function(transport) {
      var content = $('containerDivContent');
      content.update(transport.responseText);
      highSlideBox.open();
    }
  });
  return false;
}

Event.observe(window, 'load', function () {
	highSlideBox = new Lightbox('containerDiv');
});
