


// moofx effects

var coverfeatureHeight;
var featureauthorOpacity;
var featureintroOpacity;
var featuremoreOpacity;

var coverOpen = 0;


window.onload = function () {
	
	featureauthorOpacity = new Fx.Style('featureauthorlink', 'color', {duration: 400});
	featureintroOpacity = new Fx.Style('featureintro', 'color', {duration: 400});
	featuremoreOpacity = new Fx.Style('featuremorelink', 'color', {duration: 400});
	
	coverfeatureHeight = new Fx.Style('coverfeature', 'height', {duration: 400, onComplete: function()
		{
			if (coverOpen == 0) {
				coverOpen = 1;
			} else if (coverOpen == 1) {
				coverOpen = 0;
			}
		}
	});
	
}



var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function flash_header_DoFSCommand(command, args) {
	var flash_headerObj = isInternetExplorer ? document.all.flash_header : document.flash_header;
	//
	if (command == "replacefeature") {
		
		if (coverOpen == 0) {
			featureauthorOpacity.start('#4e3d68', '#cdb8f0');
			featureintroOpacity.start('#4e3d68', '#cdb8f0');
			featuremoreOpacity.start('#4e3d68', '#cdb8f0');

			coverfeatureHeight.start(0, 215);
		}
		
	}
	if (command == "restorefeature") {
		
		if (coverOpen == 1) {
			featureauthorOpacity.start('#cdb8f0', '#4e3d68');
			featureintroOpacity.start('#cdb8f0', '#4e3d68');
			featuremoreOpacity.start('#cdb8f0', '#4e3d68');

			coverfeatureHeight.start(215, 0);
		}
	}
	if (command == "checkcover") {
		// occurs when flash cover fades back in - sliding cover should then be hidden.
		if (coverOpen == 1) {
		
			featureauthorOpacity.start('#cdb8f0', '#4e3d68');
			featureintroOpacity.start('#cdb8f0', '#4e3d68');
			featuremoreOpacity.start('#cdb8f0', '#4e3d68');

			coverfeatureHeight.start(215, 0);
		} else if (coverOpen == 0) {
		}
	}
	//
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub flash_header_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call flash_header_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

