function tab_show_hide(id){

            var elms = new Array("tabone", "tabtwo", "tabthree", "tabfour", "tabfive", "tabsix");

            var elm_off;

            var elm_on;

            var elm_detail; 

            //turn on the divs we specified in the function call

            var id_off = document.getElementById("tab-"+id+"-off");

            var id_on = document.getElementById("tab-"+id+"-on");

            var id_detail = document.getElementById("detail-"+id);

            id_off.style.display = "none";

            id_on.style.display = "block";

            id_detail.style.display = "block";

            //turn everything else off

            for (i=0; i< elms.length; ++i) {

                        if(id == elms[i]){

                                    continue;

                        } else {

                         elm_off =  document.getElementById("tab-"+elms[i]+"-off");

                         elm_off.style.display = "block";

                         elm_on = document.getElementById("tab-"+elms[i]+"-on");

                         elm_on.style.display = "none";

                         elm_detail = document.getElementById("detail-"+elms[i]);

                         elm_detail.style.display = "none";

                        }

            }

            

}

createNotes=function(){

showNote=function(){
	// gets corresponding note element id
	var id=this.id.replace(/a/,'note');
	note=document.getElementById(id);
	// assigns X,Y mouse coordinates to note element
	note.style.left=event.clientX;
	note.style.top=event.clientY;
	// makes note element visible
	note.style.visibility='visible';
	}
hideNote=function(){ 
	// gets corresponding id for note element
	var id=this.id.replace(/a/,'note');
	note=document.getElementById(id);
	// hides note element
	note.style.visibility='hidden';
	}
	// gets all <a> elements 
	as=document.getElementsByTagName('a');
	// iterates over all <a> elements
	for(i=0;i<as.length;i++){
		// assigns mouse event handlers to <a> elements with class name "special"
		if(/\bspecial\b/.test(as[i].className)){
			// shows note element when mouse is over 
			as[i].onmousemove=showNote;
			// hides note element when mouse is out
			as[i].onmouseout=hideNote;
			}
		}
	}
// execute code once page is loaded
window.onload=createNotes;

function switchMenu(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != "none" ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}
function popUplg(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0, scrollbars=1, location=0, statusbar=0, menubar=0, resizable=0, width=805, height=400, left = 100, top = 100');");
}

 var popUpWin=0;
function tellAFriend()
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  var strsource = document.URL;
  strsource = strsource.replace(/\?/g,"[que]");
  strsource = strsource.replace(/\&/g,"[amp]");
  strsource = strsource.replace(/\%/g,"[prc]");
  strsource = strsource.replace(/\=/g,"[eql]");
  var strtitle = document.title;  
  strtitle = strtitle.replace(/\?/g,"[que]");
  strtitle = strtitle.replace(/\&/g,"[amp]");
  strtitle = strtitle.replace(/\%/g,"[prc]");
  strtitle = strtitle.replace(/\=/g,"[eql]");
  
  var invt = "http://www.iStayGreen.org/invitefriends.cfm"
  //var invt = "invitefriends.cfm"
  invt+='?source='+ strsource + '&txttitle=' + strtitle;
  	popUpWin = open(invt, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width=394,height=530,left=50');
}
function popUpInvite(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width=394,height=530,left=50');");
}
function linktoUs()
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  var strsource = document.URL;
  strsource = strsource.replace(/\?/g,"[que]");
  strsource = strsource.replace(/\&/g,"[amp]");
  strsource = strsource.replace(/\%/g,"[prc]");
  strsource = strsource.replace(/\=/g,"[eql]");
  var strtitle = document.title;  
  strtitle = strtitle.replace(/\?/g,"[que]");
  strtitle = strtitle.replace(/\&/g,"[amp]");
  strtitle = strtitle.replace(/\%/g,"[prc]");
  strtitle = strtitle.replace(/\=/g,"[eql]");
  
  var invt = "http://www.iStayGreen.org/link.cfm"
  //var invt = "link.cfm"
  invt+='?source='+ strsource + '&txttitle=' + strtitle;
  	popUpWin = open(invt, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width=394,height=530,left=50');
}