function lightWindow_DoneLoading(clicked){
if (!get_cookie("lightbox"))
{
	
	myLightWindow = new lightwindow();
	myurl=get_media_url();
    el=document.getElementById('lwDisclaimer');
    lwhref='http://www.rlsunderthecovers.com/rls-disclaimer.html';
    if(el && !clicked)
    return;
    else if(el)
    lwhref=location.href+'#lwDisclaimer';
    //window.status=lwhref;
     //   Event.observe(window,"keypress",stopEsc,false);

    window.myLightWindow=myLightWindow;
	myLightWindow.activateWindow({
		href: lwhref,
		width: 680,
        height: 410,
        loadingAnimation: false,
        iframeEmbed: false
        
        
	})
	}
	}  


function stopEsc(event)
{
window.status="keypress:"+event.keyCode;

    if(event.keyCode == Event.KEY_TAB)
        Event.stop(event);
}
	
     
/*function popwindow(id){
	myLightWindow = new lightwindow();
	myLightWindow.activateWindow({
		href: 'http://rls.nitro2-client-test.co.uk/pop-disclaimer.php'+'?id='+id,
		width: 550,
		height:239
	})
	
	
}*/

function popwindow(id)
{
	var msg;
	msg = "This link will let you leave <strong>www.rlsundersthecovers.com</strong>. The linked sites are not under the control of the Boehringer Ingelheim corporation and no entity of the Boehringer Ingelheim group of companies is responsible for the contents of any linked site or any link contained in a linked site, or any changes or updates to such sites. Neither is any entity of the Boehringer Ingelheim group of companies responsible for webcasting or any other form of transmission received from any linked site. These links are provided to you only as a convenience, and the inclusion of any link does not imply endorsement by the Boehringer Ingelheim group of companies of the site.";
	
	switch(id)
	{
	   case '1':
        strUrl='http://www.worldsleepday.org';
        break;
       case '2':
        strUrl='http://www.wasmonline.org';
        break;
       case '3':
        strUrl='http://www.wemove.org/rls/rls_afa.html';
        break;
	   case '4':
        strUrl='http://www.emea.europa.eu/humandocs/PDFs/EPAR/Mirapexin/H-134-PI-en.pdf';
        break;
	   case '5':
        strUrl='http://www.emea.europa.eu/pdfs/human/referral/adartrel/Adartrel-Annex%20I-IV-en.pdf';
        break;	
	}
	
	showDisclaimer(strUrl,msg);
	
}


/*function bipopwindow(){
	myLightWindow = new lightwindow();
	myLightWindow.activateWindow({
		href: 'http://rls.nitro2-client-test.co.uk/bi-disclaimer.html',
		width: 400,
		height:100
	})
	
	
}*/


function showContent(){
el=document.getElementById("ContentContainer");
if(el)
el.style.display='';

//document.getElementById("MainflashArea").innerHTML = 'Flash Payer is needed to view the navigation';
//document.getElementById("MainflashArea").style.height='auto';
//showVideo("swf/flashnav.swf","mymovie","MainflashArea");
}

function showDisclaimer(strUrl,msg)
{
	var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
	var browser = navigator.appName;
	var msg;
    var layer = document.createElement('div');
	
    layer.style.zIndex = 2;
    layer.id = 'layer';
    layer.style.position = 'absolute';
    layer.style.top = '0px';
    layer.style.left = '0px';
    layer.style.height = document.documentElement.scrollHeight + 'px';
    layer.style.width = width + 'px';
    layer.style.backgroundColor = 'black';
	layer.style.backgroundImage = 'url(/images/black-70.png)';
    layer.style.opacity = '.7';
    layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=80)");
    document.body.appendChild(layer); 
   
    var div = document.createElement('div');
    div.style.zIndex = 3;
    div.id = 'box';
    div.style.position = (navigator.userAgent.indexOf('MSIE 6') > -1) ? 'absolute' : 'fixed';
	
