//currency conversion data testing 4.002 R.E

var pwCurData = {
1: ["United States Dollar", "USD", "$", 1.0, true, []],
2: ["Australian Dollar", "AUD", "$", 0.9372949667, true, []],
12: ["United Kingdom Pound", "GBP", "\u00a3", 0.6347160749, true, []],
22: ["Japan Yen", "JPY", "\u00a5", 77.6443210892, true, []],
32: ["Canada Dollar ", "CAD", "$", 1.001550385, true, []],
42: ["United Arab Emirates Dirhams", "AED", "$", 3.6728000641, false, []],
52: ["Afghanistan Afghanis", "AFN", "$", 49.1800003052, false, []],
62: ["Albania Leke", "ALL", "$", 105.05, false, []],
72: ["Armenia Drams", "AMD", "$", 388.6400146484, false, []],
82: ["Netherlands Antilles Guilders", "ANG", "$", 1.7497999668, false, []],
92: ["Angola Kwanza", "AOA", "$", 95.0599975586, false, []],
102: ["Argentina Pesos", "ARS", "$", 4.3429999352, false, []],
112: ["Aruba Guilders", "AWG", "$", 1.79, false, []],
122: ["Azerbaijan New Manats", "AZN", "$", 0.7857999802, false, []],
132: ["Bosnia and Herzegovina Convertible Marka", "BAM", "$", 1.481932466, false, []],
142: ["Barbados Dollars", "BBD", "$", 2.0, false, []],
152: ["Bangladesh Taka", "BDT", "$", 83.75, false, []],
162: ["Bulgaria Leva", "BGN", "$", 1.48494, false, []],
172: ["Bahrain Dinars", "BHD", "$", 0.3768000007, false, []],
182: ["Burundi Francs", "BIF", "$", 1298.0, false, []],
192: ["Bermuda Dollars", "BMD", "$", 1.0, false, []],
202: ["Brunei Dollars", "BND", "$", 1.26125, false, []],
212: ["Bolivia Bolivianos", "BOB", "$", 6.8600001335, false, []],
222: ["Brazil Reais", "BRL", "$", 1.7223, false, []],
232: ["Bahamas Dollars", "BSD", "$", 1.0, false, []],
242: ["Bhutan Ngultrum", "BTN", "$", 49.475, false, []],
252: ["Botswana Pulas", "BWP", "$", 7.3099411981, false, []],
262: ["Belarus Rubles", "BYR", "$", 8328.0, false, []],
272: ["Belize Dollars", "BZD", "$", 1.959800005, false, []],
282: ["Congo\/Kinshasa Francs", "CDF", "$", 905.0, false, []],
292: ["Switzerland Francs", "CHF", "CHF", 0.91655, false, []],
302: ["Chile Pesos", "CLP", "$", 478.1000061035, false, []],
312: ["China Yuan Renminbi", "CNY", "$", 6.2943, false, []],
322: ["Colombia Pesos", "COP", "$", 1785.0, false, []],
332: ["Costa Rica Colones", "CRC", "$", 505.6900024423, false, []],
342: ["Cuba Convertible Pesos", "CUC", "$", 1.0, false, []],
352: ["Cuba Pesos", "CUP", "$", 26.5, false, []],
362: ["Cape Verde Escudos", "CVE", "$", 83.6200027466, false, []],
372: ["Czech Republic Koruny", "CZK", "$", 19.1015, false, []],
382: ["Djibouti Francs", "DJF", "$", 174.5, false, []],
392: ["Denmark Kroner", "DKK", "", 5.6319, false, []],
402: ["Dominican Republic Pesos", "DOP", "$", 38.7999992371, false, []],
412: ["Algeria Dinars", "DZD", "$", 74.1999969482, false, []],
422: ["Estonia Krooni", "EEK", "$", 11.8554597283, false, []],
432: ["Egypt Pounds", "EGP", "E\u00a3", 6.0320000648, false, []],
442: ["Eritrea Nakfa", "ERN", "$", 15.0, false, []],
452: ["Ethiopia Birr", "ETB", "$", 17.3006000519, false, []],
462: ["Euro", "EUR", "\u20ac", 0.7577000384, true, []],
472: ["Fiji Dollars", "FJD", "$", 1.7458100559, false, []],
482: ["Falkland Islands Pounds", "FKP", "$", 0.6347160749, false, []],
492: ["Georgia Lari", "GEL", "$", 1.6663999557, false, []],
502: ["Guernsey Pounds", "GGP", "$", 0.6347160749, false, []],
512: ["Ghana Cedis", "GHS", "$", 1.6809999943, false, []],
522: ["Gibraltar Pounds", "GIP", "$", 0.6347160749, false, []],
532: ["Gambia Dalasi", "GMD", "$", 30.0, false, []],
542: ["Guinea Francs", "GNF", "$", 6680.0, false, []],
552: ["Guatemala Quetzales", "GTQ", "$", 7.7534999847, false, []],
562: ["Guyana Dollars", "GYD", "$", 203.6999969482, false, []],
572: ["Hong Kong Dollars", "HKD", "$", 7.75505, false, []],
582: ["Honduras Lempiras", "HNL", "$", 19.0550003052, false, []],
592: ["Croatia Kuna", "HRK", "$", 5.75125, false, []],
602: ["Haiti Gourdes", "HTG", "$", 40.3499984741, false, []],
612: ["Hungary Forint", "HUF", "$", 222.96, false, []],
622: ["Indonesia Rupiahs", "IDR", "$", 8980.0, false, []],
632: ["Israel New Shekels", "ILS", "\u20aa", 3.7186, false, []],
642: ["Isle of Man Pounds", "IMP", "$", 0.6347160749, false, []],
652: ["India Rupees", "INR", "Rs", 49.475, false, []],
662: ["Iraq Dinars", "IQD", "$", 1163.0, false, []],
672: ["Iran Rials", "IRR", "$", 11335.0, false, []],
682: ["Iceland Kronur", "ISK", "$", 122.19, false, []],
692: ["Jersey Pounds", "JEP", "$", 0.6347160749, false, []],
702: ["Jamaica Dollars", "JMD", "$", 86.3000030518, false, []],
712: ["Jordan Dinars", "JOD", "$", 0.7077000141, false, []],
722: ["Kenya Shillings", "KES", "$", 82.6999969482, false, []],
732: ["Kyrgyzstan Soms", "KGS", "$", 46.8639984131, false, []],
742: ["Cambodia Riels", "KHR", "$", 4038.0, false, []],
752: ["Comoros Francs", "KMF", "$", 372.7639830493, false, []],
762: ["North Korea Won", "KPW", "$", 129.9112897111, false, []],
772: ["South Korea Won", "KRW", "$", 1123.6, false, []],
782: ["Kuwait Dinars", "KWD", "$", 0.27669999, false, []],
792: ["Cayman Islands Dollars", "KYD", "$", 0.8191674881, false, []],
802: ["Kazakhstan Tenge", "KZT", "$", 148.3000030518, false, []],
812: ["Laos Kips", "LAK", "$", 7960.0, false, []],
822: ["Lebanon Pounds", "LBP", "$", 1500.0, false, []],
832: ["Sri Lanka Rupees", "LKR", "$", 114.9000015259, false, []],
842: ["Liberia Dollars", "LRD", "$", 73.0, false, []],
852: ["Lesotho Maloti", "LSL", "$", 7.75136, false, []],
862: ["Lithuania Litai", "LTL", "$", 2.6161866925, false, []],
872: ["Latvia Lati", "LVL", "$", 0.529399991, false, []],
882: ["Libya Dinars", "LYD", "$", 1.2404999733, false, []],
892: ["Morocco Dirhams", "MAD", "", 8.4270000458, false, []],
902: ["Moldova Lei", "MDL", "$", 11.7250003815, false, []],
912: ["Madagascar Ariary", "MGA", "$", 2160.0, false, []],
922: ["Macedonia Denars", "MKD", "$", 46.2000007629, false, []],
932: ["Myanmar Kyats", "MMK", "$", 6.4099998474, false, []],
942: ["Mongolia Tugriks", "MNT", "$", 1330.0, false, []],
952: ["Macau Patacas", "MOP", "$", 7.9877015, false, []],
962: ["Mauritania Ouguiyas", "MRO", "$", 289.0, false, []],
972: ["Mauritius Rupees", "MUR", "$", 28.5499992371, false, []],
982: ["Maldives Rufiyaa", "MVR", "$", 15.1999998093, false, []],
992: ["Malawi Kwachas", "MWK", "$", 166.4499969482, false, []],
1002: ["Mexico Pesos", "MXN", "$", 12.80255, false, []],
1012: ["Malaysia Ringgits", "MYR", "$", 3.0280001163, false, []],
1022: ["Mozambique Meticais", "MZN", "$", 26.8500003815, false, []],
1032: ["Namibia Dollars", "NAD", "$", 7.75136, false, []],
1042: ["Nigeria Nairas", "NGN", "N", 158.75, false, []],
1052: ["Nicaragua Cordobas", "NIO", "$", 23.1019992828, false, []],
1062: ["Norway Kroner", "NOK", "kr", 5.74295, false, []],
1072: ["Nepal Rupees", "NPR", "$", 79.3899993896, false, []],
1082: ["New Zealand Dollars", "NZD", "$", 1.209628644, false, []],
1092: ["Oman Rials", "OMR", "$", 0.3842000067, false, []],
1102: ["Panama Balboas", "PAB", "$", 1.0, false, []],
1112: ["Peru Nuevos Soles", "PEN", "$", 2.6830000877, false, []],
1122: ["Papua New Guinea Kina", "PGK", "$", 2.1482277253, false, []],
1132: ["Philippines Pesos", "PHP", "$", 42.4799995422, false, []],
1142: ["Pakistan Rupees", "PKR", "$", 90.6800003052, false, []],
1152: ["Poland Zlotych", "PLN", "$", 3.194, false, []],
1162: ["Paraguay Guarani", "PYG", "$", 4500.0, false, []],
1172: ["Qatar Riyals", "QAR", "$", 3.6410000324, false, []],
1182: ["Romania New Lei", "RON", "$", 3.2883999348, false, []],
1192: ["Serbia Dinars", "RSD", "$", 82.0595016479, false, []],
1202: ["Russia Rubles", "RUB", "$", 30.0377006531, false, []],
1212: ["Rwanda Francs", "RWF", "$", 595.0, false, []],
1222: ["Saudi Arabia Riyals", "SAR", "$", 3.75015, false, []],
1232: ["Solomon Islands Dollars", "SBD", "$", 7.0696034574, false, []],
1242: ["Seychelles Rupees", "SCR", "$", 13.7749996185, false, []],
1252: ["Sudan Pounds", "SDG", "$", 2.6714999676, false, []],
1262: ["Sweden Kronor", "SEK", "$", 6.6619, false, []],
1272: ["Singapore Dollars", "SGD", "$", 1.26125, false, []],
1282: ["Saint Helena Pounds", "SHP", "$", 0.6347160749, false, []],
1292: ["Slovakia Koruny", "SKK", "$", 22.9058089417, false, []],
1302: ["Sierra Leone Leones", "SLL", "$", 4300.0, false, []],
1312: ["Somalia Shillings", "SOS", "$", 1629.0, false, []],
1322: ["Seborga Luigini", "SPL", "$", 0.1666666667, false, []],
1332: ["Suriname Dollars", "SRD", "$", 3.25, false, []],
1342: ["S\u00e3o Tome and Principe Dobras", "STD", "$", 18585.0, false, []],
1352: ["El Salvador Colones", "SVC", "$", 8.75, false, []],
1362: ["Syria Pounds", "SYP", "$", 57.2999992371, false, []],
1372: ["Swaziland Emalangeni", "SZL", "$", 7.75136, false, []],
1382: ["Thailand Baht", "THB", "\u00e0\u00b8\u00bf", 30.8700008392, false, []],
1392: ["Tajikistan Somoni", "TJS", "$", 4.757999897, false, []],
1402: ["Turkmenistan Manats", "TMM", "$", 14250.0, false, []],
1412: ["Tunisia Dinars", "TND", "$", 1.5010000467, false, []],
1422: ["Tonga Pa'anga", "TOP", "$", 1.6891891674, false, []],
1432: ["Turkey New Lira", "TRY", "$", 1.7602000237, false, []],
1442: ["Trinidad and Tobago Dollars", "TTD", "$", 6.3499999046, false, []],
1452: ["Tuvalu Dollars", "TVD", "$", 0.9372949667, false, []],
1462: ["Taiwan New Dollars", "TWD", "$", 29.58, false, []],
1472: ["Tanzania Shillings", "TZS", "$", 1583.0, false, []],
1482: ["Ukraine Hryvnia", "UAH", "$", 8.0249996185, false, []],
1492: ["Uganda Shillings", "UGX", "$", 2305.0, false, []],
1502: ["Uruguay Pesos", "UYU", "$", 19.2999992371, false, []],
1512: ["Uzbekistan Sums", "UZS", "$", 1828.0, false, []],
1522: ["Venezuela Bolivares", "VEB", "BSF", 4300.0, false, []],
1532: ["Venezuela Bolivares Fuertes", "VEF", "BSF", 4.3, false, []],
1542: ["Vietnam Dong", "VND", "$", 20870.0, false, []],
1552: ["Vanuatu Vatu", "VUV", "$", 88.3499984741, false, []],
1562: ["Samoa Tala", "WST", "$", 2.305209711, false, []],
1572: ["Communaut\u00e9 Financi\u00e8re Africaine Francs BEAC", "XAF", "$", 497.0186440657, false, []],
1582: ["Silver Ounces", "XAG", "$", 0.0297796307, false, []],
1592: ["Gold Ounces", "XAU", "$", 0.0005808213, false, []],
1602: ["East Caribbean Dollars", "XCD", "$", 2.7000000477, false, []],
1612: ["International Monetary Fund Special Drawing Rights", "XDR", "$", 0.6445749998, false, []],
1622: ["Communaut\u00e9 Financi\u00e8re Africaine Francs BCEAO", "XOF", "$", 497.0186440657, false, []],
1632: ["Palladium Ounces", "XPD", "$", 0.0014227382, false, []],
1642: ["Comptoirs Fran\u00e7ais du Pacifique Francs", "XPF", "$", 90.417665676, false, []],
1652: ["Platinum Ounces", "XPT", "$", 0.0006025948, false, []],
1662: ["Yemen Rials", "YER", "$", 212.9499969482, false, []],
1672: ["South Africa Rand", "ZAR", "$", 7.75136, false, []],
1682: ["Zambia Kwacha", "ZMK", "$", 5240.0, false, []],
1692: ["Zimbabwe Dollars", "ZWD", "$", 361.9, false, []],
1693: ["Turkmenistan New Manats", "TMT", "$", 2.85, false, []]
};

