// JavaScript Document
function doNuhn() {}

function getRefToDiv(divID,oDoc) {
			if( document.getElementById ) { return document.getElementById(divID); }
			if( document.all ) { return document.all[divID]; }
			if( !oDoc ) { oDoc = document; }
			if( document.layers ) {
				if( oDoc.layers[divID] ) {
					return oDoc.layers[divID];
				} else {
					for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
						y = getRefToDiv(divID,oDoc.layers[x].document);
					}
					return y;
				}
			}
			return false;
		}
		
        function showlayer(whichLayer,type) {
            //document.getElementById(whichLayer).style.display = 'block';
			
			myReference = getRefToDiv(whichLayer);
  			if( !myReference ) {
    			window.alert('Nothing works in this browser');
    			return; //don't go any further
  			}
			
  			//now we have a reference to it
			 if( myReference.style ) {
				//DOM & proprietary DOM
				if(myReference.style.display == 'block'){
					if(type == 'link'){
						myReference.style.display = 'none';
					}
				}else{
					myReference.style.display = 'block';
				}
		  	} else {
				//layers syntax
				if(myReference.display == 'block'){
					if(type == 'link'){
						myReference.display = 'none';
					}
				}else{
					myReference.display = 'block';
				}
		  	}
        }

        function hidelayer(whichLayer) {
            //document.getElementById(whichLayer).style.display = 'none';
			//var d = document.getElementById(whichLayer);
			
			
			var myReference = getRefToDiv(whichLayer);
			if( !myReference ) { 
			window.alert('Nothing works in this browser'); 
			return; 
			}else{
				var e = myReference.getElementsByTagName("select");
				for ( var i = 0; i < e.length; i++ ) {
						e[i].selectedIndex = 0;
				}
			}
			if( myReference.style ) { 
				myReference.style.display = 'none'; 
			} else {
				if( myReference.display ) { 
					myReference.display = 'none'; 
				} else {
					window.alert('Nothing works in this browser'); 
					return; 
				} 
			}
			
			
		}
		
		function popUp(URL) {
			day = new Date();
			id = day.getTime();
			eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=500');");
		}