

//Sentius corp.
//rl_viewer1.js
//06/18/01
//last modified by Brett Conklin
//Modified 09/5/01


//Viewer Configuration varibles should be configured by customer. 
var RL_window_width = "width=470";
var RL_window_height = "height=290"


var RL_window_locationbar = "locationbar=no";
var RL_window_menubar = "menubar=no";
var RL_window_personalbar = "personalbar=no";
var RL_window_scrollbar ="scrollbar=no";
var RL_window_statusbar= "statusbar=no";
var RL_window_toolbar = "toolbar=no";
var RL_window_resize = "resize=no";
var RL_winName = "RLpopup";
var RL_status_message = "Click For RichLink";


//Mouse stuff and global varibles should not be edited. 
var IE=document.all?true:false
var RL_tempX=0;
var RL_tempY=0;
var RL_window_positionX="";
var RL_window_positionY="";
var RL_window_up=null;
var app = navigator.appName;
var posvalue;
var RL_dynamic_on="1";
var RL_winNum=1;



if(!IE){document.captureEvents(Event.MOUSEMOVE)}
                document.onmousemove = RL_getMouseXY;

//rl_window function 
function rl_window(RL_viewer,posid){
	if(!IE){document.captureEvents(Event.MOUSEMOVE)}
                document.onmousemove = RL_getMouseXY;
RL_x = RL_window_positionX;
RL_y = RL_window_positionY;

	if(RL_y >= (screen.availHeight-290)){
        	RL_y=screen.availHeight-320;
		
        }
  	if(RL_x >= screen.availWidth-470){
        	RL_x=screen.availWidth-480;
        }


		RL_window_features = RL_window_resize+","+RL_window_height+","+RL_window_width+","+RL_window_menubar+",screenx="+RL_x+",screeny="+RL_y+",left="+RL_x+",top="+RL_y;
		if(!RL_window_up || RL_window_up.closed){
			RL_window_up=window.open(RL_viewer,RL_winName,RL_window_features);
			document.returnValue=false;
			RL_window_up.focus();
		}//end of if testing if window is up
		else{
			RL_window_up.close();
			RL_window_up=window.open(RL_viewer,RL_winName+(RL_winNum++),RL_window_features);
			document.returnValue=false;
			RL_window_up.focus();
		}//end of else 
		document.returnValue=false;
		posvalue = posid;
		RL_window_positionY="";
		RL_window_positionX="";
		if(!IE){document.captureEvents(Event.MOUSEMOVE)}
                document.onmousemove = RL_getMouseXY;

}//end of rl_window

//return the posvalue
function rl_posid(){
	return posvalue;
}//end of rl_posid


function RL_getMouseXY(e) {
  if(IE) { // grab the x-y pos.s if browser is IE
    tempX = event.screenX;
    tempY = event.screenY;
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.screenX;
    tempY = e.screenY;
  }  
  // catch possible negative values in NS4
  if (tempX < 0){
  	tempX = 0;
  	}
  if (tempY < 0){
  	tempY = 0;
	}  
  RL_window_positionX = tempX;//+30;
  RL_window_positionY = tempY;//+153;
  return true;
}//end of RL_getMouseXY

//grab the mouse position at load might not be needed. 
function RL_OnLoad(){
	if (!IE){ document.captureEvents(Event.MOUSEMOVE)}
		document.onmousemove = RL_getMouseXY;
}//end of RL_OnLoad function 

//rl_close fucntion used to 
function rl_close(){
	if(RL_window_up && !RL_window_up.closed && RL_window_up.open) 
		{
			RL_window_up.close();
		}
}//end of rl_close

function rl_update_window() { }


