if(top.document==self.document)
{
var pagina = document.location.href
var delen  = pagina.split("inhoud/")
var delen  = delen[1].split(".htm")
location.replace("http://www.avdtravel.be/index.htm?p=" + delen[0]);
}// JavaScript Document

function cellImg(idcell, imgName) { 
//window.parent.document.getElementById(idcell).style.background = "url(" + imgName + ")";
initImage(idcell, imgName);

} 

function cOn(td){
if(document.getElementById||(document.all && !(document.getElementById))){
td.style.backgroundColor="#cccccc";
}
}

function cOut(td){
if(document.getElementById||(document.all && !(document.getElementById))){
td.style.backgroundColor="#B8AF9C";
}
}
function initImage(cellid, imgName) {
  hidelogo('logo');
  image = window.parent.document.getElementById(cellid);

  if(window.parent.document.getElementById(cellid).style.backgroundImage != "url(" + imgName + ")"){
	 
  
  window.parent.document.getElementById(cellid).style.background = "url(" + imgName + ")";
  image = window.parent.document.getElementById(cellid);
  setOpacity(image, 0);
  //image.style.visibility = 'visible';
  fadeIn(cellid,0 );
  }
  else
  {
  setOpacity(image, 100);
  
}

}
function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

function fadeIn(objId,opacity) {
  if (window.parent.document.getElementById) {
    obj = window.parent.document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 5;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
    }
  }
}

function fadeOut(objId,opacity) {
  if (window.parent.document.getElementById) {
    obj = window.parent.document.getElementById(objId);
    if (opacity >= 5) {
      setOpacity(obj, opacity);
      opacity -= 5;
      window.setTimeout("fadeOut('"+objId+"',"+opacity+")", 5);
    }
  }
}

function load(url) {
	//frames['iframe1'].location = url;
  document.location.href= url;
}

function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=350,height=350,scrollbars=no');
return false;
}

function hidelogo(idcell) { 

window.parent.document.getElementById(idcell).style.visibility = 'hidden';
}
function showlogo(idcell) { 

window.parent.document.getElementById(idcell).style.visibility = 'visible';
}  
