// 7th Chevron Image Swap Script 1.0
// Author:  Gerry Brinkman
// Revison Date:  Nov 24, 2004
// Enquiries:  webmaster@acalltoduty.com
// Copyright 2004 A Call to Duty Roleplaying
// http://7thchevron.acalltoduty.com

//constants
var fPath = "http://7thchevron.acalltoduty.com/images/features/"

//pic
var charFile = new Array()
var charAlt = new Array()
var charLink = new Array()

charFile[1]="SGCarter.jpg"
charAlt[1]="7th Chevron: A Call to Duty"
charLink[1]="http://7thchevron.acalltoduty.com"

charFile[2]="SGSynth.jpg"
charAlt[2]="7th Chevron: A Call to Duty"
charLink[2]="http://7thchevron.acalltoduty.com"

charFile[3]="SGZartaxian.jpg"
charAlt[3]="7th Chevron: A Call to Duty"
charLink[3]="http://7thchevron.acalltoduty.com"

charFile[4]="SGSheppard.jpg"
charAlt[4]="7th Chevron: A Call to Duty"
charLink[4]="http://7thchevron.acalltoduty.com"

//begin code

var fIndex

function fRandom(fFile,fAlt,fLink){
	
	if(fFile==charFile){
		while(!fIndex || !charFile[fIndex]){
			fIndex = Math.round(Math.random()*(fFile.length-1))
		}
	}
	
	return '<a href="'+fLink[fIndex]+'" alt="'+fAlt[fIndex]+'"><img src="'+fPath+fFile[fIndex]+'" border="0"></a>'

}