//    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    -   Uncomment to Use

//   <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> */

//          Uncomment Below To Use
/*
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    -   Uncomment

/*  <td onmouseup="LmUp('downloads2.html')" 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    */                  

//  Uncomment Below To Use
/*                  
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 = "FF0000";
elem.style.cursor = 'hand'}

function LmOut(elem, clr)
{var linkElem = getLink(elem);
elem.style.backgroundColor = clr;
//  MOUSE OUT LINK COLOR BELOW
linkElem.style.color = "#FFFF00";}

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    -   Uncomment

// 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">   

//     Uncomment Below To Use
/*
if (document.images) {
image1 = new Image
image2 = new Image

image1.src = "filename-1.gif"
image2.src = "filename-2.gif" }  
*/

/* Place this next code where you want the text link.
<a href="http://www.draac.com/" onMouseover="document.imagename.src=image2.src" onMouseout="document.imagename.src=image1.src">PUT SOME TEXT HERE</a>

Place this next code where you want the image to show up.
<img src="your-image1.gif" name="imagename" border="0">   */

/*  ========================================================================================= */

//   BREAK OUT OF FRAMES

if (window != window.top) {
top.location.href = location.href;
}       

/*  ========================================================================================= */

//   NO RIGHT CLICK    -   Uncomment

/* 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;}  */

/*  ========================================================================================= */

//   FORMMAIL ANTI-SPAM QUESTION    -   Uncomment

/*   function validateForm()
{
    valid = true;

    if ( document.getElementById('verify').value != "orange" )
    {
        alert ( "For anti-spam purposes, you must answer the 'orange' question to submit this form." );
		document.getElementById('verify').value = "";
		document.getElementById('verify').focus();
		valid = false;
    }

    return valid;
}     */

/*  ========================================================================================= */

//   FORMMAIL - HIDE LOCATION OF FORMMAIL.PL

//   <form id="contactform" action="cgi-bin/formmail.pl" method="post" onsubmit="return formProtect();">
function formProtect() {
	document.getElementById("contactform").setAttribute("action","cgi-bin/123.pl");
}
