// If you wish to use this script for non-commercial purposes, please extend the author the courtesy of crediting him and
// providing a link to his site - http://www.markeverett.com

// Unauthorised use of this script for commercial purposes is prohibited.
// Please contact the author at mark AT markeverett D0T com to request authorisation.

// In all cases this work remains the copyrighted property of Mark Everett

// _______________________________________________________________

// Title : Link blinker v1
// Author : Mark Everett
// Website : www.markeverett.com
// Copyright © Mark Everett 2004 all rights reserved
// _______________________________________________________________

// The first argument passed is the link object reference
// If the link has a hover colour set and you still want it to show onmouseover, pass that colour as the second argument
// All subsequent arguments represent the other colours to paint the link in the order they're required

linkblink.colorArray = new Array();
linkblink.arrayPosition = 0;
linkblink.blinkTimer = null;

function linkblink (theLink) {
	if (linkblink.colorArray.length == 0) {
		for (i = 0; i < arguments.length - 1; i ++) {
			linkblink.colorArray[i] = arguments[i + 1];
		}
	}
	if (linkblink.arrayPosition == linkblink.colorArray.length) {
		linkblink.arrayPosition = 0;
	}
	theLink.style.color = linkblink.colorArray[linkblink.arrayPosition];
	linkblink.arrayPosition ++;
	linkblink.blinkTimer = setTimeout("linkblink(document.getElementById('"	+ theLink.getAttribute("id") + "'))", 120);
	theLink.onmouseout = function () {
		clearTimeout(linkblink.blinkTimer);
		theLink.style.color = "";
		linkblink.colorArray = new Array();
		linkblink.arrayPosition = 0;
		linkblink.blinkTimer = null;
	}
}

