function GetDetails(WkEntry1, WkEntry2)
	{
		document.SearchForm.rec.value = WkEntry1;
		document.SearchForm.action = 'product.asp';
		document.SearchForm.submit();	
	}

function EmptyField()
	{
	if (document.search.C0.value == "Keyword search")
		document.search.C0.value = "";
	}

function FillField()
	{
	if (document.search.C0.value == "")
		document.search.C0.value = "Keyword search";
	}


function alpha(searchFor)
{
	document.alphaSearch.searchFor.value = searchFor;
	document.alphaSearch.submit();
}

function viewcart()
{
	today = new Date();
	document.location = "add.asp?furc="+today.getTime();
}

function checkout(where)
{
	today = new Date();
	if(where == "details")
		document.location = "https://www.dvd.co.uk/details.asp?furc="+today.getTime();
	else
		document.location = "https://www.dvd.co.uk/logonform.asp?next=https://www.dvd.co.uk/details.asp";
}

function quickVal()
{
	if(document.quickSearch.searchFor.value == "")
	{
		alert("Please enter search criteria.")
		document.quickSearch.searchFor.focus();
		return false
	}
	
	return true
}

function remove(index)
	{
		today = new Date();
		locstr = "add.asp?action=remove&time=" + today.getTime() + "&index="+index;
		document.location.replace(locstr);
	}
function CheckEmail()
{
	var pattern = new RegExp ("^[0-9a-z,._-]+@[a-z0-9\._-]+\.[a-z]{2,3}$", "i");
	var EmailValue = document.forms.fdbk.E.value;
	var match = pattern.test (EmailValue);

	if (EmailValue == '')
	{
		alert('You need to provide an email address.');
		return false;
	}
	else
	{
		if (!match)
		{
			alert('Please check your email address is correct.');
			return false;
		}
		else
		{
			return true;
		}
	}
}

function JumpToLetter(WkEntry)
{
	document.location.href = "#" + WkEntry;
}