var pwCurOrder = [1,2,12,22,32,42,52,62,72,82,92,102,112,122,132,142,152,162,172,182,192,202,212,222,232,242,252,262,272,282,292,302,312,322,332,342,352,362,372,382,392,402,412,422,432,442,452,462,472,482,492,502,512,522,532,542,552,562,572,582,592,602,612,622,632,642,652,662,672,682,692,702,712,722,732,742,752,762,772,782,792,802,812,822,832,842,852,862,872,882,892,902,912,922,932,942,952,962,972,982,992,1002,1012,1022,1032,1042,1052,1062,1072,1082,1092,1102,1112,1122,1132,1142,1152,1162,1172,1182,1192,1202,1212,1222,1232,1242,1252,1262,1272,1282,1292,1302,1312,1322,1332,1342,1352,1362,1372,1382,1392,1402,1412,1422,1432,1442,1452,1462,1472,1482,1492,1502,1512,1522,1532,1542,1552,1562,1572,1582,1592,1602,1612,1622,1632,1642,1652,1662,1672,1682,1692,1693];

var pwCurId = 1;
var pwCurCur = pwCurData[pwCurId];

var pwCurBId = 1;
var pwCurBCur = pwCurData[pwCurBId];

var pwCurModifier = 1;

var pwCurFormat = 0;

