// the G_ object is a keyring to store "G"lobal variables and constants
var G_=new Object();

// browser sniffer significantly reduced and somewhat modified from ns ultimate browser sniffer
{
	var agt=navigator.userAgent.toLowerCase();
	G_.major=parseInt(navigator.appVersion);
	G_.minor=parseFloat(navigator.appVersion);
	G_.nav =((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1));
	G_.nav4=(G_.nav && G_.major==4 && G_.minor>4.05);
	G_.nav6up=(G_.nav && (G_.major >=5));
	G_.ie=(agt.indexOf("msie") !=-1);
	G_.ieMinor=G_.ie?parseFloat(agt.slice(agt.indexOf("msie")+4)):0;
	G_.ieMajor=parseInt(G_.ieMinor);
	// G_.aol=(agt.indexOf("aol") !=-1);
	G_.win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) || (agt.indexOf("windows 16-bit")!=-1));
	G_.win=((agt.indexOf("win")!=-1)||(agt.indexOf("16bit")!=-1));
	G_.mac=(agt.indexOf("mac")!=-1);
	// may want to add opera check back in
}

// in the JS 1.2 section this will attempt to hold the currently installed Flash version number.  It is introduced here so that code needing it will find it even if the Flash detector can't run
var lvlFlash=0; // can lvlFlash work in earlier browsers?  VBscript only introduced late in game; not sure about mimeTypes etc....

function forceFlash(lvl){ // over-ridden in advanced.js
    alert("sorry; this is not supported in your browser.")
}

// remaining functions in this script block are used in page to write Flash or replacement.
function writeRibbon(){
	document.write('<div style="display: none;">This page best seen in a modern, standards compliant browser such as Netscape 6 or IE 6.</div><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td width="90" height="6"><img src="/components/lori/px.gif" width="90" height="6" border="0" /></td><td width="410" height="6"><img src="/components/lori/px.gif" width="410" height="6" border="0" /></td><td width="1000" height="6"><img src="/components/lori/px.gif" width="13" height="6" border="0" /></td><td width="90" height="6"><img src="/components/lori/px.gif" width="90" height="6" border="0" /></td></tr><tr><td colspan="2" rowspan="2" width="500" valign="top" height="61">');
	if(lvlFlash>=5)
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"  ID=ribbon WIDTH=500 HEIGHT=40> <PARAM NAME="movie" VALUE="/components/lori/ribbonOpt.swf"> <PARAM NAME="menu" VALUE="false"> <PARAM NAME="quality" VALUE="high"> <PARAM NAME="bgcolor" VALUE="#FFFFFF"> <EMBED src="/components/lori/ribbonOpt.swf" menu="false" quality="high" bgcolor="#FFFFFF"  WIDTH="500" HEIGHT="40" swLiveConnect="true" NAME="ribbon" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"><NOEMBED><a href="'+portal_url+'/meet/">MEET</a> <a href="'+portal_url+'/hear/">HEAR</a> <a href="'+portal_url+'/explore/">EXPLORE</a> <a href="'+portal_url+'/buy/">BUY</a> <a href="'+portal_url+'/contact/">CONTACT</a></NOEMBED></EMBED></OBJECT>');
	else
		document.write('<img src="/components/lori/ribbonLinks.gif" width="500" height="40" alt="" border="0" usemap="#linkMap"><map name="linkMap"><area alt="Meet Lori Laitman" coords="5,7,60,32" href="'+portal_url+'/meet/"><area alt="Hear sound clips and performances" coords="98,7,158,32" href="'+portal_url+'/hear/"><area alt="Explore the song catalog" coords="194,7,283,32" href="'+portal_url+'/explore/"><area alt="Buy printed music and cds" coords="319,7,364,32" href="'+portal_url+'/buy/"><area alt="Contact Lori" coords="396,7,493,32" href="'+portal_url+'/contact/"></map>');
	document.write('</td><td width="1000" height="40" background="/components/lori/ribbon_body_test.gif"><img src="/components/lori/ribbon_body_test.gif" width="48" height="40" alt="" border="0"></td><td rowspan="3" width="90" height="146" valign="top"><img src="/components/lori/ribbon_tail.gif" width="71" height="74" border="0" /></td></tr><tr><td width="1000" height="21"><img src="/components/lori/px.gif" width="1" height="21" border="0" /></td></tr><tr><td width="90" height="85"><img src="/components/lori/px.gif" width="90" height="85" border="0"></td><td width="1410" height="85" align="center" colspan="2"><img src="/components/lori/logo.gif" width="423" height="85" alt="Lori Laitman, composer" border="0" /></td></tr></table><br />');
}

