var myKey=1;
var newsKey=1;
var helpKey=1;
var classKey=1;
var sportsTopInt=211;
var buttonleft=850;
var buttontop=179;
var macadjust="";
var headerad=0;
var safariadj="";

if (typeof(istherealeader)=="undefined" || istherealeader===null) {istherealeader="yes";} 

if (istherealeader=="no") {

if (yourversion.indexOf("MSIE 6")!=-1 || yourversion2.indexOf("MSIE 6")!=-1 || yourversion.indexOf("MSIE 7")!=-1 || yourversion2.indexOf("MSIE 7")!=-1) {headerad=113;}

else if (yourversion.indexOf("MSIE 8")!=-1 || yourversion2.indexOf("MSIE 8")!=-1) {headerad=105;}
	else {headerad=111;}
}

buttontop=buttontop-headerad;
sportsTopInt=sportsTopInt-headerad;

function fixMO() {
var cg=document.getElementById("cg");
cg.style.zIndex=-1000;
cg.style.position = "relative";
}

function showCounties() {
document.getElementById("sportsTab").style.zIndex = 100;
if (document.getElementById("sportscounties")) {
document.getElementById("sportscounties").style.visibility = "visible";
document.getElementById("sportscounties").style.zIndex = 100;
}
if (document.getElementById("sportscounties2")) {
document.getElementById("sportscounties2").style.visibility = "visible";
document.getElementById("sportscounties2").style.zIndex = 100;
}
}

function showChoices() {
document.getElementById("newsTab").style.zIndex = 200;
if (document.getElementById("newscounties")) {
document.getElementById("newscounties").style.visibility = "visible";
document.getElementById("newscounties").style.zIndex = 200;
}
if (document.getElementById("newscounties2")) {
document.getElementById("newscounties2").style.visibility = "visible";
document.getElementById("newscounties2").style.zIndex = 200;
}
}

function showHelp() {
document.getElementById("helpTab").style.zIndex = 1200;
document.getElementById("helpcats").style.visibility = "visible";
document.getElementById("helpcats").style.zIndex = 1200;
document.getElementById("helpcats").style.overflow = "visible";
//fixMO();
}

function showClass() {
document.getElementById("classTab").style.zIndex = 200;
document.getElementById("classcats").style.visibility = "visible";
document.getElementById("classcats").style.zIndex = 200;
}


function laterMuch() {
if (myKey==1) {
document.getElementById("sportsTab").style.zIndex = 0;
if (document.getElementById("sportscounties")) {
document.getElementById("sportscounties").style.visibility = "hidden";
document.getElementById("sportscounties").style.zIndex = 100;
}
if (document.getElementById("sportscounties2")) {
document.getElementById("sportscounties2").style.visibility = "hidden";
document.getElementById("sportscounties2").style.zIndex = 100;
}
}
}

function laterMuch2() {
if (newsKey==1) {
document.getElementById("newsTab").style.zIndex = 0;
if (document.getElementById("newscounties")) {
document.getElementById("newscounties").style.visibility = "hidden";
document.getElementById("newscounties").style.zIndex = 200;
}
if (document.getElementById("newscounties2")) {
document.getElementById("newscounties2").style.visibility = "hidden";
document.getElementById("newscounties2").style.zIndex = 200;
}
}
}

function laterMuch3() {
if (helpKey==1) {
document.getElementById("helpTab").style.zIndex = 0;
document.getElementById("helpcats").style.visibility = "hidden";
document.getElementById("helpcats").style.zIndex = 200;
}
}

function laterMuch4() {
if (classKey==1) {
document.getElementById("classTab").style.zIndex = 0;
document.getElementById("classcats").style.visibility = "hidden";
document.getElementById("classcats").style.zIndex = 200;
}
}


function hideCounties() {
setTimeout('laterMuch()', 1000)
}

function hideChoices() {
setTimeout('laterMuch2()', 1000)
}

function hideHelp() {
setTimeout('laterMuch3()', 1000)
}

function hideClass() {
setTimeout('laterMuch4()', 1000)
}


var home1="http://www.gazette.net";
var home2="http://staging.gazette.net";
var home3="http://www.gazette.net/";
var home4="http://staging.gazette.net/";
var home5="http://staging2.gazette.net/";
var thisurl=location.href;
var mont="";
var pg="";
var fred="";
var gbs="";
var sports="";
var politics="";
var biz="";
var ent="";
var speak="";
var jobs="";
var autos="";
var homes="";
var classifieds="";
var topnav;
var writeclassfooter="";
var inc_spotted="no";
var newsop="";
var help="";
var calendarnav="";
var contact="";
var classpath="";
var writethis="";
var dollarsign="dollarsign.gif";
var ou="out";
var ov="over";
var coupon="";

