
// // // // // // // // // // GENERAL SCRIPTS


function addbookmark(url,title){
	if (document.all)
	window.external.AddFavorite(url,title)
	if (navigator.appName!="Microsoft Internet Explorer"){
	alert("For browsers other than Internet Explorer,\nplease press Ctrl-D to bookmark\n\nThank you\!")
	}
}

function fontReset(){
	if(document.getElementById) {
	var area = document.getElementById('main');
	area.style.fontSize = '14px';
	area.style.lineHeight = '20px';
	}
}

function searchingTime(x){
var musicalTerm = document.searchform.input1.value;
var googlePage = 'http://www.google.com/search?q=';
var wikiPage ='http://en.wikipedia.org/wiki/';
	if(musicalTerm != ''){
		if(x == 'google'){
		window.open(googlePage + musicalTerm);
		} else if(x == 'wiki'){
		window.open(wikiPage + musicalTerm);
		} 
	} else
	alert('Please enter a musical term');
}

function searchingTime2(){
var musicalTerm = document.searchform.input1.value;	
var getMe = document.searchform.select1.options.selectedIndex;
var gotMe = document.searchform.select1.options[getMe].value;
var lycosPage = 'http://search.lycos.com/?query=';
var yahooPage = 'http://search.yahoo.com/search?p=';
var askPage = 'http://www.ask.com/web?q=';
var hotbotPage = 'http://www.hotbot.com/?query=';
	if(musicalTerm != ''){
		if(gotMe == 'lycos'){
		window.open(lycosPage + musicalTerm);
		} else if(gotMe == 'yahoo'){
		window.open(yahooPage + musicalTerm);
		} else if(gotMe == 'ask'){
		window.open(askPage + musicalTerm);
		} else if(gotMe == 'hotbot'){
		window.open(hotbotPage + musicalTerm);
		}
	} else
	alert('Please enter a musical term');
}

function key_sniffer(x){		// keys and titles array numbers correspond, DO NOT CHANGE!
var keys = new Array(
'../images/musical/keys/none.gif','../images/musical/keys/1_sharp.gif','../images/musical/keys/2_sharps.gif','../images/musical/keys/3_sharps.gif','../images/musical/keys/4_sharps.gif','../images/musical/keys/5_sharps.gif','../images/musical/keys/6_sharps.gif','../images/musical/keys/7_sharps.gif','../images/musical/keys/1_flat.gif','../images/musical/keys/2_flats.gif','../images/musical/keys/3_flats.gif','../images/musical/keys/4_flats.gif','../images/musical/keys/5_flats.gif','../images/musical/keys/6_flats.gif','../images/musical/keys/7_flats.gif');
var titles = new Array(
'None: C major, A minor','1 sharp: G major, E minor','2 sharps: D major, B minor','3 sharps: A major, F# minor',
'4 sharps: E major, C# minor','5 sharps: B major, G# minor','6 sharps: F# major, D# minor','7 sharps: C# major, A# minor','1 flat: F major, D minor','2 flats: B flat major, G minor','3 flats: E flat major, C minor','4 flats: A flat major, F minor','5 flats: D flat major, B flat minor','6 flats: G flat major, E flat minor','7 flats: C flat major, A flat minor');
	if(x != ''){
	document.answer.src = keys[x];
	document.answer.title = titles[x];
	}
}

function toggle(id){
	if(document.getElementById(id).style.display == 'block'){
	document.getElementById(id).style.display = 'none';
	document.getElementById('filler').style.display = 'block';
	}
	else{document.getElementById(id).style.display = 'block';
	document.getElementById('filler').style.display = 'none';
	}
}

function show_or_hide(x){
var ids = new Array(
'early_years','early_eighties','late_eighties','nineties','late_nineties','early_noughties','mid_noughties');
	for(i=0;i<ids.length;i++){
		if(x == 'show'){
		document.getElementById(ids[i]).style.display = 'block';
		document.getElementById('filler').style.display = 'none';
		} else if(x == 'hide'){
		document.getElementById(ids[i]).style.display = 'none';
		document.getElementById('filler').style.display = 'block';
		}
	}
}


// // // // // // // // // // MUSICAL TERMS POPUPS

// Clarinet

var clarinet_text = "<p><img align=\'right\' src=\'../images/clarinet.jpg\' alt=\'The clarinet\' hspace=\'10\' vspace=\'5\' />The main ancestor of the modern clarinet was a single reed recorder called the <em>chalumeau.</em> Once a register key was added in the late 17th century, the <em>clarinetto</em> (or 'little trumpet') was born. By Mozart\'s time the clarinet had a mixture of finger holes and keys, and the tone of the instrument was already warm and expressive. Mozart loved it and wrote a lot of music for the clarinet family, including some for the now rare Bassett Horn in F.</p><p>In 1839 Hyacinthe Klose applied the Boehm system of keys from the flute, and the clarinet finally obtained it\'s modern appearance. There have been a few adjustments to the design, but nothing major. The common clarinet family ranges from the soprano in E flat, through the B flat and A clarinets, alto in E flat, bass in B flat, contra-alto in E flat and contra-bass in B flat.</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Clarinet\'>&#187;&nbsp;<strong>Wikipedia</strong></a></p>"