function writeGallery(){
	var noFlashHtml='<'+'img src="/components/lori/px.gif" width="10" height="33" border="0" align="left"><'+'table border="3" bordercolor="#000000" cellpadding="3" cellspacing="0"><'+'tr><'+'td><'+'p class="side">See all <'+'a href="'+portal_url+'/meet/reviews.html">reviews<'+'/a> and <'+'a href="'+portal_url+'/meet/photos.html">photos<'+'/a>.<'+'/p><'+'p class="side">'+(G_.major>=4?'Please ':'If your browser can use it, ') +'consider downloading <'+'a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">the FREE Macromedia Flash (7 or greater) player<'+'/a> to see this page as designed.  If you think it is already installed, <'+'a href="javascript:forceFlash(7);">click here<'+'/a>.<'+'/p><'+'p align="center"><'+'img src="/artsongs/scroller/images/blackheadshot.jpg" width="137" alt="" border="0"><'+'/p><'+'p class="side">Gregory Berg, NATS, from <'+'em>The Journal of Singing<'+'/em>, Volume 60, No. 3, Jan/Feb 2004:<'+'br />[Lori Laitman\'s Dreaming CD is] a stunning collection of widely varied songs by one of the finest art song composers on the scene today. Lori Laitman deservedly stands shoulder to shoulder with Ned Rorem for her uncommon sensitivity to text, her loving attention to the human voice and its capabilities, and her extraordinary palette of musical colors and gestures.... The rollicking energy of the title track shows us yet another side of Lori Laitman\'s remarkable gifts as a composer, making the dreamed about great review rather prophetic and leaving us hungry for more from this exceptionally gifted genius.<'+'/p><'+'/td><'+'/tr><'+'/table>';
	if(lvlFlash>=7)
		document.write('<'+'OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ID=gallery WIDTH=165 HEIGHT=906> <'+'PARAM NAME=movie VALUE="/artsongs/scroller/gallery.swf"> <'+'PARAM NAME=quality VALUE=high> <'+'PARAM NAME=bgcolor VALUE=#FFFFFF> <'+'EMBED src="/artsongs/scroller/gallery.swf" quality=high bgcolor=#FFFFFF  WIDTH=165 HEIGHT=906 swLiveConnect=true NAME=gallery TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"><'+'/EMBED><'+'NOEMBED>'+noFlashHtml+'<'+'/NOEMBED><'+'/OBJECT><'+'br /><'+'p class="side" align="right"><'+'a href="javascript:forceFlash(0);">Click here<'+'/a><'+'br />to turn off<'+'br />Flash animations<'+'/p>');
	else
		document.write(noFlashHtml);
}
function startMainTable(){
	document.write('<img src="/images/parts/px.gif" width="1" height="30" border="0"><table width="93%" border="5" cellspacing="0" cellpadding="10" align="center" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#FFFFFF" style="border: 5px solid Black;"><tr><td valign="top"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td width="*" valign="top">');
}
function midMainTable(){
	document.write('</td><td width="165" valign="top">');
}
function endMainTable(){
	document.write('</td></tr></table></td></tr></table>');
}
