// Handles rollover images for NN3+ and IE4+



var loaded = new Array();

var activeTag = 'none';

var currentTag = 'none';

var RolloversActive = 0;

//////
function popIt(url) 
	{
    // the variable name represents the open window
    // the first argument is the page you are displaying in the popup
    // the second argument is the name of the window for future operations
    // you can modify/delete some of the remaining arguments as you wish
    // they represent the features of the popup window
    // N.B. --- put the following on one line!!!
	openWin = window.open(url,"myWindow","top=0,left=0,width=640,height=700,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=yes,status=no,directories=no,toolbar=no");
    	// the following line sets the focus to the open window, i.e. brings it to the front
	}

function SubmitForm(form)
{			
	form.submit();
}

function WriteDate()
{
	var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	var montharray=new Array("Jan","Feb","Mar","April","May","June","July","Aug","Sep","Oct","Nov","Dec");
	var mydate=new Date();
	var year=mydate.getYear();
	// year<2000, pad it with "19"
	if (year<2000)
	{
		year=1900+year;
	}
	var day=mydate.getDay();
	var month=mydate.getMonth();
	var daym=mydate.getDate();
	
	//if the current date is less than 10, pad it.
	if (daym<10)
	{
		daym="0"+daym;
	}
	//write out the final results
	document.write("<font face='arial,verdana' size=1>" + montharray[month] + " " + daym + ", " + year + "</font>")
}
/////////

function activateRollovers()
{
	RolloversActive = 1;
}


function F_loadRollover(image,imageName, imageTag) {

	if (image && image.src &&

		(null == image.off || typeof(image.off) == typeof(void(0)))) {

		s = image.src;

		image.off = new Image();

		image.off.src = s;

		image.ovr = new Image();

		image.tag = new Image();

		if (imageName.lastIndexOf('/') >= 0 || imageName.lastIndexOf('\\') >= 0) {

			s = imageName;

		} else {

			i = s.lastIndexOf('/');

			if (i<0) i = s.lastIndexOf('\\');

			if (i<0) { s = imageName; }

			else	 { s = s.substring(0,i+1) + imageName; }

		}

		image.ovr.src = s;

		

		if (imageTag)

		{

			image.tag.src = imageTag;

		}

		loaded[image.name] = image;

	}

}



function F_roll(imageName,over) {

	if (RolloversActive==0)
	{
		return;
	}
	
	if (document.images) {

	if (over) { imageObject = "ovr"; }

	else	  { imageObject = "off"; }

	image = loaded[imageName];

	if (image) {

		ref = eval("image."+imageObject);

		if (ref) image.src = eval("image."+imageObject+".src");


		if (activeTag=='none')
		{
			activeTag=document.images["tag"].src;
		}			
		if (over)
		{
			targetTag = eval("image.tag.src");
			document.images["tag"].src = targetTag;
		}
		else
		{
			document.images["tag"].src = activeTag;	
		}
	}

	if (window.event)

		window.event.cancelBubble = true;

	}

}