var clarinet_caption = "&nbsp;&nbsp;Clarinet - History&nbsp;&nbsp;&nbsp;&nbsp;"

// Flute

var flute_text = "<p><img src=\'../images/flute.jpg\' alt=\'The flute\' align=\'right\' hspace=\'10\' vspace=\'5\' />Flutes are amongst the oldest instruments; some carved from mammoth tusks have been found that date back 30,000 years! They were included in early Western music making, both as an inside and outside instrument, and also exist across most cultures of the world. Some other members of the flute cultural family are the pan pipes, ocarinas and nose flutes.</p><p>The classical flute familiar to Western music is a <em>transverse</em> flute, meaning it is stretched sideways from the mouth and not down (like the pan pipes). The Boehm key system dates from the 19th century, and has been mostly unchanged since then. The common flute family consists of the piccolo, concert flute, alto flute in G and sometimes the bass flute in C.</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Flute\'>&#187;&nbsp;<strong>Wikipedia</strong></a></p>"

var flute_caption = "&nbsp;&nbsp;Flute - History&nbsp;&nbsp;&nbsp;&nbsp;"

// Guitar

var guitar_text = "<p><img align=\'right\' src=\'../images/gtr.gif\' alt=\'The acoustic guitar\' hspace=\'10\' vspace=\'5\' />The modern guitar, both acoustic and electronic, developed from many different sources. The basic concept of strings stretched over a finger board, and plucked or strummed over a cavity to resonate the sound has been around since ancient times. Some of these ancestors include the <em>Sitara</em> (central Asia), <em>kithara</em> (Greece) and <em>quitara</em> (Arabic).</p><p>The Moorish influence in Spain after the 10th century saw an exchange of ideas that helped to shape the Renaissance lute family several centuries later. A lute manufacturer and repairer was called a <em>luthier.</em> From these beginnings came an array of modern instruments, including the mandolin, 6 and 12 string acoustic guitars, ukeleles, steel guitars and many more.</p><p><img align=\'left\' src=\'../images/elec_gtr.gif\' alt=\'The electric guitar\' hspace=\'10\' vspace=\'5\' />In the 1930's, several different manufacturers experimented with electronic amplification of the guitar, resulting in several key innovations. These new guitars had several electronic pickups, different controls for tone and volume and eventually even \"whammy bars,\" which stretch the strings to shake the sound quickly up and down.</p><p>The acoustic (upright) bass needed amplification to balance the regular guitars, so the electric bass was born in much the same way. These guitars have become the main voice of pop, rock, heavy metal and country music heading into the 21st century.</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Guitar\'>&#187;&nbsp;<strong>Wikipedia</strong></a></p>"

var guitar_caption = "&nbsp;&nbsp;Guitar - History&nbsp;&nbsp;&nbsp;&nbsp;"

// Interval

var interval_text = "<p>A musical interval is the distance between two musical tones. They are calculated by measuring the distance inclusive, according to the scale of the current key signature. For example, in C major the interval between C and E is a third (C,D,E).</p><p>In addition to this, intervals may be major, minor, perfect, augmented (expanded by a semi-tone) or diminished (contracted by a semi-tone).</p><p>The intervals of the major scale are:</p><p><center><img src=\'../images/musical/major.jpg\' alt=\'Intervals of the major scale\' /></center></p><p>The intervals of the harmonic minor scale are:</p><p><center><img src=\'../images/musical/minor.jpg\' alt=\'Intervals of the harmonic minor scale\' /></center></p><p>Intervals may be <em>melodic</em> (written one after the other like a short melody), or <em>harmonic</em> (above each other like a chord, as above). They may also be <em>diatonic</em> (changing note name, like F to G flat) or <em>chromatic</em> (retaining note name, like F to F sharp).</p><p>Study of these theory concepts should be accompanied by a decent rest interval!</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Interval_%28music%29\'>&#187;&nbsp;<strong>Wikipedia</strong></a></p>"

var interval_caption = "&nbsp;&nbsp;Musical Intervals&nbsp;&nbsp;&nbsp;&nbsp;"

// Piano

