function showIframePlugin(opt)
{	
	var src=plug_base+"&pAppl=EEPLMOD&pSession="+plug_sess+"&pTimeStamp="+plug_tstamp+"&runOptions=Domain:"+plug_domain+",Portale:"+plug_portale+","+opt;	
	var arr_dimension=getPageSizeWithScroll();
	scrollwidth=getScrollBarWh();
	divwidth=eval(arr_dimension[0]-scrollwidth);
	divheight=arr_dimension[1];	
	divpluginwidth=960;
	divpluginheight=750;
	pluginwidth=960;
	pluginheight=720;
	divcontrolheight=30;
	screenheight=getScreenHeight();
	scrollHeight=f_scrollTop();
	(screenheight>divpluginheight)?	divplugin_top=(screenheight-divpluginheight)/2 : divplugin_top=22;
	
	divplugin_top=divplugin_top+scrollHeight;
	(divwidth>divpluginwidth)? divplugin_left=(divwidth-divpluginwidth)/2 : divplugin_left=10;
	
	
	//document.getElementById("hideall").style.width=divwidth+"px";
	document.getElementById("hideall").style.height=divheight+"px";
	document.getElementById("hideall").style.height=divheight+"px";	
	document.getElementById("hideall").style.display="block";
	
	
	document.getElementById("eeanagplugin").style.width=divpluginwidth+"px";
	document.getElementById("eeanagplugin").style.height=divpluginheight+"px";	
	document.getElementById("eeanagplugin").style.top=divplugin_top+"px";
	document.getElementById("eeanagplugin").style.left=divplugin_left+"px";
		//document.getElementById("eeanagplugin").innerHTML="<div style='width:"+divpluginwidth+"px;height:"+divcontrolheight+"px'><p align=right><a href='javascript:exitpluginiframe(2)'>esci</a></p></div><iframe src="+src+" style='width:"+pluginwidth+"px;height:"+pluginheight+"px' frameborder=0></iframe>";
	document.getElementById("eeanagplugin").innerHTML="<iframe src="+src+" style='width:"+pluginwidth+"px;height:"+pluginheight+"px' frameborder=0></iframe>";
	document.getElementById("eeanagplugin").style.display="block";	
}
function exitpluginiframe(param, status)
{
	doredirect=false;	
	switch (param)
	{
		case 1:
			doredirect=true;
			break;
		case 2:
			doredirect=false;
			break;
		default:			
			break;
	}	
	if (doredirect)
	{					
		mylocation=document.location;
		newlocation=mylocation.toString().substring(0, mylocation.toString().indexOf("?"));		
		try
		  {					  
			  document.location=newlocation;
		  }
		catch(err)
		  {
			  
		  }				
	}
	else
	{		
		//if (status)
		//{
			document.getElementById("eeanagplugin").style.display="none";
			document.getElementById("hideall").style.display="none";
			document.getElementById("eeanagplugin").innerHTML="";
			refreshpage();
		//}
	}	
	
}
function getScreenHeight() {
  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;
  }
  return myHeight;
}
function getPageSizeWithScroll(){
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
  	}
	arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );
	return arrayPageSizeWithScroll;
}
function getScrollBarWh () {
	var inner = document.createElement('p');
	inner.style.width = "100%";
	inner.style.height = "200px";

	var outer = document.createElement('div');
	outer.style.position = "absolute";
	outer.style.top = "0px";
	outer.style.left = "0px";
	outer.style.visibility = "hidden";
	outer.style.width = "200px";
	outer.style.height = "150px";
	outer.style.overflow = "hidden";
	outer.appendChild (inner);

	document.body.appendChild (outer);
	var w1 = inner.offsetWidth;
	outer.style.overflow = 'scroll';
	var w2 = inner.offsetWidth;
	if (w1 == w2) w2 = outer.clientWidth;

	document.body.removeChild (outer);

	return (w1 - w2);
};
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}




