﻿	<!-- Begin
	/* This script and many more are available free online at
	The JavaScript Source!! http://javascript.internet.com
	Created by: Ultimater :: http://ultimiacian.tripod.com/
	Add this snippet to the very beginning of your script. */

	if(!document.getElementById){
	if(document.all)
	document.getElementById=function(){
		if(typeof document.all[arguments[0]]!="undefined")
		return document.all[arguments[0]]
		else
		return null
	}
	else if(document.layers)
	document.getElementById=function(){
		if(typeof document[arguments[0]]!="undefined")
		return document[arguments[0]]
		else
		return null
	}
	}
	// End -->

	browserName=navigator.appName;
	browserVer=parseInt(navigator.appVersion);
	
	if (browserVer > 2) {
	
	AboutUs_R = new Image(87, 37);
	AboutUs_R.src="images/AboutUs_R.jpg";
	AboutUs_O = new Image(87, 37);
	AboutUs_O.src="images/AboutUs_O.jpg";		

	Services_R = new Image(87, 37);
	Services_R.src="images/Services_R.jpg";
	Services_O = new Image(87, 37);
	Services_O.src="images/Services_O.jpg";			
		
	Partners_R = new Image(80, 37);
	Partners_R.src="images/Partners_R.jpg";
	Partners_O = new Image(80, 37);
	Partners_O.src="images/Partners_O.jpg";		
	
	Customers_R = new Image(101, 37);
	Customers_R.src="images/Customers_R.jpg";
	Customers_O = new Image(101, 37);
	Customers_O.src="images/Customers_O.jpg";			
	
	Specials_R = new Image(85, 37);
	Specials_R.src="images/Specials_R.jpg";
	Specials_O = new Image(85, 37);
	Specials_O.src="images/Specials_O.jpg";			
	
	LatestNews_R = new Image(158, 37);
	LatestNews_R.src="images/LatestNews_R.jpg";
	LatestNews_O = new Image(158, 37);
	LatestNews_O.src="images/LatestNews_O.jpg";			
	
	ContactUs_R = new Image(109, 31);
	ContactUs_R.src="images/ContactUs_R.jpg";
	ContactUs_O = new Image(109, 31);
	ContactUs_O.src="images/ContactUs_O.jpg";	
					
	DashImg = new Image(5, 9);
	DashImg.src="images/SideNavDash.gif";
	ClearImg = new Image(5, 9);
	ClearImg.src="images/Clear.gif";
	
}

	
	function RollIt(imgName) {
		var el = document.getElementById(imgName);
		el.src = eval(imgName + "_O.src");
		
    }
	
	function UnRollIt(imgName) {
		var el = document.getElementById(imgName);
		el.src = eval(imgName + "_R.src");
	}
	
	function RollIt_v2(imgName, DDFS, GorJ) {
	
		var el = document.getElementById(imgName);
		var img = new Image();
		img.src = DDFS + 'images/CloudConfig/' + imgName + '_O.' + GorJ;
		el.src = img.src;
	}
	
	function UnRollIt_v2(imgName, DDFS, GorJ) {
	
		var el = document.getElementById(imgName);
		var img = new Image();
		img.src = DDFS + 'images/CloudConfig/' + imgName + '_R.' + GorJ;
		el.src = img.src;
		
	}	
	
	function Dash_Roll(imgName) {
		var el = document.getElementById(imgName);
		if (el != null) {
				el.src = DashImg.src;
		}
	}
		
	function Dash_UnRoll(imgName) {
		var el = document.getElementById(imgName);
		if (el != null) {
				el.src = ClearImg.src;
		}

	}	
	
	
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}


var Pic = new Array()

Pic[0] = 'images/HmPg_FeatSol1.jpg'; 
Pic[1] = 'images/HmPg_FeatSol2.jpg'; 
Pic[2] = 'images/HmPg_FeatSol3.jpg'; 
Pic[3] = 'images/HmPg_FeatSol4.jpg'; 

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]
}

var Pic_tmr1;	
var Pic_Cnt1 = 0;
var Pic_Op1 = 100;
var Pic_HeadingCnt = 1;
var Pic_Pause = false;

function Rotate_Pics() {

        if ( Pic_Pause == true ) {
            Pic_tmr1 = setTimeout('Rotate_Pics()', 100);
            return;
        }

    	Pic_Cnt1 = Pic_Cnt1 + 1;
		if (Pic_Cnt1 > 24) {
			var el = document.getElementById('imgFeatSol');
			if (el != null) {
				// fade the image out
				if (Pic_Cnt1 < 40) {
					Pic_Op1 = Pic_Op1 - 7;
					if (navigator.appName.indexOf("Microsoft") != -1) { el.filters.alpha.opacity = Pic_Op1 }
						else { el.style.MozOpacity = Pic_Op1/100; el.style.opacity = Pic_Op1/100; }
					}
				// swap the image back to orig
				if (Pic_Cnt1 == 41 ) { el.src = preLoad[Pic_HeadingCnt].src }
				// fade the image back in
				if (Pic_Cnt1 > 42) {
					Pic_Op1 = Pic_Op1 + 7;
					if (navigator.appName.indexOf("Microsoft") != -1) { el.filters.alpha.opacity = Pic_Op1 }
						else { el.style.MozOpacity = Pic_Op1/100; el.style.opacity = Pic_Op1/100;  }
					}				
				}
			}
		if (Pic_Cnt1 > 57) {
			clearTimeout(Pic_tmr1);
			Pic_Cnt1 = 0;
			Pic_Op1 = 100;
			Pic_HeadingCnt = Pic_HeadingCnt + 1;
			if (Pic_HeadingCnt > 3) { Pic_HeadingCnt = 0 }
		}
			
		Pic_tmr1 = setTimeout('Rotate_Pics()', 100);
}

function ShowSlide(SlideNum) {

    Pic_Cnt1 = 40;
    if ( SlideNum == 1 ) { Pic_HeadingCnt = 0 }
    if ( SlideNum == 2 ) { Pic_HeadingCnt = 1 }
    if ( SlideNum == 3 ) { Pic_HeadingCnt = 2 }
    if ( SlideNum == 4 ) { Pic_HeadingCnt = 3 }
   
}

function PauseSlides() {

    Pic_Pause = true;
}

function PlaySlides() {

    Pic_Pause = false;
}