
var slideShowSpeed = 5000
var slideShowSpeed2 = 3000
var crossFadeDuration = 3
var crossFadeDuration2 = 3
var Pic = new Array() 
var Pic2 = new Array()
Pic[0] = 'uploads/images/assets/frameworks.jpg'
Pic[1] = 'uploads/images/assets/methodolgy.jpg'
Pic[2] = 'uploads/images/assets/innovation.jpg'
Pic2[0] = 'uploads/images/assets/grey1.jpg'
Pic2[1] = 'uploads/images/assets/grey2.jpg'
Pic2[2] = 'uploads/images/assets/grey3.jpg'
Pic2[3] = 'uploads/images/assets/grey4.jpg'

var t
var t2
var j = 0
var j2 = 0
var p = Pic.length
var p2 = Pic.length

var preLoad = new Array()
var preLoad2 = new Array()

for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

for (i2 = 0; i2 < p2; i2++){
   preLoad2[i2] = new Image()
   preLoad2[i2].src = Pic2[i2]
}

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)
}

function runSlideShow2(){
   if (document.all){
      document.images.SlideShow2.style.filter="blendTrans(duration=2)"
      document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration2)"
      document.images.SlideShow2.filters.blendTrans.Apply()      
   }
   document.images.SlideShow2.src = preLoad2[j2].src
   if (document.all){
      document.images.SlideShow2.filters.blendTrans.Play()
   }
   j2 = j2 + 1
   if (j2 > (p2-1)) j2=0
   t2 = setTimeout('runSlideShow2()', slideShowSpeed2)
}


function CWScroller(ulId, speed) {

	this.container = document.getElementById(ulId);
	this.container.Scroller = this;
	this.speed = speed;

	this.scroll = function() {
			var c = this.container.firstChild;
			var first = null;
			while (c) {
				if (c.tagName == 'LI') {
					first = c;
					break;
				}
				c = c.nextSibling;
			}
			var nodeSize = 78;	// Default
			var px = 0;
			nodeSize = first.clientWidth;
			if (first.style.marginLeft != '') {
				px = parseInt(first.style.marginLeft);
			}
			first.style.marginLeft = ( px - 1 ) + 'px';
			if ( parseInt(first.style.marginLeft) <= -(nodeSize) ) {
				first.style.marginLeft = '0px';
				this.container.removeChild(first);
				this.container.appendChild(first);
			}
		setTimeout('document.getElementById(\'' + this.container.id + '\').Scroller.scroll()', this.speed);	
	}

	setTimeout('document.getElementById(\'' + ulId + '\').Scroller.scroll()', this.speed);

}






function CWScroller2(ulId, speed) {

	this.container = document.getElementById(ulId);
	this.container.Scroller = this;
	this.speed = speed;

	this.scroll = function() {
			var c = this.container.firstChild;
			var first = null;
			while (c) {
				if (c.tagName == 'LI') {
					first = c;
					break;
				}
				c = c.nextSibling;
			}
			var nodeSize = 100;	// Default
			var px = 0;
			nodeSize = first.clientWidth;
			if (first.style.marginTop != '') {
				px = parseInt(first.style.marginTop);
			}
			first.style.marginTop = ( px - 1 ) + 'px';
			if ( parseInt(first.style.marginTop) <= -(nodeSize) ) {
				first.style.marginTop = '0px';
				this.container.removeChild(first);
				this.container.appendChild(first);
			}
		setTimeout('document.getElementById(\'' + this.container.id + '\').Scroller.scroll()', this.speed);	
	}

	setTimeout('document.getElementById(\'' + ulId + '\').Scroller.scroll()', this.speed);

}