function launchOpt()
{
	var currentUrl = window.location ;
	var html = '<embed id="opt" width="800" height="1200" type="application/x-shockwave-flash" src="http://ovulation-calculator.com/online-pregnancy-test/main.swf" allowScriptAccess="always" name="opt" wmode="transparent" quality="high" flashVars="currentUrl='+currentUrl+'" />' ;
	popup(html) ;
}
function popup(html) {
	//screen width 
	var w = screen.width ;
	var left = ((w / 2) - 400).toString() ;
	div1 = document.createElement('div') ;
	div1.id = 'popup-translucent' ;
	div1.style.width = '100%' ;
	div1.style.height = '2000px' ;
	div1.onclick = function() {closePopup()}
	div1.style.position = 'absolute' ;
	div1.style.display = 'block' ;
	div1.style.cssfloat = 'left' ;
	div1.style.top = '0' ;
	div1.style.left = '0' ;
	div1.style.backgroundColor = "#ffffff" ;
	div1.style.padding = '25px' ;
	div1.style.zIndex = 2000 ;
	document.body.appendChild(div1) ;
	div2 = document.createElement('div') ;
	div2.id = 'popup-window' ;
	div2.style.cssFloat = "left" ;
	div2.style.position = 'absolute' ;
	div2.style.display = 'block' ;
	div2.style.top = '0' ;
	div2.style.left = left + "px" ;
	div2.style.padding = '15px' ;
	div2.style.fontSize = '18px' ;
	div2.style.zIndex = 3000 ;
	div2.innerHTML = html ;
	document.body.appendChild(div2) ;
	SetOpacity(div1, 80) ;
	document.getElementById('ovucalcForm').style.visibility = 'hidden' ;
}
function closePopup() {
    var reMove = document.getElementById('popup-window');
    reMove.parentNode.removeChild(reMove);
    var reMove = document.getElementById('popup-translucent');
    reMove.parentNode.removeChild(reMove);
	document.getElementById('ovucalcForm').style.visibility = 'visible' ;
}
function SetOpacity(elem, opacityAsInt)
{
     var opacityAsDecimal = opacityAsInt;
     
     if (opacityAsInt > 100)
         opacityAsInt = opacityAsDecimal = 100; 
     else if (opacityAsInt < 0)
         opacityAsInt = opacityAsDecimal = 0; 
    
    opacityAsDecimal /= 100;
    if (opacityAsInt < 1)
        opacityAsInt = 1; // IE7 bug, text smoothing cuts out if 0
   
    elem.style.opacity = (opacityAsDecimal);
    elem.style.filter  = "alpha(opacity=" + opacityAsInt + ")";
}