if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('Android') != -1)) {  
document.location = "http://www.garyschocker.com/iphone/";  
} 

var leftnav = [
				["Home","index.html"],
				["About Gary","about.html"],
				["News","news.html"],
				["Engagements","engagements.html"],
				["Compositions","comps.html",[["Flute","comps_flute.html"],["Piano","comps_piano.html"],["Voice","comps_voice.html"],["Various","comps_various.html"],["Errata","comps_errata.html"]]],
				["Teaching / Tips","lessons.html"],
				["Photos","photos.html"],
				["Discography","disc.html"],
				["Video","video.html"],
				["Reviews","reviews.html"],
				["GS Headjoint","headjoints.html"],
				["Contact","contact.html"],
				["Mailing List","mailinglist.html"]
				];
				
				

var filepath = window.location.pathname;	
var splitfilepath = filepath.split("/");
var filename = splitfilepath[splitfilepath.length -1];
var splitfilename = filename.split(".");
var subfilename = splitfilename[0];
var splitsubfilename = subfilename.split("_");
var subx = splitsubfilename[0];
var currentnum = "1";
var notitle = 0;

function writeBottom(){
document.write("Gary Schocker | Flutist-Composer | New York, NY | Website by <a href='http://www.spencerlloydweb.com' target='_blank' class='bottomlinks'>Spencer Lloyd<\/a>");
}

function writeNav(){
document.write("<table width='130' cellspacing='0' cellpadding='0' border='0' style='padding-top: 0px; background-color: #ccdff4; border-top: 2px solid #444444; border-bottom: 2px solid #444444'>");

	for (x = 0; x < leftnav.length; x++){
	document.write("<tr class='navrows'>");
	document.write("<td class='navcells'><a href='" + leftnav[x][1] + "' class='navlinks'>" + leftnav[x][0] + "<\/a>");
	
	var catsplit = leftnav[x][1].split(".");
	var cat = catsplit[0];
		if (((leftnav[x][2] != null) && (leftnav[x][1] == filename)) || ((leftnav[x][2] != null) && (subx == cat))){
		document.write("<div class='subnavclass'>");
			for (subloop = 0; subloop < leftnav[x][2].length; subloop++){
				if (leftnav[x][2][subloop][1] == filename){
				document.write("<br>&rarr; " + leftnav[x][2][subloop][0]);
				} else {
				document.write("<br><a href='" + leftnav[x][2][subloop][1] + "' class='subnavlinks'>" + leftnav[x][2][subloop][0] + "<\/a>");
				}
			}
		document.write("<\/div>");
		}
	document.write("<\/td>");
	document.write("<td valign='top' class='arrowcell'>");
		if ((filename == "") && (notitle == 0)){
		document.write("<img src='images/arrow.gif'>");
		notitle++;
		}
		if ((leftnav[x][1] == filename) || (subx == cat)){
		document.write("<img src='images/arrow.gif'>");
		} else if ((leftnav[x][1] == 'mailinglist.html') && (filename == 'ml_thankyou.php')){
		document.write("<img src='images/arrow.gif'>");
		} else if ((leftnav[x][1] == 'contact.html') && (filename == 'contact_thankyou.php')){
		document.write("<img src='images/arrow.gif'>");
		} else {
		document.write("<br>");
		}
	document.write("<\/td>");
	document.write("<\/tr>");
	}
document.write("<\/table>");
}