var piano_text = "<p>Precursors to the modern pianoforte include the <em>clavichord,</em> and the <em>harpsichord.</em> In the early Eighteenth century a harpsichord maker called Bartolomeo Cristofori succeeded in constructing hammers that withdrew from the strings after hitting them, enabling the performer to control dynamics by touch rather than stops.</p><p><img src=\'../images/piano2a.gif\' alt=\'The piano\' align=\'right\' hspace=\'10\' vspace=\'5\' />This gave the new instrument its' name - <em>gravicèmbalo col piano e forte</em>, or the \"harpsichord with soft and loud.\" Later Viennese instruments had two strings per note, and have come to be called <em>fortepianos</em> to distinguish them from modern instruments.</p><p>In the Nineteenth century, the Industrial Revolution enabled piano manufacturers to expand the power, range and tone of their instruments. In this era it became common to use three strings for all but the lower notes. The sostenuto pedal was also developed.</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Piano\'>&#187;&nbsp;<strong>Wikipedia</strong></a></p>"

var piano_caption = "&nbsp;&nbsp;Piano - History&nbsp;&nbsp;&nbsp;&nbsp;"

// Saxophone

var saxophone_text = "<p>The saxophone was developed sometime around 1840 by Adolphe Sax, a Belgian instrument maker working in Paris. He intended it to be an instrument with the dexterity of woodwind and the power of brass. He may have been inspired by fitting a clarinet mouthpiece to an <em>ophicleide</em>, a bass tuba common in the 19th century. The word saxophone literally means \'the sound of Sax.\'</p><p><img align=\'right\' src=\'../images/saxophone.gif\' alt=\'The saxophone\' hspace=\'10\' vspace=\'5\' />Even though Sax was friends with great Parisian composer Hector Berlioz, it took a while to convince the musical world of the instrument\'s advantages, and the saxophone was relegated to millitary bands for decades. Eventually it became a regular member of many different ensembles, and today is one of the most common woodwind instruments.</p><p>Sax originally envisaged two complete saxophone families - a band family in E flat and B flat, and an orchestral family in F and C. The band family is commonly used today, from the B flat soprano, through E flat alto and B flat tenor, to the E flat baritone. Sopranino, bass and contra bass are all very rare. The only surviving member of the orchestral family is the C-Melody saxophone, like a tenor in concert pitch. When saxophones are required by orchestral composers, they usually write for alto.</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Saxophone\'>&#187;&nbsp;<strong>Wikipedia</strong></a></p>"

var saxophone_caption = "&nbsp;&nbsp;Saxophone - History&nbsp;&nbsp;&nbsp;&nbsp;"

// Sonata

var sonata_text = "<p>Sonata form dates from the early Classical period, and has been commonly used in the opening movements of symphonies and other major works since then. It consists of three main sections, the <em>Exposition,</em> the <em>Development</em> and the <em>Recapitulation,</em> and usually follows a path similar to this:</p><p><strong>Introduction</strong> - if desired<br /><strong>Exposition</strong> - where the <em>main theme</em> is heard, often followed by a <em>second subject</em> in a related key. Sometimes rounded off with a short <em>codetta</em><br /><strong>Development</strong> - where the themes are musically metamorphosed into all manner of other things. As the Classical era became the Romantic era, this section was vastly expanded<br /><strong>Recapitulation</strong> - where the good old <em>main theme</em> returns in all it\'s glory. The <em>second subject</em> is also recapitulated, in the tonic, then everything comes to a close in the <em>coda</em></p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Sonata_form\'>&#187;&nbsp;<strong>Wikipedia</strong></a></p>"

var sonata_caption = "&nbsp;&nbsp;Sonata form&nbsp;&nbsp;&nbsp;&nbsp;"

// Trombone

var trombone_text = "<p>The word \'trombone\' originates from the Italian <em>tromba</em> meaning trumpet, and <em>-one</em> meaning large - literally a large trumpet. Like the trumpet, the trombone has a cylindrical bore, producing a brash and brassy sound. Ancestors of the modern trombone include the <em>sackbut,</em> Spanish <em>sacabuche</em> and French <em>sacqueboute.</em></p><p><img align=\'right\' src=\'../images/trombone.jpg\' alt=\'A trombone\' hspace=\'10\' vspace=\'5\' />Through the Baroque period the trombone was frequently used out of doors and in cathedrals. By the Classical era, it had become a regular member of the opera orchestra and was appearing more frequently in symphonies. During the Romantic era, orchestras grew in size and more trombones were added: sometimes up to four!</p><p>Through the 20th century the trombone became a solo instrument, with a large repertoire available in the worlds of classical music, jazz, Latin music, rock, concert bands and brass bands.</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Trombone\'>&#187;&nbsp;<strong>Wikipedia</strong></a><br />&nbsp;&nbsp;<a href=\'http://www.andrewbatterham.com/Brass/\'>&#187;&nbsp;<strong>Andrew\'s Brass Instruments Page</strong></a></p>"

var trombone_caption = "&nbsp;&nbsp;Trombone - History&nbsp;&nbsp;&nbsp;&nbsp;"

