
//InfoBox.AddMouseOver(document.getElementById('over'),'qqqqqqqqqq');


var HomePage={
graphs:[
	'scaledwebsite-pic-1.jpg',
	'scaledwebsite-pic-2.jpg',
	'scaledwebsite-pic-3.jpg',
	'scaledwebsite-pic-4.jpg',
	'scaledwebsite-pic-5.jpg',
	'scaledwebsite-pic-6.jpg',
	'scaledwebsite-pic-7.jpg'
],
graphUpto:0,
fadeUpto:0.0,
tickTimer:null,
prefix:"wp-content/uploads/2009/04/",
SetOpacity:function(box,fade) {
	if(fade>=1) {fade=1; }
	box.style.opacity=fade;
	box.style.filter='alpha(opacity=' + (fade*100) + ')';
},

SetSrc:function(img,src) {
	if(img.src==src) { return; }
	img.src=src;
},

ManualTick:function() {
//	if(this.tickTimer!=null) { window.clearTimeout(this.tickTimer); this.tickTimer=null; }
//	this.Tick();
	this.fadeUpto=3;
},

Tick:function() {
	var graphUpto=this.graphUpto;
	var nextGraphUpto=graphUpto+1;
	if(nextGraphUpto>=this.graphs.length) {
		nextGraphUpto=0;
	}

	var graph1=document.getElementById('HomeGraph1');
	var graph2=document.getElementById('HomeGraph2');

	this.fadeUpto+=0.05;
	this.SetOpacity(graph1,1-this.fadeUpto);
	this.SetOpacity(graph2,this.fadeUpto);

	this.SetSrc(graph1,this.prefix+this.graphs[graphUpto]);
	this.SetSrc(graph2,this.prefix+this.graphs[nextGraphUpto]);


	if(this.fadeUpto>=3) {
		this.fadeUpto=0;
		graphUpto++;
		if(graphUpto>=this.graphs.length) {
			graphUpto=0;
		}
		this.graphUpto=graphUpto;
	}
	this.tickTimer=window.setTimeout(function() { HomePage.Tick(); },100);
}

};

HomePage.Tick();



