﻿///<reference name="MicrosoftAjax.js"/>
///<reference path="jquery-1.3.2.js/>
///<reference path="jQuery.validation.1.5.5.js/>
///<reference path="xVal.jquery.validate.js/>
///<reference path="jquery.validation.1.5.5.js/>
function pageLoad()
{
	adjustRBHeight();
	
	var sb = $("input[name='q']");
	sb.addClass("_watermark");
	sb.val("Search");
	sb.focus(function()
	{
		if ($(this).val() == "Search")
		{
			$(this).val("");
		}
		$(this).removeClass("_watermark");
	});

	sb.blur(function()
	{
		if ($(this).val().length == 0)
		{
			$(this).addClass("_watermark");
			$(this).val("Search");
		}
	});
}



function adjustRBHeight()
{
	var rb = $("#rightbarcontainer");
	var mc = $("#maincontent");
	mc.ready(function()
	{
		if (rb && mc)
		{
			if (rb.height() > mc.height())
			{
				return;
			}
			rb.css("height", mc.height());
		}
	});
}