// Trumpet

var trumpet_text = "<p>The trumpet is one of the oldest recorded instruments, with references in the Bible and relics found in Egypt and China dating from 2000 B.C. Throughout history the trumpet has been used as a herald instrument, in battles and ceremonies. Originally a long tube with a bell and mouthpiece, by the 1300's it had been folded to assume a more manageable shape. In the 1500's Nuremburg became a centre for trumpet making, and concertos began to be written for the instrument.</p><p><img align=\'right\' src=\'../images/trumpet_kid.bmp\' alt=\'A young trumpet player\' hspace=\'10\' vspace=\'5\' />By the late 18th Century trumpets used fingerholes and a system of crooks (extra lengths of piping) to produce different harmonic series, allowing a change of key. Around 1800, simultaneously in several places, first keys then valves were applied to the trumpet to make it a fully chromatic instrument.</p><p>From there it was a short step to the orchestra, and almost every other sort of ensemble right up to the present day world of jazz, rock, Latin and big bands.</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Trumpet\'>&#187;&nbsp;<strong>Wikipedia</strong></a><br />&nbsp;&nbsp;<a href=\'http://www.andrewbatterham.com/Brass/\'>&#187;&nbsp;<strong>Andrew\'s Brass Instruments Page</strong></a></p>"

var trumpet_caption = "&nbsp;&nbsp;Trumpet - History&nbsp;&nbsp;&nbsp;&nbsp;"

// Tuba

var tuba_text = "<p><img align=\'right\' src=\'../images/tuba.jpg\' alt=\'The tuba\' hspace=\'10\' vspace=\'5\' />The tuba is the bass member of the brass family. It is a conical instrument, growing in diameter from start to finish, resulting in a round, warm sound like a french horn (but much lower!). There are many ancestors to the modern tuba, including the <em>ophecliede,</em> the <em>Russian bassoon</em> and the <em>bombardon.</em></p><p>In spite of this, it was not until the mid-19th century that the tuba became a regular member of the orchestra. From there, it branched out into early \"sweet music\" or the beginnings of jazz. In the 20th century the tuba has even become a solo instrument, with many concertos and concert pieces written for the instrument. There are four regular types of tuba - the C and F tubas for classical use, and the E flat and B flat tubas for band use. Wagner developed the <em>Wagner tuba</em> as well, but they are played with a french horn mouthpiece.</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Tuba\'>&#187;&nbsp;<strong>Wikipedia</strong></a><br />&nbsp;&nbsp;<a href=\'http://www.andrewbatterham.com/Brass/\'>&#187;&nbsp;<strong>Andrew\'s Brass Instruments Page</strong></a></p>"

var tuba_caption = "&nbsp;&nbsp;Tuba - History&nbsp;&nbsp;&nbsp;&nbsp;"

// Violin

var violin_text = "<p>Precursors of the modern violin include the Renaissance fiddle and the <em>lira da braccio.</em> Andrea Amati constructed a four string violin as early as 1555, and a set was commissioned by the French King Charles IX in 1560. Stradivarius violins date from a little later, the late 17th and early 18th centuries, and by then the design was changing.</p><p><img align=\'left\' src=\'../images/violin.jpg\' alt=\'The violin\' hspace=\'10\' />Through the 18th century modifications increased the range and power of the violin; the neck was lengthened and the angle was slightly changed. By the 19th century the violin was essentially as we see it today.</p><p>A Stradivarius violin holds the record for the most expensive musical instrument ever sold at auction - $2.03 million US in 2005.</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Violin\'>&#187;&nbsp;<strong>Wikipedia</strong></a></p>"

var violin_caption = "&nbsp;&nbsp;Violin - History&nbsp;&nbsp;&nbsp;&nbsp;"

// Violoncello

var violoncello_text = "<p><img align=\'left\' src=\'../images/cello.jpg\' alt=\'The violoncello\' hspace=\'10\' vspace=\'5\' />Initially developed as a bass violin, the violoncello (or \'little violone\') was not suitable for solo work as the sound was too weak. In ensembles the cello part was doubled by violones until, by the 18th century, the instrument was sufficiently developed to come into its own. Early versions were manufactured, tuned and played in a variety of ways, even on the shoulder like a giant violin!</p><p>By 1750 the Baroque cello had been further refined, and basically resembled the instrument of today. In a symphony orchestra the cello plays a pivotal role, joining the top and bottom halves of the ensemble together. In a string quartet the cello occupies the bass role. There is a vast repertoire of cello music.</p><p>&nbsp;&nbsp;<a href=\'http://en.wikipedia.org/wiki/Cello\'>&#187;&nbsp;<strong>Wikipedia</strong></a></p>"

var violoncello_caption = "&nbsp;&nbsp;Violoncello - History&nbsp;&nbsp;&nbsp;&nbsp;"


