function hover_u(status,htmlTag)
{
	if(status == 1) 
	{ 
		htmlTag.style.textDecoration = "underline";
		htmlTag.style.cursor = "pointer";
		htmlTag.style.cursor = "hand";
	} 
	else
	{ 
		htmlTag.style.textDecoration = "none";
	}
}

function hover(status,htmlTag)
{
	if(status == 1) 
	{ 
		htmlTag.style.textDecoration = "underline"; 
		htmlTag.style.cursor = "pointer";
		htmlTag.style.cursor = "hand";
	} 
	else
	{ 
		htmlTag.style.textDecoration = "none";
	}
}

function hover_v_menu(status,htmlTag)
{
	if(status == 1) 
	{ 
		htmlTag.style.backgroundColor = "#EBEBF1"; 
		htmlTag.style.cursor = "pointer";
		htmlTag.style.cursor = "hand";
		htmlTag.style.border = "1px outset #EBEBF1;"; 
	} 
	else
	{ 
		htmlTag.style.backgroundColor = "#FFFFFF";
		htmlTag.style.textDecoration = "none"; 
		htmlTag.style.color = "#000000";
		htmlTag.style.border = "0px"; 
	}
}

function hover_hb_menu(status,htmlTag)
{
	if(status == 1) 
	{ 
		htmlTag.style.color = "#FFFFFF"; 
		htmlTag.style.cursor = "pointer";
		htmlTag.style.cursor = "hand";
	} 
	else
	{ 
		htmlTag.style.color = "#FFFFFF";
	}
}
//combine all of the above functions into one or two functions

function openObject(url,w,h)
{
	newWindow(url,"", w, h, "scrollbars,menubar,resizable,")
}

function rsvp(action_type, event_id, user_id)
{
	if(action_type == "add")
	{
		newWindow("j_events/rsvp_me.php?user_id=" + user_id + "&event_id=" + event_id,"RSVP",420,290, "scrollbars,menubar,resizable,");	
	}
	else
	{
		top.location.href="j_events/rsvp_me_delete.php?user_id=" + user_id + "&event_id=" + event_id;
	}
}

function openObject2(event_id,user_id,w,h)
{
	//window.open("j_events/user_comments.php?id=" + user_id + "&event_id=" + event_id,"","width=" + w + ",height=" + h + ",scrollbars,menubar,resizable,");
	newWindow("j_events/user_comments.php?id=" + user_id + "&event_id=" + event_id,"comments",w ,h, "scrollbars,menubar,resizable,");
}
function newWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + (wint - 120) + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
function getRequired(pg)
{
	top.location.href="index.php?pg="+pg;
	//window.open(pg);
}

function loginValidate()
{
	document.Me.username.style.backgroundColor = "#FFFFFF";
	document.Me.password.style.backgroundColor = "#FFFFFF";
	if(document.Me.username.value == "") 
	{
		document.Me.username.style.backgroundColor = "#FFFF66";
		document.Me.username.focus();
		alert('Please enter your username.  Click "Register w/ MadCityRides" if you have not registered.');
		return(false);
	}
	if(document.Me.password.value == "") 
	{
		document.Me.password.style.backgroundColor = "#FFFF66";
		document.Me.password.focus();
		alert('Please enter your password.  Click "Register w/ MadCityRides" if you have not registered.');		
		return(false);
	}
	document.Me.submit();
	return(true);
}

function goHome()
{
	top.location.href="../index.php?pg=home";
}

function galleryAlbums()
{
	top.location.href="index.php?pg=gallery_albums";
}

function galleryAlbum()
{
	top.location.href="index.php?pg=gallery_album";
}
function galleryCategories()
{
	top.location.href="index.php?pg=gallery_categories";
}



