/*
 * This function is used to create an e-mail address with the hopes of 
 * spoofing spiders & mail harvesters. Note that smart mail harvesters
 * can still figure out the e-mail address.
 */
function create_email( domain, user, text ) { 
var ToReturn = ''; 
  if ( domain != '' ) {
    var emailAddr = user + '&#64;' + domain; 
    ToReturn = '<a href="mailto:' + emailAddr + '">'; 
    if ( text == undefined ) { 
      ToReturn = ToReturn + emailAddr; 
    } else { 
      ToReturn = ToReturn + text; 
    } 
    ToReturn = ToReturn + '</a>'; 
  } 
  return ToReturn; 
}

function setRecipientAndSubmit(theForm, user) {
  var domain = "strategiesinaction.com"
  var theEmail = user + "@" + domain
  theForm.recipient.value = theEmail
  alert(theForm.recipient.value )
  theForm.submit()
}

//function doRollover(elem, rollover_color, text_color){
  // set background color of TD
  /*
  if (elem.parentNode){ // IE5, IE6 and Netscape 6
    if (rollover_color == 'transparent'){   // Netscape does not like the word "transparent".
      elem.parentNode.bgColor = '';    
    }
    else{
      elem.parentNode.bgColor=rollover_color;
    }
  }
  else if (elem.parentElement && elem.parentElement.setAttribute){ // IE4.
    elem.parentElement.setAttribute("bgColor", rollover_color);
  }
  else{  // Netscape 4.6x or 4.7x
    //alert("Must be Netscape! do nothing");
  }
  */
  // set color of the link text
//  if (elem.children){  // IE4, IE5, IE6 and Netscape 6
//    elem.children(0).style.color=text_color;
//  }
//}                              

/***********************************************
* Highlight Table Cells Script- © Dynamic Drive DHTML code library
* (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

// Specify highlight behavior. "TD" to highlight table cells, "TR" to
// highlight the entire row:
var highlightbehavior="TD"
var ns6=document.getElementById&&!document.all
var ie=document.all

function changeto(e,elem,highlightcolor,text_color){
  source=ie? event.srcElement : e.target
  if (source.tagName=="TABLE")
    return
  while(source.tagName!=highlightbehavior && source.tagName!="HTML")
    source=ns6? source.parentNode : source.parentElement
  if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore"){
    source.style.backgroundColor=highlightcolor
    elem.children(0).style.color=text_color;
  }
}

function contains_ns6(master, slave) { //check if slave is contained by master
  while (slave.parentNode)
    if ((slave = slave.parentNode) == master)
      return true;
  return false;
}

function changeback(e,elem,originalcolor,text_color){
  if (ie&&(event.fromElement.contains(event.toElement)||
    source.contains(event.toElement)||source.id=="ignore")||
    source.tagName=="TABLE")
    return
  else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
    return
  if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source){
    source.style.backgroundColor=originalcolor
    elem.children(0).style.color=text_color;
  }
}


