function bar(url)
{
  wasOpen  = false;
  win = window.open(url);    
  return (typeof(win)=='object')?true:false;
}




function slideshow(imgno, images_str, id, id_div)
{  
  var images = images_str.split(";"); 
  var speed = Math.round(1000 / 100); 
  var timer = 0; 
  
  imgno++;
  if (imgno > (images.length-1))
  {
    imgno = 0;
  }
  
  
  document.getElementById(id_div).style.backgroundImage = "url(" + document.getElementById(id).src + ")";
  changeOpac(0, id)
  
  
  timeDelay=setTimeout("slideshow("+imgno+", '"+images_str+"', '"+id+"', '"+id_div+"', "+1000+")",5000);
  document.getElementById(id).src = images[imgno];
  
  for(i = 0; i <= 100; i++) 
  { 
      setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
      timer++; 
  } 
}

function stopShow(div_id, img_id)
{
  clearTimeout(timeDelay);
}

//change the opacity for different browsers
function changeOpac(opacity, id) 
{
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
}
