//    NO SPAM E-MAIL ADDRESS
//   <A href="javascript:noSpam('pictures','livingstonitown.com','Subject Goes Here - or not')">E-mail Us</a>
function noSpam(user,domain,subject) {
   locationstring = "mailto:" + user + "@" + domain + "?subject=" + subject;
   window.location = locationstring; }


//   OPEN A  POP UP WINDOW
//   <a href="javascript:openWindow1();">Clicable Link</a>
function openWindow1() {
  popupWin = window.open('filename.htm', 'datalink',             
'width=350,height=375,scrollbars=no,toolbar=no,location=no,directories=no,status=no,resizable=no,copyhistory=no')
}

function openWindow2() {
  popupWin = window.open('filename.htm', 'datalink',             
'width=350,height=375,scrollbars=no,toolbar=no,location=no,directories=no,status=no,resizable=no,copyhistory=no')
}

function openWindow3() {
  popupWin = window.open('filename.htm', 'datalink',             
'width=350,height=375,scrollbars=no,toolbar=no,location=no,directories=no,status=no,resizable=no,copyhistory=no') }


//   JAVASCRIPT POP-UP WINDOW FOR NOTES (Doesn't Load Another Page)
/*
<a href="javascript:Popup('This is the first popup window.  When I click on another one without closing this one first, this first one closes automatically.')">CLICK FOR POPUP WINDOW</a>
<br>
<a href="javascript:Popup('This is the second popup window. The first one has already closed.')">CLICK FOR THE SECOND POPUP WINDOW</a>
*/
var Note;
function Popup(message) {
 Note = window.open('','Note','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,height=200,width=400' );
 var text = '<HTML><HEAD><TITLE>Note</TITLE></HEAD><BODY BGCOLOR="#FFFFFF"><font face="arial" size="2">' + message + '</font></BODY></HTML>';
 Note.document.write(text);
 Note.document.close();
 Note.focus(); }


//   LINK ON WHOLE CELL WITH COLOR CHANGE ON MOUSEOVER
/*  
<td onmouseup="LmUp('1.htm')" onmousedown="LmDown(this, '#cccc99')" onmouseover="LmOver(this, '#cccc99')" onmouseout="LmOut(this, '#666633')" width="100%" bgColor=#666633><a href="downloads2.html" class="link4">&nbsp; Admin Tools</a></td>
***Needs a link class attribute to load correct colors the first time    */                  
                  
function getLink(elem) {
var child_array = elem.childNodes; var i=0;
for (; i<child_array.length; i++) {
if(child_array[i].nodeName.toLowerCase() == "a") break;
else continue;
}return(child_array[i]);}

function LmOver(elem, clr)
{var linkElem = getLink(elem);
elem.style.backgroundColor = clr;
//  MOUSE OVER LINK COLOR BELOW
linkElem.style.color = "0000FF";
elem.style.cursor = 'hand'}

function LmOut(elem, clr)
{var linkElem = getLink(elem);
elem.style.backgroundColor = clr;
//  MOUSE OUT LINK COLOR BELOW
linkElem.style.color = "#2169B1";}

function LmDown(elem, clr)
{var linkElem = getLink(elem);
elem.style.backgroundColor = clr;
//  MOUSE CLICK LINK COLOR BELOW
linkElem.style.color = "#000000";}

function LmUp(path)
{location.href = path;}


// IMAGE CHANGE ON TEXT MOUSEOVER
/* Place the line below where you want the text link.
<a href="http://www.draac.com/" onMouseover="document.imagename.src=image2.src" onMouseout="document.imagename.src=image1.src">LINK</a>

Place this next code where you want the image to show up.
<img src="filename-1.gif" name="imagename" border="0">   */

if (document.images) {
image1 = new Image
image2 = new Image

image1.src = "filename-1.gif"
image2.src = "filename-2.gif" }


//   BREAK OUT OF FRAMES
if (window != window.top) {
top.location.href = location.href; }       


//   NO RIGHT CLICK
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
