/// ==========================================================================================
/// CUSTOMIZATIONS 
/// ==========================================================================================
/// RELEASCODE	: SDN-02.00
/// DESIGN		: BASE
/// AUTHORS		: Olaf Winkel
/// CREATED		: 18-11-2004
/// DESCRIPTION	: This JScript file acts as a container for all common JScript
///					functions. 
/// ==========================================================================================


// MM_findObj return a object in the current or given frame by name or id
//n = object naam
//d = framenaam (of zoiets)
function MM_findObj(n, d) { //v4.01
  var p,i,x;  
  if(!d) d=document; 
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; 
    n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n]; 
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); 
  return x;
}

function setImageUrl(strImgUrl, strImageId){ //v1.0
	var obj;
	obj = MM_findObj(strImageId);
	if (obj){
		obj.src = strImgUrl;		
	}
}

//For GlobalNav.xslt
function menuExpand(sID)
{
	var obj;
	obj = MM_findObj(sID);
	if (obj){	
		obj.style.visibility="visible";
		//obj.style.display ="inline";	
		//if (obj.style.display =="inline") obj.style.display ="none"
		//else obj.style.display ="inline";
	}
}
function menuCollaps(sID)
{
	var obj;
	obj = MM_findObj(sID);
	if (obj){	
		obj.style.visibility="hidden";
		//obj.style.display ="none";	
		//if (obj.style.display =="inline") obj.style.display ="none"
		//else obj.style.display ="inline";
	}
}
function changeCssClass(sID, CssClassName)
{
	var obj;
	obj = MM_findObj(sID);
	if (obj){			
		obj.className = CssClassName;			
	}
}

function menuClick(sHRef)
{
	document.location = sHRef;
}
function hiliteLeaf(oThis)
{
	oThis.style.color  = "blue";
	oThis.style.cursor = "hand";
}
function normal(oThis)
{
	oThis.style.color = "black";
}

function showHand(oThis)
{
	oThis.style.cursor = "hand";
}
// End GlobalNav.xslt

function drukaf(wat)
{
    var NS = (navigator.appName == "Netscape");
    
	if (NS) {
		wat.window.print();
	} else {
		window.print();
	}

}

function PrintPopup(html)
{
	printwindow = window.open("","print");
	printwindow.document.write(html);
} 
