var fadeimages = new Array()
fadeimages[0] = ["images1/client/1.gif", "", ""]
fadeimages[1] = ["images1/client/2.gif", "", ""]
fadeimages[2] = ["images1/client/3.gif", "", ""]
fadeimages[3] = ["images1/client/4.gif", "", ""]
 
var fadeimages2 = new Array()
fadeimages2[0] = ["images1/awards/award1.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[1] = ["images1/awards/award2.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[2] = ["images1/awards/award3.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[3] = ["images1/awards/award4.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[4] = ["images1/awards/award5.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[5] = ["images1/awards/award6.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[6] = ["images1/awards/award7.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[7] = ["images1/awards/award8.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[8] = ["images1/awards/award9.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[9] = ["images1/awards/award10.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[10] = ["images1/awards/award11.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[11] = ["images1/awards/award12.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[12] = ["images1/awards/award13.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[13] = ["images1/awards/award14.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[14] = ["images1/awards/award15.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[15] = ["images1/awards/award16.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[16] = ["images1/awards/award17.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[17] = ["images1/awards/award18.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[18] = ["images1/awards/award19.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[19] = ["images1/awards/award20.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[20] = ["images1/awards/award21.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[21] = ["images1/awards/award22.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[22] = ["images1/awards/award23.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[23] = ["images1/awards/award24.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[24] = ["images1/awards/award25.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[25] = ["images1/awards/award26.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[26] = ["images1/awards/award27.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[27] = ["images1/awards/award28.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
fadeimages2[28] = ["images1/awards/award29.gif", "http://www.nucleustechnologies.com/Awards.html", ""]
 
var fadebgcolor = "white"
var fadearray = new Array()
var fadeclear = new Array()
var dom = (document.getElementById)
var iebrowser = document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder) {
	this.pausecheck = pause
	this.mouseovercheck = 0
	this.delay = delay
	this.degree = 10
	this.curimageindex = 0
	this.nextimageindex = 1
	fadearray[fadearray.length] = this
	this.slideshowid = fadearray.length - 1
	this.canvasbase = "canvas"+this.slideshowid
	this.curcanvas = this.canvasbase+"_0"
	
	if (typeof displayorder != "undefined")
		theimages.sort(function() {return 0.5 - Math.random();}
	)
	
	this.theimages = theimages
	this.imageborder = parseInt(borderwidth)
	this.postimages = new Array()
	for (p=0; p<theimages.length; p++) {
		this.postimages[p] = new Image()
		this.postimages[p].src = theimages[p][0]
	}
	
	var fadewidth = fadewidth+this.imageborder * 2
	var fadeheight = fadeheight+this.imageborder * 2
	
	if (iebrowser&&dom||dom)
		document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
	else
		document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
	
	if (iebrowser&&dom||dom)
		this.startit()
	else {
		this.curimageindex++
		setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
	}
}

function fadepic(obj) {
	if (obj.degree < 100) {
		obj.degree += 10
		if (obj.tempobj.filters&&obj.tempobj.filters[0]) {
			if (typeof obj.tempobj.filters[0].opacity=="number")
				obj.tempobj.filters[0].opacity=obj.degree
			else
				obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
		}
	else if (obj.tempobj.style.MozOpacity)
		obj.tempobj.style.MozOpacity = obj.degree / 101
	else if (obj.tempobj.style.KhtmlOpacity)
		obj.tempobj.style.KhtmlOpacity = obj.degree / 100
	else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
		obj.tempobj.style.opacity = obj.degree / 101
	} else {
		clearInterval(fadeclear[obj.slideshowid])
		obj.nextcanvas = (obj.curcanvas==obj.canvasbase+"_0") ? obj.canvasbase+"_0" : obj.canvasbase+"_1"
		obj.tempobj = iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
		obj.populateslide(obj.tempobj, obj.nextimageindex)
		obj.nextimageindex = (obj.nextimageindex<obj.postimages.length-1) ? obj.nextimageindex+1 : 0
		setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
	}
}

fadeshow.prototype.populateslide = function(picobj, picindex) {
	var slideHTML = ""
	if (this.theimages[picindex][1]!="")
	slideHTML = '<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
	slideHTML += '<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
	if (this.theimages[picindex][1]!="")
	slideHTML += '</a>'
	picobj.innerHTML =slideHTML
}
 
fadeshow.prototype.rotateimage = function() {
	if (this.pausecheck == 1)
		var cacheobj = this
		if (this.mouseovercheck == 1)
			setTimeout(function(){cacheobj.rotateimage()}, 100)
		else if (iebrowser&&dom||dom) {
			this.resetit()
			var crossobj = this.tempobj = iebrowser ? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
			crossobj.style.zIndex++
			fadeclear[this.slideshowid] = setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
			this.curcanvas = (this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
		} else {
			var ns4imgobj = document.images['defaultslide'+this.slideshowid]
			ns4imgobj.src = this.postimages[this.curimageindex].src
		}
	this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}

fadeshow.prototype.resetit = function() {
	this.degree = 10
	var crossobj = iebrowser ? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
	if (crossobj.filters&&crossobj.filters[0]) {
		if (typeof crossobj.filters[0].opacity=="number")
			crossobj.filters(0).opacity = this.degree
		else
			crossobj.style.filter = "alpha(opacity="+this.degree+")"
		}
	else if (crossobj.style.MozOpacity)
	crossobj.style.MozOpacity = this.degree / 101
	else if (crossobj.style.KhtmlOpacity)
	crossobj.style.KhtmlOpacity = this.degree / 100
	else if (crossobj.style.opacity&&!crossobj.filters)
	crossobj.style.opacity = this.degree / 101
}
 
fadeshow.prototype.startit = function() {
	var crossobj = iebrowser ? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
	this.populateslide(crossobj, this.curimageindex)
	if (this.pausecheck == 1) {
		var cacheobj = this
		var crossobjcontainer = iebrowser ? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
		crossobjcontainer.onmouseover = function() {
			cacheobj.mouseovercheck = 1
		}
		crossobjcontainer.onmouseout = function() {
			cacheobj.mouseovercheck=0
		}
	}
	this.rotateimage()
}

function faqs(url) {
	var w = '600';
	var h = '500';
	var target = '_blank';
	var left = (screen.width / 2) - (w / 2);
	var top = (screen.height / 2) - (h / 2);
	var cmd = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1, width='+w+', height='+h+', top='+top+', left='+left;
	var openwin = window.open(url, target, cmd);
}