function ImgOn(bob){
  document.images[bob].src = "/2004_img/"+bob+"_on.gif"
}

function ImgOff(bob){
  document.images[bob].src = "/2004_img/"+bob+"_off.gif"

  if(SECTION=="home"){
  return;
  }else{
  whatPage()
  }
}


function whatPage(){
  if(document.getElementById && LOC != "" && SECTION != ""){
    if(document.getElementById(LOC).children[0].className == "TIERTWO"){
      document.getElementById(LOC).children[0].className = "TIERTWO_ON"
    } else if(document.getElementById(LOC).children[0].className == "TIERTWO_SUB") {
    document.getElementById(LOC).children[0].className = "TIERTWO_SUB_ON"
    }
//  if(document.all && LOC != "" && SECTION != ""){
//    if(document.all[LOC].children[0].className == "TIERTWO"){
//      document.all[LOC].children[0].className = "TIERTWO_ON"
//    } else if(document.all[LOC].children[0].className == "TIERTWO_SUB") {
//    document.all[LOC].children[0].className = "TIERTWO_SUB_ON"
//    }
  }else{
  }
  if(SECTION != "" && SECTION != "about"){
  document.images[SECTION].src = "/2004_img/"+SECTION+"_on.gif"
  }
  if(document.all){
    if(SECTION == "business"){document.all.colorBar.style.backgroundColor = "#E95600"}
    if(SECTION == "community"){document.all.colorBar.style.backgroundColor = "#EF9A31"}
    if(SECTION == "culture"){document.all.colorBar.style.backgroundColor = "#FFCA05"}
    if(SECTION == "environment"){document.all.colorBar.style.backgroundColor = "#89CC59"}
    if(SECTION == "government"){document.all.colorBar.style.backgroundColor = "#116903"}
    if(SECTION == "publicsafety"){document.all.colorBar.style.backgroundColor = "#19196F"}
    if(SECTION == "transportation"){document.all.colorBar.style.backgroundColor = "#0066CC"}
    if(SECTION == "utilities"){document.all.colorBar.style.backgroundColor = "#009EFF"}
    if(SECTION == "visiting"){document.all.colorBar.style.backgroundColor = "#892122"}
  }else{
    return
  }
}

function cOn(td){
//if(document.getElementById||(document.all && !(document.getElementById))){
// alert(td.className)
//  if(td.className == "TIERTWO"){
//  }else{
//    td.className = "TIERTWO_OVER"
//  }
//}
}

function cOut(td){
//if(document.getElementById||(document.all && !(document.getElementById))){
//  if(td.className == "TIERTWO"){
//  }else{
//    td.className = "TIERTWO_OFF"
//  }
//}
}

function openwindow(address)
{
 window.open(address,"viewer","location=no,status=yes,scrollbars=no,resizable=yes,width=800,height=580")
}
function popWin(where,wide,high){
window.open(where,'newWin','width='+wide+',height='+high+',top=100,left=100,status=yes,scrollbars=no')
}

function video(id){
loC = "http://www.seattlechannel.org/videos/video.asp?ID="+id
//alert (loC)
window.open(loC,"viewer","location=no,status=yes,scrollbars=no,resizable=yes,width=800,height=580")
}

function videoContent(id){
loC = "http://www.seattlechannel.org/videos/video.asp?ID="+id+"&content=1"
window.open(loC,"viewer","location=no,status=yes,scrollbars=no,resizable=yes,width=800,height=580")
}

business = new Array
business[1]= new Array("<b>Business Link #1</b>", "http://www.link1.com", "This is the <b>description</b> for link 1","/2004_IMG/features/icon1.gif")
business[2]= new Array("<b>Business Link #2</b>", "http://www.link2.com", "This is the <b>description</b> for link 2","/2004_IMG/features/icon2.gif")
business[3]= new Array("<b>Business Link #3</b>", "http://www.link3.com", "This is the <b>description</b> for link 3","/2004_IMG/features/icon3.gif")
business[4]= new Array("<b>Business Link #4</b>", "http://www.link4.com", "This is the <b>description</b> for link 4")

