// JavaScript Document


// Correct the text for Currency

function displayCorrectCurrency(webHost) {	
                     var priceCurrency;
	if (webHost == "au.raynormassage.com") { priceCurrency = "AUD"; }
	else if (webHost == "nz.raynormassage.com") { priceCurrency = "NZD"; }
	else if (webHost == "ca.raynormassage.com") { priceCurrency = "CAD"; }
	else if (webHost == "uk.raynormassage.com") { priceCurrency = "GBP"; }
	else if (webHost == "de.raynormassage.com") { priceCurrency = "EUR"; }
	else if (webHost == "ie.raynormassage.com") { priceCurrency = "EUR"; }
	else if (webHost == "sg.raynormassage.com") { priceCurrency = "SGD"; }
	else if (webHost == "jpn.raynormassage.com") { priceCurrency = "YEN"; }
	else if (webHost == "jp.raynormassage.com") { priceCurrency = "YEN"; }
	else if (webHost == "za.raynormassage.com") { priceCurrency = "RAND"; }
	else  { priceCurrency = "USD"; }
	return(priceCurrency);				
 }	

function replaceCurrencyNodes(curClass){
  // select all <DIV> elements on the web page
  var myDivTags=document.getElementsByTagName('div');
  if(!myDivTags){return};

  for(var i=0;i<myDivTags.length;i++){
    
       if(myDivTags[i]){
              if (myDivTags[i].className == curClass){
                    myDivTags[i].innerHTML = "* Prices for this course are in "+displayCorrectCurrency(document.location.host);
if (displayCorrectCurrency(document.location.host) == "AUD") myDivTags[i].innerHTML = '* Prices for this course are in '+displayCorrectCurrency(document.location.host);
                 } 
           } 
       }
}

              // Display the DIV with the Tell a Friend form.
				function showTellAFriend() {							
				if (document.getElementById("TAFShown")) {
				document.getElementById("TAFShown").style.display = 'none';	
				document.getElementById("TAFShown").id = 'TAFHidden';			
				} else if (document.getElementById("TAFHidden")) {
				document.getElementById("TAFHidden").style.display = 'inline';
				document.getElementById("TAFHidden").id = 'TAFShown';			
				}

					

		 }	


			// Display the DIV with the correct payment Info according to the payment selected.
				function displayPaymentInfo(val) {							

				document.getElementById("" + val + "div").style.display = 'inline';	
	
					

		 }	