function pwSetBaseCurrency(curCurrencyId) {
	pwCurBId = curCurrencyId;
	pwCurBCur = pwCurData[pwCurBId];
}

function pwSetCurrentCurrency(curCurrencyId) {
	pwCurId = curCurrencyId;
	pwCurCur = pwCurData[pwCurId];
	
	if(pwCurId==pwCurBId) {
		pwCurModifier = 1;
	} else {
		fromUS = parseFloat(pwCurCur[3]);
		toUS = parseFloat(pwCurBCur[3]);
		pwCurModifier = fromUS / toUS;
	}
}

function pwSetCurrencyFormat(priceFormat) {
  pwCurFormat = priceFormat;
}

function pwCurSelectCurrency() {
	var div = document.getElementById("pw_c_popup");
	if(div.style.display=="") {
		pwCurClose();
		return;
	}
	var container = document.getElementById("pw_c_container");
	if(container.firstChild==null) {
		container.innerHTML = pwLoadCurrencySelector();
	}
	var link = document.getElementById("pw_c_popup_link");
	
	/* added by jonathan *///div.style.display="";
	//link.style.display="none";
}

function pwCurCurCode() {
	return pwCurCur[1];
}

function pwLoadCurrencySelector(el) {
	var html = '<select id="pw_c_selector" onchange="pwCurSelectorChanged(this);" style="width: 54px;">'; //</select>";
	for(var i=0; i < pwCurOrder.length; i++) { //>
		var cId = pwCurOrder[i];
		var cData = pwCurData[cId];
		/*
		var opt = document.createElement("OPTION");
		opt.value = cId;
		opt.text = cData[1] + " " + cData[0];
		if(cId==pwCurId) {
			opt.selected = true;
		}
		el.appendChild(opt);
	*/
		
		if(cId==pwCurId) {
			html += '<option value="' + cId + '" selected="true">' + cData[1] + " " + cData[0] + '</option>';
		} else {
			html += '<option value="' + cId + '">' + cData[1] + " " + cData[0] + '</option>';
		}
	}
	html += '</select>';
	return html;
	//document.write(html);
	//el.innerHTML = html;
}