community = new Array
community[1]= new Array("<b>Community & Human Services Link #1</b>", "http://www.link1.com", "This is the <b>description</b> for link 1","/2004_IMG/features/icon1.gif")
community[2]= new Array("<b>Community & Human Services Link #2</b>", "http://www.link2.com", "This is the <b>description</b> for link 2","/2004_IMG/features/icon2.gif")
community[3]= new Array("<b>Community & Human Services Link #3</b>", "http://www.link3.com", "This is the <b>description</b> for link 3","/2004_IMG/features/icon3.gif")
community[4]= new Array("<b>Community & Human Services Link #4</b>", "http://www.link4.com", "This is the <b>description</b> for link 4","/2004_IMG/features/icon4.gif")
community[5]= new Array("<b>Community & Human Services Link #5</b>", "http://www.link5.com", "This is the <b>description</b> for link 5")
community[6]= new Array("<b>Community & Human Services Link #6</b>", "http://www.link6.com", "This is the <b>description</b> for link 6")

culture = new Array
culture[1]= new Array("<b>Culture & Recreation Link #1</b>", "http://www.link1.com", "This is the <b>description</b> for link 1","/2004_IMG/features/icon1.gif")
culture[2]= new Array("<b>Culture & Recreation Link #2</b>", "http://www.link2.com", "This is the <b>description</b> for link 2","/2004_IMG/features/icon2.gif")
culture[3]= new Array("<b>Culture & Recreation Link #3</b>", "http://www.link3.com", "This is the <b>description</b> for link 3","/2004_IMG/features/icon3.gif")
culture[4]= new Array("<b>Culture & Recreation Link #4</b>", "http://www.link4.com", "This is the <b>description</b> for link 4")
culture[5]= new Array("<b>Culture & Recreation Link #5</b>", "http://www.link5.com", "This is the <b>description</b> for link 5")
culture[6]= new Array("<b>Culture & Recreation Link #6</b>", "http://www.link6.com", "This is the <b>description</b> for link 6")
culture[7]= new Array("<b>Culture & Recreation Link #7</b>", "http://www.link7.com", "This is the <b>description</b> for link 7")

housing = new Array
housing[1]= new Array("<b>Housing & Neighborhoods Link #1</b>", "http://www.link1.com", "This is the <b>description</b> for link 1","/2004_IMG/features/icon1.gif")
housing[2]= new Array("<b>Housing & Neighborhoods Link #2</b>", "http://www.link2.com", "This is the <b>description</b> for link 2","/2004_IMG/features/icon2.gif")
housing[3]= new Array("<b>Housing & Neighborhoods Link #3</b>", "http://www.link3.com", "This is the <b>description</b> for link 3","/2004_IMG/features/icon3.gif")

publicsafety = new Array
publicsafety[1]= new Array("<b>Public Safety Link #1</b>", "http://www.link1.com", "This is the <b>description</b> for link 1","/2004_IMG/features/icon1.gif")
publicsafety[2]= new Array("<b>Public Safety Link #2</b>", "http://www.link2.com", "This is the <b>description</b> for link 2","/2004_IMG/features/icon2.gif")
publicsafety[3]= new Array("<b>Public Safety Link #3</b>", "http://www.link3.com", "This is the <b>description</b> for link 3","/2004_IMG/features/icon3.gif")
publicsafety[4]= new Array("<b>Public Safety Link #4</b>", "http://www.link4.com", "This is the <b>description</b> for link 4")
publicsafety[5]= new Array("<b>Public Safety Link #5</b>", "http://www.link5.com", "This is the <b>description</b> for link 5")

transportation = new Array
transportation[1]= new Array("<b>Metro Bus Online</b>", "http://transit.metrokc.gov/", "Metro Transit offers bus service, vanpool and carpool options to get around King County, each designed to help increase your mobility and solve your transportation problems.","/2004_IMG/features/bus.gif")
transportation[2]= new Array("<b>Report a Street Repair</b>", "http://www.seattle.gov/transportation/potholereport.htm", "Report non-emergency problems such as potholes, malfunctioning traffic signals, damaged street signs and other minor street repairs.","/2004_IMG/features/pothole.gif")
transportation[3]= new Array("<b>Live Traffic Cameras</b>", "http://www.seattle.gov/trafficcams/default.htm", "View live webcam images focused on Seattle area arterials and intersections.","/2004_IMG/features/camera.gif")

