var toggleHistory = new Array();

function toggleExpandableImage( id ){
	teiObj = document.getElementById( id );

	teiObj.style.display = ( teiObj.style.display == "block" ? "none" : "block" );
	
	toggleHistory.push( id );
}

function printPage(){
	for( i=0 ; i < toggleHistory.length ; i++ ){
		if( teiObj.style.display == "block" ) teiObj.style.display = "none";
	}
	
	window.print();
}

function openPopupWindow(strURL, intWidth, intHeight, strPopupOptions)
{	
	var today = new Date();
	
	var timestamp = today.getTime();

	window.open(strURL,timestamp,"width="+intWidth+",height="+intHeight+","+strPopupOptions);
}

function wPop(url,winName,wWidth,wHeight,scrll)
{
	var scrollB;
	if(!scrll)
	{
		scrollB='no';
		var pWidth=wWidth;
	}
	else
	{
		scrollB=scrll;
		wWidth=parseInt(wWidth)+20;
	}
	var iMyWidth;
	var iMyHeight;
	wHeight=wHeight+12;
	//Added twelve pixels to ALL popup heights to compensate for newer/larger popup header logo. 
	iMyWidth = (window.screen.width/2)-(wWidth/2+10);
	//half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight=(window.screen.height/2)-(wHeight/2+15);
	//half the screen height minus half the new window height (plus title and status bars).
	var zWin=window.open(url,winName,"status=no,width="+wWidth+",height="+wHeight+",resizable=no,left="+iMyWidth+",top="+iMyHeight+",screenX="+iMyWidth+",screenY="+iMyHeight+",scrollbars="+scrollB);
	zWin.focus();
}