var isNS = (navigator.appName.indexOf("Netscape")) >= 0? 1: 0 ;
var isMinNS4 = (isNS && parseFloat(navigator.appVersion) >= 4)? 1: 0;
var isMinNS6 = (isNS && parseFloat(navigator.appVersion) >= 6)? 1: 0;

var isMinIE4 = (document.all)? 1: 0;
var isMinIE5 = (isMinIE4 && parseFloat(navigator.appVersion) >= 5) >= 0? 1: 0;
var isMinIE55 = (isMinIE4 && parseFloat(navigator.appVersion) >= 5.5) >= 0? 1: 0;
var isMinIE6 = (isMinIE4 && parseFloat(navigator.appVersion) >= 6) >= 0? 1: 0;

var isMac = (navigator.userAgent.indexOf('Mac')) > -1? 1: 0 ;


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 MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_swapImage() { //v3.0
  var i
  var j=0
  var x
  var a=MM_swapImage.arguments; 
  document.MM_sr=new Array; 
  for (i=0; i<(a.length-2); i+=3)
	if ((x=MM_findObj(a[i]))!=null){
		document.MM_sr[j++]=x; 
		if(!x.oSrc) x.oSrc=x.src; 
		x.src = a[i+2];
		}
}

var scrbreed = screen.availWidth; // screen-object not available in Netscape 3
var scrhoog = screen.availHeight;
function openWerkblad(theURL,winName,features) { //v2.0
	self.name = "Tijdwindow";
	var breed = 512, hoog = 400;
	// adjust for NN en IE:
	if (navigator.appName == 'Netscape') {
		breed += 20;
		hoog += 20;
	} else {
		breed += 50;
		hoog+= 50;
	}
	var rechts = 150;
	window.open(theURL,'werkblad','scrollbars=no,resizable=no,width=' + breed + ',height=' + hoog + ',top=100,left='+ rechts);
}

function PrintThisPage() { 
  window.print();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_showHideLayers() { //v2.0
  var i, visStr, args, theObj;
  args = MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+2];
    if (navigator.appName == 'Netscape' && document.layers!= null) {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all!= null) { //IE
      if (visStr == 'show') visStr = 'visible'; //convert vals
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
  } }
}

function OpenWebView(imageurl,width,height,backcolor,text) { 
	OpenViewWin("webview_popup.aspx","webview",width,height,imageurl,text,backcolor)
	}

function OpenViewWin(viewurl,winname,width,height,imageurl,text,backcolor) {


	// adjust for NN en IE:
	if (navigator.appName == 'Netscape') {
		win_width = width + 20;
		win_height = height + 50;
	} else {
		win_width = width + 50;
		win_height= height + 80;
	}
	var rechts = 150;
	
	theURL = viewurl
	theURL += "?img=" + imageurl
	theURL += "&w=" + width
	theURL += "&h=" + height
	theURL += "&bc=" + backcolor
	theURL += "&txt=" + text
	
	var features = 'scrollbars=no,resizable=no,width=' + win_width + ',height=' + win_height + ',top=100,left='+ rechts
	
	winWebView = window.open(theURL,'webview',features);
	
}

function Togglevisible(objItem) {
			if (document.getElementById) {
				if (document.getElementById(objItem).style.display == 'none') {
					document.getElementById(objItem).style.display = 'block' ;
					}
				else {
					document.getElementById(objItem).style.display= 'none' ;
			        	}
			}
		}
		function SetVisible(objItem) {
			if (document.getElementById) {
					document.getElementById(objItem).style.display = 'block' ;
				
			}
		}
		function SetInvisible(objItem) {
			if (document.getElementById) {
					document.getElementById(objItem).style.display = 'none' ;
				
			}
		}

	
	
	
	
	