
function OpenBrWindow (URL_Dest){
	temp = window.open(URL_Dest,'SS','resizable=yes,scrollbars=yes')
	}
	


//===============================================================================================

// CREDITS:
// Top-of-page onDoubleClick by Urs Dudli and Peter Gehrig 
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.ch.
// info@24fun.ch
// 1/24/2000

// IMPORTANT: 
// If you add this script to a script-library or script-archive 
// you have to add a link to http://www.24fun.ch on the webpage 
// where this script will be running.

function dblclick() {
	window.scrollTo(0,0)
}
if (document.layers) {
	document.captureEvents(Event.ONDBLCLICK);
}
document.ondblclick=dblclick;


//===============================================================================================
	
/*	
	DISABLES RIGHT MOUSE-BUTTON

	AUTHOR: JAN VAN LOOY, ?
	
	CODE TO BE ADDED TO PAGE (BODY)::
		
		//Netscape
		if (document.layers) window.captureEvents(Event.MOUSEDOWN);
		window.onmousedown=right;
	
		//IE
		document.onmousedown=right;	
*/

	function right(e) {
		if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
			return false;
		else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) 
			{
			//alert("Welkom bij galatea.");
			return false;
			}
		return true;
		}	


//===============================================================================================

/*	
	DETERMINES WHETHER BROWSER IS NOT NETSCAPE -> RETURNS TRUE, ELSE RETURNS FALSE

	AUTHOR: BERNHARD FRIEDRICH, JAN VAN LOOY
*/

	function IsIE (){
		if (navigator.appName == "Netscape"){
			return false
		}
		else{
			return true
		}
	}


//===============================================================================================	
	
	//resets the SelectBox (ElementName) in 'Formname' to value 0: (upper item) selected
	function ResetSelectBox(FormName,ElementName){
		document.forms[FormName].elements[ElementName].selectedIndex=0;
	}
	

//===============================================================================================
/*
	SERIES OF FUNCTIONS PERFORMING PLACEMENT OF SELECTION BOX
	ALLOWING THE INSERTION OF MARKUP INTO A FORM ELEMENT

	REQUIRED ARGUMENTS
		- FormName: NAME OF THE FORM WHERE SELECTBOX AND DESTINATION ELEMENT ARE LOCATED
		- ElementName: NAME OF DESTINATION ELEMENT
	
	AUTHOR
		JAN VAN LOOY, 31-05-00	
	
*/
	//writes selection box to document
	function MarkupSelectBox(FormName,ElementName){
		document.write('<SELECT NAME=\"Markup\" OnChange=\"InsertTag(\''+ FormName +'\',\'' + ElementName + '\',this.options[this.selectedIndex].value)\">');
		document.write('<option value=\"\">Insert Markup');
		document.write('<option value=\"I\">italics (&lt;I&gt;)');
		document.write('<option value=\"B\">bold (&lt;B&gt;)');
		document.write('<option value=\"U\">underlined (&lt;U&gt;)');
		document.write('<option value=\"BIG\">larger (&lt;BIG&gt;)');
		document.write('<option value=\"SMALL\">smaller (&lt;SMALL&gt;)');
		document.write('<option value=\"A\">Hyperlink (&lt;A HREF=\"URL\"&gt;)');
		document.write('</SELECT>');
	}


	// evaluates whether exceptional EndTag, passes through to respective function
	// inserts starting and ending tag (the same) in Elementname of FormName
	// calls ResetSelectBox function
		
	function InsertTag(FormName,ElementName,Tag){
		if (Tag == 'A'){
			InsertLink (FormName,ElementName);
			}
		else{
			var NewValue=(document.forms[FormName].elements[ElementName].value + '<' + Tag + '></' + Tag + '>');
			document.forms[FormName].elements[ElementName].value=NewValue;
		}
		ResetSelectBox (FormName,'Markup');
	}

	//prompts for URL; inserts starting and ending tag <A HREF="URL"></A>
	function InsertLink (FormName,ElementName){
		var temp = prompt('URL: (Uniform Resource Locator)\n e.g. http:\/\/www.kuleuven.ac.be','http://')
		var NewValue=(document.forms[FormName].elements[ElementName].value + '<A HREF=\"' + temp + '\"></A>');
		document.forms[FormName].elements[ElementName].value=NewValue;
		}
	
	
//===============================================================================================
/*
	SERIES OF FUNCTIONS PERFORMING PLACEMENT OF SELECTION BOX
	ALLOWING THE APLICATION OF THE FOLLOWING FILTERS TO AN IMAGE
		- GRAYSCALE
		- INVERT
		- BLUR
		- WAVE
		- XRAY

	REQUIRED ARGUMENTS
		- Formname: NAME OF FORM CONTAINING SELECTBOX
		- ImgName: NAME OF IMAGE TO BE FILTERED
		
	
	AUTHOR
		JAN VAN LOOY, 08-06-00
	
*/
	
	//if IE, then writes selection box to document
	function FilterSelectBox (FormName,ImgName){
		if (IsIE()){
			document.write('<SELECT NAME=\"Filter\" OnChange=\"filter(\'' + FormName +	'\',\'' + ImgName + '\',this.options[this.selectedIndex].value)\">');
			document.write('<OPTION VALUE=\"\"> -- Filter --');
			document.write('<OPTION VALUE=\"none\">no filter');
			document.write('<OPTION VALUE=\"gray\">grayscale');
			document.write('<OPTION VALUE=\"invert\">invert');
			document.write('<OPTION VALUE=\"xray\">grayscale + invert');
			document.write('<OPTION VALUE=\"blur\">blurred');
			document.write('<OPTION VALUE=\"wave\">waved');			
			document.write('</SELECT>');
		}
	}
	
	// applies filter to image
	// resets SelectBox
	function filter (FormName,ImgName,FilterName){
	document.images[ImgName].className = FilterName;
	ResetSelectBox (FormName,'Filter');
	}
		
//=============================================================================================