// JavaScript Document
// Designed by Alexis Brovko on Behalf of Aubre Hill

function buildToolbar(){
	document.write('<div id="navigation">');
	document.write('<img src="graphics/navigation_logo.png" alt="Aubre Hill" id="logo"/>');
	document.write('<div id="linkBox">');
    document.write('<table id="links"><tr>');
		linkBuilder('home');
		linkBuilder('biography');
		linkBuilder('classes');
		linkBuilder('performances');
		linkBuilder('workshops');
		linkBuilder('gallery');
		linkBuilder('lumina');
		linkBuilder('store');
	document.write('</tr></table>');
    document.write('</div><!--END LINK BOX-->');
	document.write('</div><!--END NAVIGATION-->');
}

function linkBuilder(linkName){
	document.write('<td>');
	document.write('<a id="', linkName, 'Link" ');
	if (linkName!='home'){
		document.write('href="', linkName, '.html" ');
	} else{
		document.write('href="index.html" '); 
	}
	document.write('title="', linkName, '">');
	document.write('<span>', linkName, '</span></a></td>');
	if (linkName!='store'){
		document.write('<td><img src="graphics/navigation_dot.gif"/></td>');
	}		
}

function buildFooter(){
	document.write('<div id="footer">');
	document.write('<table align="center" cellpadding="0" cellspacing="0" id="fanbridge"/>');
	document.write('<tr><td><img src="http://img01.fanbridge.com/images/widget/small/jointhemailingist_black.png" ');
	document.write('width="200" height="30" /></td></tr>');
	document.write('<tr><td><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
	document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" ');
	document.write('width="200" height="32" id="WidgetMailBlack" align="middle">  ');
	document.write('<param name="allowScriptAccess" value="sameDomain" />  ');
	document.write('<param name="movie" value="http://widget.fanbridge.com/widget_small_black.swf" />  ');
	document.write('<param name="quality" value="high" />  <param name="bgcolor" value="#333333" />  ');
	document.write('<param name="flashvars" value="wid=small-4ace7b9edf246-sb&list_id=127592" />');
	document.write('<embed src="http://widget.fanbridge.com/widget_small_black.swf"');
	document.write('flashvars="wid=small-4ace7b9edf246-sb&list_id=127592" quality="high" bgcolor="#333333" width="200" ');
	document.write('height="32" name="WidgetMailBlack" align="middle" swLiveConnect="true" allowScriptAccess="sameDomain"');
	document.write('type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />  ');
	document.write('</object></td>  </tr>  <tr>  <td>');
	document.write('<a href="http://www.fanbridge.com/b.php?id=127592&loc=learn/" target="_blank">');
	document.write('<img src="http://img01.fanbridge.com/images/widget/small/poweredbyFB_black.png" ');
	document.write('width="200" height="15" border="0" /></a></td>  </tr> </table>');
	document.write('<p>To contact Aubre Hill, call 323.868.7111 or email <a href="mailto:aubre@aubrehill.com" target="_blank">aubre@aubrehill.com</a></p>');
	document.write('<div id="abLogo">');
	document.write('<a href="http://www.alexisbrovko.com" target="_blank">');
	document.write('<img src="graphics/abLogo.gif" alt="An Alexis Brovko Design"/></a></div>');
	document.write('</div>');
}

function trackBuild (numTracks){
	document.write('<table width="100%" cellpadding="2" cellspacing="0" align="center">');
	for(i=0; i<numTracks; i++){
		document.write('<tr>');
		if((i%2) == 0){
			document.write('<td class="shadedBg">', i+1, '</td>');
			document.write('<td class="shadedBg">', dvdInfo[i], '</td>');
		}
		else{
			document.write('<td class="addInfo">', i+1, '</td>');
			document.write('<td class="addInfo">', dvdInfo[i], '</td>');
		}
		document.write('</tr>');
	}
	document.write("</table>");
}
function popUp (fileName){
	elementWindow= window.open(fileName,"Window1","width=550,height=650,resizable=yes,scrollbars=yes, location=no");
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
