	var w1 = null, is_nav = 0, is_nav3 = 0, is_nav4 = 0, is_nav4up = 0, is_ie  = 0;       
	var is_ie3 = 0, is_ie4 = 0, is_ie4up = 0, is_ie5 = 0, is_ie5up = 0;
		
	function DetermineBrowserTypeVersion()
	{
	   var agt=navigator.userAgent.toLowerCase(); 
			   
	   // Note: On IE5, these return 4, so use is_ie5up to detect IE5. 
	   var is_major = parseInt(navigator.appVersion); 
	   var is_minor = parseFloat(navigator.appVersion); 
	

	   // Navigator Checks
	   is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('compatible') == -1)); 
       if( is_nav )
	   {
         is_nav3 = (is_nav && (is_major == 3)); 
         is_nav4 = (is_nav && (is_major == 4)); 
         is_nav4up = (is_nav && (is_major >= 4)); 
	   }
	
	   // IE Checks
	   is_ie   = (agt.indexOf("msie") != -1); 				
	   if( is_ie )
	   {
	     is_ie3  = (is_ie && (is_major < 4)); 
         is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) && (agt.indexOf("msie 6.0")==-1)); 
         is_ie4up  = (is_ie  && (is_major >= 4)); 
         is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1)); 
         is_ie5up  = (is_ie  && !is_ie3 && !is_ie4); 	
	   }
	}
						
	function CreateSatellite( theURL, name, width, height, pos, options )
	{	
		
		DetermineBrowserTypeVersion();
		// Different Browsers have different ways to get the 
		// position and size of the browser window.
		if( is_nav4up && pos == "center" )
		{
		 	var x = window.screenX;
    	  	var y = window.screenY;
		  	var w = window.outerWidth;
		  	var h = window.outerHeight;
		  	var midx = x + (w - width)/2; 
		  	var midy = y + (h - height)/2; 	
			w1 = window.open( theURL, name, "left=" + midx + ",top=" + midy + ",height="+ height + ",width=" +  width + options );
		}else if( is_nav4up && pos == "topright" )
		{
		 	var x = window.screenX;
    	  	var y = window.screenY;
		  	var w = window.innerWidth;
		  	var rightx = x + (w - width); 
		  	var topy = y + ( window.outerHeight - window.innerHeight ); 	
			w1 = window.open( theURL, name, "left=" + rightx + ",top=" + topy + ",height="+ height + ",width=" +  width + options );
		}else if( is_ie5up && pos == "center" ) 
		{
			var x = window.screenLeft;
         	var y = window.screenTop;
			var w = document.body.clientWidth;
		 	var h = document.body.clientHeight;
			var midx = x + (w - width)/2; 
			var midy = y + (h - height)/2; 	

			// Next bit forces IE5 to give focus and display the window in the correct position
		  	if( w1 != null && !w1.closed ){w1.close(); w1 = null;}			    
   		      
			w1 = window.open(theURL, name, "left=" + midx + ",top=" + midy + ",height="+ height + ",width=" +  width + options );
		}else if( is_ie5up && pos == "topright" ) 
		{
			var x = window.screenLeft;
         	var y = window.screenTop;
			var w = document.body.clientWidth;
		 	var h = document.body.clientHeight;
			var rightx = x + (w - width); 
			var topy = y; 	

			// Next bit forces IE5 to give focus and display the window in the correct position
		  	if( w1 != null && !w1.closed ){w1.close(); w1 = null;}			       		      
			w1 = window.open(theURL, name, "left=" + rightx + ",top=" + topy + ",height="+ height + ",width=" +  width + options );
		}else{  
		    // Older browsers can't determine browser window pos/size and IE4 has probs
		    // closing and re-opening a window  	      
			w1 = window.open(theURL, name, "height="+ height + ",width=" +  width + options );
		}
		w1.focus();
		return w1;
	}

	function LaunchTocWindow(theURL, theWindowName)
	{
		var options = ",location=no,menubar=no,resizable=yes,status=no,toolbar=no,copyhistory=no,directories=no,scrollbars=yes";
		var w = 475, h = 460;		
		CreateSatellite( theURL, theWindowName, w, h, "topright", options );
	}

	
	function back2main(url) 
	{
		// Make sure the main window hasn't been closed accidentally.
		if(opener && !opener.closed)
		{
		    	opener.location.replace(url);
		}
		else
		{
			var	sOptions = ",location=yes,menubar=yes,resizable=yes,status=yes,toolbar=yes,copyhistory=yes,directories=yes,scrollbars=yes";
			var	nWidth	= 800;
			var	nHeight	= 600;		
			opener = CreateSatellite(url, "", nWidth, nHeight, "center", sOptions);
			opener.opener = null;
		}
	}
	
	//es/pi.gif" BORDER="0" ALT="View article PDF">&nbsp\;<A HREF="htxview?template=basic.htx&content=ftimage_pqf_frameset.htx&action=ShowImage&from=som&XXX_SESSION_FILE_XXX&multi=Y&body=pdf|&page=1
	function pdfWindow(url) {
		CreateSatellite(url,"pdfWindow",800,600,"center",null);
	}
	
	//function pdfWindow(id,product) {
	//	var url = "http://proquest.umi.com/pqdlink?Ver=1&Exp=11-27-2008&REQ=1&Cert=PgNeliQ5TUDNZ%2feZ8mFqm4gYEqV2c5z7C6DtJhXesyrwV14CxCoz6kbdYhk04aMy&DID=";
	//	url += id;
	//	url += "&Fmt=page&Qty=regular&IE=x.pdf&session=0&product=";
	//	url += product;
	//	CreateSatellite(url,"pdfWindow",800,600,"center",null);
	//}

	function fnRefWorks(sURL)
	{
		var	sDomain	= stringReplace(document.location.host, "private.", "");
		var	sTemp = 'http://www.refworks.com/express/ExpressImport.asp?vendor=ProQuest&url=http://' + sDomain + '%2Fcgi%2Fsearch%3F' + escape(sURL);
		CreateSatellite(sTemp, 'RefWorks',800,600,"center",null);
	}
	
	function addWindowOpens()
	{
		if (!document.getElementsByTagName) return false;
		var links = document.getElementsByTagName("a");
		for (var i=0; i < links.length; i++) {
			if (links[i].className && links[i].className.match("popUp")) {
				hideSpan = document.createElement('span');
				hideSpan.className = 'hiddenText';
				hideText = document.createTextNode(' - this link will open in a new window');
				hideSpan.appendChild(hideText);
				links[i].setAttribute("title", "This link will open in a new window");
				links[i].appendChild(hideSpan);
			}
			// attributes if single page only, e.g. end session - named 'PopUp1'
			if (links[i].className && (' ' + links[i].className + ' ').indexOf(' popUp1 ') != -1) {
				links[i].onclick = function() {
					window.open(this.href,'PopUp1','menubar=yes,resizable=yes,status=yes,width=480,height=320');
					return false;
				}
			} 
			// attributes for multiple page Help popup - named 'PopUpHelp'
			else if (links[i].className && (' ' + links[i].className + ' ').indexOf(' popUpHelp ') != -1) {
				links[i].onclick = function() {
					window.open(this.href,'PopUpHelp','toolbar=yes,menubar=yes,resizable=yes,status=yes,scrollbars=yes,width=500,height=480');
					return false;
				}
			} 
			// attributes for any other multiple page popup - named 'PopUpMulti'
			else if (links[i].className && (' ' + links[i].className + ' ').indexOf(' popUpMulti ') != -1) {
				links[i].onclick = function() {
					window.open(this.href,'PopUpMulti','toolbar=yes,location=1,menubar=yes,resizable=yes,status=yes,scrollbars=yes,width=500,height=480');
					return false;
				}
			}
		}
	}

	
	
	function fnWriteMuseLink(sSubs, sCollections, sURL)
	{		
		if (sURL == '') { return; };
		
		if (isSubscribedTo(sSubs, sCollections)) {
			//document.write('MUSE');
			document.write('&nbsp;&nbsp;<IMG SRC="/images/muse.gif" BORDER="0"' +
						   ' ALT="Full Text from Project MUSE">&nbsp;<A TARGET="_blank"' +
						   ' HREF="' + sURL + '" class="popUpMulti">Full Text from Project MUSE</A>');
		}
		
	}
	
	function isSubscribedTo(sSubs, sColls)
	{
		//alert(sSubs + " " + sColls);
		
		if (sSubs == '') { return false; };
		if (sColls == '') { return false; };
		 
		var rexp = /:+/;
		var subsArray = sSubs.split(rexp);			
		for (var i = 0; i < subsArray.length; ++i) {
			if (subsArray[i]!= ''){//fixes bug in firefox
				if (sColls.indexOf(subsArray[i]) > -1) {
					return true;
				}
			}
		}
		
		return false;
	}
	
	function fulltextLinking(sSubs)
	{
				
		if (sSubs == '') { return false; };		
		 
		var rexp = /:+/;
		var subsArray = sSubs.split(rexp);			
		for (var i = 0; i < subsArray.length; ++i) {
			if (subsArray[i]!= ''){
				return true;
			}
		}
		
		return false;
	}
	
	// setStyleByClass: given an element type and a class selector,
	// style property and value, apply the style.
	// args:
	//  t - type of tag to check for (e.g., SPAN)
	//  c - class name
	//  p - CSS property
	//  v - value
	
	function setStyleByClass(t,c,p,v){
		var elements;
		var ie = (document.all) ? true : false;
		if(t == '*') {
			// '*' not supported by IE/Win 5.5 and below
			elements = (ie) ? document.all : document.getElementsByTagName('*');
		} else {
			elements = document.getElementsByTagName(t);
		}
		for(var i = 0; i < elements.length; i++){
			var node = elements.item(i);
			for(var j = 0; j < node.attributes.length; j++) {
				if(node.attributes.item(j).nodeName == 'class') {
					if(node.attributes.item(j).nodeValue == c) {
						eval('node.style.' + p + " = '" +v + "'");
					}
				}
			}
		}
	}

	
	

