// JavaScript Document

function MM_preloadImages() { //v3.0
  var d=document; 
  if(d.images){ 
  	if(!d.MM_p) {
		d.MM_p = new Array();
	}
    var i, j = d.MM_p.length, a = MM_preloadImages.arguments; 
	for(i=0; i<a.length; i++) {
		if(a[i].indexOf("#")!=0) { 
			d.MM_p[j] = new Image; 
			d.MM_p[j++].src = a[i];
		}
	}
  }
}

function bandw() {
	document.getElementById('body').style.background='url(img/grass_bw.jpg)'
	//changeOpac(100, "")
	
}

function colour() {
	document.getElementById('body').style.background='url(img/grass.jpg)'
	//changeOpac(0, "")
	
}

function show($item) {
	//document.getElementById($item).style.display='block';
	//bandw();
	//opacity('blackfade', 0, 100, 500);
}

function hide($item) {
	//document.getElementById($item).style.display='none';
	//colour();
	//opacity('blackfade', 100, 0, 500);
}

function writemymail() {
      document.getElementById('email_link').innerHTML = '<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#108;&#111;&#110;&#103;&#98;&#111;&#116;&#116;&#111;&#109;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;">&#108;&oslash;&#110;&#103;&#98;&oslash;&#116;&#116;&oslash;&#109;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&oslash;&#109;</a>';
	  
}

function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
}













