﻿function closeServerResponse()
{
	$("#serverResponse").css("display", "none");
}

function getQueryParams(param)
{
	//var args = new Object(); 
	var query = location.search.substring(1);
	
	var paramValue = "";
	var pairs = query.split("&");
	for (var i = 0; i < pairs.length; i++) { 
		var pos = pairs[i].indexOf('=');
		
		if (pos == -1)
			continue; 
		
		var argname = pairs[i].substring(0, pos); 
		var value = pairs[i].substring(pos + 1);
		
		if (param == argname)
			paramValue = value;
		//args[argname] = unescape(value); 
	}
	
	return paramValue;
}

function showGrayOverlay()
{
	$("#grey_overlay").removeClass("hidden");
}

function hideGrayOverlay()
{
	$("#grey_overlay").addClass("hidden");
}

function popup(url)
{
    window.open(url, "profileViewer", "width=400,height=600,location=yes,menubar=no,resizeable=no,scrollbars=yes");
    return false;
}

$(document).ready(function() {
//	$("#current_date .event").hover(function() {
//		$(this).addClass("highlight");
//	}, function() {
//		$(this).removeClass("highlight");
//	});
//	$("#today_container")
//		.hover(function(e) {
//			$(this).css("display", "block");
//		}, function(e) {
//			$(this).css("display", "none");
//		})
//	$("#current_date")
//		.click(function(e) {
//			e.preventDefault();
//			
//			if ($(this).hasClass("open")) {
//				$(this).removeClass("open");
//			} else {
//				$(this).addClass("open");
//			}
//		});
	
//	setUpFeedback()
});

//function setUpFeedback()
//{
//	$("#feedback")
//		.click(function(e) {
//			if (!$(this).hasClass("open")) {
//				$(this).addClass("open");
//				//$("#ctl00_habFeedback_pnlFeedbackSent").css("display", "none");
//				$("#ctl00_habFeedback_pnlFeedbackForm").css("display", "block");
//			}
//		});
//	$("#ctl00_hyplnkFeedback")
//		.click(function(e) {
//			e.preventDefault();
//			
//			$("#feedback").trigger("click");
//		});
//	$("#ctl00_habFeedback_btnSubmitFeedback").click(function() {
//		$("#feedback").removeClass("open");
//	});
//	$("#ctl00_habFeedback_btnCancelFeedback").click(function() {
//		$("#feedback").removeClass("open");
//	});
//}