﻿StockWidthPopup="0";
function resizeLoader()
    {
    jQuery("#layerfullpage").css({
    height:Math.max(jQuery(window).height(), jQuery(document.body).height())
    });
    PositionneLelayPopup();
    }

function PositionneLelayPopup()
    {
    PosLeft=parseInt(getWindowWidth()-StockWidthPopup)/2;
    PosTop=document.documentElement.scrollTop+100
    SetToXY('contenerPopupSite',PosLeft,PosTop)
    }
var htmlElement = top.document.getElementsByTagName('html')[0];
	
function OpenPopup(Url,HeidthPopup,WidthPopup)
    {
  //  document.body.style.marginRight='12px';
	htmlElement.style.overflow = 'hidden';
	StockWidthPopup=WidthPopup;
    resizeLoader();
	objFramePop=getObj("FramePopSite")
	objFramePop.width=WidthPopup;
	objFramePop.height=HeidthPopup;
  	objFramePop.src=Url;
  	getObj('contenerPopupSite').style.display='block';
    getObj('layerfullpage').style.display='block';
   	}
function closePopup()
    {
    top.getObj('contenerPopupSite').style.display='none';
    top.getObj('layerfullpage').style.display='none';
	htmlElement.style.overflow = 'scroll';
	//document.body.style.marginRight='0px';
	} 

function ResizePopup(PopHeight,PopWidth)
	{
	parent.getObj("FramePopSite").height=PopHeight;
	parent.getObj("FramePopSite").width=PopWidth;
	}
function OpenPopupRel(url, height, width)
{
	/*if (document.location.href.indexOf("diagnosed_with_as") >= 0 
		|| document.location.href.indexOf("living_with_as") >= 0)
		url = "../" + url;*/
	OpenPopup(url, height, width);
}

function OpenDove() 
{
	OpenPopupRel('dove-sono-associazioni-pazienti-sul-territorio.jsp','420','635');
}


function OpenRecords() 
{
	OpenPopupRel('include/records.jsp','241','638');
}

function OpenTracking() 
{
	OpenPopupRel('include/symptom_tracking.jsp','398','638')
}

function OpenLocator() 
{
	OpenPopupRel('include/locator.jsp','480','638')
}

function OpenLogin() 
{
	OpenPopupRel('include/login.jsp','339','638')
}



function leaveSite(site) {

  if (confirm("State abbandonando il sito www.viverelacoliteulcerosa.it. Le informazioni contenute nel nuovo sito prescelto possono non essere conformi con il DLvo 219/06 che regola la pubblicit\340 sui medicinali per uso umano e  Schering Plough non \350 responsabile delle opinioni espresse e dei contenuti del nuovo sito che non riflettono necessariamente le posizioni dell'Azienda, n\350 sono da essa avallate. ") == 1) {

  window.open(site, 'perceptions','toolbar=yes,width=600,height=400,location=yes,status=yes,scrollbars=yes,resizable=yes,menubar=yes')
     //window.open(site)
  }
}