if (thisurl == home1 || thisurl == home2 || thisurl == home3 || thisurl == home4 || thisurl == home5 || thisurl.indexOf(".net/montgomery") != -1 || thisurl.indexOf(".net/princegeorges") != -1 || thisurl.indexOf(".net/frederickcounty") != -1 || thisurl.indexOf(".net/sports") != -1 || thisurl.indexOf(".net/entertainment") != -1) {inc_spotted="yes";} else {inc_spotted="no";}

if (thisurl.indexOf(home1) == -1 && thisurl.indexOf(home2) == -1 && thisurl.indexOf(home3) == -1 && thisurl.indexOf(home4) == -1 && thisurl.indexOf(home5) == -1) {classpath="http://www.gazette.net";}

if (
thisurl.indexOf("mont") != -1 || thisurl.indexOf("aspe") != -1 || thisurl.indexOf("beth") != -1 || thisurl.indexOf("burt") != -1 || thisurl.indexOf("chev") != -1 || thisurl.indexOf("dama") != -1 || thisurl.indexOf("gait") != -1 || thisurl.indexOf("germ") != -1 || thisurl.indexOf("kens") != -1 || thisurl.indexOf("olne") != -1 || thisurl.indexOf("pool") != -1 || thisurl.indexOf("poto") != -1 || thisurl.indexOf("nort") != -1 || thisurl.indexOf("rock") != -1 || thisurl.indexOf("silv") != -1 || thisurl.indexOf("tako") != -1 || thisurl.indexOf("whea") != -1 || thisurl.indexOf("homemlo") != -1
)
{
mont="class='sel'";
pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
gbs="";
}


if (thisurl.indexOf("buyandsell") != -1) {
gbs="class='sel'";
pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
}

if (
thisurl.indexOf("princegeorge") != -1 || thisurl.indexOf("bowi") != -1 || thisurl.indexOf("clin") != -1 || thisurl.indexOf("coll") != -1 || thisurl.indexOf("fort") != -1 || thisurl.indexOf("gree") != -1 || thisurl.indexOf("hyat") != -1 || thisurl.indexOf("land") != -1 || thisurl.indexOf("lanh") != -1 || thisurl.indexOf("larg") != -1 || thisurl.indexOf("laur") != -1 || thisurl.indexOf("newc") != -1 || thisurl.indexOf("port") != -1 || thisurl.indexOf("uppe") != -1 || thisurl.indexOf("pg") != -1 || thisurl.indexOf("homeplo") != -1
)
{
pg="class='sel'";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
}

if (
thisurl.indexOf("prin") != -1 && thisurl.indexOf("silv") == -1 
)
{
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
pg="class='sel'";

}

if (
thisurl.indexOf("fred") != -1 || thisurl.indexOf("brun") != -1 || thisurl.indexOf("midd") != -1 || thisurl.indexOf("newm") != -1 || thisurl.indexOf("thur") != -1 || thisurl.indexOf("urba") != -1 || thisurl.indexOf("walk") != -1 || thisurl.indexOf("frederick") != -1 || thisurl.indexOf("homeflo") != -1
)
{
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
fred="class='sel'";
}

if (thisurl.indexOf("politics") != -1 || thisurl.indexOf("poli") != -1) {
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
politics="class='sel'";
}

if (thisurl.indexOf("business") != -1 || thisurl.indexOf("busi") != -1) {
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
biz="class='sel'";
}

if (thisurl.indexOf("entertainment") != -1 || thisurl.indexOf("ente") != -1) {
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
ent="class='sel'";
}

if (thisurl.indexOf("speak") != -1 || thisurl.indexOf("montlet") != -1 || thisurl.indexOf("prinlet") != -1 || thisurl.indexOf("carrlet") != -1 || thisurl.indexOf("fredlet") != -1 || thisurl.indexOf("montcol") != -1 || thisurl.indexOf("princol") != -1 || thisurl.indexOf("carrcol") != -1 || thisurl.indexOf("fredcol") != -1 || thisurl.indexOf("montedi") != -1 || thisurl.indexOf("prinedi") != -1 || thisurl.indexOf("carredi") != -1 || thisurl.indexOf("frededi") != -1) {
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
speak="class='sel'";
}

if (thisurl.indexOf("/faq") != -1 || thisurl.indexOf("/advertise") != -1 || thisurl.indexOf("/help") != -1 || thisurl.indexOf("/about") != -1 || thisurl.indexOf("/affiliates") != -1) {
pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
help="class='sel'";
}

