<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- <link rel="stylesheet" type="text/css" href="../include/LPS.css"> -->
<style type="text/css">
<!--
.textarea { font-family: Arial, Helvetica, sans-serif; font-size: x-small; font-style: normal; line-height: normal; color: #000066; background-color: #CCCCCC; letter-spacing: normal; text-align: left; vertical-align: baseline; word-spacing: normal; white-space: normal; left: 10pt; top: 5px; clip: rect( ); background-image: url(Images/bgmeas3.gif)}
.template { font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-style: normal; line-height: normal; font-weight: bold; font-variant: small-caps; text-transform: none; color: #000000; background-color: #FFCCCC}
-->
</style>
<STYLE>
#contextMenu {
position: absolute;
visibility: hidden;
width: 120px;
background-color: lightgrey;
layer-background-color: lightgrey;
border: 2px outset white;
}
.A:Menu {
color: black;
text-decoration: none;
background-color: darkblue;
cursor: default;
width: 100%
}
.A:MenuOn {
color: white;
text-decoration: none;
background-color: darkblue;
cursor: default;
width: 100%
}
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
var Xcoord, Ycoord;
var isNav, isIE;
var menu;
//-
//- Check for the key stroke event looking for the "{" key.
//-
function showMenu (evt) {
// alert("made it to showMenu"

;
if (document.all) {
//alert("in document.all"

;
//document.all.contextMenu.style.pixelLeft = event.clientX;
//document.all.contextMenu.style.pixelTop = event.clientY;
document.all.contextMenu.style.pixelLeft = Xcoord;
document.all.contextMenu.style.pixelTop = Ycoord;
document.all.contextMenu.style.visibility = 'visible';
return false;
}
else if (document.layers) {
if (evt.which == 3) {
alert("in evt.which 3"

;
// djm -- document.contextMenu.left = evt.x;
// djm -- document.contextMenu.top = evt.y;
document.contextMenu.left = Xcoord;
document.contextMenu.top = Ycoord
document.contextMenu.onmouseout =
function (evt) { this.visibility = 'hide'; };
document.contextMenu.visibility = 'show';
return false;
}
}
return true;
}
//-
//- Well, I guess this is fall through logic for now.
//-
if (document.all)
{
document.oncontextmenu =showMenu;
} // end of document.all
if (document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = showMenu;
}// end of document.layers
//-
//- Check for the key stroke event looking for the "{" key.
//-
function PasteIt(id)
{
//-
//- for through the loop
//-
for (var i = 0; i < document.anchors.length; i++) // was links
{
if (i == id)
{
document.letter_form.pasteText.value = document.anchors
.name;
var Range1 = document.letter_form.pasteText.createTextRange();
} // end if the for nteger is equal to id number passed.
} // end for statement through anchors collection.
Range1.execCommand("Copy"
;
//-
//- set the range and paste the button contents at the offset
//- set by the user.
//-
//for (i=0;i< parent.frames.length;i++)
//{
//alert("text ["+parent.frames.name+"]" );
//if (parent.frames.name == "mainFrame"
//{
// Range = parent.frames.letter_form.txt_letter_text.createTextRange();
//}
//}
//window.clipboardData.setData("Text", pasteText);
//btnRange.execCommand("Copy"
;
Range = document.letter_form.mytextarea.createTextRange();
//Range.select();
offsetX = Xcoord;
offsetY = Ycoord;
Range.moveToPoint(offsetX,offsetY);
alert("Range.length ["+Range.length+"]"
;
for (var i=0; i > Range.length; i++)
{
alert("i ["+i+"]"
;
}
//Range.expand("word"
;
//Range.select();
//Range.collapse(false);
Range.execCommand("Paste"
;
document.onkeypress = null;
return false; // do not submit the form
}// end of function
//-
//- when the user sets the mousedown event in the textarea... grab the
//- X and Y coordinates.
//-
function setXY()
{
Xcoord = window.event.x;
Ycoord = window.event.y;
}
//-
//- Check for the key stroke event looking for the "{" key.
//-
function checkKey(evt)
{
if (isNav)
{
theBtnOrKey = evt.which;
} // end of if isNav
if (window.event.srcElement.type == "textarea"
{
//alert("window.event.KeyCode " + window.event.keyCode);
if (window.event.keyCode == 123) // check for "{" keystroke
{
//alert("window.event.KeyCode " + window.event.keyCode);
if (document.all)
{
Xcoord = window.event.x;
Ycoord = window.event.y;
document.onkeypress = showMenu;
} // end of if document.all
if (document.layers)
{
//alert ("made it 2"
;
document.captureEvents(event.KEYPRESS);
document.onkeypress = showMenu;
} // end of document.layers
} // end of window.event.keyCode
} // end of window.event.srcElement.type
} // end of function
</SCRIPT>
</head>
<body>
<form name="letter_form">
<INPUT type="hidden" name="pasteText" value="">
<!-- ONMOUSEOUT="menu = this; this.tid = setTimeout ('menu.style.visibility = \'hidden\'', 20);" onmouseover="clearTimeout(this.tid);" -->
<textarea id="mytextarea" class="textarea" onmousedown="setXY();" onkeypress="checkKey(event);" cols="90" rows="20" wrap="hard" ></textarea>
<DIV ID="contextMenu"
ONMOUSEOUT="menu = this; this.tid = setTimeout
('menu.style.visibility = \'hidden\'', 20);"
ONMOUSEOVER="clearTimeout(this.tid);"
>
<A NAME="{ACCOUNT_NUMBER}"; HREF="{ACCOUNT_NUMBER}"; ID=0; CLASS="menu"
ONMOUSEOVER="this.className = 'menuOn'"
ONMOUSEOUT="this.className = 'menu';"
ONCLICK="return PasteIt(0);"
>
Account Number
</A>
<BR>
<A NAME="{ACCOUNT_DATE}"; HREF="{ACCOUNT_DATE}"; ID=1; CLASS="menu"
ONMOUSEOVER="this.className = 'menuOn'"
ONMOUSEOUT="this.className = 'menu';"
ONCLICK="return PasteIt(1);"
>
Account Date
</A>
</DIV>
</form>
</body>
</html>