// Java Document
function getHeight() { 
  var myWidth = 0, myHeight = 0; 
  if( typeof( window.innerWidth ) == 'number' ) { 
    //Non-IE 
    myWidth = window.innerWidth; 
    myHeight = window.innerHeight; 
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 
    //IE 6+ in 'standards compliant mode' 
    myWidth = document.documentElement.clientWidth; 
    myHeight = document.documentElement.clientHeight; 
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { 
    //IE 4 compatible 
    myWidth = document.body.clientWidth; 
    myHeight = document.body.clientHeight; 
  } 
  return myHeight; 
} 

function getObj(name){     
    if (document.getElementById){         
        this.obj = document.getElementById(name);         
        this.style = document.getElementById(name).style;     
    }     
    else if (document.all){         
        this.obj = document.all[name];         
        this.style = document.all[name].style;     
    } 
} 

function resize(div,marge) {         									//Deze functie staat erin om de container mee te vergroten.                       
    var oContent = new getObj(div);  					//In Firefox en Chrome is dit niet nodig omdat die dat zelf snappen de de container mee oprekken.
	if (oContent) {												//Als er geen rand of zo van de container zichtbaar is kan deze aanroep achterwege gelaten worden.
		oContent.style.height = "auto";
    	var height = getHeight();  
    oContent.style.height = height - parseInt(marge); 
	}
//    var oContent2 = new getObj('Iframe'); 
//	if (oContent2) {
//		oContent2.style.height = "auto"
//		var height2 = getHeight();
//        if (height2 > 500) { 
//        	oContent2.style.height = height - parseInt(230); 
//    	}else { 
//        oContent2.style.height = 500; 
//		}
//    }
} 

// Java Document

function setIframeHeight(marge2) {
		  //var iframeWin = window.frames[iframeName];
		  var iframeEl = document.getElementById? document.getElementById('Iframe'): document.all? document.all['Iframe']: null;
		  if (iframeEl) {
		  iframeEl.style.height = "auto"; // helps resize (for some) if new doc shorter than previous
		  //var docHt = getDocHeight(iframeWin.document);
		  // need to add to height to be sure it will all show
		  var h = getHeight();
		  var new_h = (h-marge2);
		  iframeEl.style.height = new_h + "px";
		  //alertSize();
		  }
		}

		function alertSize() {
		  var myHeight = 0;
		  if( typeof( window.innerWidth ) == 'number' ) {
		    //Non-IE
		    myHeight = window.innerHeight;
		  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		    //IE 6+ in 'standards compliant mode'
		    myHeight = document.documentElement.clientHeight;
		  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		    //IE 4 compatible
		    myHeight = document.body.clientHeight;
		  }
		  //window.alert( 'Height = ' + myHeight );
		  return myHeight;
		}
		
function ververs()  {
	window.refresh();
	windows.alert('hij doet het');
	}
	
	
function setHeight(div,marge) {
		  //var iframeWin = window.frames[iframeName];
		  var de_div = document.getElementById? document.getElementById(div): document.all? document.all[div]: null;
		  if (de_div) {
		  de_div.style.height = "auto"; // helps resize (for some) if new doc shorter than previous
		  //var docHt = getDocHeight(iframeWin.document);
		  // need to add to height to be sure it will all show
		  var h = getHeight();
		  var new_h = (h-marge);
		  de_div.style.height = new_h + "px";
		  //alertSize();
		 // window.alert( 'Height = ' + new_h );
		  }
		}