if (myPage.toLowerCase().indexOf("montgomery") != -1)
{
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
mont="class='sel'";
}

if (myPage.toLowerCase().indexOf("princegeorges") != -1)
{
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
newsop="";
pg="class='sel'";
}

if (myPage.toLowerCase().indexOf("frederick") != -1)
{
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
fred="class='sel'";
}


if (myPage.toLowerCase() == "businesshome")
{
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
biz="class='sel'";
}

if (myPage.toLowerCase() == "entertainmenthome")
{
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
ent="class='sel'";
}

if (myPage.toLowerCase() == "politicshome")
{
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
politics="class='sel'";
}

if (myPage.toLowerCase() == "speakout")
{
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
speak="class='sel'";
	}


if (myPage.toLowerCase().indexOf("sports") != -1)
{
	pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
sports="class='sel'";
}


if (myPage.toLowerCase().indexOf("contact") != -1 || thisurl.indexOf("/contact") != -1)
{	
pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
help="class='sel'";
}

if (myPage.toLowerCase().indexOf("couponpage") != -1 || thisurl.indexOf("/coupon") != -1)
{	
pg="";
fred="";
gbs="";
sports="";
politics="";
biz="";
ent="";
speak="";
jobs="";
autos="";
homes="";
classifieds="";
contact="";
coupon="";
mont="";
gbs="";
coupon="class='sel'";
dollarsign="dollarsignblue.gif"; 
}
if (thisurl.toLowerCase().indexOf("class.gazette") != -1) {sportsTopInt=sportsTopInt-20;}

if (thisurl.toLowerCase().indexOf("classification=jobs") != -1 || thisurl.toLowerCase().indexOf("classification=help") != -1) {buttontop=buttontop+100;}


	if(navigator.appVersion.indexOf("Mac") != -1) {

	macadjust="<style type='text/css'>#classcats {left:772px;} #helpcats {left:932px;} #sportscounties {left:224px;} .nav-row a {padding: 3px 2px 0 2px;} .nav-row a:hover, .nav-row .sel {padding: 5px 2px 0 2px;}</style>";
	buttonleft=buttonleft-12; buttontop=buttontop-1;
}

if (yourversion.indexOf("Safari") != -1)

	{
		buttonleft=buttonleft+7;
		safariadj="<style type='text/css'>#classcats {left:779px;} #helpcats {left:937px;} #sportscounties {left:224px;}</style>";
	}

//var newsTop=sportsTop+"}";

if (yourversion.indexOf("MSIE 6")!=-1 || yourversion2.indexOf("MSIE 6")!=-1 || yourversion.indexOf("MSIE 7")!=-1 || yourversion2.indexOf("MSIE 7")!=-1) {
sportsTopInt=sportsTopInt+13; buttontop=buttontop+13;
}

var sportsTop="{top:"+sportsTopInt+"px;";

var newsTop=sportsTop+"}";
var helpTop=sportsTop+"}";
var classTop=sportsTop+"}";


if (yourversion.indexOf("MSIE 6")!=-1 || yourversion2.indexOf("MSIE 6")!=-1 || yourversion.indexOf("MSIE 7")!=-1 || yourversion2.indexOf("MSIE 7")!=-1) {
sportsTop=sportsTop+" left:232px;";
}

sportsTop=sportsTop+"}";

function swapDollar(huh) {
	if (coupon=="") {
var dollarsignpath=classpath+"/images2/dollarsignblue.gif";
if (huh=="out") {dollarsignpath=classpath+"/images2/dollarsign.gif";} else {dollarsignpath=classpath+"/images2/dollarsignblue.gif";}
var imswap=document.getElementById("ds");
imswap.src=dollarsignpath;
	}
}

//var topnav=macadjust+"<div class='nav-row'><div class='nav-row-bg'><span id='newsTab' style='zIndex:0; height;20px;' onmouseover='newsKey=0; showChoices();' onmouseout='newsKey=1; hideChoices();'><a href='#'"+newsop+"'>News & Opinion</a></span><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><span id='sportsTab' style='zIndex:0; height;20px;' onmouseover='myKey=0; showCounties();' onmouseout='myKey=1; hideCounties();'><a href='#'"+sports+"'>Sports</a></span><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/entertainment/'"+ent+">Entertainment</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='http://calendar.gazette.net/'"+calendarnav+">Calendar</a><img src='"+classpath+"/images/misc/spacer.gif' height='6' width='68' border='0' alt='' /><a href='http://gazettenet.kaango.com/feListAds/categoryID/902'"+autos+">Autos</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/homes/'"+homes+">Homes</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><span id='classTab' style='zIndex:0; height;20px;' onmouseover='classKey=0; showClass();' onmouseout='classKey=1; hideClass();'><a href='#'"+classifieds+"'>Classifieds</a></span><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/coupons/'"+coupon+">Coupon Savings</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/contact/'"+contact+">Contact Us</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><span id='helpTab' style='zIndex:0; height;20px;' onmouseover='helpKey=0; showHelp();' onmouseout='helpKey=1; hideHelp();'><a href='#'"+help+"'>Help</a></span><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/buyandsell/'"+gbs+">Gazette Buy & Sell</a></div></div><div style='z-index:8000; position:absolute; top:"+buttontop+"px; left:"+buttonleft+"px; height:54px;'><a href='http://gazettenet.ca.kaango.com/feListAds?search=&listtype=1&cat=936'"+jobs+"><img src='"+classpath+"/images2/jobsbutton.gif' border='0' alt='Jobs' /></a></div>";

