// preloads image
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (var i=0; i<array.length; i+=2) {
			img = null; var n = array[i];
			if (d.images) {img = d.images[n];}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (img) {img.src = array[i+1];}
		}
	}
}
function changeImages() {
	changeImagesArray(changeImages.arguments);
}
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		core_over = newImage('img/menu/core_o.gif');
		products_over = newImage('img/menu/products_o.gif');
		crossbow_over = newImage('img/menu/crossbow_o.gif');
		support_over = newImage('img/menu/support_o.gif');
		preloadFlag = true;
	}
}

// onClick="pop(this.href,'name','0','0','no','no','no');return false"
// window.open("Sample.htm",null,"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
// http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp
var popwin=null;
var popset=null;

function pop(popsrc, w, h)
{
	var popset = 'width=' + w + ',' + 'height=' + h
		//+ ',left=no'
		//+ ',top=no'

		+ ',channelmode=no'
		+ ',directories=no'
		+ ',fullscreen=no'
		+ ',scrollbars=1'

		+ ',location=no'
		+ ',menubar=no'
		+ ',toolbar=no'
		+ ',status=no'
		+ ',resizable=yes';

	popwin = window.open(popsrc, null, popset);

	if(parseInt(navigator.appVersion)>=6){popwin.focus( );}
}

function photo(popsrc)
{
	var popset = 'width=1,height=1,channelmode=no,directories=no,fullscreen=no,scrollbars=no,location=no,menubar=no,toolbar=no,status=no,resizable=no';

	popwin = window.open(popsrc, null, popset);
	if(parseInt(navigator.appVersion)>=6){popwin.focus( );}
}

// ticker tape
var ticker
speed  = 75
len   = 150
space  = ""
tid   = 0;
message = ""
c    = -len;

function move()
{ cend=Math.min(c+len,message.length)
 if (c <0)
  cstart=0
 else
  cstart=c
 if (c < 0)
  f.scroll.value=space.substring(0,-c) + message.substring(cstart,cend)
 else
  f.scroll.value=message.substring(cstart,cend)
 c = c +1;
 if (c == message.length ) c = -len;
 tid = window.setTimeout("move()" , speed);
}
 
function start(x)
{ f = x
 tid = window.setTimeout("move()" , speed);
}
 
function cleartid()
{ window.clearTimeout(tid);
}
 
// for some reason on some pages this crashes netscape
function ticker(m,l,s)
{ 
message=m
len=l
speed=s
document.write('<form name="ticker"><input name="scroll" size="')
document.write(len)
document.write('" value=""></form>')
start(document.ticker);
}

// for some reason on some pages this crashes netscape
function ticker(m)
{
message=m
len=l
speed=s
document.write('<form name="ticker"><input name="scroll" size="100" value=""></form>');
start(document.ticker);
}