/* Copyright 2012: Callontime Global Resources. All Rights Reserved. Proprietary and Confidential information of Netope Group. Disclosure, Use or Reproduction without the written authorization of Netope Group is prohibited. */

	// Display a popup window to have customer enter the phone number that they want us to recharge or want the system recharge instantly.
	//------------------------------------------------------------------------
	function popupDialogBox (reqString, intl, ie, width, height) {
	//------------------------------------------------------------------------
	
		// bring up modal window for IE or small window for other browsers
		if (ie == 1) {
			if (intl == 0) {
				window.showModalDialog(reqString, 'myModal', 'dialogHeight:150px;dialogWidth:500px');
				return false;
			}
			else { // taller window for two inputs
				window.showModalDialog(reqString, 'myModal', 'dialogHeight:180px;dialogWidth:500px');
				return false;
			}
		}
		else {
			var x;
			var y;
					
			var popupwin = null;

		    x = (640 - width)/2, y = (480 - height)/2;
		
		    if (screen) {
		        y = (screen.availHeight - height)/2;
		        x = (screen.availWidth - width)/2;
			}

			popupwin = window.open(reqString,'dialog','dependent=yes,toolbar=no,menubar=no,directories=no,resizable=no,status=no,location=no,scrollbars=no,width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
				
			if (!document.all) {
				document.captureEvents (Event.CLICK);
			}
			document.onclick = function() {
				if (popupwin != null && !popupwin.closed) {
					popupwin.focus();
				}
			}
		}
		
		return false;
	}
	
	
	// Trim the white space around the price
	//------------------------------------------------------------------------
	function trimWhiteSpace (str) {
	//------------------------------------------------------------------------
	
	var	str = str.replace(/^\s\s*/, ''),
		ws = /\s/,
		i = str.length;
	while (ws.test(str.charAt(--i)));
	return str.slice(0, i + 1);
	}
	
	
	// This will detect if customer has any popup blocker before we display any popup automatically. 
	// This is currently not in use. For a future enhancement.
	//------------------------------------------------------------------------
	function detectPopupBlocker() {
	//------------------------------------------------------------------------
	
	  var myTest = window.open("about:blank","","directories=no,height=100,width=100,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,top=0,location=no");
	  if (!myTest) {
	  
		setCookie("popupblocker","yes",365);
	   // alert("A popup blocker was detected.");
	    return true;
	  } 
	  else {
	  
		setCookie("popupblocker","no",365);
	    myTest.close();
	   // alert("No popup blocker was detected.");
	    
	    return false;
	  }
	}

	// We want to set a cookie to be able to know if the popup blocker exist in this browser. This will help not to detect every time we come to the page. 
	// This is currently not in use. For a future enhancement.
	//------------------------------------------------------------------------
	function setCookie(c_name,value,exdays) {
	//------------------------------------------------------------------------
	
		var exdate=new Date();
		exdate.setDate(exdate.getDate() + exdays);
		var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
		document.cookie=c_name + "=" + c_value;
	}
	
/* PINLESS SECTION */

	// Toggle between the combox box
	//------------------------------------------------------------------------
	function RedirectPINlessTopup(x){
	//------------------------------------------------------------------------
	
		for (m=tempPINlessTopup.options.length-1;m>0;m--)
		tempPINlessTopup.options[m]=null
		for (i=0;i<groupPINlessTopup[x].length;i++){
		tempPINlessTopup.options[i]=new Option(groupPINlessTopup[x][i].text,groupPINlessTopup[x][i].value);
	}
		tempPINlessTopup.options[0].selected=true;
	}

	// Display discount percentage amount based on which denomination user selected
	//------------------------------------------------------------------------
	function DisplayPINlessTopupDiscount() {
	//------------------------------------------------------------------------
	
		// set the final tally	
		var pinlessAmount = "";
		pinlessAmount = tempPINlessTopup.options[tempPINlessTopup.selectedIndex].value;
		
		var denomination;
		denomination = document.forms["PINlessTopupDoubleCombo"]["PINlessTopupStage"].value;
		denomination = denomination.split(",");
		pinlessAmount = denomination[0];
				
		// Get no significant discount for $5 purchase
		if (pinlessAmount == 4.99) {
		
			pinlessAmount = "";
		}
		
		// Get 2.5% off of a $10 purchase
		else if (pinlessAmount == 9.75) {
		
			pinlessAmount = "2.5% off";
		}
		
		// Get 5% off of a $20, $30, $40 purchase
		else if (pinlessAmount > 18 && pinlessAmount < 41) {
		
			pinlessAmount = "5% off";
		}
		
		// Get 6% off of a $50, $60, $70 purchase
		else if (pinlessAmount > 45 && pinlessAmount < 71) {
		
			pinlessAmount = "6% off";
		}
		
		// Get 7% off of a $80, $90 purchase
		else if (pinlessAmount > 74 && pinlessAmount < 91) {
		
			pinlessAmount = "7% off";
		}
		
		else if (pinlessAmount > 90) {
		
			pinlessAmount = "8% off";
		}
		
		else {
			pinlessAmount = "Up to 8% off";
		}
		
		document.getElementById('pinlessTotal').innerHTML = pinlessAmount;
	}

	// Get the selected inputbox information and build the link to display the popup window
	//------------------------------------------------------------------------
	function ProcessPINlessTopup() {
	//------------------------------------------------------------------------
	
		var currentDate = new Date();
		var day = currentDate.getDate();
		var month = currentDate.getMonth() + 1;
		var year = currentDate.getFullYear();
	
		var todaysDate = '';
		todaysDate = "COT" + year + "" + month + "" + day + "FWS";

		var reqString;
		var nQuantity = null;
		nQuantity = '1';
			
		var itemPrice;
		
		var itemName;
		itemName = document.forms["PINlessTopupDoubleCombo"]["PINlessTopupExample"].value;
	
		var itemNumber;
		itemNumber = document.forms["PINlessTopupDoubleCombo"]["PINlessTopupExample"].value;
		
		var denomination;
		denomination = document.forms["PINlessTopupDoubleCombo"]["PINlessTopupStage"].value;	
		
		// Validate the selection first before trying to process it
		if (itemName == "Select an Option...") {
			alert("Please select your PINless option!");
			return false;
		}
			
		else if (itemPrice == "Select Denomination ...") {
			alert("Please select an amount!");
			return false;
		}
		
		
		denomination = denomination.split(",");
		itemPrice = trimWhiteSpace(denomination[0]);
		denomination = trimWhiteSpace(denomination[1]);
		
		itemName = "$" + denomination + " " + itemName + " " + "PINLESS Calling Credit - " + todaysDate;
		
		
	
		if (itemNumber == "Bonus Talk")
		{		
			if (itemPrice == 4.99) {
				itemNumber = "5btk";
			}
			
			else if (itemPrice == 9.75){
				itemNumber = "10btk";
			}
				
			else if (itemPrice == 19.00){
				itemNumber = "20btk";
			}
				
			else {
				itemNumber = "1btk"
			}	
		}
	
		else if (itemNumber == "Boss Revolution")
		{
			if (itemPrice == 4.99) {
				itemNumber = "5rev";
			}
			
			else if (itemPrice == 9.75){
				itemNumber = "10rev";
			}
				
			else if (itemPrice == 19.00){
				itemNumber = "20rev";
			}
				
			else {
				itemNumber = "2rev"
			}
		}
	
		else if (itemNumber == "Dollar Phone")
		{
	
			if (itemPrice == 4.99) {
				itemNumber = "5dpc";
			}
			
			else if (itemPrice == 9.75){
				itemNumber = "10dpc";
			}
				
			else if (itemPrice == 19.00){
				itemNumber = "20dpc";
			}
				
			else {
				itemNumber = "3dpc"
			}		
		}
	
		else if (itemNumber == "My Black 011")
		{
	
			if (itemPrice == 4.99) {
				itemNumber = "5blk";
			}
			
			else if (itemPrice == 9.75){
				itemNumber = "10blk";
			}
				
			else if (itemPrice == 19.00){
				itemNumber = "20blk";
			}
				
			else {
				itemNumber = "4blk"
			}
		}
	
		else if (itemNumber == "Homies No Mas")
		{
			if (itemPrice == 4.99) {
				itemNumber = "5hnm";
			}
			
			else if (itemPrice == 9.75){
				itemNumber = "10hnm";
			}
				
			else if (itemPrice == 19.00){
				itemNumber = "20hnm";
			}
				
			else {
				itemNumber = "44hnm"
			}
		}
	
		else
		{
			itemNumber = "33nom";
			itemName = "No Product Defined" + " " + "Calling Credit";
		}
			
		reqString = 'enterrefillnumber.asp?qty=' + nQuantity;
		reqString = reqString + '&product=' + encodeURIComponent(itemName);
		reqString = reqString + '&item_number=' + itemNumber;
		reqString = reqString + '&amount=' + itemPrice;
		reqString = reqString + '&intl=0';
		
		// Display the popup window	now!		
		if (navigator.appName=="Microsoft Internet Explorer")
		{
			//popupDialogBox (reqString, intl, ie, width, height)
			popupDialogBox (reqString,0,1,400,200);
		}
		
		else {
			//popupDialogBox (reqString, intl, ie, width, height)
			popupDialogBox (reqString,1,0,500,150);
		}
	}
	
	
/* US WIRELESS TOPUP */

	// Toggle between the combox box
	//------------------------------------------------------------------------
	function RedirectUSWirelessTopup(x){
	//------------------------------------------------------------------------

		for (m=tempUSWireless.options.length-1;m>0;m--)
			tempUSWireless.options[m]=null
			for (i=0;i<group[x].length;i++){
			tempUSWireless.options[i]=new Option(group[x][i].text,group[x][i].value)
		}
			tempUSWireless.options[0].selected=true
	}

	// Calculate the discount and display to the customer
	//------------------------------------------------------------------------
	function DisplayUSWirelessDiscount() {
	//------------------------------------------------------------------------
	
		var price;
		var discount;
		discount = tempUSWireless.options[tempUSWireless.selectedIndex].value;
		discount = discount.replace(")", "");
		discount = discount.replace("(", "");
		
		discount = discount.split(",");
		price = discount[0];
		discount = discount[1] - discount[0];
		discount = discount/price;
		discount = discount * 100;
		discount = parseInt(discount);
	
		// set the final tally	
		if (discount > 0.5) {
			document.getElementById('domesticMobileDiscount').innerHTML = discount + "% Off";
		}
		
		else {
			document.getElementById('domesticMobileDiscount').innerHTML = "";
		}
	}

	// Build the item name, price for PayPal to process the order
	//------------------------------------------------------------------------
	function ProcessUSWirelessTopup() {
	//------------------------------------------------------------------------
	
		var currentDate = new Date();
		var day = currentDate.getDate();
		var month = currentDate.getMonth() + 1;
		var year = currentDate.getFullYear();
	
		var todaysDate = '';
		todaysDate = "COT" + year + "" + month + "" + day + "FWS";
			
		var itemName;
		itemName = document.forms["USWirelessDoubleCombo"]["USWirelessExample"].value;
							
		var itemPrice;
		itemPrice = document.forms["USWirelessDoubleCombo"]["USWirelessStage"].value;
		
		// Validate the selection first before trying to process it
		if (itemName == "Select your US mobile service provider ...") {
			alert("Please select your mobile provider!");
			return false;
		}
			
		else if (itemPrice == "Select Denomination ...") {
			alert("Please select an amount!");
			return false;
		}
		
		itemPrice = itemPrice.split(",");
		
		var reqString = "";
		var nQuantity = "";
		nQuantity = '1';
		
		// 	itemPrice[0] is selling price itemPrice[1] is retail price	
		itemName = "$" + trimWhiteSpace(itemPrice[1]) + " " + itemName + " " + "US Wireless Refill - " + todaysDate;
		
		// Concate the information that we need for PayPal		
		reqString = 'enterrefillnumber.asp?qty=' + nQuantity;
		reqString = reqString + '&product=' + encodeURIComponent(itemName);
		reqString = reqString + '&item_number=7usa';
		reqString = reqString + '&amount=' + itemPrice[0];
		reqString = reqString + '&intl=0';
					
		// Display the popup window	now!						
		if (navigator.appName=="Microsoft Internet Explorer")
		{
			//popupDialogBox (reqString, intl, ie, width, height)
			popupDialogBox (reqString,0,1,400,200);
		}
					
		else {		
			//popupDialogBox (reqString, intl, ie, width, height)
			popupDialogBox (reqString,0,0,500,150);
		}
	}
	
	
/* INTERNATIONAL WIRELESS TOPUP */

	// Display all the drop down with country list, topup list and then denomination
	var categories = [];	
	categories["startList"] = 
		["Afghanistan", "Anguilla", "Antigua", "Armenia", "Aruba", "Barbados", "Bangladesh", "Belize", "Bermuda", "Bolivia", "Brazil", "British Virgin Islands", "Burundi",
		"Cambodia", "Cameroon", "Cayman Islands", "China", "Chile", "Colombia", "Congo", "Cote Divoire", "Cuba", "Dominica", "Dominican Republic", "Ecuador", "El Salvador", "Fiji", "French Guiana",
		"Gambia", "Ghana", "Grenada", "Guadeloupe", "Guatemala", "Guinea", "Guyana", "Haiti", "Honduras", "Iraq", "India", "Indonesia", "Jamaica", "Jordan", "Kazakhstan", "Laos", "Liberia", "Lithuania",
		"Madagascar", "Malaysia", "Mali", "Martinique", "Mexico", "Moldova", "Montserrat", "Nepal", "Nicaragua", "Niger", "Nigeria", "Pakistan", "Panama", "Paraguay", "Peru", "Philippines", "Poland",
		"Romania", "Russia", "Samoa", "Senegal", "Spain", "Sri Lanka", "St. Kits", "St. Lucia", "St. Vincent", "Sudan", "Suriname", "Thailand", "Tonga", "Trinidad and Tobago", "Tunisia", "Turks and Caicos",
		"Uganda", "Uruguay", "Vanuatu", "Vietnam", "Yemen"];						
	
	categories["Afghanistan"] = ["Roshan Afghanistan","Etisalat Afghanistan", "MTN Afghanistan"];
	categories["Roshan Afghanistan"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Etisalat Afghanistan"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["MTN Afghanistan"] = ["7.20","14.40","43.20","114"];
	
	categories["Anguilla"] = ["Digicel Anguilla","LIME Anguilla"];
	categories["Digicel Anguilla"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["LIME Anguilla"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Antigua"] = ["Digicel Antigua","LIME Antigua"];
	categories["Digicel Antigua"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["LIME Antigua"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
		
	categories["Armenia"] = ["VivaCell-MTS"];
	categories["VivaCell-MTS"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Aruba"] = ["Digicel Aruba"];
	categories["Digicel Aruba"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Barbados"] = ["Digicel Barbados", "LIME Barbados"];
	categories["Digicel Barbados"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["LIME Barbados"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Bangladesh"] = ["Airtel Bangladesh", "Banglalink Bangladesh", "GraminPhone Bangladesh", "Robi Bangladesh", "TeleTalk Bangladesh"];
	categories["Airtel Bangladesh"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45","$50","$60","$70","$80","$90", "100"];
	categories["Banglalink Bangladesh"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45","$50","$60","$70","$80","$90", "100"];
	categories["GraminPhone Bangladesh"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45","$50","$60","$70","$80","$90", "100"];
	categories["Robi Bangladesh"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45","$50","$60","$70","$80","$90", "100"];
	categories["TeleTalk Bangladesh"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45","$50","$60","$70","$80","$90", "100"];
	
	categories["Belize"] = ["Smart Belize", "Telemedia Belize"];
	categories["Smart Belize"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Telemedia Belize"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Bermuda"] = ["Digicel Bermuda"];
	categories["Digicel Bermuda"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Bolivia"] = ["Entel Bolivia","VIVA Bolivia", "Tigo Bolivia"];
	categories["Entel Bolivia"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["VIVA Bolivia"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45"]
	categories["Tigo Bolivia"] = ["$6","$7","$10","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];

	categories["Brazil"] = ["Vivo Brazil","Claro Brazil", "Tim Brazil", "Oi Brazil", "Nextel Brazil"];
	categories["Vivo Brazil"] = ["$7.20","$14.40","$20.40","$27.60","$78"];
	categories["Claro Brazil"] = ["$6","$9.60","$16.80","$22.80","$38.40"];
	categories["Tim Brazil"] = ["13.20","19.20","26.40","36"];
	categories["Oi Brazil"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Nextel Brazil"] = ["$14.40","$22.80","$38.40","$78"];

	categories["British Virgin Islands"] = ["Digicel BVI", "LIME BVI"];
	categories["Digicel BVI"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["LIME BVI"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];

	categories["Burundi"] = ["U-COM Burundi"];
	categories["U-COM Burundi"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];

	categories["Cambodia"] = ["QbCube Cambodia","Smart Cambodia"];
	categories["QbCube Cambodia"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Smart Cambodia"] = ["$7.20","$13.20","$26.40","$66.00"];

	categories["Cameroon"] = ["MTN Cameroon","Orange Cameroon"];
	categories["MTN Cameroon"] = ["$7","$12","$20"];
	categories["Orange Cameroon"] = ["$10","$20"];

	categories["Cayman Islands"] = ["Digicel Cayman", "LIME Cayman"];
	categories["Digicel Cayman"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["LIME Cayman"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["China"] = ["Unicom Mobile China"];
	categories["Unicom Mobile China"] = ["$6","$10","$19"];
	
	categories["Chile"] = ["Claro Chile", "Movistar Chile"];
	categories["Movistar Chile"] = ["$5","$9","$12","$24","$35"];
	categories["Movistar Chile"] = ["$5","$12","$24","$35"];
	
	categories["Colombia"] = ["Comcel Colombia","Movistar Colombia", "Tigo Colombia"];
	categories["Comcel Colombia"] = ["$6","$10","$20","$40"];
	categories["Movistar Colombia"] = ["$5","6","$7","$10","$12","$14","$15","$20","$25","$30","$35","$40","$45"];
	categories["Tigo Colombia"] = ["$5","$6","$10","$12"];
	
	categories["Congo"] = ["MTN Congo"];
	categories["MTN Congo"] = ["$5","$12","$24", "$35"];
	
	categories["Cote Divoire"] = ["MTN Cote Divoire","Orange Cote Divoire"];
	categories["MTN Cote Divoire"] = ["$5","$12","$24", "$35"];
	categories["Orange Cote Divoire"] = ["$5","$12","$24", "$35"];

	categories["Cuba"] = ["Cubacel Cuba"];
	categories["Cubacel Cuba"] = ["$6","$12","$14","$15","$21","$22","$28","$29","$36","$43","$48","$54","$60"];

	categories["Dominica"] = ["Digicel Dominica","LIME Dominica"];
	categories["Digicel Dominica"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["LIME Dominica"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45"];
	
	categories["Dominican Republic"] = ["Claro Dominican Republic","Orange Dominican Republic", "VIVA Dominican Republic"];
	categories["Claro Dominican Republic"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$50"];
	categories["Orange Dominican Republic"] = ["$6","$11","$16","$22", "44"];
	categories["VIVA Dominican Republic"] = ["$6","$10","$15","$20","$29"];
	
	categories["Ecuador"] = ["Alegro Ecuador", "Claro Ecuador", "Movistar Ecuador"];
	categories["Alegro Ecuador"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Claro Ecuador"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45"];
	categories["Movistar Ecuador"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45"];
	
	categories["El Salvador"] = ["Claro El Salvador", "Digicel El Salvador", "Movistar El Salvador", "Tigo El Salvador"];
	categories["Claro El Salvador"] = ["$5","$6","$10","$11","$12","$22","$33","$36","$42","$48","$54","$60"];
	categories["Digicel El Salvador"] = ["$5","$6","$10","12","$15","$20","$25","$30","$35","$40","$50"];
	categories["Movistar El Salvador"] = ["$6","$7","$11","$12","$14","$18","$22","$24","$30","$33","$36","$42","$44","$48","$54","$60","$66","$72","$78","$84"];
	categories["Tigo El Salvador"] = ["$6","$10","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Fiji"] = ["Digicel Fiji"];
	categories["Digicel Fiji"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45"];
	
	categories["French Guiana"] = ["Digicel French Guiana"];
	categories["French Guiana"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Gambia"] = ["QCell Gambia"];
	categories["QCell Gambia"] = ["$5","$12","$24", "$35"]
	
	categories["Ghana"] = ["Tigo Ghana","MTN Ghana"];
	categories["Tigo Ghana"] = ["$5","$10","$15","$25","$30"];
	categories["MTN Ghana"] = ["$6","$12","$18","$24","$30","$36"];
	
	categories["Grenada"] = ["Digicel Grenada","LIME Grenada"];
	categories["Digicel Grenada"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["LIME Grenada"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45"];
	
	categories["Guadeloupe"] = ["Digicel Guadeloupe"];
	categories["Digicel Guadeloupe"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Guatemala"] = ["Claro Guatemala","Movistar Guatemala", "Tigo Guatemala"];
	categories["Claro Guatemala"] = ["$5","$7","$8","$10","$15","$29","$44"];
	categories["Movistar Guatemala"] = ["$7","$8","$14","$15","$29","$44"];
	categories["Tigo Guatemala"] = ["$7","$10","$14","$16"];
	
	categories["Guinea"] = ["Cellcom Guinea","Orange Guinea"];
	categories["Cellcom Guinea"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Orange Guinea"] = ["$10.00","$14.40","$19.00","$27.60","$55.20"];
	
	categories["Guyana"] = ["Digicel Guyana","GT&T Guyana"];
	categories["Digicel Guyana"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45","$50"];
	categories["GT&T Guyana"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Haiti"] = ["Digicel Haiti","Voila Haiti"];
	categories["Digicel Haiti"] = ["$5","$6","$10","$12","$15","$18","$20","$24","$25","$30","$35","$40","$45","$60"];
	categories["Voila Haiti"] = ["$5","$6","$10","$11","$12","$14","$18","$20","$24","$28","$30","$36","$42"];
	
	categories["Honduras"] = ["Claro Honduras","Digicel Honduras", "Tigo Honduras"];
	categories["Claro Honduras"] = ["$5","$10","$15","$20","$25","$30", "$40"];
	categories["Digicel Honduras"] = ["$5","$10","$15","$20","$25","$30","$35","$40"];
	categories["Tigo Honduras"] = ["$6","$7","$10","$12"];
	
	categories["Iraq"] = ["AsiaCell Iraq"];
	categories["AsiaCell Iraq"] = ["$5","$10","$25"];
	
	categories["India"] = ["Aircel India","Airtel India", "BSNL India", "Idea India", "Reliance India", "Tata DOCOMO India (Denom.)", "Tata Indicom India (Denom.)", "Tata Indicom India", "Uninor India", "Vodafone India"];
	categories["Aircel India"] = ["$3.30","$4.56","$6.00","$7.44","$9.00","$10.20","$13.20","$15.00","$24.00","$30.00"];
	categories["Airtel India"] = ["$3.60","$9.60","$15.60"];
	categories["BSNL India"] = ["$3.60","$6.60","$16.20","$32.40"];
	categories["Idia India"] = ["$6.00","$10.80","$14.40","$21.60", "28.80"];
	categories["Reliance India"] = ["$3","$6","$9","$15", "30"];
	categories["Tata DOCOMO India (Denom.)"] = ["$3.60","$8.40","$15.60","$32.40","$64.80"];
	categories["Tata Indicom India (Denom.)"] = ["$3.60","$8.40","$15.60","$32.40","$64.80"];
	categories["Tata Indicom India"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Uninor India"] = ["$3.60","$8.40","$15.60","$32.40","$64.80"];
	categories["Vodafone India"] = ["$3.84","$7.20","$10.80","$15.60"];
	
	categories["Indonesia"] = ["Indosat Indonesia", "Excelcomindo Indonesia"];
	categories["Indosat Indonesia"] = ["$4","$7","$14"];
	categories["Excelcomindo Indonesia"] = ["$3.90","$7.80","$15.60", "30.00"];
	
	categories["Jamaica"] = ["Claro Jamaica","Digicel Jamaica", "LIME Jamaica"];
	categories["Claro Jamaica"] = ["$5","$10","$15","$20","$25","$30","$40"];
	categories["Digicel Jamaica"] = ["$5","$10","$15","$20","$25","$30","$40"];
	categories["LIME Jamaica"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45"];
	
	categories["Jordan"] = ["Umniah Jordan"];
	categories["Umniah Jordan"] = ["$5","$12","$24","$35"];
	
	categories["Kazakhstan"] = ["Kcell Kazakhstan"];
	categories["Kcell Kazakhstan"] = ["$5","$12","$24","$35"];
	
	categories["Laos"] = ["Tigo Laos"];
	categories["Tigo Laos"] = ["$8","$15"];
	
	categories["Liberia"] = ["Cellcom Liberia","Lonestar Cell Liberia"];
	categories["Cellcom Liberia"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Lonestar Cell Liberia"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Lithuania"] = ["Tele2 Lithuania"];
	categories["Tele2 Lithuania"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Madagascar"] = ["Orange Madagascar"];
	categories["Orange Madagascar"] = ["$5","$12","$24","$35"];
	
	categories["Malaysia"] = ["Digi Malaysia"];
	categories["Digi Malaysia"] = ["$4","$12","$20"];
	
	categories["Mali"] = ["Orange Mali"];
	categories["Orange Mali"] = ["$10","$19"];
	
	categories["Martinique"] = ["Digicel Martinique"];
	categories["Digicel Martinique"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Mexico"] = ["Iusacell Mexico","Movistar Mexico", "Telcel Mexico", "Unefon Mexico"];
	categories["Iusacell Mexico"] = ["$6","$9","$10","$11","$18", "22"];
	categories["Movistar Mexico"] = ["$7","$11","$13","$23","26","35"];
	categories["Telcel Mexico"] = ["$6","$11","$17","$22", "$23", "$33", "$55"];
	categories["Unefon Mexico"] = ["$6","$9","$10","$11","$18","$20","$22","$29"];
	
	categories["Moldova"] = ["Moldcell Moldova"];
	categories["Moldcell Moldova"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Montserrat"] = ["LIME Montserrat"];
	categories["LIME Montserrat"] = ["$5","$10","$15","$20","$25","$30","$35","$40","$45"];
	
	categories["Nepal"] = ["Ncell Nepal"];
	categories["Ncell Nepal"] = ["$5","$9","$17"];
	
	categories["Nicaragua"] = ["Claro Nicaragua","Movistar Nicaragua"];
	categories["Claro Nicaragua"] = ["$5","$10","$15","$20","$25","$30","$35","$40"];
	categories["Movistar Nicaragua"] = ["$7","$11","$14","$21"];
	
	categories["Niger"] = ["Orange Niger"];
	categories["Orange Niger"] = ["$10","$19","$27.60","$55.20"];
	
	categories["Nigeria"] = ["Airtel Nigeria","MTN Nigeria"];
	categories["Airtel Nigeria"] = ["$5","$10","$20","$40"];
	categories["MTN Nigeria"] = ["$5","$8","10","$15","$20","$40"];
	
	categories["Pakistan"] = ["Jazz Pakistan", "Mobilink Pakistan","Telenor Pakistan", "Ufone Pakistan", "Warid Pakistan", "Zong Pakistan"];
	categories["Jazz Pakistan"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Mobilink Pakistan"] = ["$7","$14","$21","$28"];
	categories["Telenor Pakistan"] = ["$5","6","$10","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Ufone Pakistan"] = ["$5","$6","$10","$12","$20","$25","$30","$40","$50"];
	categories["Warid Pakistan"] = ["$6","$7","$12","$14","$21","$28","$30"];
	categories["Zong Pakistan"] = ["$6","$7","$12","$14","$21","$28","$30"];
	
	categories["Panama"] = ["Digicel Panama","Movistar Panama"];
	categories["Digicel Panama"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Movistar Panama"] = ["$6","$7","$11","$14","$22","$33","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Paraguay"] = ["Personal Paraguay","Vox Paraguay", "Tigo Paraguay"];
	categories["Personal Paraguay"] = ["$6.00","$8.40","$14.40","$28.20"];
	categories["Vox Paraguay"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Tigo Paraguay"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Peru"] = ["Claro Peru","Movistar Peru"];
	categories["Claro Peru"] = ["$5","$7","$11","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Movistar Peru"] = ["$6","$7","$11","$12","$14","$21","$31","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Philippines"] = ["Touch Mobile Philippines","Globe Philippines", "Smart  Philippines", "SunCellular Philippines", "Smart Talk n Text Philippines"];
	categories["Touch Mobile Philippines"] = ["$4.20","$8.40","$13.80","$27.60"];
	categories["Globe Philippines"] = ["$4","$6","$8","10", "$13"];
	categories["Smart  Philippines"] = ["$8","$13"];
	categories["SunCellular Philippines"] =  ["$4.20","$8.40","$13.80"];
	categories["Smart Talk n Text Philippines"] = ["$4.20","$8.40","$13.80","$27.60"];
	
	categories["Poland"] = ["Play Poland","Orange Poland"];
	categories["Play Poland"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Orange Poland"] = ["$5","$11","$20","$40"];
	
	categories["Romania"] = ["Vodafone Romania","Orange Romania"];
	categories["Vodafone Romania"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Orange Romania"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Russia"] = ["Megafone Russia"];
	categories["Megafone Russia"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Samoa"] = ["Digicel Samoa"];
	categories["Digicel Samoa"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Senegal"] = ["Orange Senegal","Tigo Senegal"];
	categories["Orange Senegal"] = ["$10","$20"];
	categories["Tigo Senegal"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Spain"] = ["DigiMobil Spain","Movistar Spain", "Orange Spain", "Vodafone Spain", "Yoigo Spain"];
	categories["DigiMobil Spain"] = ["$9.60","$18.00","$36.00","$62.40","$88.80"];
	categories["Movistar Spain"] = ["$9.60","$18.00","$36.00","$62.40","$88.80"];
	categories["Orange Spain"] = ["$9.60","$18.00","$36.00","$62.40","$88.80"];
	categories["Vodafone Spain"] = ["$9.60","$18.00","$36.00","$62.40","$88.80"];
	categories["Yoigo Spain"] = ["$9.60","$18.00","$36.00","$62.40","$88.80"];
	
	categories["Sri Lanka"] = ["Airtel Sri Lanka", "Dialog Sri Lanka","Etisalat Sri Lanka", "Mobitel Sri Lanka", "Hutch Sri Lanka"];
	categories["Airtel Sri Lanka"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Dialog Sri Lanka"] = ["$4","$5","$11"];
	categories["Etisalat Sri Lanka"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Mobitel Sri Lanka"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["Hutch Sri Lanka"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["St. Kits"] = ["Digcel St. Kits", "LIME St. Kits"];
	categories["Digcel St. Kits"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["LIME St. Kits"] =  ["$5","$10","$15","$20","$25","$30","$35","$40","$45"];
	
	categories["St. Lucia"] = ["Digcel St. Lucia", "LIME St. Lucia"];
	categories["Digcel St. Kits"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["LIME St. Kits"] =  ["$5","$10","$15","$20","$25","$30","$35","$40","$45"];
	
	categories["St. Vincent"] = ["Digcel St. Vincent", "LIME St. Vincent"];
	categories["Digcel St. Kits"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["LIME St. Kits"] =  ["$5","$10","$15","$20","$25","$30","$35","$40","$45"];
	
	categories["Sudan"] = ["MTN Sudan"];
	categories["MTN Sudan"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Suriname"] = ["Digicel Suriname"];
	categories["Digicel Suriname"] = ["$7","$12","$14","$16"];
	
	categories["Thailand"] = ["AIS Thailand"];
	categories["AIS Thailand"] = ["$4","$12","$20"];
	
	categories["Tonga"] = ["Digicel Tonga"];
	categories["Digicel Tonga"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Trinidad and Tobago"] = ["Digicel Trinidad and Tobago", "bMobile Trinidad and Tobago"];
	categories["Digicel Trinidad and Tobago"] = ["$5","$10","$15","$20","$25","$30","$35","$40"];
	categories["bMobile Trinidad and Tobago"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Tunisia"] = ["Orange Tunisia"];
	categories["Orange Tunisia"] = ["$5","$12","$24","$35"];
	
	categories["Turks and Caicos"] = ["Digicel Turks and Caicos", "LIME Turks and Caicos"];
	categories["Digicel Turks and Caicos"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	categories["bMobile Turks and Caicos"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Uganda"] = ["Warid Uganda"];
	categories["Warid Uganda"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Uruguay"] = ["Movistar Uruguay"];
	categories["Movistar Uruguay"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Vanuatu"] = ["Digicel Vanuatu"];
	categories["Digicel Vanuatu"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Vanuatu"] = ["Digicel Vanuatu"];
	categories["Digicel Vanuatu"] = ["$6","$12","$18","$24","$30","$36","$42","$48","$54","$60","$66","$72","$78","$84"];
	
	categories["Vietnam"] = ["VinaPhone Vietnam", "Mobifone Vietnam","Viettel Vietnam", "EVN Telecom Vietnam", "S-fone Vietnam"];
	categories["VinaPhone Vietnam"] = ["$9.60","$18.00","$26.40","$42.00"];
	categories["Mobifone Vietnam"] = ["$9.60","$18.00","$26.40","$42.00"];
	categories["Etisalat Vietnam"] = ["$9.60","$18.00","$26.40","$42.00"];
	categories["Mobitel Vietnam"] = ["$9.60","$18.00","$26.40","$42.00"];
	categories["S-fone Vietnam"] = ["$9.60","$18.00","$26.40","$42.00"];
	
	categories["Yemen"] = ["Sebafon Yemen"];
	categories["Sebafon Yemen"] = ["$7","$13","$20"];

	var nLists = 3; // number of select lists in the set

	//------------------------------------------------------------------------
	function fillSelect(currCat,currList){
	//------------------------------------------------------------------------
		var step = Number(currList.name.replace(/\D/g,""));
		for (i=step; i<nLists+1; i++) {
		document.forms['tripleplay']['List'+i].length = 1;
		document.forms['tripleplay']['List'+i].selectedIndex = 0;
	}
	
	var nCat = categories[currCat];
	
	for (each in nCat) {
		var nOption = document.createElement('option'); 
		var nData = document.createTextNode(nCat[each]); 
		nOption.setAttribute('value',nCat[each]); 
		nOption.appendChild(nData); 
		currList.appendChild(nOption); 
	} 
	}

	// Get all the values for the PayPal processing
	//------------------------------------------------------------------------
	function ProcessInternationalRecharges(L3, L2, L1) {
	//------------------------------------------------------------------------
	
	
		var currentDate = new Date();
		var day = currentDate.getDate();
		var month = currentDate.getMonth() + 1;
		var year = currentDate.getFullYear();
	
		var todaysDate = '';
		todaysDate = "COT" + year + "" + month + "" + day + "FWS";
		
		//alert("Your selection was:- \n" + L1 + "\n" + L2 + "\n" + L3);
		
		// Validate the selection first before trying to
		if ( L1 == "Select Country...") {
			alert("Please select a country!");
			return false;
		}
			
		else if ( L2 == "Select Carrier...") {
			alert("Please select a carrier!");
			return false;
		}
		
		else if ( L3 == "Select Denomination...") {
			alert("Please select an amount!");
			return false;
		}
		
		// If the validation gets successful, then process it:
		var reqString;
		var nQuantity = '';
		
		// Item Quantity 
		nQuantity = '1';
		
		// Item Name
		var itemName = '';
		itemName = L3 + " " + L2 + " " + "International Mobile Topup - " + todaysDate;
		
		// Item Price
		var itemPrice = '';
		itemPrice = L3;
		itemPrice = itemPrice.replace("$", "");
		
		if (itemPrice == "5" || itemPrice == "5.00") {
			itemPrice = "5.35";
		}
		
		// International phone number format
		
		var international = '';
			
		switch(L1)
		{
		 
		case 'Afghanistan':
			international = "93-XXX-XXX-XXX. 11 Digits Only.";
			break;
			
		case 'Anguilla':
			international = "264-XXX-XXXX. 10 Digits Only.";
			break;
			
		case 'Antigua':
			international = "268-XXX-XXXX. 10 Digits Only.";
			break;
			
		case 'Armenia':
			international = "374-XXXX-XXXX. 11 Digits Only.";
			break;
		
		case 'Aruba':
			international = "297-XXX-XXXX. 10 Digits Only.";
			break;	
		
		case 'Bangladesh':
			international = "880-XXX-XXX-XXXX. 13 Digits Only.";
			break;
			
		case 'Barbados':
			international = "246-XXX-XXXX. 10 Digits Only.";
			break;
			
		case 'Belize':
			international = "501-XXX-XXXX 10 Digits Only.";
			break;
			
		case 'Bermuda':
			international = "441-XXX-XXXX. 10 Digits Only.";
			break;

		case 'Bolivia':
			international = "591-XXX-XXXXX. 11 Digits Only.";
			break;
			
		case 'Brazil':
			international = "55-XX-XXXX-XXXX. 12 Digits Only.";
			break;
			
		case 'British Virgin Islands':
			international = "284-XXX-XXXX. 10 Digits Only.";
			break;		
	
		case 'Burundi':
			international = "257-XXXX-XXXXX. 11 Digits Only.";
			break;
				
		case 'Cambodia':
			international = "855-XXXX-XXXX. 11 Digits Only.";
			break;

		case 'Cameroon':
			international = "237-XXXX-XXXX. 11 Digits Only.";
			break;
			
		case 'Colombia':
			international = "57-XXX-XXX-XXXX. 12 Digits Only.";
			break;
		
		case 'Cuba':
			international = "53-XXXX-XXXX. 10 Digits Only.";
			break;
			
		case 'Dominica':
			international = "767-XXX-XXXX. 10 Digits Only.";
			break
			
		case 'Dominican Republic':
			international = "8XX-XXX-XXXX. 10 Digits Only.";
			break;

		case 'Ecuador':
			international = "593-XXXX-XXXX. 11 Digits Only.";
			break;

		case 'El Salvador':
			international = "503-XXX-XXX-XX. 11 Digits Only.";
			break;
	
		case 'Fiji':
			international = "679-XXX-XXXX. 10 Digits Only.";
			break		
			
		case 'French Guiana':
			international = "594-XXXXX-XXXX. 12 Digits Only.";
			break	
				
		case 'Gambia':
			international = "220XXXYYYY. 10 Digits Only.";
			break;
			
		case 'Ghana':
			international = "233-XXX-XXX-XXX. 12 Digits Only.";
			break;
	
		case 'Grenada':
			international = "473-XXX-XXXX. 10 Digits Only.";
			break;
			
		case 'Guadeloupe':
			international = "590-XXXXX-XXX. 11 Digits Only.";
			break;

		case 'Guatemala':
			international = "502-XXX-XXX-XX. 11 Digits Only.";
			break;
			
		case 'Guinea':
			international = "224-XX-XXX-XXX. 10 Digits Only.";
			break;
			
		case 'Guyana':
			international = "592-XXX-XXXX. 10 Digits Only.";
			break;

		case 'Haiti':
			international = "509-XXXX-XXXX. 11 Digits Only.";
			break;
			
		case 'Honduras':
			international = "504-XXXX-XXXX. 11 Digits Only.";
			break;
			
		case 'India':
			international = "91-XX-XXX-XXXXX. 12 Digits Only.";
			break;
		
		case 'Indonesia':
			international = "62-XXX-XXXX-XXXX. 13 Digits Only.";
			break;
			
		case 'Jordan':
			international = "962-XXX-XXX-XXXX. 12 Digits Only.";
			break;
			
		case 'Jamaica':
			international = "876-XXX-XXXX. 10 Digits Only.";
			break;
			
		case 'Kazakhstan':
			international = "7-XXX-XXX-XXXX. 11 Digits Only.";
			break;
			
		case 'Laos':
			international = "856-XXX-XXX-XXXX. 13 Digits Only.";
			break;
			
		case 'Liberia':
			international = "231-XXXX-XXXX. 11 Digits Only.";
			break;
			
		case 'Lithuania':
			international = "370-XXXX-XXXX. 11 Digits Only.";
			break;
			
		case 'Madagascar':
			international = "261-XXX-XXX-XXX. 12 Digits Only.";
			break;
			
		case 'Malaysia':
			international = "60-XXX-XXX-XXX. 11 Digits Only.";
			break;
			
		case 'Mali':
			international = "223-XXXX-XXXX. 11 Digits Only.";
			break;
			
		case 'Martinique':
			international = "596-XXXXX-XXXX. 12 Digits Only.";
			break;
			
		case 'Mexico':
			international = "52-XXX-XXX-XXXX. 12 Digits Only.";
			break;
			
		case 'Moldova':
			international = "373-XXXX-XXXX. 12 Digits Only.";
			break;
			
		case 'Montserrat':
			international = "664-xxx-xxxx. 10 Digits Only.";
			break;
			
		case 'Nepal':
			international = "977-XXX-XXX-XXXX. 13 Digits Only.";
			break;
			
		case 'Nicaragua':
			international = "505-XXXX-XXXX. 11 Digits Only.";
			break;
			
		case 'Niger':
			international = "227-XXXX-XXXX. 11 Digits Only.";
			break;
			
		case 'Nigeria':
			international = "234-XXX-XXX-XXXX. 13 Digits Only.";
			break;
			
		case 'Pakistan':
			international = "92-XXXXX-XXXXX. 12 Digits Only.";
			break;
			
		case 'Paraguay':
			international = "595-XX-XXX-XXXX. 12 Digits Only.";
			break;
			
		case 'Panama':
			international = "507-XXXX-XXXX. 11 Digits Only.";
			break;
		
		case 'Peru':
			international = "51-XXX-XXX-XXX. 11 Digits Only.";
			break;

		case 'Philippines':
			international = "63-XXX-XXX-XXXX. 12 Digits Only.";
			break;
			
		case 'Poland':
			international = "48-XXX-XXX-XXX. 11 Digits Only.";
			break;
			
		case 'Romania':
			international = "407-XXXX-XXXX. 11 Digits Only.";
			break;
			
		case 'Russia':
			international = "7-XXXX-XXX-XXX. 11 Digits Only.";
			break;
			
		case 'Samoa':
			international = "685-XXX-XXXX. 11 Digits Only.";
			break;
			
		case 'Sri Lanka':
			international = "94-XXXXX-XXXX. 11 Digits Only.";
			break;
			
		case 'St. Kits':
			international = "869-XXX-XXXX. 10 Digits Only.";
			break;
			
		case 'St. Lucia':
			international = "758-XXX-XXXX. 10 Digits Only.";
			break;
			
		case 'St. Vincent':
			international = "784-XXX-XXXX. 10 Digits Only.";
			break;
		
		case 'Sudan':
			international = "249-XX-XXX-XXXX. 12 Digits Only.";
			break;	
			
		case 'Suriname':
			international = "597-XXX-XXXX. 10 Digits Only.";
			break;		
			
		case 'Thailand':
			international = "66-XXX-XXX-XXX. 11 Digits Only.";
			break;

		case 'Trinidad and Tobago':
			international = "868-XXX-XXXX. 10 Digits Only.";
			break;	
			
		case 'Uganda':
			international = "256-XX-XXX-XXXX. 12 Digits Only.";
			break;
			
		case 'Vietnam':
			international = "84-XXXXX-XXXX. 11 Digits Only.";
			break;

		case 'Yemen':
			international = "967-XXX-XXX-XXX. 12 Digits Only.";
			break;
			
		default:
			international = "Country Code + ...";
		}
		
		// Form the necessary parm to satisfy PayPal buy operation
		reqString = 'enterrefillnumber.asp?qty=' + nQuantity;
		reqString = reqString + '&product=' + encodeURIComponent(itemName);
		reqString = reqString + '&item_number=6int';
		reqString = reqString + '&amount=' + itemPrice;
		reqString = reqString + '&intl=1';
		reqString = reqString + '&pattern='+ encodeURIComponent(international);
	
		// Display the popup window	now!
		if (navigator.appName=="Microsoft Internet Explorer")
		{
			// popupDialogBox (reqString, intl, ie, width, height).
			popupDialogBox (reqString,1,1,410,300);
		}
		
		else {
		
			// popupDialogBox (reqString, intl, ie, width, height)
			popupDialogBox (reqString,1,0,500,200);
		}
		return false;
		
	}

	//------------------------------------------------------------------------
	function init() {
	//------------------------------------------------------------------------
	
		fillSelect('startList',document.forms['tripleplay']['List1'])
	}

	navigator.appName == "Microsoft Internet Explorer" ? attachEvent('onload', init, false) : addEventListener('load', init, false);
	
	

