function toggleTracks(div)
{
    var urlString = location.href;
    var strLen = urlString.length;
    var startPos = urlString.lastIndexOf("/")+1;

   // alert(urlString.substr(startPos,strLen - startPos));
    if (urlString.substr(startPos,strLen - startPos)=="tracks.php"){
        // do nothing
    }
    else{
	var loc="http://www.bozracing.com/BozAlpha/tracks.php";
	location.href = loc;
    }
    var option=['attica','bloomington','bristol','calistoga','eagle','eldora','fremont','graysHarbor','husets','kc','knoxville','lakeside','lasVegas','lowes','millstream','ohsweken','selinsgrove','talledega','terreHaute','volusia','williamsGrove','chico'];
    for(var i=0; i<option.length; i++)
    {
        obj=document.getElementById(option[i]);
        if(div==option[i] && obj.style.display=="block")
        {
            return;
        }
        else
        {
            obj.style.display=(option[i]==div) && !(obj.style.display=="block")? "block" : "none";
        }
    }
}
function openForum(){
	var loc="http://www.bozracing.com/forums/viewforum.php?f=13&sid=4edcc5f9f171ea7cfd3b50db97cffbc0";
	var eventWin=window.open(loc, "new", 'width=1024, resizable=1, scrollbars=1, status=0, toolbar=0');
	eventWin.focus();
}
function openContentEditor(homePage){
	var loc="http://www.bozracing.com/BozAlpha/"+homePage;
	location.href = loc;
}
function openSection(homePage){
	var loc="http://www.bozracing.com/BozAlpha/"+homePage;
	location.href = loc;
}
function openResult(eventId){
	var loc="http://www.bozracing.com/BozAlpha/myResult.php?eventId="+eventId;
	var eventWin=window.open(loc, "_blank", 'width=1024, resizable=1, scrollbars=1, status=0, toolbar=0');
	eventWin.focus();
}
function openLaps(resultId, driverId){
	var loc="http://www.bozracing.com/BozAlpha/myLap.php?resultId="+resultId+"&driverId="+driverId;
	var eventWin=window.open(loc, "_blank", 'width=1024, resizable=1, scrollbars=1, status=0, toolbar=0');
	eventWin.focus();
}
function openRfactor(serverType){
    if(serverType=='1')
    {
        serverLink=window.frames["rfactorframe1"].document.forms["serverOpenerForm"].elements["ServerOpener"].value;
    }
    else
    {
        serverLink=window.frames["rfactorframe2"].document.forms["serverOpenerForm"].elements["ServerOpener"].value;
    }
    location.href = serverLink;
}
function pushSourceButton()  {
   var oEditor = FCKeditorAPI.GetInstance('FCKeditor1');  // there is your fckeditor instance name
   oEditor.Commands.GetCommand('Source').Execute();
}