//DOM Image Rollover II- Available at Dynamic Drive (http://www.dynamicdrive.com)

	// Make Variables----------------------
	var imgMouseOverHolder = new Array();
	var imgMouseDownHolder = new Array();
	//-------------------------------------

function preloader(imgTags){

	// Create Variables------------------
	var newmouseover, newmouseout, newmouseup, newmousedown, oldmouseover, oldmouseout, oldmouseup, oldmousedown
	//-----------------------------------
	
	// Get array length--------------
	var AL = imgMouseOverHolder.length + 1;
	//-------------------------------

	for (var i = 0; i < imgTags.length; i++) {

		if (imgTags[i].getAttribute('srcdown')||imgTags[i].getAttribute('srcover')) {
	
		newmouseover = null; newmouseout = null; newmouseup = null;	newmousedown = null; oldmouseover = null; oldmouseout = null; oldmouseup = null; oldmousedown = null

			// Store src Images------------------
			if (imgTags[i].getAttribute('srcover')) {imgMouseOverHolder[AL] = new Image(); imgMouseOverHolder[AL].src = imgTags[i].getAttribute('srcover');}
			if (imgTags[i].getAttribute('srcdown')) {imgMouseDownHolder[AL] = new Image(); imgMouseDownHolder[AL].src = imgTags[i].getAttribute('srcdown');}
			//-----------------------------------
			
			// Make backups----------------------
			if (imgTags[i].src) {imgTags[i].setAttribute("oldsrc", imgTags[i].src);}
			//-----------------------------------
				
			if (imgTags[i].getAttribute('srcover')) {
			
				// Make Mouse over--------------------
				if (imgTags[i].onmouseover) {imgTags[i].oldmouseover = imgTags[i].onmouseover; newmouseover = function (){this.src=this.getAttribute("srcover"); this.oldmouseover();}}
				else {newmouseover = function (){this.src=this.getAttribute("srcover");}}
				imgTags[i].onmouseover = newmouseover;
				//------------------------------------
			
				// Make Mouse out--------------------
				if (imgTags[i].onmouseout){imgTags[i].oldmouseout = imgTags[i].onmouseout; newmouseout = function (){this.src=this.getAttribute("oldsrc"); this.oldmouseout();}}
				else {newmouseout = function (){this.src=this.getAttribute("oldsrc");}}
				imgTags[i].onmouseout = newmouseout;
				//-----------------------------------
			}
			
			if (imgTags[i].getAttribute('srcdown')) {	
			
			// Make Mouse Down---------------------
			if (imgTags[i].onmousedown) {imgTags[i].oldmousedown = imgTags[i].onmousedown; newmousedown = function (){this.src=this.getAttribute("srcdown"); this.oldmousedown();}}
			else {newmousedown = function (){this.src=this.getAttribute("srcdown");}}
			imgTags[i].onmousedown = newmousedown;
			//-------------------------------------
			
				if (imgTags[i].getAttribute('srcover')) {
						
					// Make Mouse up-----------------------
					if (imgTags[i].onmouseup) {imgTags[i].oldmouseup = imgTags[i].onmouseup; newmouseup = function (){this.src=this.getAttribute("srcover"); this.oldmouseup();}}
					else {newmouseup = function (){this.src=this.getAttribute("srcover");}}
					imgTags[i].onmouseup = newmouseup;
					//-------------------------------------
				
				} else {
								
					//Make Mouse up-------------------------
					if (imgTags[i].onmouseup) {imgTags[i].oldmouseup = imgTags[i].onmouseup; newmouseup = function (){this.src=this.getAttribute("oldsrc"); this.oldmouseup();}}
					else {newmouseup = function (){this.src=this.getAttribute("oldsrc");}}
					imgTags[i].onmouseup = newmouseup;
					//-------------------------------------
					
					// Make Mouse out--------------------
					if (imgTags[i].onmouseout) {imgTags[i].oldmouseout = imgTags[i].onmouseout; newmouseout = function (){this.src=this.getAttribute("oldsrc"); this.oldmouseout();}}
					else {newmouseout = function (){this.src=this.getAttribute("oldsrc");}}
					imgTags[i].onmouseout = newmouseout;
					//-----------------------------------
				
				}
				
			}
		}
	}
}