utilities = new Array
utilities[1]= new Array("<b>Utilities Link #1</b>", "http://www.link1.com", "This is the <b>description</b> for link 1","/2004_IMG/features/icon1.gif")
utilities[2]= new Array("<b>Utilities Link #2</b>", "http://www.link2.com", "This is the <b>description</b> for link 2","/2004_IMG/features/icon2.gif")
utilities[3]= new Array("<b>Utilities Link #3</b>", "http://www.link3.com", "This is the <b>description</b> for link 3","/2004_IMG/features/icon3.gif")
utilities[4]= new Array("<b>Utilities Link #4</b>", "http://www.link4.com", "This is the <b>description</b> for link 4")
utilities[5]= new Array("<b>Utilities Link #5</b>", "http://www.link5.com", "This is the <b>description</b> for link 5")
utilities[6]= new Array("<b>Utilities Link #6</b>", "http://www.link5.com", "This is the <b>description</b> for link 6")
utilities[7]= new Array("<b>Utilities Link #7</b>", "http://www.link5.com", "This is the <b>description</b> for link 7")
utilities[8]= new Array("<b>Utilities Link #8</b>", "http://www.link5.com", "This is the <b>description</b> for link 8")
utilities[9]= new Array("<b>Utilities Link #9</b>", "http://www.link5.com", "This is the <b>description</b> for link 9")

yourgov = new Array
yourgov[1]= new Array("<b>Questions/Complaints</b>", "http://www.seattle.gov/CitizenService/", "The Citizens Service Bureau can help you get information, solve problems, or resolve complaints regarding any City of Seattle department.","/2004_IMG/features/icon1.gif")
yourgov[2]= new Array("<b>Seattle Channel</b>", "http://www.seattlechannel.org", "Stay informed about your government and community. Watch City Council meetings, the Mayor's Press Conferences, and a variety of programing focused in on life in Seattle, its current events, civic impacts, and cultural affairs.","/2004_IMG/features/icon2.gif")
yourgov[3]= new Array("<b>View Legislation</b>", "http://www.seattle.gov/council/legdb.htm", "Search for City bills and ordinances, resolutions, comptroller/clerk files, and City Council minutes.","/2004_IMG/features/icon3.gif")
yourgov[4]= new Array("<b>Seattle City Archives</b>", "http://www.seattle.gov/CityArchives/", "Research historic City files, maps, and photographs.")
yourgov[5]= new Array("<b>Events Calendar</b>", "http://www4.cityofseattle.net/events/default_gov.asp", "Get out and participate in events in and around the City.")

visit = new Array
visit[1]= new Array("Woodland Park Zoo", "http://www.zoo.org", "The Zoo is a conservation and education institution demonstrating the value, beauty and interdependence of all living things.","/2004_IMG/features/zoo.gif")
visit[2]= new Array("Seattle Center", "http://www.seattlecenter.com", "The original grounds of the Seattle World’s Fair have been transformed into a center for arts and cultural – there is always something going on.","/2004_IMG/features/spaceneedle.gif")
visit[3]= new Array("Seattle Aquarium", "http://www.seattleaquarium.org", "See, touch and explore our amazing underwater world.  Also enjoy a stroll on the Seattle Waterfront.","/2004_IMG/features/aquarium.gif")
visit[4]= new Array("Pike Place Market", "http://www.pikeplacemarket.org", "The Pike Place Market is the soul of Seattle. The Market\'s traditions, products, and people create a unique shopping destination and a thriving community.","/2004_IMG/features/pikeplace.gif")
visit[5]= new Array("Skagit Tours", "http://www.ci.seattle.wa.us/light/tours/skagit/", "Visit the breathtaking scenic splendor of the North Cascades.","http://www.seattle.gov/light/images/tr4sk_Banner4.jpg")