function pwCurClose() {
	var div = document.getElementById("pw_c_popup");
	var link = document.getElementById("pw_c_popup_link");
	/* added by jonathan *///div.style.display="none";
	//link.style.display="";
}

function pwCurSelectorChanged(el) {
	var cId = el.value;
	pwSetCurrentCurrency(cId);
	
	var i2=new Image(1,1);
	i2.src="/ppr/home/set_user_currency/" + cId;
	i2.onload=function() { pwCurVoid(); };
		
	for(var i=0; i < pwCurAreas.length; i++) { //>
		var a = pwCurAreas[i];
		if(a["callback"] != null) {
			a["callback"](pwCurCur, pwCurBCur, pwCurModifier);
		} else {
			if(a["span"] == null) {
				a["span"] = document.getElementById(a["spanId"]);
			}
			if((a["codeId"] != null) && (a["code"] == null)) {
				a["code"] = document.getElementById(a["codeId"]);
			}
			//if(a["code"]==null) {
			
			  a["span"].innerHTML = pwCurContent(a.amount, a.codeClazz, a.forceCents, a.codeId, a.format, a.taxWarning, a.disc)
			
				new Effect.Opacity(a["span"], { from: 0, to: 1.0, duration: 0.5 });
			/*} else {
				a["span"].innerHTML = pwCurFormatAmount(a["amount"], a["forceCents"]);
				a["code"].innerHTML = pwCurCur[1];
				new Effect.Pulsate(a["span"], { pulses: 5, duration: 1.5 });
			}*/
		}
	}
	var link = document.getElementById("pw_c_popup_link");
	link.innerHTML = "currency: "+pwCurCur[1];
	/*added by jonathan*///pwCurClose();
	close_extras($('currency'));
}