//topnav="<style type='text/css'>#sportscounties "+sportsTop+" #newscounties"+newsTop+" #classcats "+classTop+" #helpcats "+helpTop+"</style>"+topnav; 

var topnav=macadjust+safariadj+"<div class='nav-row'><div class='nav-row-bg'><a href='"+classpath+"/montgomery/'"+mont+">Montgomery</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/princegeorges/'"+pg+">Prince George\'s</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/frederickcounty/'"+fred+">Frederick</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><span id='sportsTab' style='zIndex:0; height;20px;' onmouseover='myKey=0; showCounties();' onmouseout='myKey=1; hideCounties();'><a href='#'"+sports+"'>Sports</a></span><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/business/'"+biz+">Business</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/politics/'"+politics+">Politics</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/entertainment/'"+ent+">Entertainment</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/speakout/'"+speak+">Opinion</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='http://calendar.gazette.net/'"+calendarnav+">Calendar</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='http://gazettenet.kaango.com/feListAds/categoryID/902'"+autos+">Autos</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/homes/'"+homes+">Homes</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><a href='"+classpath+"/buyandsell/'"+gbs+">GazetteBuyandSell.com</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><span id='classTab' style='zIndex:0; height;20px;' onmouseover='classKey=0; showClass();' onmouseout='classKey=1; hideClass();'><a href='#'"+classifieds+"'>Classifieds</a></span><img src='"+classpath+"/images/misc/spacer.gif' height='6' width='39' border='0' alt='' /><a href='"+classpath+"/coupons/'"+coupon+">Coupons</a><img src='"+classpath+"/images/misc/nav_div_2008.gif' border='0' alt='' /><span id='helpTab' style='zIndex:0; height;20px;' onmouseover='helpKey=0; showHelp();' onmouseout='helpKey=1; hideHelp();'><a href='#'"+help+"'>Help</a></span></div></div><div style='z-index:8000; position:absolute; top:"+buttontop+"px; left:"+buttonleft+"px; height:30px;'><a href='http://gazettenet.ca.kaango.com/feListAds?search=&listtype=1&cat=927'"+jobs+"><img src='"+classpath+"/images2/jobsbutton10.gif' border='0' alt='Jobs' /></a></div>";

topnav="<style type='text/css'>#sportscounties "+sportsTop+" #newscounties"+newsTop+" #classcats "+classTop+" #helpcats "+helpTop+"</style>"+topnav; 


if (thisurl.indexOf(home1) == -1 && thisurl.indexOf(home2) == -1 && thisurl.indexOf(home3) == -1 && thisurl.indexOf(home4) == -1 && thisurl.indexOf(home5) == -1) {
function MM_CheckFlashVersion(reqVerStr,msg){

  with(navigator){

    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);

    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);

    if (!isIE || !isWin){  

      var flashVer = -1;

      if (plugins && plugins.length > 0){

        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";

        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;

        if (desc == "") flashVer = -1;

        else{

          var descArr = desc.split(" ");

          var tempArrMajor = descArr[2].split(".");

          var verMajor = tempArrMajor[0];

          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");

          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;

          flashVer =  parseFloat(verMajor + "." + verMinor);

        }

      }

      // WebTV has Flash Player 4 or lower -- too low for video

      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;



      var verArr = reqVerStr.split(",");

      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);

  

      if (flashVer < reqVer){

        if (confirm(msg))

          window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";

      }

    }

  } 

}



function preloadImages() {

	//MM_CheckFlashVersion("9,0,0,0","Content on this page requires a newer version of Macromedia Flash Player. Do you want to download it now?");

}



function MM_preloadImages() {

//	MM_CheckFlashVersion("9,0,0,0","Content on this page requires a newer version of Macromedia Flash Player. Do you want to download it now?");

}
}