about = new Array
about[1]= new Array("About Seattle Link #1", "http://www.link1.com", "This is the <b>description</b> for link 1. Nullam elementum risus at nulla. Sed a elit quis ligula blandit pretium.","/2004_IMG/features/icon1.gif")
about[2]= new Array("About Seattle Link #2", "http://www.link2.com", "This is the <b>description</b> for link 2","/2004_IMG/features/icon2.gif")
about[3]= new Array("About Seattle Link #3", "http://www.link3.com", "This is the <b>description</b> for link 3","/2004_IMG/features/icon3.gif")
about[4]= new Array("About Seattle Link #4", "http://www.link4.com", "This is the <b>description</b> for link 4")
about[5]= new Array("About Seattle Link #5", "http://www.link5.com", "This is the <b>description</b> for link 5")

function writeNavVisit(whichNum){
document.write('<p style=\"font-size:10px\"><A href="'+visit[whichNum][1]+'"><img src="'+visit[whichNum][3]+'" alt="'+visit[whichNum][0]+'" width="50" height="50" align="left" border="0"></a><A href="'+visit[whichNum][1]+'">'+visit[whichNum][0]+'</a> - '+visit[whichNum][2]+'</p>')
// document.write('<table width="100%" cellpadding="0" cellspacing="0" border="0">')
// document.write('<td valign="top" width="55"><A href="'+visit[whichNum][1]+'"><img src="'+visit[whichNum][3]+'" alt="'+visit[whichNum][0]+'" width="50" height="50" border="0"></a></td>')
// document.write('<td valign="top"><p style=\"font-size:10px\"><A href="'+visit[whichNum][1]+'">'+visit[whichNum][0]+'</a> - '+visit[whichNum][2]+'</td>')
// document.write('</tr>')
// document.write('</table><br>')
}

function numGenVisit(){
random_num = (Math.round((Math.random()*4)+1))

if (random_num == 5){
writeNavVisit(5);
writeNavVisit(4);
writeNavVisit(3);
writeNavVisit(2);
writeNavVisit(1);
} 
if (random_num == 4){
writeNavVisit(4);
writeNavVisit(3);
writeNavVisit(2);
writeNavVisit(1);
writeNavVisit(5);
}
if (random_num == 3){
writeNavVisit(3);
writeNavVisit(2);
writeNavVisit(1);
writeNavVisit(5);
writeNavVisit(4);
}
if (random_num == 2){
writeNavVisit(2);
writeNavVisit(1);
writeNavVisit(5);
writeNavVisit(4);
writeNavVisit(3);
}
if (random_num == 1){
writeNavVisit(1);
writeNavVisit(5);
writeNavVisit(4);
writeNavVisit(3);
writeNavVisit(2);
}
}



function numGen(){
random_num = (Math.round((Math.random()*arrLen)+1))
random_num2 = (Math.round((Math.random()*arrLen)+1))
random_num3 = (Math.round((Math.random()*arrLen)+1))
  if((random_num == random_num2)||(random_num == random_num3)||(random_num2 == random_num3)){
  numGen()
  }
}
hrefClose="</a>"
ArrLink="<p><a style=\"font-size:10px\" href=\""

