// JavaScript Document<!--
function OpenWin ( )
	{
		var width = 545;
		var height = 420;
		var top = parseInt( (screen.availHeight - height) / 2 );
		var left = parseInt( (screen.availWidth - width) / 2 );
		
		window.open( '2257.php','Edit','top='+top+',left='+left+',width='+width+',height='+height+',scrollbars=no' );
		
		return true;
	}
	
	//This array will contain all the Membership options available
        var recurringOption = new Array("$2.95 - 3 Day Trial","$19.95 - 30 Days","$39.95 - 90 Days","$74.95 - 180 Days");
        var recurringValue = new Array("0000000019","0000000014","0000000033","0000016935");
                                                                                                                                                                                 
        var phoneOption = new Array("$19.95 - 30 Days", "$34.95 - 75 Days");
        var phoneValue = new Array("0000000016","0000016950");


	/**
	 * This fuction will change Membership Options text and value based on the selection of Payment Option
	 */
	function changeMemberShip()
	{
		var packageCtl = document.frmJoin.elements["subscriptionTypeId"];

		//will fetch value of payment option selected
                var selectedPaymentOption = document.frmJoin.paymentOption.options[document.frmJoin.paymentOption.selectedIndex].value;
		selectedPaymentOption = selectedPaymentOption.toLowerCase();

                if( selectedPaymentOption == "creditcard" ) {
                        document.frmJoin.action="https://bill.ccbill.com/jpost/signup.cgi";
                        document.frmJoin.formName.value = '71cc';
                        arrMemberShipOption = recurringOption;
                        arrMemberShipValue = recurringValue;
                } else if ( selectedPaymentOption == "check" ) {
                        document.frmJoin.action="https://bill.ccbill.com/jpost/signup.cgi";
                        document.frmJoin.formName.value = '71ck';
                        arrMemberShipOption = recurringOption;
                        arrMemberShipValue = recurringValue;
                } else if ( selectedPaymentOption == "phone" ) {
                        document.frmJoin.action="https://bill.ccbill.com/jpost/signup.cgi";
                        document.frmJoin.formName.value = '63t9';
                        arrMemberShipOption = phoneOption;
                        arrMemberShipValue = phoneValue;
                }
                else
                {
                        document.frmJoin.action="newmembers.php";
                        arrMemberShipOption = recurringOption;
                        arrMemberShipValue = recurringValue;
                }

		index = 0;
		for(i=0 ; i < arrMemberShipOption.length ; ) {
			packageCtl.options[i++] = null;
		}


		for(i=0 ; index < arrMemberShipOption.length ; index++ )
		{
			newoption = new Option(arrMemberShipOption[index],arrMemberShipValue[index]);
			packageCtl.options[i++] = newoption;
		}
		packageCtl.options[0].selected=true;


	}//end of changeMemberShip function definition

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
//-->
