<!-- // Begin
/*------------------------------------------------------------
	SpeedSearch v1.2
	
	Written by LightSpeed Technology
		- Jeff Garirson [jgarrison@studylight.org]
	
	Copyright © StudyLight.org
	Created by the New Media Department
	Created: 01/18/01  /  Last update: 11/28/02
	
	Concepts and ideas originated from the THE JAVASCRIPT
						   SOURCE
	
	PC-Tested for 
		- Internet Explorer 4.0, 5.0, 5.5, 6.01b
		- Netscape 6.01
	MAC-Tested for 
		- Netscape 6.01
	
	****************************************************
		IF YOU DON'T KNOW WHAT YOU ARE DOING
		THEN DON'T DO IT.
		.................. PLEASE CLOSE IMMEDIATELY!
	****************************************************
------------------------------------------------------------*/

var trans = document.network.tr.value ;
self.name = "MainWindow" ;

var wide = (document.all) ? (screen.AvailWidth - 270) : (screen.width - 270) ;
var high = (document.all) ? screen.AvailHeight : (screen.height - 24) ;

function newsite(load) {
	wide = (document.all) ? (screen.AvailWidth - 360) : (screen.width - 360) ;
	msg = window.open("","results","scrollbars=yes,toolbar=no,width=350,height=600,left=" + wide + ",top=0") ;
	if (navigator.appVersion.indexOf("2.0") != -1 || navigator.appVersion.indexOf("(X11") != -1 || navigator.appVersion.indexOf("(Mac") != -1) {
		msg = window.open("","results","scrollbars=yes,toolbar=no,width=350,height=600,left=" + wide + ",top=0") ;
	   }
	msg.location.href = load ;
	setTimeout('msg.focus()', 100) ;
   }

function display(e) {
	if (document.getSelection) {
		var str = document.getSelection() ;
		var altclick = e.altKey ? e.altKey : e.modifiers & Event.ALT_MASK ;
		var ctlclick = e.ctrlKey ? e.ctrlKey : e.modifier & Event.CONTROL_MASK ;
	   } else if (document.selection && document.selection.createRange) {
		var range = document.selection.createRange() ;
		var str = range.text ;
		var altclick = window.event.altKey ;
		var ctlclick = window.event.ctrlKey
	   } 

	if (str > '' && ctlclick) {
		alert("I am sorry but this feature\nhas not been implimented just yet!") ;
	   }

        if (str > '' && altclick) {
		self.moveTo(0,0) ;
		self.resizeTo(800,high) ;
		newwin = window.open("/cgi-bin/search.cgi?query="+str+"&tr="+trans, "dictionary", "scrollbars=yes,toolbar=no,width=260,height=600,left=" + wide + ",top=0");
		newwin.focus() ;
           }
        return true ;
   }

function PopUp(url,name,width,height,center,resize,scroll,posleft,postop) {
	if (posleft != 0) { X = posleft }
	if (postop  != 0) { Y = postop  }

	if (!scroll) { scroll = 'no' }
	if (!resize) { resize = 'no' }

	if ((parseInt (navigator.appVersion) >= 4 ) && (center)) {
		X = (screen.width  - width ) / 2;
		Y = (screen.height - height) / 2;
	   }

	if (scroll > 0) { 
		scroll = 'yes' ;
	   } else {
		scroll = 'no' ;
	   }

	var extra = 'width='+width+',height='+height+',top='+Y+',left='+X+',resizable='+resize+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no';
	window.open( url, name, extra ) ;
   }

if (window.Event) {
	document.captureEvents(Event.MOUSEUP) ;
   }
document.onmouseup = display ;

//  End -->
