$(document).ready(function(){
	hideLabel("userID","User Name");
	hideLabel("password","Password");
	
	$('.map').maphilight({fillColor: 'ffffff', fade: false}); /*set true for fading hover effect*/
	$('map > area').easyTooltip(); /*use for html code version*/
});
//Auto hide label
function hideLabel(obj,text) {
	$("#" + obj).focus(function() {
		if($(this).val() == text) {
			$(this).val("");
		}
	});
	$("#" + obj).blur(function() {
		if($(this).val() == "") {
			$(this).val(text);
		}
	});
}

function sameHeight(obj) {
	if($(obj).length > 0) {
		var maxHCell = 0;
		$(obj).each(function() {
			var thisObj = $(this);
			var thisH = thisObj.height();
			if(maxHCell < thisH) {
				maxHCell = thisH;
			}
		});
		$(obj).height(maxHCell);
	}
}

function equalHeight(obj) {
	if($(obj).length > 0) {
		$(obj).each(function() {
			var thisObj = $(this);
			var maxHCell = 0;
			$(thisObj).children().each(function() {
				var thisCell = $(this);
				var thisH = thisCell.height();
				if(maxHCell < thisH) {
					maxHCell = thisH;
				}
			});
			$(thisObj).children().height(maxHCell);
		});
	}
}

function CreateMailURL(user, domain, subject, textlink)
{
	mailto = user + '@' + domain;
	document.write('<a href="mailto:' + mailto + subject + '">' + textlink + '</a>');
}

function CreateMailURL2(user, domain, subject)
{
	mailto = user + '@' + domain;
	document.write('<a href="mailto:' + mailto + subject + '"' + 'style="text-decoration: underline; color: #0000FF">' + mailto + '</a>');
}
