var Browser = navigator.appName;
var Version = parseInt(navigator.appVersion);
var imageDir = "images/";
var imageExt = ".gif"
var delayTime = 999;
var loop = 0;
function CI3(name,action,newSelect)
{
	if(Version >= 3 && (Browser == 'Netscape' || Browser == 'Microsoft Internet Explorer')) {
	document[name+'2'].src= (action=='') ? imageDir+name+'_on'+imageExt : imageDir+name+imageExt
	return false;
	}
}
function CI2(name)
{
	document['mainmenudescr'].src = (name) ? imageDir+"mainmenu_"+name+"_descr.gif" : imageDir+"mainmenu_blank_descr.gif";
}
function cslink(id,value) {
	document.getElementById(id).innerHTML=value;
}
function hideit(id){
	document.getElementById(id).style.display="none";
}
function displayit(id){
	document.getElementById(id).style.display="";
}
function hideAll() {
	hideit('innovations');
	hideit('portfolio');
	hideit('contacts');
	hideit('careers');
	hideit('home');
}
function showClock(){
	var now = new Date();
	dd = now.getUTCDate();
	mm = now.getUTCMonth()+1;
	yy = now.getUTCFullYear();
	h = now.getUTCHours(); h=(h<10) ? "0"+h:h;
	m = now.getUTCMinutes(); m=(m<10) ? "0"+m:m;
	s = now.getUTCSeconds(); s=(s<10) ? "0"+s:s;
	currDateStr =  mm + '/' + dd + '/' + yy + ' ' + h +':' +m + ':' + s + " (Z)";
	document.getElementById("ATIClock").innerHTML=currDateStr;
	setTimeout("showClock()",delayTime)
}

function cImagex() {
	var img = new Array();
	img[img.length] = "images/mainpage/airplane2.jpg";
	img[img.length] = "images/mainpage/wx.jpg";
	img[img.length] = "images/mainpage/nicole.jpg";
	img[img.length] = "images/mainpage/airplane.jpg";
	img[img.length] = "images/mainpage/heli.jpg";
	img[img.length] = "images/mainpage/wwii.jpg";

	document.mainImage.src = img[loop%img.length];
	loop++;
	setTimeout("cImage()",1000);
}


var slideShowSpeed = 4000;
var crossFadeDuration = 100;
var img = new Array();

img[img.length] = "images/mainpage/airplane2.jpg";
img[img.length] = "images/mainpage/wx.jpg";
img[img.length] = "images/mainpage/nicole.jpg";
img[img.length] = "images/mainpage/airplane.jpg";
img[img.length] = "images/mainpage/heli.jpg";
img[img.length] = "images/mainpage/wwii.jpg";


var t;
var j = 0;
var p = img.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
	preLoad[i] = new Image();
	preLoad[i].src = img[i];
}
function cImage() {
	if (document.all) {
		document.images.mainImage.style.filter="blendTrans(duration=2)";
		document.images.mainImage.style.filter="blendTrans(duration=crossFadeDuration)";
		document.images.mainImage.filters.blendTrans.Apply();
	}
	document.images.mainImage.src = preLoad[j].src;
	if (document.all) {
		document.images.mainImage.filters.blendTrans.Play();
	}
	j = j + 1;
	if (j > (p - 1)) j = 0;
	t = setTimeout('cImage()', slideShowSpeed);
}
