Rev 17573 | Blame | Compare with Previous | Last modification | View Log | RSS feed
var pheight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);if(document.getElementsByClassName('mobile-recharge')[0] != undefined){document.getElementsByClassName('mobile-recharge')[0].style.minHeight = pheight - 195 +'px';}if(document.getElementsByClassName('dth-recharge')[0] != undefined){document.getElementsByClassName('dth-recharge')[0].style.minHeight = pheight - 195 +'px';}if(document.getElementsByClassName('conf-cont')[0] != undefined){document.getElementsByClassName('conf-cont')[0].style.minHeight = pheight - 170 +'px';}var operatorId;var circleCode;var isOperaMini = (navigator.userAgent.indexOf('Opera Mini') > -1);if(isOperaMini){document.getElementById('operator-list').style.display = "block";}function operator(){var number = document.getElementById('mobile-number').value;number = number.trim();if(!/^\d+$/.test(number)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please Use numbers only for Mobile Number!';window.scrollTo(0,0); return false;}if(number.length == 10){var url = base_url+'recharge/operator/'+number;//window.location.href = a;microAjax(url, function (res) {if(res != ''){var data = JSON.parse(res);var planId;operatorId = data.operatorId;circleCode = data.circleCode;var dropdownlistbox = document.getElementById("mobile-operator");document.getElementById("mobile-operator").disabled = false;for(var x=0;x < dropdownlistbox.length -1 ; x++){if(data.operatorName == dropdownlistbox.options[x].text){dropdownlistbox.selectedIndex = x;var opids ='';for(var i=0;i<plan.length;i++){if(plan[i].operatorId == operatorId){var planId = plan[i].operatorId;opids += '<option value='+plan[i].Name+'>'+plan[i].displayName+'</option>';}}if(planId == operatorId){document.getElementById('plans').style.display = 'block';}else{document.getElementById('plans').style.display = 'none';}document.getElementById('operator-palns').innerHTML = opids;if(special.indexOf(operatorId) != -1){document.getElementById('operatorName').innerHTML = data.operatorName;document.getElementById('special').style.display = 'block';}else{document.getElementById('special').style.display = 'none';}break;}}}});}else if(number.length < 10){if(document.getElementById("mobile-operator").disabled != true){document.getElementById("mobile-operator").disabled = true;}var isOperaMini = (navigator.userAgent.indexOf('Opera Mini') > -1);if(isOperaMini){if(number ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill Your Mobile Number!';window.scrollTo(0,0); return false;}if(!/^\d+$/.test(number)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please Use numbers only for Mobile Number!';window.scrollTo(0,0); return false;}if(number.length != 10){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Mobile Number should be of 10 digits';window.scrollTo(0,0); return false;}}}}function changeOperator(e){var Id = e.currentTarget.value;var opids ='';for(var i=0;i<plan.length;i++){if(plan[i].operatorId == Id){var planId = plan[i].operatorId;opids += '<option value='+plan[i].Name+'>'+plan[i].displayName+'</option>';}}if(planId == Id){document.getElementById('plans').style.display = 'block';}else{document.getElementById('plans').style.display = 'none';}document.getElementById('operator-palns').innerHTML = opids;if(special.indexOf(parseInt(Id)) != -1){var dropdownlistbox = document.getElementById("mobile-operator");var index = e.currentTarget.selectedIndex;document.getElementById('operatorName').innerHTML = dropdownlistbox.options[index].text;;document.getElementById('special').style.display = 'block';}else{document.getElementById('special').style.display = 'none';}}function topup(e){var Id = e.currentTarget.id;var url = base_url+'recharge/topupSpecial/'+Id+'/'+operatorId+'/'+circleCode;microAjax(url, function (res) {if(res != ''){document.getElementsByClassName('rech-cont')[0].style.display = 'none';document.getElementsByClassName('topup-cont')[0].style.display = 'block';var appenddata = document.getElementById('appendlist');//appenddata.innerHTML= appenddata.innerHTML + res;appenddata.innerHTML = res;}});}function closePlan(){//document.getElementsByClassName('rech-cont')[0].style.display = 'block';document.getElementsByClassName('topup-cont')[0].style.display = 'none';}function fillAmount(e){//var amount = e.currentTarget.innerHTML;document.getElementById('mobile-amount').value = amount;document.getElementsByClassName('rech-cont')[0].style.display = 'block';document.getElementsByClassName('topup-cont')[0].style.display = 'none';}function changeName(e){var id = e.currentTarget.value;if(id != -1){var name = dthIdMap[id];document.getElementById('accountName').innerHTML = name;}else if(id == -1){document.getElementById('accountName').innerHTML = 'Account Number :';}}function mobileValidation(){var operator = document.getElementById('mobile-operator');var number = document.getElementById('mobile-number').value;var amount = document.getElementById('mobile-amount').value;var email = document.getElementById("emailId").value;document.getElementById('operator_hidden').value = operator[operator.selectedIndex].text;email = email.trim();var atpos = email.indexOf("@");var dotpos = email.lastIndexOf(".");number = number.trim();if(number ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill Your Mobile Number!';window.scrollTo(0,0); return false;}if(!/^\d+$/.test(number)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please Use numbers only for Mobile Number!';window.scrollTo(0,0); return false;}if(number.length != 10){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Mobile Number should be of 10 digits';window.scrollTo(0,0); return false;}if(operator.selectedIndex == 0){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please select your operator!';window.scrollTo(0,0); return false;}if(amount ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill recharge amount!';window.scrollTo(0,0); return false;}if(!/^\d+$/.test(amount)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please Use numbers only!';window.scrollTo(0,0); return false;}if((parseInt(amount) < 10) || (parseInt(amount) > 1000)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Recharge amount should be between Rs. 10-1000';window.scrollTo(0,0); return false;}if(email ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill email field!';window.scrollTo(0,0); return false;}if((atpos<1) || (dotpos < atpos+2) || (dotpos+2 >= email.length)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill email in correct format!';window.scrollTo(0,0); return false;}if(email.length> 50){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please enter less than 50 characters in email field!';window.scrollTo(0,0); return false;}if(email.indexOf(' ') != -1){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove space from email field!';window.scrollTo(0,0); return false;}if(email != email.trim()){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove space from email field!';window.scrollTo(0,0); return false;}}function dthValidation(){var operator = document.getElementById('dth-operator');var number = document.getElementById('dth-number').value;var amount = document.getElementById('dth-amount').value;var email = document.getElementById("dth-email").value;var value = document.getElementById('accountName').innerHTML;value = value.split(':')[0];document.getElementById('dth_hidden').value = operator[operator.selectedIndex].text;email = email.trim();var atpos = email.indexOf("@");var dotpos = email.lastIndexOf(".");number = number.trim();if(operator.selectedIndex == 0){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please select your operator!';window.scrollTo(0,0); return false;}if(number ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please enter the '+value+'!';window.scrollTo(0,0); return false;}if(!/^\d+$/.test(number)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please Use numbers only for '+value+' field!';window.scrollTo(0,0); return false;}if(amount ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill recharge amount!';window.scrollTo(0,0); return false;}if(!/^\d+$/.test(amount)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please Use numbers only!';window.scrollTo(0,0); return false;}if((parseInt(amount) < 200) || (parseInt(amount) > 2000)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Recharge amount should be between Rs. 200-2000';window.scrollTo(0,0); return false;}if(email ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill email field!';window.scrollTo(0,0); return false;}if((atpos<1) || (dotpos < atpos+2) || (dotpos+2 >= email.length)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill email in correct format!';window.scrollTo(0,0); return false;}if(email.length> 50){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please enter less than 50 characters in email field!';window.scrollTo(0,0); return false;}if(email.indexOf(' ') != -1){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove space from email field!';window.scrollTo(0,0); return false;}}function recahrgeAmount(){var couponCode = document.getElementById('couponCode').value;var recharge_Amount = document.getElementById('recharge_Amount').innerHTML;var rechargeOperator = document.getElementById('rechargeOperator').innerHTML;if(couponCode.length !=0){var url = base_url+'recharge/rechargeAmount/'+recharge_Amount+'/'+couponCode;microAjax(url, function (res) {if(res != ''){var data = JSON.parse(res);if(parseInt(data.couponAmount) == 0){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Invalid Coupon Code!';}else{if(data.payAmount == 0){if(document.getElementById('captcha').style.display == 'none'){changeCaptcha();}//document.getElementById('amount').value = parseInt(data.payAmount);//document.getElementById('recharge_Amount').innerHTML = parseInt(data.payAmount);document.getElementById('payAmount').innerHTML = parseInt(data.payAmount);if(document.getElementById('walletAmount')){if(parseInt(data.walletAmount) == 0){document.getElementById('walletAmount').style.display = 'none';document.getElementById('waText').style.display = 'none';}else{document.getElementById('walletAmount').innerHTML = parseInt(data.walletAmount);}}if(document.getElementById('walletAmountLeft')){if(parseInt(data.walletAmountLeft) == 0 || data.walletAmountLeft == undefined){document.getElementById('walletAmountLeft').style.display = 'none';document.getElementById('walText').style.display = 'none';}else{document.getElementById('walletAmountLeft').innerHTML = parseInt(data.walletAmountLeft);}}document.getElementById('coupon_code').value = document.getElementById('couponCode').value;document.getElementById('payAmount').value = parseInt(data.payAmount);document.getElementById('coupon').style.display = "none";document.getElementById('coupon_msg').innerHTML ='Coupon Code applied!';document.getElementById('submit').value ='Recharge Now';}else{//document.getElementById('amount').value = parseInt(data.payAmount);//document.getElementById('recharge_Amount').innerHTML = parseInt(data.payAmount);document.getElementById('payAmount').innerHTML = parseInt(data.payAmount);document.getElementById('coupon_code').value = document.getElementById('couponCode').value;document.getElementById('payAmount').value = parseInt(data.payAmount);document.getElementById('coupon').style.display = "none";document.getElementById('coupon_msg').innerHTML ='Coupon Code applied!';}}}});}else{document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please enter a Coupon Code!';}}function clearError(){if(document.getElementById('error').style.display == "block"){document.getElementById('error').style.display = "none";}}window.onload=function(){var value = localStorage.getItem('rechargeValue');if(parseInt(value) == 2){if(document.getElementsByClassName('mobile-recharge')[0]){document.getElementsByClassName('mobile-recharge')[0].style.display = 'none';document.getElementsByClassName('dth-recharge')[0].style.display = 'block';document.getElementsByClassName('mobile-re')[0].className = 'mobile-re';document.getElementsByClassName('dth-re')[0].className += ' selected';}}if(document.getElementById('mobile-number').value.length==10){document.getElementById('mobile-operator').disabled = false;}};function changePayment(e){var Id = e.currentTarget.id;var defaultId = defaultPayment.id;if(defaultId != Id){var title = e.currentTarget.textContent.split('+')[0];document.getElementById(defaultId).className = 'card';defaultPayment.nextElementSibling.style.display = 'none';defaultPayment.children[0].innerHTML = '+';document.getElementById(Id).className += ' selected';document.getElementById(Id).children[0].innerHTML = '-';e.currentTarget.nextElementSibling.style.display = 'block';//document.getElementById(Id).style.display = 'block';defaultPayment = e.currentTarget;/*if(typeof _gaq != "undefined" && _gaq != null) {_gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab clicked',title]);}*/ga('send', 'event', 'Payment Option', 'Payment option tab clicked', title);}}var previousDebit;function selectDebitCard(e){var Id = e.currentTarget.id;if(previousDebit == undefined){document.getElementById(Id).className = 'selected';}else if(previousDebit != undefined){document.getElementById(previousDebit).className = '';document.getElementById(Id).className = 'selected';}document.getElementById('pay-debit').value = Id;previousDebit = Id;var title = e.currentTarget.getAttribute('data-parent');title = title+'-'+Id;/*if(typeof _gaq != "undefined" && _gaq != null) {_gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab-payoption selected',title]);}*/ga('send', 'event', 'Payment Option', 'Payment option tab-payoption selected', title);}function selectPayu(e){var Id = e.currentTarget.id;console.log(Id);document.getElementById('pay-payu').value = Id;var title = e.currentTarget.getAttribute('data-parent');title = title+'-'+Id;ga('send', 'event', 'Payment Option', 'Payment option tab-payoption selected', title);}var previousCard;function selectCard(e){var Id = e.currentTarget.id;if(previousCard == undefined){document.getElementById(Id).className = 'selected';}else if(previousCard != undefined){document.getElementById(previousCard).className = '';document.getElementById(Id).className = 'selected';}document.getElementById('pay-credit').value = Id;previousCard = Id;var title = e.currentTarget.getAttribute('data-parent');title = title+'-'+Id;/*if(typeof _gaq != "undefined" && _gaq != null) {_gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab-payoption selected',title]);}*/ga('send', 'event', 'Payment Option', 'Payment option tab-payoption selected', title);}var netBankingInfo;var prevClass;function changeNetBanking(e){var Id;var selected;var hasClass;Id = e.currentTarget.value;if(Id == undefined){selected = 1;Id = e.currentTarget.id;var dropDown = document.getElementById('net');if(dropDown.selectedIndex != 0){dropDown.selectedIndex = 0;}}if(netBankingInfo == undefined){if((selected == 1))document.getElementById(Id).className = 'selected';}else if(netBankingInfo != undefined){if((selected == 1)) {document.getElementById(Id).className = 'selected';if(prevClass == 'selected'){document.getElementById(netBankingInfo).className = '';}}else{if(prevClass == 'selected'){document.getElementById(netBankingInfo).className = '';}}}document.getElementById('pay-net').value = Id;netBankingInfo = Id;prevClass = e.currentTarget.className;var title = e.currentTarget.getAttribute('data-parent');title = title+'-'+Id;/*if(typeof _gaq != "undefined" && _gaq != null) {_gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab-payoption selected',title]);}*/ga('send', 'event', 'Payment Option', 'Payment option tab-payoption selected', title);}function submitform(){if(parseInt(document.getElementById('amountPayable').value) == 0 ){if(document.getElementById('captcha_response_box').value == ''){// document.forms['recharge-confirm'].submit();// }else{var bRed = document.getElementById('captcha_response_box');bRed.style.border = 'red solid 1px';bRed.style.color = 'red';bRed.value = 'Please enter the captcha'setTimeout(function(){bRed.style.border = '';bRed.style.color = '';bRed.value = '';},3000);return false;}}var value = localStorage.getItem('rechargeValue');if(parseInt(value) == 1){/*if(typeof _gaq != "undefined" && _gaq != null) {_gaq.push(['_trackEvent', 'Recharge', 'Confirm','Mobile']);}*/ga('send', 'event', 'Recharge', 'Confirm', 'Mobile');}else if(parseInt(value) == 2){/*if(typeof _gaq != "undefined" && _gaq != null) {_gaq.push(['_trackEvent', 'Recharge', 'Confirm','DTH']);}*/ga('send', 'event', 'Recharge', 'Confirm', 'DTH');}var obj = document.getElementById('submit');obj.style.display = 'none'var textnode = document.createTextNode("Submitting");var errordiv = document.getElementById('error1');errordiv.appendChild(textnode);errordiv.style.display = 'block';}function addressValidation(e){var Id = e.currentTarget.id;if(Id == 'creditcard'){if(previousCard == undefined){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please select payment method!';window.scrollTo(0,0); return false;}}else if(Id == 'debitcard'){if(previousDebit == undefined){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please select payment method!';window.scrollTo(0,0); return false;}}else if(Id == 'netbanking'){var payOption = document.getElementById('pay-net').value;if(payOption == undefined || payOption ==""){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please select payment method!';window.scrollTo(0,0); return false;}}if(document.getElementById('ccAddress')){var error = Id+'error';var fname = document.getElementById(Id).name.value;var street1 = document.getElementById(Id).line1.value;var street2 = document.getElementById(Id).line2.value;var city = document.getElementById(Id).city.value;var state = document.getElementById(Id).state.value;var zipcode = document.getElementById(Id).pincode.value;var phone = document.getElementById(Id).phone.value;if(fname ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill name field!';window.scrollTo(0,0); return false;}if(!removeScript(fname)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove script tags!';window.scrollTo(0,0); return false;}if(fname.length> 50){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please Enter Less Than 50 Characters in name field!';window.scrollTo(0,0); return false;}if(fname !== fname.trim()){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from name field!';window.scrollTo(0,0); return false;}if(fname !== fname.replace(/\s+/g, ' ')){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from name field!';window.scrollTo(0,0); return false;}if(street1 ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill address field!';window.scrollTo(0,0); return false;}if(street1 != street1.trim()){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from address field!';window.scrollTo(0,0); return false;}if(street1 != street1.replace(/\s+/g, ' ')){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from address field!';window.scrollTo(0,0); return false;}if(!removeScript(street1)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove script tags!';window.scrollTo(0,0); return false;}if(street2 != street2.trim()){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from address field!';window.scrollTo(0,0); return false;}if(street2 != street2.replace(/\s+/g, ' ')){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from address field!';window.scrollTo(0,0); return false;}if(!removeScript(street2)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove script tags!';window.scrollTo(0,0); return false;}if(state == -1){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill state field!';window.scrollTo(0,0); return false;}if(!removeScript(state)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove script tags!';window.scrollTo(0,0); return false;}if(city ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill City field!';window.scrollTo(0,0); return false;}if(!removeScript(city)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove script tags!';window.scrollTo(0,0); return false;}if(city != city.trim()){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from city!';window.scrollTo(0,0); return false;}if(city != city.replace(/\s+/g, ' ')){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from city!';window.scrollTo(0,0); return false;}if(zipcode ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill pincode field!';window.scrollTo(0,0); return false;}if(zipcode.length !=6){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Pincode should be 6 digits long';window.scrollTo(0,0); return false;}if(!/^\d+$/.test(zipcode)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please Use numbers only for pincode!';window.scrollTo(0,0); return false;}if(zipcode != zipcode.trim()){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from pincode!';window.scrollTo(0,0); return false;}if(zipcode != zipcode.replace(/\s+/g, ' ')){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from pincode!';window.scrollTo(0,0); return false;}if(phone ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill phone number field!';window.scrollTo(0,0); return false;}if(!/^\d+$/.test(phone)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please Use numbers only for Mobile Number!';window.scrollTo(0,0); return false;}if(phone.length != 10){ document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Mobile number should be of 10 digits!';window.scrollTo(0,0); return false;}if(phone != phone.trim()){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from phone number!';window.scrollTo(0,0); return false;}if(phone != phone.replace(/\s+/g, ' ')){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from phone number!';window.scrollTo(0,0); return false;}}if(document.getElementById('ccPhone')){var phone = document.getElementById(Id).phone.value;phone = phone.trim();if(phone ==''){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please fill phone number field!';window.scrollTo(0,0); return false;}if(!/^\d+$/.test(phone)){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please Use numbers only for Mobile Number!';window.scrollTo(0,0); return false;}if(phone.length != 10){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Mobile number should be of 10 digits!';window.scrollTo(0,0); return false;}if(phone != phone.replace(/\s+/g, ' ')){document.getElementById('error').style.display = "block";document.getElementById('error').innerHTML ='Please remove excess whitespaces from phone number!';window.scrollTo(0,0); return false;}}var value = localStorage.getItem('rechargeValue');if(parseInt(value) == 1){/*if(typeof _gaq != "undefined" && _gaq != null) {_gaq.push(['_trackEvent', 'Recharge', 'Pay Now','Mobile']);}*/ga('send', 'event', 'Recharge', 'Pay Now', 'Mobile');}else if(parseInt(value) == 2){/*if(typeof _gaq != "undefined" && _gaq != null) {_gaq.push(['_trackEvent', 'Recharge', 'Pay Now','DTH']);}*/ga('send', 'event', 'Recharge', 'Pay Now', 'DTH');}}var url;url = document.URL;if(url.indexOf('recharge-result') != -1){// if(orderConfirmation != undefined){// var amount = parseFloat(orderConfirmation['response'].totalAmount).toFixed(2);// var orderId = orderConfirmation['response'].rechargeDisplayId;// var deviceNumber = orderConfirmation['response'].rechargeDeviceNumber;// _gaq.push(['_addTrans',// orderId, // Transaction ID. Required.// 'Saholic', // Affiliation or store name.// amount, // Grand Total.// '0', // Shipping.// '0', // Tax.// "",// "",// "India"// ]);// _gaq.push(['_addItem',// orderId, // Transaction ID. Required.// deviceNumber, // SKU/code.// orderConfirmation['response'].rechargeProvider, // Product name. Required.// 'Digital', // Category or variation.// amount, // Unit price.// '1' // Quantity.// ]);// _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers// }}function showMoreDeals(){window.location.href = base_url+"private-deals/1";}function quickAddToCart(id,catalogId){var email = document.getElementById("email").value;email = email.trim();var url = base_url+'cart/add/'+id+'/'+email+'/'+catalogId;microAjax(url, function(res){if(res!=''){data = JSON.parse(res);if(data['addcart'][0].redirectUrl != undefined && data['addcart'][0].redirectUrl != ''){//window.history.replaceState("",document.title, base_url+'cart');/*if(typeof _gaq != "undefined" && _gaq != null) {_gaq.push(['_trackEvent', 'Order', 'Add To Cart',itemId]);}*/ga('send', 'event', 'Order', 'Add To Cart',id);var ua = navigator.userAgent.toLowerCase();var redirectUrl = data['addcart'][0].redirectUrl;var isIE = ua.indexOf('msie') !== -1;if (isIE){window.location.replace(base_url+redirectUrl);}else{window.location.href = base_url+redirectUrl;}}else if(data['addcart'][0].message != undefined){window.location.href=base_url+document.getElementById(id+"-url").value;}}});}