// Open seperate window with variable size
	
	function openwin(URL,w,h,windowoptions) {
	
		showtoolbar = windowoptions.substring(0,1);
		showmenubar = windowoptions.substring(1,2);
		showscrollbar = windowoptions.substring(2,3);
		showstatus = windowoptions.substring(3,4);
		showresizable = windowoptions.substring(4);
		
		insertoptions = "toolbar="+showtoolbar+",menubar="+showmenubar+",scrollbars="+showscrollbar+",status="+showstatus+",resizable="+showresizable+",width="+w+",height="+h;
		
		thePage = window.open(URL,"mypopupwindow",insertoptions);
	}
	
	
	function toggle_showbtn(mygraphic) {
		state = document.images[mygraphic].src;
		if (state.indexOf("btn-show.gif") > 0) {
			document.images[mygraphic].src = "my/library/img/btn-hide.gif";
		} else {
			document.images[mygraphic].src = "my/library/img/btn-show.gif";
		}
	}
	
	
	
// Layer functions

	function show_layer(id) {
		document.getElementById(id).style.visibility = 'visible';
	}
			
	function hide_layer(id) {
		document.getElementById(id).style.visibility = 'hidden';
	}
	
	
	function toggle_vis(id) {
		if (document.getElementById(id).style.visibility == 'hidden') {
			document.getElementById(id).style.visibility = 'visible';
		} else {
			document.getElementById(id).style.visibility = 'hidden';
		}
	}
	

// Plugins

	function plugin_collapse(id) {
		if (document.getElementById(id).style.display == 'block') {
			document.getElementById(id).style.display = 'none';
		} else {
			document.getElementById(id).style.display = 'block';
		}
	}