// IE Fix
	 if (navigator.userAgent.indexOf('MSIE 6') > -1)
	 {
		ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
	//	topval = ignoreMe + 200;
		topval = 200;
	} else {
		topval = 200;
	}
    div.style.top = topval +'px';
	
    div.style.left = (width / 2) - (600 / 2) + 'px'; 
    div.style.height = '220px';
    div.style.width = '550px';
	div.style.color = '#003366';
    div.style.backgroundColor = '#ffffff';
    div.style.border = '3px solid #123466';
    div.style.padding = '15px';
	div.style.clear = 'left';
	document.body.appendChild(div); 
   
   	var p = document.createElement('p');
    p.innerHTML = msg;
	p.className = 'clsDisclaimer';
    div.appendChild(p);
   
  /*  var pblank = document.createElement('p');
    pblank.innerHTML = '&nbsp;';
    div.appendChild(pblank);*/
	
   var subdiv = document.createElement('div');
   subdiv.setAttribute("align","center");
   subdiv.style.clear='both';
   
    var a1 = document.createElement('a');
	a1.innerHTML = '<img src="/images/ok-btn.gif" alt="OK" name="OK" border="0" id="enterSite" onmouseover="MM_swapImage('+"'OK','','/images/ok-btn-over.gif'"+',1)" onmouseout="MM_swapImgRestore()" />';
	
	
    a1.href = 'javascript:void(0)';
    a1.onclick = function()
    {
      document.body.removeChild(document.getElementById('layer'));
      document.body.removeChild(document.getElementById('box'));
	  window.open(strUrl);
    };
    
	var a2 = document.createElement('a');
	a2.innerHTML = '<img src="/images/cancel-btn.gif" alt="Cancel" name="Cancel" border="0" id="Cancel" onmouseover="MM_swapImage('+"'Cancel','','/images/cancel-btn-over.gif'"+',1)" onmouseout="MM_swapImgRestore()" />';
	a2.href = 'javascript:void(0)';
	a2.style.marginLeft = '15px';
	a2.onclick = function()
    {
      document.body.removeChild(document.getElementById('layer'));
      document.body.removeChild(document.getElementById('box'));
    };
	
    subdiv.appendChild(a1);
	subdiv.appendChild(a2);
	div.appendChild(subdiv);	
}

function bipopwindow()
{
	var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
	var browser = navigator.appName;
	var msg,strUrl;
    var layer = document.createElement('div');
	msg = "This link will let you leave www.rlsundersthecovers.com.";
	strUrl = "http://www.boehringer-ingelheim.com";
    layer.style.zIndex = 2;
    layer.id = 'layer';
    layer.style.position = 'absolute';
    layer.style.top = '0px';
    layer.style.left = '0px';
    layer.style.height = document.documentElement.scrollHeight + 'px';
    layer.style.width = width + 'px';
    layer.style.backgroundColor = 'black';
	layer.style.backgroundImage = 'url(/images/black-70.png)';
    layer.style.opacity = '.7';
    layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=80)");
    document.body.appendChild(layer); 
   
    var div = document.createElement('div');
    div.style.zIndex = 3;
    div.id = 'box';
    div.style.position = (navigator.userAgent.indexOf('MSIE 6') > -1) ? 'absolute' : 'fixed';
	
// IE Fix
	 if (navigator.userAgent.indexOf('MSIE 6') > -1)
	 {
		ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
	//	topval = ignoreMe + 200;
		topval = 200;
	} else {
		topval = 200;
	}
    div.style.top = topval +'px';
	
    div.style.left = (width / 2) - (400 / 2) + 'px'; 
    div.style.height = '80px';
    div.style.width = '400px';
	div.style.color = '#003366';
    div.style.backgroundColor = '#ffffff';
    div.style.border = '3px solid #123466';
    div.style.padding = '15px';
	div.style.clear = 'left';
	div.style.textAlign='center';
	document.body.appendChild(div); 
   
   	var p = document.createElement('p');
    p.innerHTML = msg;
	p.className = 'clsDisclaimer';
    div.appendChild(p);
   
  /*  var pblank = document.createElement('p');
    pblank.innerHTML = '&nbsp;';
    div.appendChild(pblank);*/
	
   var subdiv = document.createElement('div');
   subdiv.setAttribute("align","center");
   subdiv.style.clear='both';
   
    var a1 = document.createElement('a');
	a1.innerHTML = '<img src="/images/ok-btn.gif" alt="OK" name="OK" border="0" id="enterSite" onmouseover="MM_swapImage('+"'OK','','/images/ok-btn-over.gif'"+',1)" onmouseout="MM_swapImgRestore()" />';
	
	
    a1.href = 'javascript:void(0)';
    a1.onclick = function()
    {
      document.body.removeChild(document.getElementById('layer'));
      document.body.removeChild(document.getElementById('box'));
	  window.open(strUrl);
    };
    
	var a2 = document.createElement('a');
	a2.innerHTML = '<img src="/images/cancel-btn.gif" alt="Cancel" name="Cancel" border="0" id="Cancel" onmouseover="MM_swapImage('+"'Cancel','','/images/cancel-btn-over.gif'"+',1)" onmouseout="MM_swapImgRestore()" />';
	a2.href = 'javascript:void(0)';
	a2.style.marginLeft = '15px';
	a2.onclick = function()
    {
      document.body.removeChild(document.getElementById('layer'));
      document.body.removeChild(document.getElementById('box'));
    };
	
    subdiv.appendChild(a1);
	subdiv.appendChild(a2);
	div.appendChild(subdiv);	
}