function checkInputIn(which_form, which_input, should_be)
{
var a = eval("document.forms."+which_form+"."+which_input+".value");
if (a == should_be)
	{
	eval("document.forms."+which_form+"."+which_input+".value = '';");
	}
}

function checkInputOut(which_form, which_input, should_be)
{
var a = eval("document.forms."+which_form+"."+which_input+".value");
if (a == "")
	{
	eval("document.forms."+which_form+"."+which_input+".value = '"+should_be+"';");
	}
}


function showFAQ(which_FAQ) {
var a = document.getElementById(which_FAQ);
if (a.style.display == "none" || a.style.display == "")
	{
	a.style.display = "block";
	}
else
	{
	a.style.display = "none";
	}
}


function checkWindowPosition() {
	checkWindowPosID = setInterval("subNavMove()",500)
}
 

function subNavMove() {
if (navigator.appName == "Microsoft Internet Explorer")
	{
	var a = document.documentElement.scrollTop;
	}
else
	{
	var a = window.pageYOffset;
	}

var b = document.getElementById("overall_sub_navigation");

var c = document.getElementById("fixed_scroll_teasers");

if (a >= 390)
	{
	b.style.position = "fixed";
	var_pos_top = 10;
	b.style.top = var_pos_top + "px";

	c.style.position = "fixed";
	var_pos_top = 10;
	c.style.top = var_pos_top + "px";
	}
else
	{
	b.style.position = "relative";
	var_pos_top = a + 10;
	b.style.top = "";

	c.style.position = "relative";
	var_pos_top = a + 10;
	c.style.top = "";
	}
}


function setMaxLength(what_length) {

var l = what_length;

var a = document.forms.basketForm.flowers_message.value.length;
document.forms.basketForm.chrsLeft.value = (l-document.forms.basketForm.flowers_message.value.length);

var b = l-a

if (b <= 0)
	{
	document.forms.basketForm.flowers_message.value = document.forms.basketForm.flowers_message.value.substring(0,l);
	document.forms.basketForm.chrsLeft.value = 0;
	}

}


function matchBillingDelivery() {
document.forms.checkoutForm.billing_name.value = document.forms.checkoutForm.name.value;
document.forms.checkoutForm.billing_email.value = document.forms.checkoutForm.email.value;
document.forms.checkoutForm.billing_phone.value = document.forms.checkoutForm.phone.value;
document.forms.checkoutForm.billing_address.value = document.forms.checkoutForm.address.value;
document.forms.checkoutForm.billing_postcode.value = document.forms.checkoutForm.postcode.value;
}

