function notify_init(lang,lang_abbr,product_id,submit_value) { var action=notify_getAction(); $.post(action, { product_id:product_id, lang:lang, lang_abbr:lang_abbr, submit_value:submit_value },function(data) { //if(data) notify_echoData(notify_buildForm(data)); } ); } function notify_buildForm(data) { var o='
'+ data+ '
'; //alert(o); return o; } function notify_getAction() { return "/connect/catalog/forms/notify.php"; } function notify_validateComment() { alert("notify_validateComment"); } function notify_parseVars(v) { var l=v.length; var j=0; var s=""; for(var i in v) { s+=i+":"+v[i]; s+=(j++)!=l ? "," : ""; } return s; } function notify_isFormElement(type) { switch(type) { case 'text': case 'hidden': case 'textarea': case 'checkbox': case 'radio': case 'select': return true; break; default: return false; break; } } function notify_submit(qp) { var data = {}; var form = $("#notify_wheretobuy"); form.children().each(function() { var t = $(this); var type=t.attr('type'); if(notify_isFormElement(type)) { var n=t.attr('name'); if(type=="radio") { if(t.attr('checked')) data[n] = t.val(); } else data[n] = t.val(); } }); var action=notify_getAction(); $.post(action,data,function(data) { notify_echoData(notify_buildForm(data)); }); } function notify_echoData(data) { $('#offline_retailer_email').html(data); }