function preloadimgsrc() {

	// Check to see if document element----
	if (!document.getElementById) return;
	//-------------------------------------
	
	// Declare variables--------------------
	var imgTags = document.getElementsByTagName('IMG'); 
	var imgTags2 = document.getElementsByTagName('INPUT');   // For image type submit buttons 
	//--------------------------------------
	
	// Preload Images-----------------------
	preloader(imgTags);
	preloader(imgTags2);  // For image type submit buttons 
	//--------------------------------------
}

if (window.addEventListener)
window.addEventListener("load", preloadimgsrc, false)
else if (window.attachEvent)
window.attachEvent("onload", preloadimgsrc)
else if (document.getElementById)
window.onload=preloadimgsrc

// Home slide show



// =======================================

// set the following variables

// =======================================



// Set slideShowSpeed (milliseconds)

var slideShowSpeedHome = 3000



// Duration of crossfade (seconds)

var crossFadeDurationHome = 2



// Specify the image files

var PicHome = new Array() // don't touch this

// to add more images, just continue

// the pattern, adding to the array below



PicHome[0] = '/contents/images/home_logos_1.gif'

PicHome[1] = '/contents/images/home_logos_2.gif'

PicHome[2] = '/contents/images/home_logos_3.gif'

PicHome[3] = '/contents/images/home_logos_1.gif'

PicHome[4] = '/contents/images/home_logos_4.gif'

PicHome[5] = '/contents/images/home_logos_2.gif'

PicHome[6] = '/contents/images/home_logos_5.gif'

PicHome[7] = '/contents/images/home_logos_1.gif'

PicHome[8] = '/contents/images/home_logos_6.gif'



// =======================================

// do not edit anything below this line

// =======================================



var t

var j = 0

var p = PicHome.length



var preLoadHome = new Array()

for (i = 0; i < p; i++){

   preLoadHome[i] = new Image()

   preLoadHome[i].src = PicHome[i]

}



function runSlideShowHome(){

   if (document.all){

      document.images.SlideShow.style.filter="blendTrans(duration=2)"

      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDurationHome)"

      document.images.SlideShow.filters.blendTrans.Apply()      

   }

   document.images.SlideShow.src = preLoadHome[j].src

   if (document.all){

      document.images.SlideShow.filters.blendTrans.Play()

   }

   j = j + 1

   if (j > (p-1)) j=0

   t = setTimeout('runSlideShowHome()', slideShowSpeedHome)

}


//not sure the diff between inside???




// =======================================

// set the following variables

// =======================================



// Set slideShowSpeed (milliseconds)

var slideShowSpeed = 2000



// Duration of crossfade (seconds)

var crossFadeDuration = 1



// Specify the image files

var Pic = new Array() // don't touch this

// to add more images, just continue

// the pattern, adding to the array below



Pic[0] = '/contents/images/inside_logos_1.gif'

Pic[1] = '/contents/images/inside_logos_2.gif'

Pic[2] = '/contents/images/inside_logos_3.gif'

Pic[3] = '/contents/images/inside_logos_4.gif'

Pic[4] = '/contents/images/inside_logos_5.gif'

Pic[5] = '/contents/images/inside_logos_6.gif'

Pic[6] = '/contents/images/inside_logos_7.gif'

Pic[7] = '/contents/images/inside_logos_8.gif'

Pic[8] = '/contents/images/inside_logos_9.gif'

Pic[9] = '/contents/images/inside_logos_10.gif'

Pic[10] = '/contents/images/inside_logos_11.gif'

Pic[11] = '/contents/images/inside_logos_12.gif'

Pic[12] = '/contents/images/inside_logos_13.gif'

Pic[13] = '/contents/images/inside_logos_14.gif'

Pic[14] = '/contents/images/inside_logos_15.gif'

Pic[15] = '/contents/images/inside_logos_16.gif'

Pic[16] = '/contents/images/inside_logos_17.gif'

Pic[17] = '/contents/images/inside_logos_18.gif'

Pic[18] = '/contents/images/inside_logos_19.gif'

