function escramble(nm, sdom, dom, disp){
 var a,b,c,d,e;
 a='<a href=\"mai';
 b=nm;
 c='\">';
 a+='lto:';
 b+='@';
 e='</a>';
 b+=sdom;
 b+='.';
 b+=dom;

 if (disp) d=disp;
 else d=b;

 document.write(a+b+c+d+e);
}

function toggleDiv(id) {
  id.style.display = (id.style.display == "block" ? "none" : "block");
}

function tabClick(theTab) {
  var theTabs = document.getElementById("navTabs").cells;
  var theDivs = document.getElementById("tabData").cells[0].getElementsByTagName("div");
  
  for (i = 0; i < theTabs.length; i++) {
    if (theTabs[i] == theTab) {
      theTabs[i].className="tabActive";
      theDivs[((i+1)/2)-1].style.display = "block";
    }
    else if (theTabs[i].className == "tabActive") {
      theTabs[i].className="tabInactive";
      theDivs[((i+1)/2)-1].style.display = "none";
    }
  }
}

function chooseTab(theUrl) {
  var id;
  var idStart = theUrl.indexOf("?");

  if (idStart >= 0) {
    id = theUrl.substring(idStart+1);
    tabClick(document.getElementById(id));
  }
}

function setProgress() {
	var goal = 75000;
	var rcvd = 27963.14
	var progress = (rcvd/goal*100);
	var att = document.getElementById("attained");

	att.style.width = progress + "%";
	att.innerHTML = Math.floor(progress) + "%";
}