function writeNav(tier){
arrLen = tier.length-2
numGen()
random_num_num = (Math.round((Math.random()*2)+1))

if(random_num_num == 1){
  if(tier[random_num][3]!=undefined){
    document.write('<table width="100%" cellpadding="0" cellspacing="0" border="0">')
    document.write('<td valign="top" width="55"><A href="'+tier[random_num][1]+'"><img src="'+tier[random_num][3]+'" alt="'+tier[random_num][0]+'" width="50" height="50" border="0"></a></td>')
	document.write('<td valign="top"><p style=\"font-size:10px\"><A href="'+tier[random_num][1]+'">'+tier[random_num][0]+'</a> - '+tier[random_num][2]+'</td>')
	document.write('</tr>')
    document.write('</table><br>')
  }else{
    document.write(ArrLink + tier[random_num][1]+"\">"+tier[random_num][0]+hrefClose+" - "+tier[random_num][2]);
    document.write("<br><br>")
  }
}
if(random_num_num == 2){
  if(tier[random_num][3]!=undefined){
    document.write('<table width="100%" cellpadding="0" cellspacing="0" border="0">')
    document.write('<td valign="top" width="55"><A href="'+tier[random_num][1]+'"><img src="'+tier[random_num][3]+'" alt="'+tier[random_num][0]+'" width="50" height="50" border="0"></a></td>')
	document.write('<td valign="top"><p style=\"font-size:10px\"><A href="'+tier[random_num][1]+'">'+tier[random_num][0]+'</a> - '+tier[random_num][2]+'</td>')
	document.write('</tr>')
    document.write('</table><br>')
  }else{
    document.write(ArrLink + tier[random_num][1]+"\">"+tier[random_num][0]+hrefClose+" - "+tier[random_num][2]);
    document.write("<br><br>")
  }
  if(tier[random_num2][3]!=undefined){
    document.write('<table width="100%" cellpadding="0" cellspacing="0" border="0">')
    document.write('<td valign="top" width="55"><A href="'+tier[random_num2][1]+'"><img src="'+tier[random_num2][3]+'" alt="'+tier[random_num2][0]+'" width="50" height="50" border="0"></a></td>')
	document.write('<td valign="top"><p style=\"font-size:10px\"><A href="'+tier[random_num2][1]+'">'+tier[random_num2][0]+'</a> - '+tier[random_num2][2]+'</td>')
	document.write('</tr>')
    document.write('</table><br>')
  }else{
    document.write(ArrLink + tier[random_num2][1]+"\">"+tier[random_num2][0]+hrefClose+" - "+tier[random_num2][2]);
    document.write("<br><br>")
  }
}
if(random_num_num == 3){
  if(tier[random_num][3]!=undefined){
    document.write('<table width="100%" cellpadding="0" cellspacing="0" border="0">')
    document.write('<td valign="top" width="55"><A href="'+tier[random_num][1]+'"><img src="'+tier[random_num][3]+'" alt="'+tier[random_num][0]+'" width="50" height="50" border="0"></a></td>')
	document.write('<td valign="top"><p style=\"font-size:10px\"><A href="'+tier[random_num][1]+'">'+tier[random_num][0]+'</a> - '+tier[random_num][2]+'</td>')
	document.write('</tr>')
    document.write('</table><br>')
  }else{
    document.write(ArrLink + tier[random_num][1]+"\">"+tier[random_num][0]+hrefClose+" - "+tier[random_num][2]);
    document.write("<br><br>")
  }
  if(tier[random_num2][3]!=undefined){
    document.write('<table width="100%" cellpadding="0" cellspacing="0" border="0">')
    document.write('<td valign="top" width="55"><A href="'+tier[random_num2][1]+'"><img src="'+tier[random_num2][3]+'" width="50" height="50" alt="'+tier[random_num2][0]+'" border="0"></a></td>')
	document.write('<td valign="top"><p style=\"font-size:10px\"><A href="'+tier[random_num2][1]+'">'+tier[random_num2][0]+'</a> - '+tier[random_num2][2]+'</td>')
	document.write('</tr>')
    document.write('</table><br>')
  }else{
    document.write(ArrLink + tier[random_num2][1]+"\">"+tier[random_num2][0]+hrefClose+" - "+tier[random_num2][2]);
    document.write("<br><br>")
  }
  if(tier[random_num3][3]!=undefined){
    document.write('<table width="100%" cellpadding="0" cellspacing="0" border="0">')
    document.write('<td valign="top" width="55"><A href="'+tier[random_num3][1]+'"><img src="'+tier[random_num3][3]+'" alt="'+tier[random_num3][0]+'" width="50" height="50" border="0"></a></td>')
	document.write('<td valign="top"><p style=\"font-size:10px\"><A href="'+tier[random_num3][1]+'">'+tier[random_num3][0]+'</a> - '+tier[random_num3][2]+'</td>')
	document.write('</tr>')
    document.write('</table><br>')
  }else{
    document.write(ArrLink + tier[random_num3][1]+"\">"+tier[random_num3][0]+hrefClose+" - "+tier[random_num3][2]);
    document.write("<br><br>")
  }



}
}

