function protectSource()
	{ 
  document.onmousedown = function (e)
		{
    if( document.all )
			{
			if( event.button == 2 )
				{
				return false;
				}
			}
    else
			{
			if( e.which == 3 )
				{
				return false;
				}
			}
 		}
  document.oncontextmenu = function ()
		{
		return false;
		} 
	}

function showMain(bestand, naam)
	{
	bestand = bestand.replace(/thumb/,"medium")
	var element = document.getElementById('mainpic');
	var beschrijving = document.getElementById('beschrijving');
	beschrijving.innerHTML = naam;
	element.setAttribute('src', bestand);
	vorige = document.getElementById('mainpic');
	element.style.marginTop = '';
	mainpicmargintop = ((document.getElementById('main').clientHeight - 300) / 2)+'px';
	element.style.marginTop = mainpicmargintop;

	if(vorige)
		{
		document.getElementById('main').removeChild(vorige);
		document.getElementById('main').removeChild(document.getElementById('beschrijving'));
		document.getElementById('main').appendChild(element);
		document.getElementById('main').appendChild(beschrijving);
		}
	else
		{
		document.getElementById('main').appendChild(element);
		document.getElementById('main').appendChild(beschrijving);
		}
	}

function init()
	{
	if (self.innerHeight) // all except Explorer
		{
		hoogte = self.innerHeight;
		}
	else if (document.documentElement && document.documentElement.clientHeight)	// Explorer 6 Strict Mode
		{
		hoogte = document.documentElement.clientHeight;
		}
	else if (document.body) // other Explorers
		{
		hoogte = document.body.clientHeight;
		}
	mainhoogte = (hoogte / 1.6)+'px';
	maintopmargin = (hoogte / 6.4)+'px';
	mainbottommargin = (hoogte / 16)+'px';
	document.getElementById('main').style.height = mainhoogte;
	document.getElementById('main').style.marginTop = maintopmargin;
	document.getElementById('main').style.marginBottom = mainbottommargin;
	mainpicmargintop = ((document.getElementById('main').clientHeight - 300) / 2)+'px';
	if(document.getElementById('mainpic'))
		{
		document.getElementById('mainpic').style.marginTop = mainpicmargintop;
		}
	}

function showLarge(bestand, naam)
	{
	bestand = bestand.replace(/medium\//,"");
	bestand = bestand.replace(/thumb\//,"");
	mywindow = window.open ('large.php?show='+bestand, "mywindow", "width=0, height=0");
	}

protectSource();