/* currency component */
	
	function readCookie(name)
	{
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++)
		{
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}
	

	function initCurrency()
	{
		//set the currency
		if(document.formCurrency)
		{
			if(document.formCurrency.currency)
			{
				var fCurrency = document.formCurrency;
	
				currSelected = readCookie('CurrSelected');
	
				
				for(i=0; i<fCurrency.currency.length; i++)	
				{
					//alert(fCurrency.currency.options[i].value)
	
					if(fCurrency.currency.options[i].value == currSelected )
					{
						fCurrency.currency.options[i].selected = true;
					}
				}
	
			}
	
			//disable the currency control, when these pages are encountered.
			/*
				i. addressRegister.asp
				ii. addressBilling.asp
				iii. 
			*/
				
			if(
					(document.location.href.indexOf('addressRegister.asp') >= 0) ||
					(document.location.href.indexOf('addressBilling.asp') >= 0) ||
					(document.location.href.indexOf('addressBook.asp') >= 0) ||
					(document.location.href.indexOf('addressShipping.asp') >= 0) ||
					(document.location.href.indexOf('shipping.asp') >= 0) ||
					(document.location.href.indexOf('orderSummary.asp') >= 0) ||
					(document.location.href.indexOf('payment.asp') >= 0) ||
					(document.location.href.indexOf('thankyou.asp') >= 0) ||
					(document.location.href.indexOf('cancelpayment.asp') >= 0) 
				)
			{
				if(document.formCurrency.currency)
				{
		
					var objCurrency = eval('document.formCurrency.currency')
					objCurrency.disabled = true;
				}
			}
		}
	}
	
	function HideHelpExt(div)
	{
		objDiv = document.getElementById(div);
		objDiv.style.display = 'none';
	}
	
	function ShowHelpExt(div, title, desc, width)
	{
		 
		objDiv = document.getElementById(div);
		objDiv.style.display = 'inline';
		
		objDiv.style.position = 'absolute';
		objDiv.style.width = width;
		objDiv.style.backgroundColor = 'lightyellow';
		objDiv.style.border = 'dashed 1px black';
		objDiv.style.padding = '10px';
		objDiv.innerHTML = '<b>' + title + '</b><br/><img src="../images/blank.gif" width="1px" height="5px"><br/>' +
				'<div style="padding-left:10px; padding-right:5px">' + desc + '</div>';
		
	}	

