function PhotoPopUp( myId, myWidth, myHeight )
{
	window.open('photodetail.aspx?id='+myId,'filename','height='+myHeight+',width='+myWidth+',scrollbars=no');
}

function ChangeFriendlyIndex( myUrl )
{
	if( myUrl.length > 0 ) 
	{
		document.location = myUrl;
	}
}

function Show(soort)
{
	popup('domain_info.aspx?refreshquery='+Math.random() +'#'+soort,400,500);
}


function popup(filename,height,width)
{
	window.open(filename,'filename','height='+height+',width='+width +',scrollbars=yes');
}

function close_window() 
{
    window.close();
}

function CaricaFoto(img,imgnr)
{
  foto1= new Image();
  foto1.src=(img);
  Controlla(img,imgnr);
}

function Controlla(img,imgnr)
{
  if((foto1.width!=0)&&(foto1.height!=0))
  {
	viewFoto(img,foto1.width,foto1.height,imgnr);
  }
  else
  {
    viewFoto(img,400,300,imgnr);
  }
}

function viewFoto(img,width,height,imgnr)
{
  stringa="width="+width+",height="+height;
  finestra=window.open("blowup.aspx?imgnr="+imgnr+"&file="+img+"","blowup",stringa);
}

// Deze functie verbergt een element met het meegegeven id als deze zichtbaar is. Als deze al verborgen was wordt deze juist
function showHide(eId)
{
    if(!document.getElementById) return;
    myElement = document.getElementById(eId);
    if (myElement !=null) {
        if (myElement.style.display == 'block') {
            myElement.style.display = 'none'
        } else {
            myElement.style.display = 'block'
            //myElement.getElementById(eId).focus();
        }
    }
}

function hideElement(eId)
{
    if(!document.getElementById) return;
    myElement = document.getElementById(eId);
    if (myElement !=null) {
        myElement.style.display = 'none'
    }
}

function showHidePosition(eId)
{
    if(!document.getElementById) return;
    myElement = document.getElementById(eId);
    if (myElement.style.display == 'block') {
        myElement.style.display = 'none'
    } else {
        myElement.style.display = 'block'
        myElement.style.left = event.clientX + 30;
        myElement.style.top = event.clientY - 100;
        //myElement.getElementById(eId).focus();
    }
}
 var strOriginalText;
 
function showHideAlternate(IDExpandableArea,AlternateText,IDButton)
{
if(!document.getElementById) return;

 myElement = document.getElementById(IDExpandableArea);
 myElement2 = document.getElementById(IDButton);
    
    if (myElement.style.display == 'block') {
        myElement.style.display = 'none';
        myElement2.innerHTML = strOriginalText;
        //strOriginalText = document.getElementById(IDButton).innerHTML;

    } else {
        myElement.style.display = 'block';
        strOriginalText = document.getElementById(IDButton).innerHTML;
        myElement2.innerHTML = AlternateText;
    }
}

function ShutMeDown ()
{

var player = document.getElementById('player');
   player.controls.stop();
}

function Fullscreen()
{

var player = document.getElementById('player');
   player.fullScreen = "true";

}