Rediff.com: News | Rediffmail | Stock Quotes


Rediff.com: News | Rediffmail | Stock Quotes | Shopping

Sign in
Create Account

comscore

Your browser does not support JavaScript or it may be disabled!

-1){pos2=email.indexOf(“.”,pos1+1);if(pos2==pos1+1){return false;}else{pos1=pos2}}if(atPos==-1){return false;}if(atPos==0){return false;}if(pPos1==0){return false;}if(email.indexOf(“@”,atPos+1)>-1){return false;}if(periodPos==-1){return false;}if(atPos+1==periodPos){return false;}if(periodPos+3>email.length){return false;}return true;}function resetSubscribe(){document.getElementById(‘div_subscribe_nl’).style.display = “none”;document.getElementById(‘subwait_top’).style.visibility = ‘hidden’;document.getElementById(‘div_thanks’).style.display = “none”;document.getElementById(‘div_thanks’).innerHTML = “”;document.getElementById(‘div_err_message’).style.display = “none”;document.getElementById(‘div_err_message’).innerHTML = “”;document.getElementById(‘sub_email_in_top’).value = “”;document.getElementById(‘subscribe_btn_in_top’).disabled = false;document.getElementById(‘frm_subscription_in_top’).style.display = “block”;} function subscribeNewsletterHome(emailfield,subscribebtn){var email = document.getElementById(emailfield).value;var sub_captcha = “”;var section = “homepage-pc”;var article_url = “”;var template = “”;var page_type = “homepage”;var subreq;if(!validEmail(email)){alert(“Please enter a valid email”);document.getElementById(emailfield).focus();return false;} var url= cdn_domain.replace(‘http://’,’//’)+”/newsletter”; var postdata = “email=”+email+”&captcha=”+sub_captcha+”&section=”+section+”&article_url=”+encodeURIComponent(article_url)+”&country=india&template=”+template+”&page_type=”+page_type+”&output=xml”;if (window.XMLHttpRequest){subreq = new XMLHttpRequest();subreq.onreadystatechange = statusstateChanged;subreq.open(“POST”, url, true);subreq.setRequestHeader(“Content-type”, “application/x-www-form-urlencoded”);subreq.send(postdata);}else if (window.ActiveXObject){subreq = new ActiveXObject(“Microsoft.XMLHTTP”);if (subreq){subreq.onreadystatechange = statusstateChanged;subreq.open(“POST”, url, true);subreq.setRequestHeader(“Content-type”, “application/x-www-form-urlencoded”);subreq.send(postdata);}} function statusstateChanged(){if (subreq.readyState==4 || subreq.readyState==”complete”){if(subreq.status == 200){var resp_status = (subreq.responseXML.getElementsByTagName(“status”)[0].firstChild)?subreq.responseXML.getElementsByTagName(“status”)[0].firstChild.nodeValue:0;var resp_message = (subreq.responseXML.getElementsByTagName(“message”)[0].firstChild)?subreq.responseXML.getElementsByTagName(“message”)[0].firstChild.nodeValue:0;if(resp_status == “Success”){if(document.getElementById(‘div_thanks’)){document.getElementById(‘div_thanks’).innerHTML = “Thank you for subscribing !
Close”;document.getElementById(‘div_thanks’).style.display = “block”;document.getElementById(‘div_err_message’).innerHTML = “”;document.getElementById(‘div_err_message’).style.display = “none”;}if(document.getElementById(‘frm_subscription_in_top’)){document.getElementById(‘frm_subscription_in_top’).style.display = “none”;}}else{document.getElementById(‘div_err_message’).innerHTML = resp_message ; document.getElementById(‘div_err_message’).style.display = “block”;if(document.getElementById(subscribebtn)){document.getElementById(subscribebtn).disabled = false;}}if(document.getElementById(‘subwait_top’)){document.getElementById(‘subwait_top’).style.visibility = ‘hidden’;}}}if (subreq.readyState == 1){if(document.getElementById(‘subwait_top’)){document.getElementById(‘subwait_top’).style.visibility = ‘visible’;}if(document.getElementById(subscribebtn)){document.getElementById(subscribebtn).disabled = true;}}} return false;} ]]>

Source

Leave a Reply