function np() {
 return void(0)
}

function IsNumeric(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
}
function goToSection(sectionId) {
 new Ajax.Updater('boxMidHome1', 'get.section.asp', {method: 'post', evalScripts: true, parameters: {sectionId: sectionId}});
}

function goToPrayer(sectionId) {
new Ajax.Updater('boxMidHome2', 'get.prayer.asp', {method: 'post', evalScripts: true, parameters: {sectionId: sectionId}});
}

function goToMember(sectionId) {
 new Ajax.Updater('boxMidHome3', 'get.new.asp', {method: 'post', evalScripts: true, parameters: {sectionId: sectionId}});
}

function goToPrediction(sectionId) {
 new Ajax.Updater('boxPredsHome', 'get.prediction.asp', {method: 'post', evalScripts: true, parameters: {sectionId: sectionId}});
}
function goToAstrologer(sectionId)
{
new Ajax.Updater('astrologer', 'get.astrologer.asp', {method: 'post', evalScripts: true,parameters: {sectionId: sectionId}});
}

function goToYPrediction(sectionId)
{
new Ajax.Updater('mainpage', 'get.yearly_prediction.asp', {method: 'post', evalScripts: true,onSuccess: function() {$('ca_header').scrollTo(0)},parameters: {sectionId: sectionId}});
}

function goArticles(sectionId)
{
new Ajax.Updater('article', 'get.article.asp', {method: 'post', evalScripts: true,onSuccess: function() {$('ca_header').scrollTo(0)},parameters: {sectionId: sectionId}});
}
function goToPlanet(sectionId)
{
new Ajax.Updater('myplanet', 'get.planet.asp', {method: 'post', evalScripts: true,onSuccess: function() {$('ca_header').scrollTo(0)},parameters: {sectionId: sectionId}});
}

function goToMuhurat(sectionId)
{
new Ajax.Updater('muhurat', 'get.muhurat.asp', {method: 'post', evalScripts: true,onSuccess: function() {$('ca_header').scrollTo(0)},parameters: {sectionId: sectionId}});
}


function processFeedback(name,email,feedback) {
 new Ajax.Updater('boxMidHome3', 'process.feedback.asp', {method: 'post', evalScripts: true, parameters: {MyName: name, MyEmail: email, MyFeedback: feedback}});
}

function processCoupon(couponVal,abcd, pcode,phidden,dvalue,rvalue) 
{
	
	if (couponVal.length < 9)
	{
		alert("Invalid Coupon Code");	
		document.getinfo.dcoupon.focus();
	}
	else
	{
		new Ajax.Updater('MyReward', 'process.coupon.asp', {method: 'post', evalScripts: true, parameters: {DiscountCoupon: couponVal, memid: abcd, prod_code: pcode, 	discount_coupon_hidden: phidden, discount_value: dvalue, reward_point: rvalue, act: 'process'}});
		$('divCoupon').innerHTML = '';
		document.getinfo.dcoupon.value="";
	}
}

function processOnlineCoupon(couponVal,abcd, pcode,phidden,dvalue,rvalue) 
{
	
	if (couponVal.length < 9)
	{
		alert("Invalid Coupon Code");	
		document.getinfo.dcoupon.focus();
	}
	else
	{
		new Ajax.Updater('MyReward', 'process.onlinecoupon.asp', {method: 'post', evalScripts: true, parameters: {DiscountCoupon: couponVal, memid: abcd, prod_code: pcode, discount_coupon_hidden: phidden, discount_value: dvalue, reward_point: rvalue, act: 'process'}});
		$('divCoupon').innerHTML = '';
		document.getinfo.dcoupon.value="";
	}
}

function processReward(RPoint,dcoupon, dvalue,Reward,pcode) 
{
	if (IsNumeric(RPoint) == true)
	{
		new Ajax.Updater('MyReward', 'process.reward.asp', {method: 'post', evalScripts: true, parameters: {Reward_Point: RPoint, discount_coupon_hidden: dcoupon, discount_value: dvalue, Old_Reward: Reward, prod_code: pcode, act: 'process'}});
		 $('divReward').innerHTML = '';
		document.getinfo.rpoint.value="0";
	}
	else
	{
		alert("Please Enter Reward Point in Numeric Value only");	
		document.getinfo.rpoint.value="0";
		document.getinfo.rpoint.focus();	
	}
}

function processOnlineReward(RPoint,dcoupon, dvalue,Reward,pcode) 
{
	
	if (IsNumeric(RPoint) == true)
	{
		new Ajax.Updater('MyReward', 'process.onlinereward.asp', {method: 'post', evalScripts: true, parameters: {Reward_Point: RPoint, discount_coupon_hidden: dcoupon, discount_value: dvalue, Old_Reward: Reward, prod_code: pcode, act: 'process'}});
		 $('divReward').innerHTML = '';
		document.getinfo.rpoint.value="0";
	}
	else
	{
		alert("Please Enter Reward Point in Numeric Value only");	
		document.getinfo.rpoint.value="0";
		document.getinfo.rpoint.focus();	
	}
}

function processMemberReward(RPoint,Reward,pcode) 
{
	
	if (IsNumeric(RPoint) == true)
	{
		new Ajax.Updater('MyReward', 'process.memberreward.asp', {method: 'post', evalScripts: true, parameters: {Reward_Point: RPoint, Old_Reward: Reward, prod_code: pcode, act: 'process'}});
		 $('divReward').innerHTML = '';
		document.getinfo.rpoint.value="0";
	}
	else
	{
		alert("Please Enter Reward Point in Numeric Value only");	
		document.getinfo.rpoint.value="0";
		document.getinfo.rpoint.focus();	
	}
}