/*

$RCSfile: phrcMain.js,v $ 
$Author: lifted $  
$Date: 2001/01/09 23:19:02 $  
$Locker:  $ 
$Revision: 1.3 $ 

summary
- - - - -


terminology
- - - - - - -


methods
- - - - - - -


notes
- - - - - - -


*/

domCompat = false;

if (document.getElementById != null) domCompat = true;

if (domCompat != true) 
	{
	alert("An error has occured.\n\nYou are being routed to the PHRC Front Page.\n\nThe PHRC would like to apologise for this error.\n\nIf this error persists please email help@phrconline.org");

	document.location = "http://www.phrconline.org/"
		
	}



function initialize()
	//runs at onload of window
	{
	
	obj = document.getElementById("navTop")
	obj.style.top = 75; //fixes a bug in the clipping animation
	
	phrcScreen = new screenObject(); 
	if (document.getElementById("articleBody") != null) initArticle();	  //lays out the article in columns(if one exists)
	userEventsInit(); //set up all user events
	//if document.onclick = eventHideMenu; //hides menus when the body is clicked on !! not needed anymore !!
	
	document.onmousemove = mousePosition; //moz
	
	windowTimer = setInterval("placeNavBar()",20);
	
	window.onresize = windowResize;

//	initClippings(); //initialize clippings
	}
	

function closePage()
	{
	saveClippings();
	}

function displayFix()
	//in IE there is a bug will cause some elements to not draw on screen when the user uses the back button
	//the below fixes that problem by forcing the page to redraw
	{
	document.getElementById("bodyNode").style.display = "block"
	}	

window.onload = displayFix;

//
// going to load the window by a script call at the bottom of the page
// hopefully this will help speed up the page and not require images to load
// for the scripts to start
//

window.onunload = closePage;
/* Browser Fixes */

if (document.all) classFix = "className";
else classFix = "class"
