﻿
$(document).ready(function(){
	//$("#nav").superfish();
	$("#Login input").Tooltip({
		top: 0
	});
	
	$(".MainRow")
		.mouseover(function() {
			$(this).addClass("HiliteRow");
		})
		.mouseout(function() {
			$(this).removeClass("HiliteRow");
		});
		
	$(".AltRow")
		.mouseover(function() {
			$(this).addClass("HiliteRow");
		})
		.mouseout(function() {
			$(this).removeClass("HiliteRow");
		});

	$(".Label").Tooltip({
		top: -20
	});
	
	$(".ColumnHeader a").Tooltip({
		top: -10,
		left: 20,
		showURL: false
	});
	
	//Came from Profile page
	//$("#MemberForm").validate();
	$(".Phone").mask("999-999-9999");
	$(".BDay").mask("99-aaa");

	$(".DatePick").datepicker({ showOn: 'button', buttonImage: '/includes/calendar/cal.gif', buttonImageOnly: true });
	$(".DatePickAuto").each(function(){
		$(this).datepicker({ showOn: 'both', buttonImage: '/includes/calendar/cal.gif', buttonImageOnly: true });
	});
	$(".DatePickPast").datepicker({yearRange: '-60:-15', showOn: 'both', buttonImage: '/includes/calendar/cal.gif', buttonImageOnly: true});
});

function ToggleAll(f) {
	for (i=0; i < f.elements.length; i++) {
		if (f.elements[i].type == "checkbox") {
			f.elements[i].checked = !(f.elements[i].checked);
		}
	}
}

function Get(name) {
  var fobj
  if (document.getElementById) {
    fobj = document.getElementById(name);
  } else if (document.all) {
    fobj = document.all[name];
  } else if (document.layers) {
    if (document.layers[name]) {
      fobj = document.layers[name];
    } else {
      fobj = document.layers.testP.layers[name];
    }
  }
  return fobj
}

function varPopUp(url, height, width, options) {
    theremote = window.open(url, "theremote", options + ",width=" + width + ",height=" + height);
    window.theremote.focus();
}

