﻿function doMyAccountHome ()
{
	document.getElementById("myaccountbutton").src = "/images/button-myaccount-on.gif";
	document.getElementById("homeloginarea").style.display = "";
	document.getElementById("emailfield").focus();
}

function doProductSearchFieldFocus(theField)
{
	document.getElementById("productsearchbutton").src = "/images/goarrow-blue.gif";
	document.getElementById("productsearchtext").innerHTML = "<span class='blue11px'>Product Search</span>";
	theField.className = "searchformfieldfocus";
}

function doProductSearchFieldBlur(theField)
{
	document.getElementById("productsearchbutton").src = "/images/goarrow.gif";
	document.getElementById("productsearchtext").innerHTML = "<span class='grey11px'>Product Search</span>";
	theField.className = "searchformfield";
}

var myFunction = function(){
	document.getElementById("myaccountbuttonoff").style.display = "none";
	var div = $('homeloginarea').setStyles({
		display:'block',
		opacity: 0
	});
	var div2 = $('myaccountbuttonon').setStyles({
		display:'block',
		opacity: 0
	});
	new Fx.Style(div, 'opacity', {duration: 800} ).start(1);
	new Fx.Style(div2, 'opacity', {duration: 800, onComplete : function() {document.getElementById("emailfield").focus();}} ).start(1);
};

function doLabelColourChangeMyAcc (mode,labelID,labelText,theField)
{
	if (mode == 'focus') {
		document.getElementById(labelID).innerHTML = "<span class='blue11px'><strong>" + labelText + "</strong></span>";
		theField.className = "myaccountloginfieldfocus";
	}
	if (mode == 'blur') {
		document.getElementById(labelID).innerHTML = "<span class='grey11px'><strong>" + labelText + "</strong></span>";
		theField.className = "myaccountloginfield";
	}
}

function doLabelColourChange (mode,labelID,labelText,theField)
{
	if (mode == 'focus') {
		document.getElementById(labelID).innerHTML = "<span class='blue11px'><strong>" + labelText + "</strong></span>";
		theField.className = "normalformfieldfocus";
	}
	if (mode == 'blur') {
		document.getElementById(labelID).innerHTML = "<span class='grey11px'><strong>" + labelText + "</strong></span>";
		theField.className = "normalformfield";
	}
}

function doLabelColourChangeText (mode,labelID,labelText,theField)
{
	if (mode == 'focus') {
		document.getElementById(labelID).innerHTML = "<span class='blue11px'><strong>" + labelText + "</strong></span>";
		theField.className = "normalformtextfieldfocus";
	}
	if (mode == 'blur') {
		document.getElementById(labelID).innerHTML = "<span class='grey11px'><strong>" + labelText + "</strong></span>";
		theField.className = "normalformtextfield";
	}
}

function doLabelColourChangeText3 (mode,labelID,labelText,theField)
{
	if (mode == 'focus') {
		document.getElementById(labelID).innerHTML = "<span class='blue11px'><strong>" + labelText + "</strong></span>";
		theField.className = "normalformtextfield3focus";
	}
	if (mode == 'blur') {
		document.getElementById(labelID).innerHTML = "<span class='grey11px'><strong>" + labelText + "</strong></span>";
		theField.className = "normalformtextfield3";
	}
}

function doLabelColourChange2 (mode,labelID,labelText,theField)
{
	if (mode == 'focus') {
		document.getElementById(labelID).innerHTML = "<span class='blue11px'><strong>" + labelText + "</strong></span>";
		theField.className = "normalformtextfield2focus";
	}
	if (mode == 'blur') {
		document.getElementById(labelID).innerHTML = "<span class='grey11px'><strong>" + labelText + "</strong></span>";
		theField.className = "normalformtextfield2";
	}
}

function doRemoveThumbnail()
{
	document.getElementById('articleimage').value = 'remove';
	document.getElementById('existingfiletable').style.display = 'none';
}

function doDownloadProgressShow()
{
	document.getElementById('downloadanim').style.display = 'block';
	return true;
}

function doDownloadProgressHide()
{
	document.getElementById('downloadanim').style.display = 'none';
}