/*****************************************************
* SET OF JAVASCRIPT MODULES USED IN THE FISV.org SITE
*   - initialised: 12oct2004
*   - last update:
*                                                 pjm
*****************************************************/

/**************************************************************
* Function to determine max available height for MainContent...
*  >>> TO BE USED IN STANDARD PAGES
*  ... also fixes the HEIGHT (and, in FF, the WIDTH) of the CONTENTS DIV
*  ... 
**************************************************************/
function setSizes(){
//document.write("Test!!!");
if( typeof( window.innerWidth ) == 'number' )
	{ h = window.innerHeight; }
else if( document.documentElement && ( document.documentElement.clientHeight ) ) 
	{ h = document.documentElement.clientHeight; }
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
	{ h = document.body.clientHeight; } 
var e =document.getElementById("ENP2006_main_content");
// Make sure that people with very big screens see something nice...
if ( h > 1000)
	{
	var myURL = document.location.href ;
	var myPage = myURL.substring(myURL.lastIndexOf("\/")+1,myURL.length) ;
	// Add relevant pages here (in some cases one can let the content flow as much as possible)
	if ( myPage == 'index.php')
		{
		h = 1000;
		} 
	}
if (document.all)	// Microsoft DOM code
	{ e.style.height = h -114+"px";
	document.getElementById("ENP2006_contents").style.height = h -133+"px"; 
	} else 
	{ e.style.minHeight= h -112+"px";
	document.getElementById("ENP2006_contents").style.height = h -136+"px"; 
	document.getElementById("ENP2006_contents").style.width = 572+"px";
	}
document.getElementById("ENP2006_footer").style.border = 0+"px";
} // END of function setSizes()

function setSizesProgramme(){
//document.write("Test!!!");
if( typeof( window.innerWidth ) == 'number' )
	{ h = window.innerHeight; }
else if( document.documentElement && ( document.documentElement.clientHeight ) ) 
	{ h = document.documentElement.clientHeight; }
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
	{ h = document.body.clientHeight; } 
var e =document.getElementById("ENP2006Programme_main_content");
// Make sure that people with very big screens see something nice...
if ( h > 1000)
	{
	var myURL = document.location.href ;
	var myPage = myURL.substring(myURL.lastIndexOf("\/")+1,myURL.length) ;
	// Add relevant pages here (in some cases one can let the content flow as much as possible)
	if ( myPage == 'index.php')
		{
		h = 1000;
		} 
	}
if (document.all)	// Microsoft DOM code
	{ e.style.height = h -114+"px";
	document.getElementById("ENP2006Programme_contents").style.height = h -133+"px"; 
	} else 
	{ e.style.minHeight= h -112+"px";
	document.getElementById("ENP2006Programme_contents").style.height = h -136+"px"; 
	document.getElementById("ENP2006Programme_contents").style.width = 572+"px";
	}
document.getElementById("ENP2006_footer").style.border = 0+"px";
} // END of function setSizesProgramme()


/*****************************************************
* Function to open External Link with link-back...
*****************************************************/
function OpenExtLink(ExtLink){

	var winName  = 'ExternalWindow'; 
//	var height = screen.Height - 150; 
//	var width = screen.Width - 10; 
//	var features = 'width='+width+',height='+height+',toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,screenX=0,screenY=0,left=0,top=0'; 

	window.open("/ExternalFrame.shtml?" + ExtLink, winName);
//	window.open("/ExternalFrame.shtml?" + ExtLink, winName, features);
	}

