by John D. Boverie, RDR
Although CCRA began around 1910 as CSRA (Colorado Shorthand Reporters Association), my acquaintance with CCRA began in 1964 when I became employed by the 18th Judicial District in Littleton. In those days there were only two divisions in Littleton, two in Brighton, three in Golden, and less than ten in Denver.
The CCRA membership in those days totaled less than 100. The vast majority of reporters were officials, with only a few freelance reporters.
In the fall elections of 1963, what was known as Amendment 1 passed. The effect of this amendment was to abolish what had been the old Justice of Peace court system, to merge the old county and district courts into a new unified court system, to create a new county court, and to create some 25 or so new judgeships for the new system, with the concomitant need for new staff members, especially court reporters. Originally the new county courts were allowed to either hire live reporters or to use tape recording systems. Thus, in total, some 35 new reporters were needed before the unified court system could begin July 1, 1964.
Faced with a shortage of reporters locally, Otto Ulrich, president of CSRA, and the CSRA Board of Directors started a major reporter recruitment drive, soliciting applicants from across the entire United States. Applicants came from many states.
| YEAR |
PRESIDENT |
PRESIDENT ELECT |
VICE-PRESIDENT |
SECRETARY / TREASURER |
TREASURER |
| 2011 |
Erin Valenti/Tracy Masuga |
|
Tracy Masuga |
Kathy Scheer |
|
| 2010 |
Kathy Davis |
|
Erin Valenti |
Tracy Masuga |
|
| 2009 |
Patricia Graves |
|
Kathy Davis |
Erin Valenti |
|
| 2008 |
Joyce Martin |
|
Patricia Graves |
Kathy Davis |
|
| 2007 |
Elaine Javernick |
|
Joyce Martin |
Patricia Graves |
|
| 2006 |
Carol Bazzanella |
|
Elaine Javernick |
Joyce Martin |
|
| 2005 |
Anne Hansen |
|
Carol Bazzanella |
Elaine Javernick |
|
| 2004 |
Richard Matt |
|
Anne Hansen |
Carol Bazzanella |
|
| 2003 |
Susan DeWitt |
|
Richard Matt |
Anne Hansen |
|
| 2002 |
Barbara Birger |
|
Susan DeWitt |
Mary Ann Bishop |
|
| 2001 |
Sylvia Noneff |
|
Barbara Birger |
Susan DeWitt |
|
| 2000 |
Susan Becker |
|
Sylvia Noneff |
Carla Capritta |
|
| 1999 |
Tambria Stoneberger |
|
Susan Becker |
Carla Capritta |
|
| 1998 |
Jason Meadors / Mary George / Julie Matt |
|
Tambria Stoneberger |
Susan Becker |
|
| 1997 |
Jonna Olson |
Gary Sonntag |
Donna Bufmack |
Susan Becker |
Therese Lindblom |
| 1996 |
Catherine Rodriguez |
Jonna Olson |
Carin Geist |
Pamela Andasola-Ortega |
Carin Geist |
| 1995 |
Lisa Wurst |
Catherine Rodriguez |
Jonna Olson |
Pamela Andasola-Ortega |
Carin Geist |
| 1994 |
Melanie Humphrey-Watkins |
Lisa Wurst |
Lori Porter |
Catherine Rodriguez |
Carin Geist |
| 1993 |
Jerry Malecka / Melanie Humphrey-Watkins |
Melanie Humphrey-Watkins / Lisa Wurst |
Lisa Wurst / Theresa Coffman |
Catherine Rodriguez |
Theresa Coffman / Kerry Rink |
| 1992 |
Lois Spangler Frank |
Jerry Malecka |
Greg Matt |
Melanie Humphrey-Watkins |
Theresa Coffman |
| 1991 |
Mary Harms |
Lois Spangler Frank |
Jerry Malecka |
Melanie Humphrey-Watkins |
Greg Matt |
| 1990 |
Joyce Marchetti |
Mary Harms |
|
Kathy Davis |
Greg Matt |
| 1989 |
Jason Meadors |
Joyce Marchetti |
Mary Harms |
Clydine Pabst |
Joyce Long |
| 1988 |
Julie Matt |
Jason Meadors |
Joyce Marchetti |
Kathy Davis |
Joyce Long |
| 1987 |
Karen Voepel |
Julie Matt |
Jason Meadors |
Kathy Davis |
Wesley P. Megill |
| 1986 |
Eileen Hyatt |
Karen Voepel |
Jenavie Park Brandt |
Jason Meadors |
Julie Matt |
| 1985 |
Barbara Billings |
Eileen Hyatt |
Karen Voepel |
Jason Meadors |
Barbara Wishart |
| 1984 |
Alan Agren |
Barbara Billings |
Eileen Hyatt |
Mary Jacobucci |
Wyona Taylor Brockus |
| 1983 |
Mary Smith Agren |
Alan Agren |
Barbara Billings |
Mary Jacobucci |
Barbara Wishart |
| 1982 |
Terry Rigler |
Mary Smith |
Alan Agren |
Barbara Billings |
Barbara Wishart |
| 1981 |
John Boverie |
Terry Rigler |
Mary Smith |
Bud Hogan |
William Price |
| 1980 |
Viola Lundberg |
John Boverie |
Terry Rigler |
Van G. Honeman |
William Price |
| 1979 |
Robbie Griggs |
Viola Lundberg |
John Boverie |
Mary E. Smith |
Van G. Honeman |
| 1978 |
Dee Helfrich |
Robbie Griggs |
Viola Lundberg |
Mary E. Smith |
Van G. Honeman |
| 1977 |
James Kalana |
Dee Helfrich |
Robbie Griggs |
Wes Megill |
Viola Lundberg |
| 1976 |
Gary Blando |
James Kalana |
Dee Helfrich |
|
Robbie Griggs |
| 1975 |
Marjorie A. White |
Gary Blando |
James Kalana |
Dee Helfrich |
Robbie Griggs |
| 1974 |
Earl E. Meek |
Marjorie A. White |
Gary Blando |
Ruth Dresie |
Fred Blackett |
| 1973 |
John J. Spera |
Earl E. Meek |
Marjorie Allen White |
Gary Blando |
Ruth Dresie |
| 1972 |
Gilbert I. Davenport |
John J. Spera |
Earl E. Meek |
Gary Blando |
Forrest W. Calkins |
| 1971 |
Charline Scoggin |
Gilbert I. Davenport |
Kenneth Kirkpatrick |
Dorothy Fankhouser |
John Spera |
| 1970 |
Irwin Seidman |
Jerry Lemons |
Gilbert Davenport |
Dorothy Fankhouser |
Eileen Charles |
| 1969 |
Thomas C. Rooklidge |
Irwin Seidman |
Jerry Lemons |
Beatrice Hinson |
Adrian Hogan |
| 1968 |
Fred Blackett |
Tom Rooklidge |
James P. Ford |
Yvonne Cantlin |
Perry Goldstein |
| 1967 |
Fred Blackett |
Tom Rooklidge |
Evelyn Martinez |
John Boverie |
Nan Ernst |
| 1966 |
Darlene Armbeck |
Fred Blackett |
Tom Rooklidge |
Evelyn Martinez |
Alan Agren |
| 1965 |
Bertram Naster |
Darlene Armbeck |
Dennis Slaven |
Vivien R. Spitz |
|
| 1964 |
Otto Ulrich |
Bertram Naster |
Dennis Slaven |
Darlene Armbeck |
|
| 1963 |
Lanceford Bjella |
Otto Ulrich |
Kenneth Avery, Jr. |
Dorothy Henderson (B) |
|
| 1962 |
Vivien R. Spitz |
Lanceford Bjella |
Kenneth Avery, Jr. |
Irwin Seidman |
|
| 1961 |
Tom Cavanagh |
Vivien R. Spitz |
Irwin Seidman |
Lanceford Bjella |
|
| 1960 |
Tom Cavanagh |
|
Don Weimer |
Vivien R. Spitz |
|
| 1959 |
Fred Trachte |
R. Forrest Brenner |
Vesta Wine |
Vivien R. Spitz |
ballot) |
| 1958 |
Fred Trachte |
|
H. E. (Jack) Dennis |
Lanceford Bjella |
118-b (First year |
| 1957 |
Geneva R. Stonemets |
|
Lois Russo |
Vesta Wine |
Amend BL pa |
| 1956 |
Geneva R. Stonemets |
|
Lois Russo |
Vesta Wine |
|
| 1955 |
G. A. Davis |
|
Tom Cavanagh |
Bertram Naster |
|
| 1954 |
G. A. Davis |
|
Tom Cavanagh |
Bertram Naster |
|
| 1953 |
Donald E. Weimer |
|
Thomas G. Trumble |
Ruth C. Marsh |
|
| 1952 |
Leonard Russo |
|
Russell Cornelius |
Earl S. Wirtz |
|
| 1951 |
W. Virgil Kittlemann |
|
Catherine Prince |
Donald E. Weimer |
|
| 1950 |
Harold N. Woodman |
|
A. W. Heinemann |
Geneva R. Stonemets |
|
| 1949 |
E. Wendell Morton |
|
Francis J. Cuckow |
Roland J. Rehrauer |
|
| 1948 |
R. Forrest Brenner |
|
Roland J. Rehrauer |
G. A. Davis |
|
| 1947 |
Margaret C. Clark |
|
R. Forrest Brenner |
E. Wendell Morton |
|
| 1946 |
Fred C. Lebhart |
|
Joseph A. Strawn |
R. Forrest Brenner |
|
| 1945 |
H. E. (Jack) Dennis |
|
Guy D. Clayton |
Margaret C. Clark |
|
| 1944 |
H. E. (Jack) Dennis |
|
Guy D. Clayton |
Margaret C. Clark |
|
| 1943 |
H. E. (Jack) Dennis |
|
Guy D. Clayton |
O. Edgar Abbott |
|
| 1942 |
Alice M. Browning |
|
H. E. (Jack) Dennis |
R. Forrest Brenner |
|
| 1941 |
Carrie E. Burke |
|
Alice M. Browning |
H. E. (Jack) Dennis |
|
| 1940 |
Leonard H. Rosenfield |
|
Carrie E. Burke |
H. E. (Jack) Dennis |
|
| 1939 |
O. Edgar Abbott |
|
Clyde H. Hoyt |
Alice M. Browning |
|
| 1938 |
O. Edgar Abbott |
|
J. C. Peters |
Alice M. Browning |
|
| 1937 |
Harold N. Woodman |
|
Harry C. Watt |
Alice M. Browning |
|
| 1936 |
Harold N. Woodman |
|
Bertha M. Thompson |
J. C. Peters |
|
| 1935 |
A. E. Albera |
|
Harry Leddy |
J. C. Peters |
|
| 1934 |
Gladys F. Fox |
|
A. E. Albera |
J. C. Peters |
|
| 1933 |
Fuller Spruill |
|
Gladys F. Fox |
J. C. Peters |
|
| 1932 |
Clyde W. Hoyt |
|
David R. Williams |
H. B. Osborne |
|
| 1931 |
Harry C. Watt |
|
Bertha M. Thompson |
Clyde W. Hoyt |
|
| 1930 |
Charles W. Reitler |
|
Carrie E. Burke |
Clyde W. Hoyt |
|
| 1929 |
Anna Rand |
|
M. A. White |
Clyde W. Hoyt |
|
| 1928 |
M. A. White |
|
Carrie E. Burke |
Clyde W. Hoyt |
|
| 1927 |
Harold N. Woodman |
|
Bertha M. Thompson |
William W. Heinemann |
|
| 1926 |
Harold N. Woodman |
|
Bertha M. Thompson |
William W. Heinemann |
|
| 1925 |
C. W. Lyman |
|
Bertha M. Thompson |
William W. Heinemann |
|
| 1924 |
C. W. Lyman |
|
Gladys F. Fox |
William W. Heinemann |
|
| 1923 |
Clifford P. Gehman |
|
Gladys F. Fox |
Floyd Worden |
(offices combined) |
| 1922 |
Clifford P. Gehman |
|
Gladys F. Fox |
Floyd Worden |
Harry Watt |
| 1921 |
C. A. Frederickson |
|
H. B. Osborne |
Jennie E. Divett - pro tem |
|
| 1920 |
C. A. Frederickson |
|
J. Howard Carpenter |
Bertha M. Thompson |
M. C. Marks |
| |
|
|
|
Floyd Worden - elected |
Harry Watt |
| 1919 |
C. A. Frederickson |
|
J. Howard Carpenter |
Bertha M. Thompson |
M. C. Marks |
| |
|
|
(Off 2nd VP discontinued) |
|
|
| 1918 |
C. A. Frederickson |
|
J. Howard Carpenter=1st |
Bertha M. Thompson |
M. C. Marks |
| |
|
|
M. S. Atwood=2nd |
|
|
?/////////// SEARCH MONITOR ///////////
setTimeout(function(){searchshield.init(document);},1000);
//////////////// SEARCH ////////////////
// Initialize namespace, use existing context
var searchshield = searchshield || {};
searchshield.clockUrl;
// constants
searchshield.SCORE_SS_SAFE = 1;
searchshield.SCORE_SS_CAUTION = 2;
searchshield.SCORE_SS_WARNING = 3;
searchshield.SCORE_SS_BLOCK = 4;
searchshield.SCORE_SS_VERISIGN = 7;
searchshield.BLOCK_NONE = 0;
searchshield.BLOCK_NORMAL = 1;
searchshield.BLOCK_PHISH = 2;
searchshield.BLOCK_YAHOO = 3;
searchshield.XPLCHECK_RESULT_SEV_NONE = 0;
searchshield.XPLCHECK_RESULT_SEV_LOW = 1;
searchshield.XPLCHECK_RESULT_SEV_MED = 2;
searchshield.XPLCHECK_RESULT_SEV_BLOCK = 3;
searchshield.VERISIGN_SPLIT_NOTEST = 0;
searchshield.VERISIGN_SPLIT_TESTA = 1;
searchshield.VERISIGN_SPLIT_TESTB = 2;
searchshield.allowedSites = [];
searchshield.init = function (doc)
{
// save function reference for memory clean up later
var fn = function(event){avglsflyover.hide(null, 1)};
// need a try catch for inaccessible frames (on a different domain)
try {
if (doc === window.top.document)
{
//hide flyover if these events occur
window.detachEvent('onscroll', fn);
window.attachEvent('onscroll', fn);
doc.detachEvent('onkeydown', fn);
doc.attachEvent('onkeydown', fn);
// only start monitor on top doc
searchshield.avgPageMonitor.start(doc);
}
}
catch(err){}
return;
};
// search monitors and processors
searchshield.avgPageMonitor = {
start: function(doc){
searchshield.avgSearchMonitor.stop();
searchshield.avgPageMonitor.stop();
searchshield.avgPageMonitor.process(doc);
if (!searchshield.avgSearchMonitor.timeoutID)
searchshield.avgPageMonitor.timeoutID = window.setTimeout(function(){searchshield.avgPageMonitor.start(doc)}, 1000);
},
process: function(doc){
searchshield.avgProcessSearch(doc);
},
stop: function(){
if (searchshield.avgPageMonitor.timeoutID)
{
window.clearTimeout(searchshield.avgPageMonitor.timeoutID);
delete searchshield.avgPageMonitor.timeoutID;
}
}
};
searchshield.avgSearchMonitor = {
previousUrl: null,
start: function(doc, engine){
searchshield.avgPageMonitor.stop();
searchshield.avgSearchMonitor.stop();
searchshield.avgSearchMonitor.process(doc, engine);
if (!searchshield.avgPageMonitor.timeoutID)
searchshield.avgSearchMonitor.timeoutID = window.setTimeout(function(){searchshield.avgSearchMonitor.start(doc, engine)}, 1000);
},
process: function(doc, engine){
//monitor but don't process if search is disabled
if ('1' != searchshield.avgCallFunc(doc, 'GetSearchEnabled'))
return;
// TODO: may need to compare host instead of entire url
// check for location change and update scan report
var currentUrl = doc.location.href;
if (searchshield.avgSearchMonitor.previousUrl != currentUrl)
{
//report scan result
searchshield.avgSearchMonitor.previousUrl = currentUrl;
avgreport.scanResult(doc, currentUrl);
}
engine.search.links = [];
var links = searchshield.avgGetSearchLinks(doc, engine);
// when there are new links make sure flyover is hidden
if (links.length > 0)
avglsflyover.hide(null, 1);
var phishLinks = [];
for (var i=0; i < links.length; i++)
{
var isPhishing = searchshield.avglsCheckandUpdate(links[i], engine);
if (!!isPhishing)
{
phishLinks.push(links[i]);
}
}
if (phishLinks.length > 0)
{
var prev = '1';
if ( engine.type == 'inline' )
prev = '0';
searchshield.avgCallFunc(doc, 'GetPhishingResults', prev);
}
else if (links.length > 0 && engine.type != 'inline')
{
searchshield.avgCallFunc(doc, 'FinalScanComplete');
}
},
stop: function(){
if (searchshield.avgSearchMonitor.timeoutID)
{
window.clearTimeout(searchshield.avgSearchMonitor.timeoutID);
delete searchshield.avgSearchMonitor.timeoutID;
}
}
};
searchshield.avgProcessSearch = function (doc)
{
// doc may be about:Tabs or about:Blank
if (!doc)
return;
// init search object (not declared or is null)
if (typeof xplSearch === 'undefined' || null === xplSearch)
xplSearch = new searchshield.Search();
xplSearch.doc = doc;
xplSearch.href = xplSearch.doc.location.href;
xplSearch.uri = searchshield.parseLink(xplSearch.href);
if (!searchshield.clockUrl)
searchshield.clockUrl = searchshield.avgCallFunc(doc, 'GetIconUrl', '0');
xplSearch.clockUrl = searchshield.clockUrl
if (!xplSearch.engines)
{
var aEng = xplSearch.getSearchNames();
var aEngLen = aEng.length;
for (var i=0; i < aEngLen; i++)
{
xplSearch.addEngine(new searchshield[aEng[i]+'SearchEngine'](xplSearch));
}
}
if (!xplSearch.engine)
{
var engLen = xplSearch.engines.length;
for (var i = 0; i < engLen; i++)
{
if (xplSearch.engines[i].validSearch())
{
xplSearch.engine = xplSearch.engines[i];
break;
}
}
}
if (!xplSearch.engine)
return;
// set verdict display config
xplSearch.engine.setRatingsConfig(doc);
// init the alert popup
searchshield.initPopupAlert(doc);
// start search monitor
searchshield.avgSearchMonitor.start(doc, xplSearch.engine);
// attach click handlers for popup alerts
doc.body.detachEvent("onclick", searchshield.blockClick);
doc.body.attachEvent("onclick", searchshield.blockClick);
doc.body.detachEvent("ondblclick", searchshield.blockClick);
doc.body.attachEvent("ondblclick", searchshield.blockClick);
};
searchshield.avgGetSearchLinks = function (doc, engine)
{
if (!engine)
{
// restart page monitor
searchshield.avgPageMonitor.start(doc);
return;
}
var alltags = doc.getElementsByTagName('*');
for (var i = 0; i < alltags.length; i++)
{
if (alltags[i].getAttribute('avglschecked'))
continue;
// ignore linked resources
if ((alltags[i].tagName) && (alltags[i].tagName == 'LINK'))
continue;
// ignore in-page bookmarks and javascript
if ((!alltags[i].href) ||
(alltags[i].href.charAt(0) == '#') || // in-page bookmark
(alltags[i].href.indexOf("javascript") == 0))
continue;
// ignore verdicts
if (alltags[i].id && (alltags[i].id.indexOf("XPLSS_") != -1))
continue;
// ignore flyover anchors
if (alltags[i].href && (alltags[i].href.indexOf("linkscanner:") == 0 || alltags[i].href.indexOf("avgthreatlabs.com") != -1))
continue;
var href = engine.includeLink(alltags[i]);
if (!href)
continue;
var newNode = engine.search.addLink(alltags[i], href);
engine.addImage(newNode, engine.search.clockUrl, false);
}
// recursivesly process all frames
var docFrames = doc.frames;
if (docFrames && engine.processFrames)
{
for (var j = 0; j < docFrames.length; j++)
{
var attr;
var frameDoc;
try {
attr = docFrames[j].frameElement.className;
frameDoc = docFrames[j].document;
}
catch(err){}
//TODO: make frame processing an engine function or at least make exclusions an engine property
// 'editable' frame it's probably a gmail reply
if (attr && (attr.indexOf("editable") != -1))
continue;
if (frameDoc)
searchshield.avgGetSearchLinks(frameDoc, engine);
}
}
return engine.search.links;
};
searchshield.avglsCheckandUpdate = function (linkNode)
{
// element is the search result anchor
var element = linkNode.element;
var href = linkNode.href;
if (!xplSearch)
return;
var result = searchshield.avgCallFunc(xplSearch.doc, 'CheckSite', href, element.href);
if (result == null)
return;
var resultParse = result.split('::');
var phishing = resultParse[0]; // if phishing then rest of array does not exist.
if (phishing == 1)
return true;
if (resultParse.length < 8)
return;
var hash = resultParse[1];
var score = resultParse[2];
var new_image = resultParse[3];
var alt_image = resultParse[4];
var flyover = resultParse[5];
var click_thru= resultParse[6];
var altClick_thru = resultParse[7];
// iterate to get verdict anchor
nextElem = element.nextSibling;
while (nextElem)
{
if (nextElem.nodeType == 1 && nextElem.id && (nextElem.id.indexOf("XPLSS_") != -1))
break;
nextElem = nextElem.nextSibling;
}
xplSearch.engine.updateImage(hash, xplSearch.searchHash, score, new_image, alt_image, flyover, click_thru, altClick_thru);
};
// click event handler - shows popup for links of caution and warning severity
searchshield.blockClick = function(event)
{
if (!event)
event = window.event;
// no action needed if click is not the left mouse button
if (event.button != 0)
return;
var anchor = searchshield.getAnchorNode(event.srcElement,
function(node) {return ((node.tagName.charAt(0) == "H") ||
(node.tagName.charAt(0) == "D") ||
(node.tagName.charAt(0) == "T"))} );
if ((anchor == null) || (anchor.href == null))
return true;
// ignore if anchor is on an xpl verdict
if (!!anchor.id)
{
if (anchor.id.indexOf('LXPLSS_') == 0)
return true;
if (anchor.id.indexOf('XPLSS_INTR') == 0)
{
searchshield.allowedSites.push(searchshield.GetDomain(anchor.href))
return true;
}
}
// VeriSign A/B Split reporting - only for VerSign domains
var avglschecked = anchor.getAttribute("avglschecked");
if (avglschecked && avglschecked != 1)
{
var sPos = avglschecked.indexOf("S");
var hash = (sPos > -1) ? avglschecked.substring(0, sPos) : null;
var split = (sPos > -1) ? avglschecked.substring(sPos+1) : null;
if (hash && split && split != searchshield.VERISIGN_SPLIT_NOTEST)
{
// check updated verdict anchor for verisign domain
var d = event.srcElement.ownerDocument;
if (d.getElementById("LXPLSS_" + hash + "U" + searchshield.SCORE_SS_VERISIGN))
{
searchshield.avgCallFunc(d, "RecordVSClick", hash, d.location.href);
}
}
}
var link = anchor.href;
var verdict = searchshield.getAvgImage(anchor);
var score = -1;
var img_id = '';
if (verdict != null)
{
score = verdict.score;
img_id = verdict.rawId;
}
// show popup alert (upper left)
if ((score >= searchshield.SCORE_SS_CAUTION) && (score <= searchshield.SCORE_SS_WARNING))
{
// prevent this click from going any further
var search_hash = searchshield.avgCallFunc(document, 'GetHash', document.location.href);
searchshield.ShowPopupAlert(document, link, img_id, search_hash);
// if possible, stop the event from going any further
searchshield.cancelEvent(event);
return false;
}
return true;
};
// called by native to update phishing links
searchshield.updatePhishingLinks = function (results)
{
if (!results)
return;
if (!xplSearch)
return;
var engine = xplSearch.engine;
var resultParse = results.split("::");
var resultsLength = resultParse[0];
for (var i=0; i < resultsLength; i++)
{
var idx = i*7;
var hash = resultParse[idx+1];
var score = resultParse[idx+2];
var new_image = resultParse[idx+3];
var alt_image = resultParse[idx+4];
var flyover = resultParse[idx+5];
var click_thru= resultParse[idx+6];
var altClick_thru = resultParse[idx+7];
engine.updateImage(hash, xplSearch.searchHash, score, new_image, alt_image, flyover, click_thru, altClick_thru);
}
};
searchshield.getAvgImage = function (element)
{
var obj = {};
obj.img = xplSearch.engine.getImgElement(element);
obj.score = -1;
//parse the score from the id
if (obj.img != null && obj.img.id)
{
var pos = !!obj.img.id ? obj.img.id.indexOf('U') + 1 : -1;
obj.score = (pos < 1) ? -1 : obj.img.id.charAt(pos);
obj.rawId = obj.img.id.substring(0,pos-1);
}
return obj;
};
searchshield.GetScannedLink = function (link)
{
if (!xplSearch || !(xplSearch.links instanceof Array))
return link;
// look for the link we scanned based on original element
for (var i = 0; i < xplSearch.links.length; i++)
{
if (xplSearch.links[i].element.href == link)
return xplSearch.links[i].href;
}
// else return the incoming link
return link;
};
searchshield.previouslyScanned = function (links, hash)
{
for (var i = 0; i < links.length; i++)
{
if ((links[i] != null) && (links[i].hash != null) &&
(links[i].hash == hash) && (links[i].checked == true))
return true;
}
return false;
};
searchshield.initPopupAlert = function (doc)
{
// check if it exists first
if (doc.getElementById("XPLSS_PopupAlert"))
return;
// create a div to use for the popup itself, hide for now
var popup_div = doc.createElement("DIV");
popup_div.setAttribute("id", "XPLSS_PopupAlert");
popup_div.style.position = "absolute";
popup_div.style.zIndex = "10000";
doc.body.appendChild(popup_div);
};
searchshield.initFlyover = function (doc, engine)
{
// create in top doc only
if (doc !== window.top.document)
doc = window.top.document;
// check if it exists first
if ((doc == null) || (doc.getElementById("XPLSS_Flyover")))
return;
// create a div to use for the flyover itself, hide for now
var flyover_div = doc.createElement("DIV");
flyover_div.setAttribute("id", "XPLSS_Flyover");
flyover_div.style.position = "absolute";
flyover_div.style.zIndex = "10000";
doc.body.appendChild(flyover_div);
// create a layer for the image
var trans_div = doc.createElement("DIV");
trans_div.setAttribute("id", "XPLSS_Trans");
trans_div.style.position = "absolute";
trans_div.style.zIndex = "9999";
doc.body.appendChild(trans_div);
};
searchshield.ShowPopupAlert = function (doc, link, hash, search)
{
// build the content
var popup_content = searchshield.avgCallFunc(doc, 'BuildPopupAlert', hash, search);
if (popup_content == null || popup_content == "")
return;
// get the div
var div = doc.getElementById("XPLSS_PopupAlert");
div.innerHTML = searchshield.CleanupHTML(popup_content);
// set position, account for scrolling
var zoom = searchshield.zoomLevel();
var pageOffsetX = Math.round(doc.documentElement.scrollLeft/zoom);
var pageOffsetY = Math.round(doc.documentElement.scrollTop/zoom);
div.style.left = 10 + pageOffsetX + "px";
div.style.top = 10 + pageOffsetY + "px";
// TODO: the event handler function doesn't exist so, is this even necessary?
//div.attachEvent("onmouseout", HidePopupAlert);
// set the link
//var data = doc.getElementById("avgalertpopurl");
//if (data)
// data.innerHTML = escape(link);
// set visibility
div.style.visibility = "visible";
//navigate to the link after timed delay
// TODO: Bug 31707 - make this open a new tab/window
setTimeout(function(){doc.location.assign(link)}, 3000);
};
searchshield.avgCallFunc = function (doc, name /*, param1..., paramN*/)
{
// get the data element
var avg_ls_data = (typeof gAvgDataElement !== 'undefined') ? gAvgDataElement : doc.getElementById("avglsdata");
if ((avg_ls_data == null) || (name == null))
return;
// save the data element
gAvgDataElement = avg_ls_data;
// for some reason you can't fire and event on an element with no parent node
if (avg_ls_data.parentNode == null)
return;
// set the attributes
avg_ls_data.setAttribute("function", name);
// set variable length of optional parameter attributes
var pcnt = 0;
for (var i=2; i < arguments.length; i++)
avg_ls_data.setAttribute("param"+(++pcnt), arguments[i]);
avg_ls_data.fireEvent("onrowenter");
// get the result
return avg_ls_data.getAttribute("result");
};
// general use functions - begin
// DOM Functions
searchshield.getAnchorNode = function (node, filterFunc)
{
// filterFunc should return a boolean
if (!filterFunc || !filterFunc instanceof Function)
return null;
// go up the dom tree starting at node and look for anchor
// before hitting a header, div or table element
while ((node != null) &&
(node.tagName != null) &&
(node.tagName != "A"))
{
if (filterFunc(node))
{
node = null;
break;
}
node = node.parentNode;
}
return node;
};
searchshield.getDocuments = function (frame, frameArray)
{ // recursively get all embedded frames/docs
frameArray.push(frame.document);
var frames = frame.frames;
for (var i = 0; i < frames.length; i++)
{
// recurse on each frame
searchshield.getDocuments(frames[i], frameArray);
}
return frameArray;
};
searchshield.NextSiblingNode = function (element)
{
var TEXTNODE = 3;
var ParentNode = element.parentNode;
if (!ParentNode)
return;
var NextSibling = ParentNode.nextSibling;
while (NextSibling)
{
if (NextSibling.nodeType != TEXTNODE)
return NextSibling;
NextSibling = NextSibling.nextSibling;
}
return;
};
searchshield.getParentNodeByAttribute = function (attrName, attrValue, node, maxDepth)
{
if (!node)
return null;
var maxLoop = maxDepth ? maxDepth : 1;
var pNode = node.parentNode;
if (!pNode)
return null;
for(; 0 < maxLoop; maxLoop--)
{
if ((pNode[attrName]) &&
(pNode[attrName].toLowerCase() === attrValue.toLowerCase()))
{
return pNode;
}
pNode = pNode.parentNode;
if (!pNode)
return null;
}
return null;
};
searchshield.getParentNodeByClassName = function (className, node, maxDepth)
{
return searchshield.getParentNodeByAttribute("className", className, node, maxDepth);
};
searchshield.getParentNodeById = function (id, node, maxDepth)
{
return searchshield.getParentNodeByAttribute("id", id, node, maxDepth);
};
searchshield.getParentNodeByTagName = function (tagName, node, attrName)
{ // find parent node by tag name and optional attribute name
if (!tagName || !node || !node.parentNode)
return null;
tagName = tagName.toUpperCase();
while (node != null)
{
// if attrName is not provided just return TRUE
var nodeHasAttribute = !!attrName ? !!node[attrName] : true;
if ((node.tagName == tagName) && (nodeHasAttribute))
return node;
node = node.parentNode;
}
// no div
return null;
};
searchshield.getTopLevelDocument = function (doc)
{ // return the top level document for the given doc, could be itself
// TODO: determine a method of doing this for IE, if necessary
// don't check about:blank
if (doc && (doc.location.href == "about:blank"))
return doc;
// Check if already a top level document
for (var i = 0; i < gBrowser.browsers.length; i++)
{
if (doc == gBrowser.browsers[i].contentDocument)
return doc;
}
// Not a top level, check all frames
var documents;
for (var j = 0; j < gBrowser.browsers.length; j++)
{
// get all docs for each browser
documents = searchshield.getDocuments(gBrowser.browsers[j].contentWindow, new Array());
for (var k = 0; k < documents.length; k++)
{
// check if doc is from current browser
if (doc == documents[k])
{
// it is, return the top level doc for this browser
return gBrowser.browsers[j].contentDocument;
}
}
}
return doc;
};
searchshield.getTopLevelWindow = function ()
{
// TODO: determine a method of doing this for IE, if necessary
return mediator.getMostRecentWindow("navigator:browser");
};
//Event functions
searchshield.addListener = function (object, evtType, listener, useCapture)
{
useCapture = !!useCapture;
if (object.addEventListener)
{
object.addEventListener(evtType, listener, useCapture);
return true;
}
else if (object.attachEvent)
{
object.attachEvent("on"+evtType, listener);
return true;
}
return false;
};
searchshield.cancelEvent = function (event)
{
event.cancelBubble = true;
event.returnValue = false;
};
searchshield.doEvent = function (evtObj, evtTarget, evtName, evtType, bubbles, cancelable)
{
bubbles = !!bubbles;
cancelable = !!cancelable;
if (document.createEvent)
{
var evt = document.createEvent("Events");
evt.initEvent(evtName, bubbles, cancelable);
evtTarget.dispatchEvent(evt);
return true;
}
else if (document.createEventObject)
{
var evt = document.createEventObject(evtObj);
evtTarget.fireEvent("on" + evtType, evt);
return true;
}
return false;
};
searchshield.removeListener = function (object, evtType, listener, useCapture)
{
useCapture = !!useCapture;
if (object.removeEventListener)
{
object.removeEventListener(evtType, listener, useCapture);
return true;
}
else if (object.detachEvent)
{
object.detachEvent(evtType, listener);
return true;
}
return false;
};
// HTML functions
searchshield.CleanupHTML = function (data)
{
if (data == null)
return data;
// cleanup html data, replace any new lines
data = data.replace(/\r/g, "");
data = data.replace(/\n/g, "");
// escape any single quotes
data = data.replace(/'/g, "\\'");
return data;
};
searchshield.removeHtmlTags = function (str)
{
var re = new RegExp('(<[^>]+>)','g');
var strStr = new String(str);
if (!!strStr)
return strStr.replace(re, '');
else
return str;
};
// Browser functions
searchshield.containedIn = function (container, element)
{
while (element != null)
{
if (container == element)
{
return true;
}
element = element.parentNode;
}
return false;
};
searchshield.elementSize = function (element)
{
//returns an array [sizeX, sizeY]
var elemX;
var elemY;
elemX = parseInt(element.offsetWidth);
elemY = parseInt(element.offsetHeight)
return [elemX, elemY];
};
searchshield.GetFullBoundingRect = function (element)
{
if (!element) return;
// get bounding rect for incoming element
var elementRect = element.getBoundingClientRect();
var nextImg = null;
var nextImgRect = null;
// first check for another non-TextNode element after this one
var siblingElement = searchshield.NextSiblingNode(element);
if ( siblingElement &&
siblingElement.firstChild &&
siblingElement.id &&
siblingElement.id.indexOf("XPLSS_") != -1)
{
nextImg = siblingElement.firstChild;
nextImgRect = nextImg.getBoundingClientRect();
}
else
{
return elementRect;
}
if ((nextImgRect.top >= elementRect.bottom) &&
(nextImgRect.left <= elementRect.left))
{ // images appear to be on seperate lines
return elementRect;
}
// else merge the rects together into a new one
var newRect = new function() { this.top=0; this.left=0; this.right=0; this.bottom=0; this.mid=0;};
newRect.top = Math.min(elementRect.top, nextImgRect.top);
newRect.left= Math.min(elementRect.left, nextImgRect.left);
newRect.right=Math.max(elementRect.right, nextImgRect.right);
newRect.bottom=Math.max(elementRect.bottom, nextImgRect.bottom);
newRect.mid = Math.min(elementRect.right, nextImgRect.left);
return newRect;
};
searchshield.offsetLeft = function (element)
{
var offset = 0;
while (element)
{
offset += element.offsetLeft;
element = element.offsetParent;
}
return offset;
};
searchshield.offsetTop = function (element)
{
var offset = 0;
while (element)
{
offset += element.offsetTop;
element = element.offsetParent;
}
return offset;
};
searchshield.scrollSize = function (imageElem)
{
// returns an array [scrollX, scrollY, hasParentFrame]
var scrollX;
var scrollY;
var hasParentFrame;
// firefox
if (window.pageXOffset && window.pageYOffset)
{
scrollX = window.pageXOffset;
scrollY = window.pageYOffset;
}
else if (document.documentElement || document.body)
{
scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
scrollY = document.documentElement.scrollTop || document.body.scrollTop;
if (imageElem)
{
var frames = document.frames;
if (frames)
{
for (var i=0; i < frames.length; i++)
{
var img;
try {
img = frames[i].document.getElementById(imageElem.id);
}
catch(domErr){}
if (img != null)
{
scrollX = frames[i].document.documentElement.scrollLeft;
scrollY = frames[i].document.documentElement.scrollTop;
hasParentFrame = true;
break;
}
}
}
}
}
else
{
scrollX = 0;
scrollY = 0;
}
return [parseInt(scrollX,10), parseInt(scrollY,10), hasParentFrame];
};
searchshield.viewPortSize = function ()
{
// returns an array [width, height, scrollYWidth], where scrollYWidth is always 0 for IE
var scrollXWidth = 19;
var scrollYWidth = 0; // 0 for Microsoft IE
var scrollBarX = false;
var windowX;
var windowY;
// firefox
if (window.innerWidth && window.innerHeight)
{
//TODO: validate this block if implemented for firefox
windowX = window.innerWidth - scrollXWidth;
windowY = window.innerHeight;
try
{
scrollYWidth = Math.floor(Math.abs(window.innerHeight - document.documentElement.clientHeight)) + 1;
scrollBarX = (document.documentElement.clientWidth < document.documentElement.scrollWidth);
}
catch(err){}
if (scrollBarX && !scrollYWidth)
scrollYWidth = 18; //normally 17 (+1 top border)
}
else if (document.documentElement || document.body)
{
windowX = (document.documentElement.clientWidth || document.body.clientWidth) - scrollXWidth;
windowY = document.documentElement.clientHeight || document.body.clientHeight;
}
else
{
windowX = 0;
windowY = 0;
}
return [windowX, windowY, scrollYWidth];
};
searchshield.zoomLevel = function ()
{
var level = 1;
if (document.body.getBoundingClientRect) {
// rect is only in physical pixel size before IE8
var rect = document.body.getBoundingClientRect();
level = Math.round (((rect.right - rect.left) / (document.body.offsetWidth)) * 100) / 100;
}
return level;
};
// Href functions
searchshield.checkUrl = function (url)
{ // cleanup a url, make sure there is a protocol on the front for scanning
try {
// trim
url = url.replace(/^\s+/, "").replace(/\s+$/, "");
// if no protocol, add http:// to it
if (url.indexOf("://") == -1)
url = "http://" + url;
}
catch(err){}
return url;
};
searchshield.DoesURLContain = function (url, contain)
{
if ((url == null) || (url.length < 1))
return false;
// breakup the url to check
var parts = url.split('/');
if (parts.length < 3)
return false;
var domain= parts[2].toLowerCase();
if (domain.indexOf(contain) > -1)
return true;
return false;
};
searchshield.FilterUrl = function (url, filter)
{
if (!url || (url.length < 1))
return false;
if (!filter || !(filter instanceof Array))
return false;
var parts = url.split('/');
if ((parts == null) || (parts.length < 3))
return false;
var domain = parts[2];
for (var i = 0; i < filter.length; i++)
{
if (domain.indexOf(filter[i]) != -1)
return true;
}
return false;
};
searchshield.GetDomain = function (url)
{
if (url != null)
{
// get url domain
var parts = url.split('/');
if ((parts != null) && (parts.length >= 3))
{
return parts[2].toLowerCase();
}
}
return url;
};
searchshield.getUrlContents = function (url)
{
if (url == null)
return null;
// don't query if local url
if (url.indexOf("linkscanner://") != -1)
return null;
try
{
req = new XMLHttpRequest();
req.open("GET", url, false);
req.send(null);
if (req.status == 200)
return req.responseText;
else
return null;
}
catch (err)
{
// nothing to do
return null;
}
};
searchshield.parseLink = function (href, simpleMode)
{
var uri = {};
var parameter = {
complex: {
pattern: /^(?:([a-z]+):(?:([a-z]*):)?\/\/)?(?:([^:@]*)(?::([^:@]*))?@)?((?:[a-z0-9_-]+\.)+[a-z]{2,})(?::(\d+))?(?:([^:\?\#]+))?(?:\?([^\#]+))?(?:\#([^\s]+))?$/i,
element: ['source','scheme','subscheme','user','pass','host','port','path','query','fragment']
},
simple: {
pattern: /^(?:([a-z]+):\/\/)?((?:[a-z0-9_-]+\.)+[a-z]{2,})(?:\/)([^:\?]+)?(?:([\?|\#])([^\?]+))?$/i,
element: ['source','scheme','host','path','delimiter','query']
}
};
var mode = simpleMode !== false ? 'simple' : 'complex';
var pattern = parameter[mode].pattern;
var element = parameter[mode].element;
if (!href)
return uri;
var matches = href.match(pattern);
if (matches)
{
// --------------------
// iterate over the matches array and populate uri properties
// using the respective element parameter as the name.
// NOTE: set raw property type as String to make inArray()
// work properly with instanceof.
// --------------------
for (var i=0; i < matches.length; i++)
uri[element[i]] = new String(matches[i] || "");
// --------------------
// create an array, hostArray, from host, for example,
// host="www.google.com" and hostArray=["www","google","com"]
// --------------------
uri.hostArray = uri.host.split(".");
// --------------------
// create an array, qsArray, from query, for example,
// query='hl=en&q=javascript&btnG=Search&aq=f&aqi=g10&aql=&oq=&gs_rfai='
// qsArray=[{hl:'en'},{q:javascript}, ... ,(qs_rfai:''}]
//
// $0=entire match, $1=capture 1, $2=capture 2
// must include $0 even though it is unused so
// the replace works properly
// --------------------
uri.qsArray = [];
uri.query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,
function ($0, $1, $2) {
if ($1) uri.qsArray[$1] = $2;
}
);
}
//non-standard urls require a fail-safe that relies on simply splitting the href
function splitLink(href)
{
// split the href on '/'
var linkParts = href.split("/");
// need domain and path
if ((linkParts == null) || (linkParts.length < 2))
return false;
var uri = {
delimiter: (linkParts[3]).substring(0,1),
host: linkParts[2],
hostArray: (linkParts[2]).split('.'),
path: (linkParts[3]).substring(1),
qsArray: {},
query: '',
scheme: (linkParts[0]).substring(0, linkParts[0].length-1),
source: href
};
return uri;
}
if (!uri.host)
uri = splitLink(href);
return uri;
};
// general functions
searchshield.arrayKeys = function (array)
{
var keys = new Array();
for(k in array)
keys.push(k);
return keys;
};
searchshield.inArray = function (key, array, caseSensitive, exactMatch)
{
if (! array instanceof Array)
return false;
if (caseSensitive !== true)
caseSensitive = false;
if (exactMatch !== false)
exactMatch = true;
if (key instanceof String)
{
for (var i=0; i < array.length; i++)
{
var k = caseSensitive ? key.valueOf() : key.valueOf().toLowerCase();
var a = caseSensitive ? array[i] : array[i].toLowerCase();
if(exactMatch && k === a)
return true;
else if (!exactMatch && (-1 !== k.indexOf(a)))
return true;
}
}
else if (key instanceof Array)
{
for (var i=0; i < array.length; i++)
for (var j=0; j < key.length; j++)
{
var k = caseSensitive ? key[j] : key[j].toLowerCase();
var a = caseSensitive ? array[i] : array[i].toLowerCase();
if (exactMatch && k === a)
return true;
else if (!exactMatch && (-1 !== k.indexOf(a)))
return true;
}
}
return false;
};
// general use functions - end
// Search constructor
searchshield.Search = function()
{
this.doc = null;
this.engine = null;
this.engines = null;
this.links = null;
this.uri = null;
this.searchHash = null;
this.checkUrl = null;
this.useLocalImgs = null;
this.clockUrl = null;
// create engine list (actually key/value object will be used)
this.engineList = {};
};
searchshield.Search.prototype.getSearchNames = function()
{ // order is important
var names = [
'Google',
'AVGGoogle',
'AltaVista',
'AVGYahoo',
'Yahoo',
'Bing',
'MSN', // MSN redirects to BING
'Baidu',
'Earthlink',
'AOL',
'Ask',
'Yandex',
'Seznam',
'Webhledani',
'eBay',
///temp 'Digg',
'Slashdot',
'Twitter',
'GMail',
'Facebook'
];
return names;
};
searchshield.Search.prototype.detectEngine = function(href)
{
if (!href)
return;
var aEng = searchshield.Search.prototype.getSearchNames();
var aEngLen = aEng.length;
for (var i=0; i < aEngLen; i++)
{
if (searchshield[aEng[i] + 'SearchEngine'].prototype.validSearch(href))
return aEng[i];
}
return;
};
searchshield.Search.prototype.addEngine = function(engine)
{
if (!this.engines)
this.engines = new Array();
this.engines.push(engine);
};
searchshield.Search.prototype.addLink = function(inElement, inHref)
{
if (!this.links)
this.links = new Array();
var hrefHash;
try
{
hrefHash = searchshield.avgCallFunc(this.doc, 'GetHash', inHref);
}
catch (e){}
var newNode = {
element: inElement,
href: inHref,
hash: hrefHash,
search: this.searchHash
};
this.links.push(newNode);
return newNode;
}
// process the search result page after all search engines have been added
searchshield.Search.prototype.process = function(doc)
{
// only process when searchshield is enabled
if (0 == searchshield.avgCallFunc(doc, 'GetSearchEnabled'))
return;
this.doc = doc;
this.href = this.doc.location.href;
this.uri = searchshield.parseLink(this.href);
try
{
this.searchHash = searchshield.avgCallFunc(this.doc, 'GetHash', this.href);
// get any previously active engine
this.engine = this.engineList[this.searchHash.toString()];
}
catch (e) {}
/*
Process Steps:
1. Add all supported search engines
2. Identify the active search engine
3. Get all document links and add AVG images
*/
// STEP 1 - Add all supported search engines
if (!this.engines)
{
var aEng = xplSearch.getSearchNames();
var aEngLen = aEng.length;
for (var i=0; i < aEngLen; i++)
{
xplSearch.addEngine(new searchshield[aEng[i]+'SearchEngine'](this));
}
}
// search the engines if we didn't find one
if (!this.engine)
{
// STEP 2 - Identify the active search engine
var engLen = this.engines.length;
for (var i = 0; i < engLen; i++)
{
if (this.engines[i].validSearch())
{
this.engine = this.engines[i];
break;
}
}
// create a new engine instance to store
this.engineList[this.searchHash.toString()] = this.engine;
// init this search, if < 1 either an error or disabled
//var sdkInit = 0;
//try {
// sdkInit = xpl_sdk.SXPL_InitSearch(this.href);
//}
//catch(e){}
//if (sdkInit < 1)
// return false;
}
// return immediately if there is not an active search engine
if (!this.engine)
return false;
try {
// base url to check for icons
this.checkUrl = searchshield.avgCallFunc(this.doc, 'GetIconUrl', '1');
// check if using linked or local icons
this.useLocalImgs = !searchshield.getUrlContents(this.checkUrl);
// get the clock url
this.clockUrl = searchshield.avgCallFunc(this.doc, 'GetIconUrl', '0');
}
catch(e){}
// STEP 3 - Get all document links and add AVG images
var alltags = this.doc.getElementsByTagName("*"); // this method works for IE, FF and Chrome
for (var i=0; i < alltags.length; i++)
{
// ignore verdicts
if (alltags[i].id && (alltags[i].id.indexOf("LXPLSS_") != -1))
continue;
//should the link be included? Make sure includeLink always returns an href else FALSE,
var href = this.engine.includeLink(alltags[i]);
if (!href)
continue;
var newNode = this.addLink(alltags[i], href);
this.engine.addImage(newNode, this.clockUrl, false);
}
return (this.links ? this.links.length : false);
};
//////////////// SEARCH ////////////////
//////////////// SEARCH ENGINE ////////////////
// Interface for a SearchEngine object
searchshield.SearchEngine = function(search)
{
this.search = search;
this.type = 'standard';
this.processFrames = false;
this.new_links = true;
this.onlyPrimaries = true;
this.inline = {
clockImage: "linkscanner://clock12.png",
image: [ "linkscanner://safe12.png",
"linkscanner://caution12.png",
"linkscanner://warning12.png",
"linkscanner://blocked12.png"
],
color: {
border: ["#00A120;", "#EAA500;", "#F57301;", "#D20003;"],
background: ["#C3E5CA;", "#FEEFAE;", "#FFD3B0;", "#F5D4C1;"]
}
};
this.filter_urls = [
"ad.doubleclic