
/************************************************************
NewPages(toc,disp)

This function will replace the page in the table of contents frame, 
the page in the display frame or both with pages found at the desired urls.
Tho call this function from a page on the CSUN server, call from top.uheader. 
To call this function from a page on the irqry server call it ftom top.vstor.

inputs:

toc - the url for the table of contents.  If this isa n empty string or equal to 'NONE' 
then the table of contents frame will not be replaced.

disp - the url for the display.  If this is an empty string or equal to 'NONE' 
then the tdisplay frame will not be replaced.


************************************************************/
function NewPages(toc,disp,dest){
	var getparms = "";
	getparms = getparms + "?SERVER=" + encodeURIComponent(top.irtoc.location.host);
	getparms = getparms + "&PORT=" + encodeURIComponent(String(top.irtoc.location.port));
	getparms = getparms + "&BROWSER=" + encodeURIComponent(top.irtoc.navigator.appName);
	getparms = getparms + "&BROWVER=" + encodeURIComponent(top.irtoc.navigator.appVersion);
	getparms = getparms + "&BROWSERUA=" + encodeURIComponent(top.irtoc.navigator.userAgent);
	getparms = getparms + "&SCREENHT=" + encodeURIComponent(String(screen.height));
	getparms = getparms + "&SCREENWD=" + encodeURIComponent(String(screen.width));
	getparms = getparms + "&TOC=" + encodeURIComponent(toc);
	getparms = getparms + "&DISP=" + encodeURIComponent(disp);
	if(arguments.length == 3){
	  getparms = getparms + "&DEST=" + encodeURIComponent(dest);	
	}
	getparms = getparms + "&CURRTOC=" + encodeURIComponent(String(top.irtoc.location.href));
	top.wbtrack.location = "http://irqry.csun.edu:8080/openweb/wbtrack1.jsp" + getparms;	
        if((toc != 'NONE')&&(toc != '')){
          top.irtoc.location = toc;
	}
        if((disp != 'NONE')&&(disp != '')){
           top.irdisp.location = disp;
        }
	
      return true;
}
/******************************************************************************
PrinterFriendly(disp,dest)

This function will open a window containing the document to be printed as well as sending
information to the webtracker.

disp - the url for the print window.

dest -  the description if the users desitnation for the tracking system.

******************************************************************************/
function PrinterFriendly(disp,dest){
	var hpix =  Math.round(screen.height * 0.7);
	var wpix = Math.round(screen.width * 0.7);
	var winparms = "toolbar=yes,menubar=yes,outerHeight="+ String(hpix) + ",outerWidth=" +  String(wpix);
	var getparms = "";
	getparms = getparms + "?SERVER=" + encodeURIComponent(top.irtoc.location.host);
	getparms = getparms + "&PORT=" + encodeURIComponent(String(top.irtoc.location.port));
	getparms = getparms + "&BROWSER=" + encodeURIComponent(top.irtoc.navigator.appName);
	getparms = getparms + "&BROWVER=" + encodeURIComponent(top.irtoc.navigator.appVersion);
	getparms = getparms + "&BROWSERUA=" + encodeURIComponent(top.irtoc.navigator.userAgent);
	getparms = getparms + "&SCREENHT=" + encodeURIComponent(String(screen.height));
	getparms = getparms + "&SCREENWD=" + encodeURIComponent(String(screen.width));
	getparms = getparms + "&TOC=" + encodeURIComponent("NONE");
	getparms = getparms + "&DISP=" + encodeURIComponent(disp);
        getparms = getparms + "&DEST=" + encodeURIComponent(dest);	
	getparms = getparms + "&CURRTOC=" + encodeURIComponent(String(top.irtoc.location.href));
	top.wbtrack.location = "http://irqry.csun.edu:8080/openweb/wbtrack1.jsp" + getparms;	
	window.open(disp,"printable",winparms,true);        
}
function setFocus()
{
//document.getElementById("top.irtoc.skip").focus()
//window.parent.oFrame1.secondButton.setActive();
top.irtoc.setActive();	
}