function pwCurVoid() { 
		return; 
	}

var pwCurIdCounter = 0;

function pwCurNextId() {
	pwCurIdCounter += 1;
	return pwCurIdCounter;
}

function pwCurConvert(amount) {
	if(pwCurId==pwCurBId) {
		return parseFloat(amount);
	}
	return amount * pwCurModifier;
}

function pwCurFormatAmount(amount, forceCents) {
	if(forceCents==null) {
		forceCents = true;
	}
	amount = pwCurConvert(amount);
	var dc = null;
	var dollars = parseInt(amount);
	var cents = parseInt((amount - dollars) * 100);
	if(cents == 0 && !forceCents) {
		return dollars;
	} else {
		return amount.toFixed(2);
	}
}

function pwCurArea(amount, spanClazz, codeClazz, forceCents, spanId, codeId, callback, registerArea, useExistingId, format, taxWarning, priceElements) {
  if (taxWarning == null) taxWarning = "";
	if(spanId == null) {
		spanId = "pwc_s_" + pwCurNextId();
	}
	if(registerArea==false && codeId == null) {
	
	} else {
		if((codeId == null) && (codeClazz!=null)) {
			codeId = "pwc_c_" + pwCurNextId();
		}
	}
	
	if (forceCents == null) forceCents = true;
	
	var spanIdHtml = ' id="' + spanId + '"';
	var spanClazzHtml = "";
	if(spanClazz != null) spanClazzHtml = ' class="' + spanClazz + '"';
	
	var disc = 0;
	if((cDisc != undefined) && (cDisc != null) && (cDisc > 0) && (priceElements != null)) {
	  var discPrice = 0;
	  var dP, dPP;
	  if((priceElements != null) && (priceElements.length > 0)) {
	    for(var i=0; i < priceElements.length; i++) {
	      dP = parseFloat(Math.round( parseFloat(priceElements[i]) * cDisc)) / 100;
	      dPP = parseFloat(Math.round(priceElements[i] * 100.0)) / 100;
	      discPrice += (dPP - dP);
	    }
	  }
	  //round to 
	  if((cDiscPR != null)&&(cDiscPR > 1)) {
	    var c = Math.round(discPrice * 100);
	    var cInt = parseInt(parseInt(c) / parseInt(cDiscPR));
	    var ac = cInt * cDiscPR;
	    if(ac < c) {
	      ac += cDiscPR;
	    }
	    if(cDiscP99) {
        if(ac % 100 == 0) {
          ac -= 1;
        }
      }
	    discPrice = parseFloat(ac) / 100.0;
	  } else if(cDiscP99) {
      var ac = Math.round(discPrice * 100);
      if(ac % 100 == 0) {
        ac -= 1;
      }
      discPrice = parseFloat(ac) / 100.0;
    }
	  if(cDiscTax != 0) {
	    discPrice *= cDiscTax;
	    discPrice = parseFloat(Math.round(discPrice * 100.0)) / 100.0;
	  }
	  disc = amount - discPrice;
	}
	
	var html = '<span' + spanIdHtml + spanClazzHtml + '>' + pwCurContent(amount, codeClazz, forceCents, codeId, format, taxWarning, disc) + '</span>';
	
	
	if((registerArea)||(registerArea==null)) {
		pwCurRegisterArea(amount, spanId,codeId, null, null, forceCents, callback, format, disc, codeClazz, taxWarning);
	}
	if(useExistingId!=null) {
		var el = null;
		if (typeof useExistingId == 'string') {
		  el = document.getElementById(useExistingId);
		} else {
		  el = useExistingId;
		}
		el.innerHTML = html;
	} else {
	
		document.write(html);
	}
}

