function openwindow(popurl,name,size) {
	nieuwVenster=window.open(popurl,name,size,'menubar=no,scrollbars=no,toolbar=no,location=no,resizable=yes,directories=no');
	nieuwVenster.focus();
	return false;
}

function externalLinks() {
    if (!document.getElementsByTagName) return;
        var anchors = document.getElementsByTagName("a");
        for (var i=0; i<anchors.length; i++) {
        var anchor = anchors[i];
        if (anchor.getAttribute("href") &&
        anchor.getAttribute("rel") == "external")
        anchor.target = "_blank";
    }
}

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 + ")"; 
    if(opacity==0){
    //document.getElementById(id).style.display = "none";
    }
}

function smenu(id, state,first){

	if(first=="1"){
		id2 = id+"_2";
		if(state=='show'){
			if(document.getElementById(id))
			document.getElementById(id).style.display='block';
			document.getElementById(id2).style.backgroundColor='red';
			document.getElementById(id2).style.color='white';
		}else if(state=='hide'){
			if(document.getElementById(id))
			document.getElementById(id).style.display='none';
			document.getElementById(id2).style.backgroundColor='white';
			document.getElementById(id2).style.color='black';
		}
	}
}