//--Global declarations
var gblSite	  = "Sorrento Valley Racquetball & Fitness Center"
//var gblEmail  = "SVRacquetball@AbarisTech.com"
var gblEmail  = "SVRFC@sbcglobal.net"
var gblPage   = 0
var gblPages  = 5
var blnIE5    = false;
var userAgent = navigator.userAgent;
var MSIEIndex = userAgent.indexOf("MSIE");
if (userAgent.indexOf("Win")  != -1 &&
	userAgent.indexOf("MSIE") != -1 &&
	userAgent.substring((MSIEIndex + 5),(MSIEIndex + 6)) > 4)
{
	blnIE5 = true;
}
var strRightSideExtra=''; //global variable used to easily enhance the right side.
var gblTitle = document.title
document.title = gblTitle + " - " + gblSite

function DrawLink()
{
document.writeln("<link href='style_all.css' rel='STYLESHEET' type='text/css'>")
if (blnIE5) 
	{
	document.writeln("<link href='style_ie.css' rel='STYLESHEET' type='text/css'>")
	document.writeln("<meta http-equiv='Page-Exit' content='revealTrans(duration=1,transition=12)'>")
	} else {
	document.writeln("<link href='style_ns.css' rel='STYLESHEET' type='text/css'>")
	document.writeln("<meta http-equiv='Pragma' content='no-cache'>")
	}
}

function DrawHeader()
{
var varSide = ""
if (arguments.length == 1) {varSide = arguments[0]}
document.writeln("<table class='clsPage' border='0' width='100%'>")
document.writeln("<tr height='5'><td></td><td></td><td></td><td></td><td></td><td></td></tr>")
document.write("<tr><td height='10'></td><td ")
document.write("valign='top' rowspan='2'>")

document.writeln("<img alt='Logo' src='" + strRoot + "images/svrlogo.gif' width='110' vspace='0'>")
document.writeln("<!--navigation cell-->")
document.write("<table class='clsNav' border='")
if (blnIE5){document.write("0")} else {document.write("1")}
document.write("'><tr><td CLASS='")
if (gblTitle != "Welcome") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='" + strRoot + "index.html'>Welcome</a></td></tr><tr><td CLASS='")
if (gblTitle != "Racquetball") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='" + strRoot + "racquetball.html'>Racquetball</a></td></tr><tr><td CLASS='")
if (gblTitle != "Fitness Classes") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='" + strRoot + "aerobics.html'>Fitness Classes</a></td></tr><tr><td CLASS='")
/*if (gblTitle != "Kettlebell Training") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='" + strRoot + "kettlebell.html'>Kettlebell</a></td></tr><tr><td CLASS='")*/
if (gblTitle != "Personal Training") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='" + strRoot + "training.html'>Personal<br>Training</a></td></tr><tr><td CLASS='")
if (gblTitle != "Virtual Tour") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='javascript:void(0);' onClick=\"var winVT=window.open('http://rtvpix.com/BU-4877-2UHGG4-01', 'VirtualTour', 'location=1,menubar=1,toolbar=0,titlebar=0,scrollbars=1,width=1000,height=800');winVT.focus();return false;\">Virtual<br>Tour</a></td></tr><tr><td CLASS='")
if (gblTitle != "Corporate Membership") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='" + strRoot + "corporate.html'>Corporate<br>Membership</a></td></tr><tr><td CLASS='")
if (gblTitle != "Rates") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='" + strRoot + "rates.html'>Rates</a></td></tr><tr><td CLASS='")
if (gblTitle != "Hours") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='" + strRoot + "hours.html'>Hours</a></td></tr><tr><td CLASS='")
if (gblTitle != "Location") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='" + strRoot + "location.html'>Location</a></td></tr><tr><td CLASS='")
if (gblTitle != "History") {document.write("clsRaised")} else {document.write("clsSunken")}
document.write("'><a class='clsNoLine' href='" + strRoot + "history.html'>History</a></td></tr></table>")

document.writeln("<table class='clsSideDiv'><tr><td><div id='sidediv' class='clsSideDiv'>" + varSide + "</div></td></tr></table></td>")
document.writeln("<td colspan='2' valign='top'>")
document.writeln("<table cellspacing='0' cellpadding='5' width='100%' border='0'>")
document.writeln("<tr><td CLASS='clsHeader'>")
document.writeln("<B>" + gblSite + "</B> - " + gblTitle + "</td></tr>")
if (!blnIE5)
	{
	document.writeln("<tr><td colspan=2><table width='100%' cellpadding=0 cellspacing=0><tr><td height='1' bgcolor='#66ccff' colspan='2'>")
	document.writeln("<img src='images/pixel.gif' hspace=0 vspace=0></td></tr></table></td></tr>")
	}
