/*===============================================================================
Function Name:  ChangeView
Description:  Open another window to display the pdf file and immediate change the 
			  viewed status on the screen   
Arguments:    obj-- The text object(availabe/viewed); url-- The url of the .pdf doc
Return:
History:      03/01/00 C.Ding Created 
================================================================================*/
var nIndex = 0;
function ChangeView(obj,url) 
{
	var nXRes,nYRes;
	var nWidth,nHeight,nScreenX,nScreenY;
	if(window.screen) 
	{
	   nXRes = screen.width; 
	   nYRes = screen.height;
	}
	else
	{
	   nXRes = 800;
	   nYRes = 600;
	}   
	nWidth = nXRes/2+nXRes/4;
	nHeight = nYRes/2+nYRes/4;
	nScreenX = (nXRes-nWidth)/2;
	nScreenY = (nYRes-nHeight)/2;
	//alert(nWidth+'*'+nHeight+'*'+nScreenX+'*'+nScreenY);
	nIndex = nIndex + 1  //new window's name, must be different, otherwise all the
						 //new documents will be displayed in the same window 11/24/00 C.Ding 
	if (navigator.appName == "Netscape")     
	    var hNewWindow = window.open(url,'meetingsview'+nIndex,'menubar=yes,toolbar=no,scrollbars=yes,resizable=yes,width='+nWidth+',height='+nHeight+',screenX='+nScreenX+',screenY='+nScreenY+',status=no');
	else
	    var hNewWindow = window.open(url,'meetingsview'+nIndex,'menubar=yes,toolbar=no,scrollbars=yes,resizable=yes,width='+nWidth+',height='+nHeight+',top='+nScreenX+',left='+nScreenY+',status=no');
	//bring the selected window to foreground
	hNewWindow.focus;
	if (obj != null)
		if (obj.innerText == 'Available'  )
		   obj.innerHTML = '<SMALL>Viewed</SMALL>'; 
} 
