function opacity(id, opacStart, opacEnd, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}function shiftOpacity(id, millisec) {
	//if an element is invisible, make it visible, else make it ivisible
	if(document.getElementById(id).style.opacity == 0) {
		opacity(id, 0, 100, millisec);
	} else {
		opacity(id, 100, 0, millisec);
	}
}function blendimage(divid, imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
	changeOpac(0, imageid);
	document.getElementById(imageid).src = imagefile;
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}function currentOpac(id, opacEnd, millisec) {
	var currentOpac = 100;
	if(document.getElementById(id).style.opacity < 100) {
		currentOpac = document.getElementById(id).style.opacity * 100;
	}
	opacity(id, currentOpac, opacEnd, millisec)
}function runSlideShow() {
	blendimage('blenddiv','blendimage', preLoad[currpic23].src,1500)
	currpic23 = currpic23 + 1;
	if (currpic23 > (p - 1)) currpic23 = 0;
	t = setTimeout('runSlideShow()', 5000);
}var Pic = new Array();	Pic[0] = 'images/landingpics/pic1.jpg|300|186';
	Pic[1] = 'images/landingpics/pic2.jpg|300|186';
	Pic[2] = 'images/landingpics/pic3.jpg|300|186';
	Pic[3] = 'images/landingpics/pic4.jpg|300|186';
	Pic[4] = 'images/landingpics/pic5.jpg|300|186';
	Pic[5] = 'images/landingpics/pic6.jpg|300|186';
var t;
	var currpic23 = 0;
	var p = 6;
	var preLoad = new Array();
	for (i = 0; i < p; i++) {
		var aux=Pic[i].split('|');
		preLoad[i] = new Image();
		preLoad[i].src = aux[0];
		preLoad[i].width= aux[1];
		preLoad[i].height= aux[2];
	}