function getRadioVal( radioObj ) {
	if(!radioObj)
		return undefined;
	var radioLength = radioObj.length;
	if (radioLength == undefined) {
		if (radioObj.checked)
			return radioObj.value;
		else
			return undefined;

	}
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return undefined;
}

function startOtpTransfer( oF ) {
	var val = getRadioVal( oF.subscription_length );
	if (val==undefined) {
		alert( aJSLangDefs.Please_choose_subscription_length );
		return false;
	}
	return true;
}

function OtpResponseCallback( ret ) {
	if (typeof ret.evaluate != "undefined") eval( ret.evaluate );
	if (typeof ret.error != "undefined")
		$("#otp_error").html( ret.error );
}

function CheckOtpResponse( tran_id ) {
	$.ajax( {
		type: "POST",
		cache: false,
		data: {
			"inajax" : 1,
			"ajaxevent" : "check_otp_transaction",
			"tran_id" : tran_id
		},
		success: function( ret ) { return OtpResponseCallback( ret ); }
	} );
}
