/* currency component */
	

	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 VerifyFormNewsletter()
	{
		var f = document.formNewsletter;

		if(f.email.value =='' || f.email.value.indexOf('.') == -1 || f.email.value.indexOf('@') == -1)
		{
			alert('Please enter your email.');
			f.email.focus();
			return false;
		}

		f.FlagProcess.value = '1';
		return true;
	}


function initLoginBox()
{
		
		pkCustomer = readCookie('pkCustomer');
		
		//alert(pkCustomer);
		custName = new String(readCookie('custName'));
		custName = (custName.replace("+"," "));
		
		
		if(pkCustomer != null && pkCustomer != '')
		{
			var objLoginInfo = document.getElementById('loginInfo');
			objLoginInfo.innerHTML = '<span><strong>Welcome</strong></span>' + 
						'<span class=\"textGreen\"><strong> ' + custName + '</strong></span>' + 
						'<a href=\"/webshaper/store/logoff.asp\" >(Sign Out)</a>';

		
		}
}