/* ********* */
/* ALERTS */
/* ********* */
function showAlert(msg,type) {
	$(".GoodAlert").fadeOut(100);
	$(".BadAlert").fadeOut(100);
	myobj = '\
		<div class="'+type+'Alert">\
			<div class="AlertInside">\
				<img src="/images/template/hide.png" alt="HIDE ^" border="0" align="right" vspace="0" style="padding-left: 15px;"/>\
				'+msg+'\
			</div>\
		</div>\
	';

	var alertBox = $(myobj), alertTimer;
	alertBox.fadeTo(600,0.90).click(function(){
		if(alertTimer) clearTimeout(alertTimer);
		alertBox.fadeOut(400);
		t=false;
	});
	alertTimer = setTimeout(function(){alertBox.fadeOut(400);t=false;},6000);
	$("body").prepend(alertBox);
}


/* ************* */
/* MOUSEOVER BOX */
/* ************* */
function hoverPopup(linkObj,content,width,margin) {
	$("body").append('<div id="PopUpBox"><div class="inner"><img src="/images/template/down_arrow.png" alt="" border="0" class="arrowDown" />' + content + '</div></div>');

	var offset = $(linkObj).offset();

	if(width) $("#PopUpBox").css("width", width + "px");
	if(margin) $("#PopUpBox").css("margin", margin);

	$("#PopUpBox").css("top",(offset.top - 30) + "px").css("left",(offset.left) + "px");

	$(linkObj).mouseout(function(){
		$("#PopUpBox").remove();
	});
}