function pwCurContent(amount, codeClazz, forceCents, codeId, format, taxWarning, disc) {
  var codeIdHtml = "";
	if(codeId != null) codeIdHtml = ' id="' + codeId + '"';
	var codeClazzHtml = "";
	if(codeClazz!=null) codeClazzHtml = ' class="' + codeClazz + '"';
	var codeHtml = pwCurCur[1];
	if(codeId != null || codeClazz!=null) codeHtml = '<span' + codeIdHtml + codeClazzHtml + '>' + pwCurCur[1] + '</span>';
	
	var html = "";
	if (format == null) format = pwCurFormat;
	
	if(disc > 0) {
	  var rrpHtml = pwCurApplyFormat(format, pwCurCur, pwCurFormatAmount(amount, forceCents), codeHtml, taxWarning, '');
	  html = pwCurApplyFormat(format, pwCurCur, pwCurFormatAmount(amount - disc, forceCents), codeHtml, taxWarning, '<span class="rrp">' + rrpHtml + '</span> ');
	} else {
	  html = pwCurApplyFormat(format, pwCurCur, pwCurFormatAmount(amount, forceCents), codeHtml, taxWarning, '');
	}
	return html;
}

function pwCurApplyFormat(format, pwCurCur, amount, codeHtml, taxWarning, rrp) {
  switch(format) {
	case 1: return rrp + pwCurCur[2] + amount + ' ' + taxWarning; break;
	case 2: return rrp + amount + ' ' + codeHtml + taxWarning; break;
	case 3: return rrp + amount + ' ' + taxWarning; break;
	case 4: return rrp + amount + pwCurCur[2] + ' ' + taxWarning; break;
	default: return rrp + pwCurCur[2] + amount + ' ' + codeHtml + taxWarning;
	}
}

function pwCurWritePrice(amount, forceCents) {
	document.write(pwCurFormatAmount(amount, forceCents) + " " + pwCurCur[1]);
}

var pwCurAreas = [];

function pwCurRegisterArea(amount, spanId, codeId, span, code, forceCents, callback, format, disc, codeClazz, taxWarning) {
	pwCurAreas.push( {
		amount:amount,
		spanId:spanId,
		codeId:codeId,
		codeClazz:codeClazz,
		span:span,
		code:code,
		forceCents:forceCents,
		callback:callback,
		format:format, 
		disc:disc, 
		taxWarning: taxWarning
	});

}

