﻿	function showAndPosHotDiv(contentDiv) {
	    //get viewport's width and height
	    contentDiv = document.getElementById(contentDiv);

        var browserName=navigator.appName;
		if(browserName==="Microsoft Internet Explorer") {
			if(document.documentElement.clientWidth==0) {
			    var vpHeight=(document.body.clientHeight)
			    var vpWidth=(document.body.clientWidth)
			}
			else {
		        var vpHeight=(document.documentElement.clientHeight);
			    var vpWidth=(document.documentElement.clientWidth);
			}
		}
       else{
            //FF
            vpWidth=self.innerWidth;
            vpHeight=self.innerHeight;
       }

       document.getElementById('darkOverlayDiv').style.width = vpWidth + "px";
       document.getElementById('darkOverlayDiv').style.height = vpHeight + "px";

	    //get dialog's width -> breedte van contentDivElement
	    w = contentDiv.style.width;
	    strip=/[px]/gi; w = w.replace(strip,''); w = parseInt(w);
	    dialogWidth = w;

	    h = contentDiv.style.height;
	    strip=/[px]/gi; h = h.replace(strip,''); h = parseInt(h);
	    dialogHeight = h;


	    //calculate position
	    dialogLeft = Math.round((vpWidth/2) - (dialogWidth/2));
	    dialogTop = Math.round((vpHeight/2) - (dialogHeight/2));

	    // BROWSER SPECIFIC CORRECTION OF PLACEMENT OF DIV:
	    if(document.all){
	        dialogLeft = dialogLeft - 4;
	        dialogTop = dialogTop - 4;
	    }

	    else{
	        dialogLeft = dialogLeft;
	        dialogTop = dialogTop;
	    }

	    if(dialogLeft < 0){ dialogLeft = 0 };
	    if(dialogTop < 0){ dialogTop = 0 };

	    //Position the Dialog
	    contentDiv.style.left = dialogLeft+"px";
	    contentDiv.style.top = dialogTop+"px";
	    //contentDiv.style.top = (dialogTop-20)+"px";
	    contentDiv.style.display="block";

	}

	function hideFormResults(){
		document.getElementById('darkOverlayDiv').style.display = 'none';
		document.getElementById('hotdiv').style.display = 'none';
	}
	



