var iPath = '../js/';
var iExt = 'gif';
var suffix = new Array('on', 'out');

function preLoad()
{
  if(document.images)
  {
    var argLen = arguments.length;
    for(var i = 0; i < argLen; i++)
    {
      var arg = arguments[i];
      var sufLen = suffix.length;
      for(j = 0; j < sufLen; j++)
      {
        var suf = suffix[j]
        self[arg + '_' + suf] = new Image();
        self[arg + '_' + suf].src = iPath + arg + '_' + suf + '.' + iExt;
      }
    }
  }
}

function rollOver(img, iName, iState) {
	if(document.images && self[iName + '_' + iState]) {
   	img.src = self[iName + '_' + iState].src;
	}
}

function onLoad() {
	preLoad('arrow');
}
window.onload = onLoad;