$(document).ready(function()
{
	$("#<%= txtUser.ClientID %>").focus();
});
function openAuthor()
{
	return window.open("/Author.aspx", "author", "left=0,top=0,width=2000,height=2000,resizable=1"), false;
}

function rot13(s)
{
	return s.replace(
		/[a-zA-Z]/g,
		function(c)
		{
			return String.fromCharCode((c <= 'Z' ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
		}
	);
}
function preLoad(strAnalyticsProfile)
{
	$("a.rot13").each(
		function() {
			this.innerHTML = rot13(this.innerHTML);
			this.href = rot13(this.href);
			//alert(this.innerHTML);
		}
	);
	document.write(unescape("%3Cscript src='" + (("https:" == document.location.protocol) ? "https://ssl." : "http://www.") + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	setTimeout(
		function()
		{
			try
			{
				_gat._getTracker(strAnalyticsProfile || "UA-8647357-1")._trackPageview();
			}
			catch (err)
			{
			}
		}, 100
	);
}

$.fn.fontfit = function(max) {
	var max_size = 18;
	if (typeof (max) == "undefined")
		max = max_size;
	var dheight = $(this).height();
	$(this).wrapInner('<div id="fontfit"></div>');
	var ff = $("#fontfit");
	var cheight = ff.outerHeight();
	var fsize = (($(this).css("font-size")).slice(0, -2)) * 1;
	while (cheight < dheight && fsize < max) {
		fsize += 1;
		$(this).css("font-size", fsize + "px");
		cheight = ff.outerHeight();
	}
	while (cheight > dheight || fsize > max) {
		fsize -= 1;
		$(this).css("font-size", fsize + "px");
		cheight = ff.outerHeight();
	}
	ff.replaceWith(ff.html());
	return this;
}