Pic[19] = '/contents/images/inside_logos_20.gif'

Pic[20] = '/contents/images/inside_logos_21.gif'

Pic[21] = '/contents/images/inside_logos_22.gif'

Pic[22] = '/contents/images/inside_logos_23.gif'

Pic[23] = '/contents/images/inside_logos_24.gif'

Pic[24] = '/contents/images/inside_logos_25.gif'

Pic[25] = '/contents/images/inside_logos_26.gif'

Pic[26] = '/contents/images/inside_logos_27.gif'

Pic[27] = '/contents/images/inside_logos_28.gif'

Pic[28] = '/contents/images/inside_logos_29.gif'

Pic[29] = '/contents/images/inside_logos_30.gif'

Pic[30] = '/contents/images/inside_logos_31.gif'

Pic[31] = '/contents/images/inside_logos_32.gif'

Pic[32] = '/contents/images/inside_logos_33.gif'

Pic[33] = '/contents/images/inside_logos_34.gif'

Pic[34] = '/contents/images/inside_logos_35.gif'

Pic[35] = '/contents/images/inside_logos_36.gif'

Pic[36] = '/contents/images/inside_logos_37.gif'


// =======================================

// do not edit anything below this line

// =======================================



var t

var j = 0

var p = Pic.length



var preLoad = new Array()

for (i = 0; i < p; i++){

   preLoad[i] = new Image()

   preLoad[i].src = Pic[i]

}



function runSlideShow(){

   if (document.all){

      document.images.SlideShow.style.filter="blendTrans(duration=2)"

      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"

      document.images.SlideShow.filters.blendTrans.Apply()      

   }

   document.images.SlideShow.src = preLoad[j].src

   if (document.all){

      document.images.SlideShow.filters.blendTrans.Play()

   }

   j = j + 1

   if (j > (p-1)) j=0

   t = setTimeout('runSlideShow()', slideShowSpeed)

}


// new window 

<!-- Begin
var version4 = (navigator.appVersion.charAt(0) == "4"); 
var popupHandle;
function closePopup() {
if(popupHandle != null && !popupHandle.closed) popupHandle.close();
}
function displayPopup(position,url,name,height,width,evnt) {
// position=1 POPUP: makes screen display up and/or left, down and/or right 
// depending on where cursor falls and size of window to open
// position=2 CENTER: makes screen fall in center
var properties = "toolbar = 0, location = 0, height = " + height;
properties = properties + ", width=" + width;
var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
if(navigator.appName == "Microsoft Internet Explorer") {
screenY = document.body.offsetHeight;
screenX = window.screen.availWidth;
}
else {
screenY = window.outerHeight
screenX = window.outerWidth
}
if(position == 1)	{ // if POPUP not CENTER
cursorX = evnt.screenX;
cursorY = evnt.screenY;
padAmtX = 10;
padAmtY = 10;
if((cursorY + height + padAmtY) > screenY) {
// make sizes a negative number to move left/up
padAmtY = (-30) + (height * -1);
// if up or to left, make 30 as padding amount
}
if((cursorX + width + padAmtX) > screenX)	{
padAmtX = (-30) + (width * -1);	
// if up or to left, make 30 as padding amount
}
if(navigator.appName == "Microsoft Internet Explorer") {
leftprop = cursorX + padAmtX;
topprop = cursorY + padAmtY;
}
else {
leftprop = (cursorX - pageXOffset + padAmtX);
topprop = (cursorY - pageYOffset + padAmtY);
   }
}
else{
leftvar = (screenX - width) / 2;
rightvar = (screenY - height) / 2;
if(navigator.appName == "Microsoft Internet Explorer") {
leftprop = leftvar;
topprop = rightvar;
}
else {
leftprop = (leftvar - pageXOffset);
topprop = (rightvar - pageYOffset);
   }
}
if(evnt != null) {
properties = properties + ", left = " + leftprop;
properties = properties + ", top = " + topprop;
}
closePopup();
popupHandle = open(url,name,properties);
}
function RefreshImage(valImageId) {
	var objImage = document.images[valImageId];
	if (objImage == undefined) {
		return;
	}
	var now = new Date();
	objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}
//  End -->


