function showNotifyForm(ev,id,name,code,price) {

	var formInputs="<form method=post action=\"http://trendtimes.stores.yahoo.net/cgi-bin/pro-forma\" target=notifyIFrame class=notifyFormForm><div class=notifyDescription>" + notifyDescription + "</div><table cellspacing=3 cellpadding=2>";
	
	formInputs+="<tr><td>First Name:<td/><td><input type=text name=firstName id=notifyFirstName /></td></tr>";
	formInputs+="<tr><td>Last Name:<td/><td><input type=text name=lastName id=notifyLastName /></td></tr>";
	formInputs+="<tr><td>Email:<td/><td><input type=text name=email id=notifyEmail /></td></tr>";
	formInputs+="<tr><td>Phone:<td/><td><input type=text name=phone id=notifyPhone /></td></tr>";
	formInputs+="<tr><td>Comments:<td/><td><textarea name=comments id=notifyComments></textarea></td></tr>";
	formInputs+="<input type=hidden name=itemId value=\"" + id + "\">";
	formInputs+="<input type=hidden name=itemName value=\"" + name + "\">";
	formInputs+="<input type=hidden name=itemCode value=\"" + code + "\">";
	formInputs+="<input type=hidden name=itemPrice value=\"" + price + "\">";
	formInputs+="<input type=hidden name=subject value=\"Notify me when item will be available\">";
	formInputs+="<input type=hidden name=vwcatalog value=\"trendtimes\">";
	formInputs+="<input type=hidden name=newnames-to value=\"trendtimes\">";
	formInputs+="<input type=hidden name=owner value=\"" + notifyEmail + "\">";
	formInputs+="<input type=hidden name=from value=\"" + notifyEmail + "\">";
	
	formInputs+="</table><div class=notifySubmit><input type=image src=/lib/trendtimes/notifyme.jpg value=\"notify me\" /></div></form>";

	$(window.document.body).append("<iframe name=notifyIFrame class=notifyIFrame></iframe>");

	$(window.document.body).append("<div class=notifyForm><a href=# class=notifyClose><img src=http://lib.store.yahoo.net/lib/trendtimes/scStfPixel.gif /></a>"+formInputs+"<div class=\"notifyThankyou\">" + notifyThankyou + "</div></div>");
	$(window.document.body).append("<div class=notifyWrapper></div>");
	
	$(".notifyWrapper,.notifyClose").click(closeNotifyForm);
	
	$(".notifySubmit input").click(function(ev) {
	
		if ($("#notifyLastName").attr("value")=="" || $("#notifyFirstName").attr("value")=="" || $("#notifyEmail").attr("value")=="") {
			
			alert("Please check all required fields");
			return false;
			
		}
		
		$(".notifyThankyou").show();
		$(".notifyFormForm").hide();
		
		return true;
	
	});
	
	$(".notifyWrapper").css("height",$(window).height() + "px");
	$(".notifyWrapper").css("width",$(window).width() + "px");
	$(".notifyWrapper").css("top",$(window).scrollTop() + "px");
	$(".notifyWrapper").css("left",$(window).scrollLeft() + "px");
	
	centerObj($(".notifyForm"));
	
	if (window.event) {
		window.event.returnValue=false;
	} else {
		ev.preventDefault();
	}
	
	return false;

}

function closeNotifyForm(ev) {
	$(".notifyForm").remove();
	$(".notifyWrapper").remove();
	$(".notifyIFrame").remove();
	
	ev.preventDefault();
	return false;
	
}

function centerObj(obj) {
	obj.css("top", ( $(window).height() - obj.height() ) / 2+$(window).scrollTop() + "px"); 
    obj.css("left", ( $(window).width() - obj.width() ) / 2+$(window).scrollLeft() + "px");
}