document.writeln("</table>")

var strRtSideContent
strRtSideContent = "</td><td rowspan='2' align='center' valign='top'>"
strRtSideContent = strRtSideContent + "<img src='" + strRoot + "images/animstartplaying.gif' border='0' alt='Start Playing'><br><a href='racquetball.html#NeedAGame'><img src='" + strRoot + "images/animshowhow.gif' border='0' alt='Need a Game?'></a><br><br><font face='comic sans ms,impact,palatino,lucida' color='red'><b>Non-Members Welcome!<br>Only $9</b></font>"
//strRtSideContent = strRtSideContent + "<br><br><br><a href='EForce.html'><font size='2' face='comic sans ms,impact,palatino,lucida' color='blue'><b>1st Annual<br>E-Force Pro/Am<br>Nov 13-16</font></a><br>"
strRtSideContent = strRtSideContent + "</td><td></td></tr><tr height='100%'>"
document.writeln(strRtSideContent)

document.write("<td height='100%'></td><td width='1'")
if (blnIE5) {document.write(" height='100%'")}
document.writeln("></td>")
document.writeln("<td width='100%' align='middle' valign='top'>")
}

function DrawFooter()
{
document.writeln("</td><td></td></tr>")
document.writeln("<tr><td></td><td colspan='4' valign='bottom'>")

document.writeln("<table cellspacing='0' cellpadding='5' width='100%' border='0'>")
if (!blnIE5)
	{
	document.writeln("<tr><td colspan=3><table width='100%' cellpadding=0 cellspacing=0><tr><td height='1' bgcolor='#66ccff' colspan='2'>")
	document.writeln("<img src='" + strRoot + "images/pixel.gif' hspace=0 vspace=0></td></tr></table></td></tr>")
	}
document.writeln("<tr><td CLASS='clsFooter'>")
document.writeln("<a class='clsNoLine' href='mailto:" + gblEmail + "'><img height='10' src='" + strRoot + "images/ico_mail.gif' width='14' border='0'>&nbsp;" + gblEmail + "</a>")
document.writeln("<BR>Telephone: 858-455-1551</td><td ALIGN='right' CLASS='clsFooter'>")
var date = new Date();

document.writeln("© 2000-" + date.getFullYear() + " <a class='clsNoLine' href='" + strRoot + "index.html'>" + gblSite + "</a>")
document.writeln("<BR><a class='clsNoLine' href='" + strRoot + "location.html'>10999 Sorrento Valley Road, San Diego, California 92121</a>")
document.writeln("<BR><!--IMG SRC='http://207.167.77.89/Scripts/HitTracker.dll?'>Brought to you by <a href='http://www.abaristech.com'>Abaris Technologies</a-->")
document.writeln("</td></tr></table>")
document.writeln("</td><td></td></tr>")
document.writeln("<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>")
document.writeln("</table>")
}

function DrawPhoto(varImage, varWidth, varHeight, varCaption)
{
document.write("<table border=0 cellpadding='0' cellspacing='0' width='100%'>")
document.write("<tr>")
document.write("<td valign='top' colspan='3'><img src='images/pixel.gif' border='0' width='1' height='20' alt=''></td>")
document.write("</tr>")
document.write("<tr>")
document.write("<td valign='top'></td>")
document.write("<td align='center'>")

document.write("<table border=0 class='clsPhoto'>")
document.write("<tr>")
document.write("<td><img border='0' src='images/" + varImage + "' hspace='0' vspace='0' WIDTH='" + varWidth + "' HEIGHT='" + varHeight + "'></td>")
document.write("</tr>")
document.write("<tr>")
document.write("<td class='clsPhoto'>" + varCaption + "</td>")
document.write("</tr></table>")

document.write("</td>")
document.write("<td valign='top'>&nbsp;</td>")
document.write("</tr>")
document.write("</table>")
}

function DrawHeadline(varText)
{
document.writeln("<table class='clsHead'><tr><td class='clsHead'>")
document.writeln(varText)
document.writeln("</td></tr></table>")
}

function ChangeSide(varText)
{
sidediv.innerHTML = varText
}