// JavaScript Document

//Contents for About Menu
var menu1=new Array()

//Contents for City and States
var menu2=new Array()
menu2[1]='<a href="http://arizona.<?php print $web_domain; ?>">Arizona</a>'
menu2[2]='<a href="http://boston.<?php print $web_domain; ?>">Boston</a>'
menu2[3]='<a href="http://chicago.<?php print $web_domain; ?>">Chicago</a>'
menu2[4]='<a href="http://connecticut.<?php print $web_domain; ?>">Connecticut</a>'
menu2[5]='<a href="http://florida.<?php print $web_domain; ?>">Florida</a>'
menu2[6]='<a href="http://hawaii.<?php print $web_domain; ?>">Hawaii</a>'
menu2[7]='<a href="http://houston.<?php print $web_domain; ?>">Houston</a>'
menu2[8]='<a href="http://lasvegas.<?php print $web_domain; ?>">Las Vegas</a>'
menu2[9]='<a href="http://losangeles.<?php print $web_domain; ?>">Los Angeles</a>'
menu2[10]='<a href="http://maine.<?php print $web_domain; ?>">Maine</a>'
menu2[11]='<a href="http://newhampshire.<?php print $web_domain; ?>">New Hampshire</a>'
menu2[12]='<a href="http://neworleans.<?php print $web_domain; ?>">New Orleans</a>'
menu2[13]='<a href="http://newyork.<?php print $web_domain; ?>">New York</a>'
menu2[14]='<a href="http://philadelphia.<?php print $web_domain; ?>">Philadelphia</a>'
menu2[15]='<a href="http://portland.<?php print $web_domain; ?>">Portland</a>'
menu2[16]='<a href="http://providence.<?php print $web_domain; ?>">Providence</a>'
menu2[17]='<a href="http://provincetown.<?php print $web_domain; ?>">Provincetown</a>'
menu2[18]='<a href="http://raleigh.<?php print $web_domain; ?>">Raleigh</a>'
menu2[19]='<a href="http://sandiego.<?php print $web_domain; ?>">San Diego</a>'
menu2[20]='<a href="http://sanfrancisco.<?php print $web_domain; ?>">San Francisco</a>'
menu2[21]='<a href="http://seattle.<?php print $web_domain; ?>">Seattle</a>'
menu2[22]='<a href="http://dc.<?php print $web_domain; ?>">Washington DC</a>'
menu2[23]='<a href="http://vermont.<?php print $web_domain; ?>">Vermont</a>'
menu2[24]='<a href="http://www.<?php print $web_domain; ?>">LesbianNightLife Home</a>'

 
//Contents for Events
var menu3=new Array()
menu3[0]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/events.php">View All Events</a>'
menu3[1]='<a href="http://post.<?php print $web_domain; ?>/events/index.php?location=<?php print $main_location_ID_code; ?>" id="top_menu_bar">Post Your Event</a>'
menu3[2]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/channels.php?channel_request=faq&faq=events">Events FAQ</a>'

//Contents for Postings
var menu4=new Array()
menu4[0]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/postings/w4w/">Personals</a>'
menu4[1]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/postings/mis/">Missed Connections</a>'
menu4[2]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/postings/rnr/">Rants and Raves</a>'
menu4[3]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/channels.php?channel_request=faq&faq=posts">Postings FAQ</a>'

//Contents for Listings
var menu5=new Array()
menu5[0]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/clubs_basic.php">Club Profiles</a>'
menu5[1]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/dj_list.php">DJ Profiles</a>'
menu5[2]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/music_list.php">Musicians Profiles</a>'
menu5[3]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/performers_list.php">Entertainer Profiles</a>'
menu5[4]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/business_listings.php">Business Listings</a>'
menu5[5]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/channels.php?channel_request=add_listing">Add a Listing</a>'
menu5[6]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/channels.php?channel_request=faq&faq=listings">Listings/Profiles FAQ</a>'

//Contents for Submit Content 
var menu6=new Array()
menu6[0]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/channels.php?channel_request=content">Submit Content</a>'
menu6[1]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/channels.php?channel_request=faq&faq=content">Content FAQ</a>'

//Contents for Articles
var menu7=new Array()
menu7[0]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/channels.php?channel_request=articles&source=windy_city_times&article_num=0002">Windy City Times</a>'
menu7[1]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/channels.php?channel_request=articles">Article Archives</a>'

//Contents for Photos
var menu8=new Array()
menu8[0]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/photos/index.php">Photo Galleries</a>'
menu8[1]='<a href="http://<?php print $city_name_2; ?>.<?php print $web_domain; ?>/photos/celeb_photos.php">Celebrity Photos</a>'


var menuwidth='165px' // menu width
var menubgcolor='#FFFFFF'  //menu background gcolor
var disappeardelay=250  //menu disappear speed onmouseout (in miliseconds)
var hidemenu_onclick="yes" //hide the menu when ther user clicks within menu - yes or no

//Stop setting variables and options here

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
	if (ie4||ns6)
		dropmenuobj.style.left=dropmenuobj.style.top=-500
		if (menuwidth!=""){
			dropmenuobj.widthobj=dropmenuobj.style
			dropmenuobj.widthobj.width=menuwidth
		}
		if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
			obj.visibility=visible
			else if (e.type=="click")
			obj.visibility=hidden
}

function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
	var edgeoffset=0
		if (whichedge=="rightedge"){
			var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
			dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
			if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
				edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
			} else {
				var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
				var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
				dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
	if (ie4||ns6) return false
	else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