var musicQuotes = new Array(
"&quot;[An intellectual] is someone who can listen to the &quot;William Tell Overture&quot; without thinking of the Lone Ranger.&quot;<br />~John Chesson",
"&quot;A jazz musician is a juggler who uses harmonies instead of oranges.&quot;<br />~Benny Green",
"&quot;A painter paints pictures on canvas.  But musicians paint their pictures on silence.&quot;<br />~Leopold Stokowski",
"&quot;After silence, that which comes nearest to expressing the inexpressible is music.&quot;<br />~Aldous Huxley, Music at Night and Other Essays",
"&quot;Bach opens a vista to the universe.  After experiencing him, people feel there is meaning to life after all.&quot;<br />~Helmut Walcha",
"&quot;Country music is three chords and the truth.&quot;<br />~Harlan Howard",
"&quot;He who hears music, feels his solitude peopled at once.&quot;<br />~Robert Browning",
"&quot;If a composer could say what he had to say in words he would not bother trying to say it in music.&quot;<br />~Gustav Mahler",
"&quot;If anyone has conducted a Beethoven performance, and then doesn't have to go to an osteopath, then there's something wrong.&quot;<br />~Simon Rattle",
"&quot;If I were to begin life again, I would devote it to music.  It is the only cheap and unpunished rapture upon earth.&quot;<br />~Sydney Smith",
"&quot;In music the passions enjoy themselves.&quot;<br />~Nietzsche, Beyond Good and Evil, 1886",
"&quot;It is incontestable that music induces in us a sense of the infinite and the contemplation of the invisible.&quot;<br />~Victor de LaPrade",
"&quot;Its language is a language which the soul alone understands, but which the soul can never translate.&quot;<br />~Arnold Bennett",
"&quot;Life can't be all bad when for ten dollars you can buy all the Beethoven sonatas and listen to them for ten years.&quot;<br />~William F. Buckley, Jr.",
"&quot;Most people use music as a couch; they want to be pillowed on it, relaxed and consoled for the stress of daily living.  But serious music was never meant to be soporific.&quot;<br />~Aaron Copland",
"&quot;Music can noble hints impart,<br />Engender fury, kindle love,<br />With unsuspected eloquence can move,<br />And manage all the man with secret art.&quot;<br />~Joseph Addison",
"&quot;Music cleanses the understanding; inspires it, and lifts it into a realm which it would not reach if it were left to itself.&quot;<br />~Henry Ward Beecher",
"&quot;Music expresses feeling and thought, without language; it was below and before speech, and it is above and beyond all words.&quot;<br />~Robert G. Ingersoll",
"&quot;Music expresses that which cannot be said and on which it is impossible to be silent.&quot;<br />~Victor Hugo",
"&quot;Music is an outburst of the soul.&quot;<br />~Frederick Delius",
"&quot;Music is love in search of a word.&quot;<br />~Sidney Lanier",
"&quot;Music is moonlight in the gloomy night of life.&quot;<br />~Jean Paul Richter",
"&quot;Music is the art which is most nigh to tears and memory.&quot;<br />~Oscar Wilde",
"&quot;Music is the literature of the heart; it commences where speech ends.&quot;<br />~Alphonse de Lamartine",
"&quot;Music is the medicine of the breaking heart.&quot;<br />~Leigh Hunt",
"&quot;Music is the poetry of the air.&quot;<br />~Richter",
"&quot;Music is the shorthand of emotion.&quot;<br />~Leo Tolstoy",
"&quot;Music is the universal language of mankind.&quot;<br />~Henry Wadsworth Longfellow, Outre-Mer",
"&quot;Music is well said to be the speech of angels.&quot;<br />~Thomas Carlyle, Essays, &quot;The Opera&quot;",
"&quot;Music is what feelings sound like.&quot;<br />~Author Unknown",
"&quot;Music is your own experience, your thoughts, your wisdom.  If you don't live it, it won't come out of your horn.&quot;<br />~Charlie Parker",
"&quot;Music produces a kind of pleasure which human nature cannot do without.&quot;<br />~Confucius",
"&quot;Music was my refuge.  I could crawl into the space between the notes and curl my back to loneliness.&quot;<br />~Maya Angelou, Gather Together in My Name",
"&quot;Music washes away from the soul the dust of everyday life.&quot;<br />~Berthold Auerbach",
"&quot;Music's the medicine of the mind.&quot;<br />~John A. Logan",
"&quot;Music, once admitted to the soul, becomes a sort of spirit, and never dies.&quot;<br />~Edward George Bulwer-Lytton",
"&quot;Music, when soft voices die<br />Vibrates in the memory -&quot;<br />~Percy Bysshe Shelley",
"&quot;My idea is that there is music in the air, music all around us; the world is full of it, and you simply take as much as you require.&quot;<br />~Edward Elgar",
"&quot;My whole trick is to keep the tune well out in front.  If I play Tchaikovsky, I play his melodies and skip his spiritual struggle.&quot;<br />~Liberace",
"&quot;Play the music, not the instrument.&quot;<br />~Author Unknown",
"&quot;Rock music in its lyrics often talks ahead of the time about what's going on in the country.&quot;<br />~Edmund G. Brown",
"&quot;Silence is the fabric upon which the notes are woven.&quot;<br />~Lawrence Duncan",
"&quot;Take a music bath once or twice a week for a few seasons.  You will find it is to the soul what a water bath is to the body.&quot;<br />~Oliver Wendell Holmes",
"&quot;The discovery of song and the creation of musical instruments both owed their origin to a human impulse which lies much deeper than conscious intention:  the need for rhythm in life... the need is a deep one, transcending thought, and disregarded at our peril.&quot;<br />~Richard Baker",
"&quot;The Irish gave the bagpipes to the Scots as a joke, but the Scots haven't got the joke yet.&quot;<br />~Oliver Herford",
"&quot;The joy of music should never be interrupted by a commercial.&quot;<br />~Leonard Bernstein",
"&quot;The notes I handle no better than many pianists.  But the pauses between the notes - ah, that is where the art resides!&quot;<br />~Artur Schnabel",
"&quot;The pause is as important as the note.&quot;<br />~Truman Fisher",
"&quot;The pleasure we obtain from music comes from counting, but counting unconsciously.  Music is nothing but unconscious arithmetic.&quot;<br />~Gottfried Wilhelm Leibniz",
"&quot;There is no truer truth obtainable<br />By Man than comes of music.&quot;<br />~Robert Browning",
"&quot;There is nothing in the world so much like prayer as music is.&quot;<br />~William P. Merrill",
"&quot;What passion cannot music raise and quell!&quot;<br />~John Dryden",
"&quot;When words leave off, music begins.&quot;<br />~Heinrich Heine",
"&quot;Why waste money on psychotherapy when you can listen to the B Minor Mass?&quot;<br />~Michael Torke",
"&quot;Without music life would be a mistake.&quot;<br />~Friedrich Wilhelm Nietzsche",
"&quot;You are the music while the music lasts.&quot;<br />~T.S. Eliot",
"&quot;You can't possibly hear the last movement of Beethoven's Seventh and go slow.&quot;<br />~Oscar Levant, explaining his way out of a speeding ticket"
);

function getQuote() {
	return musicQuotes[Math.floor(Math.random()*(musicQuotes.length-1))];
}

function setTargets(tagList) {
	var aTags = tagList.split(",");
	var tags;
	var tag;

	for (i = 0; i < aTags.length; i++) {
		tags = document.getElementsByTagName(aTags[i]);
		for (j = 0; j < tags.length; j++) { 
			tag = tags[j];
			if (tag.getAttribute("rel") == "external") {
				tag.target = "_blank";
			}
		} 
	}
}

function setInputNames() {
	var f = document.getElementsByTagName("form");
	var inputs;
	var input;

	for (var i = 0; i < f.length; i++) {
		if (f.name == "" && f.id != "") {
			f.name = f.id;
		}
		inputs = f[i].getElementsByTagName("input");
		for (var j = 0; j < inputs.length; j++) {
			input = inputs[j];
			if (input.name == "" && input.id != "") {
				input.name = input.id;
			}
		}
	}
}

function validateNumber(amount){
	return amount.value.match( /^[0-9]+(\.([0-9]+))?$/);
}
