		
//window.addEventListener?window.addEventListener("load",so_init,false):window.attachEvent("onload",so_init);
function loadSnaps(){
	snap_init();

}

var d=document, img = new Array(), zInterval = null, currentimg=0, pause=false,snapinterval=2000;

function snap_init() {
	if(!d.getElementById || !d.createElement)return;
	img = d.getElementById("snapContainer").getElementsByTagName("img");
	for(i=1;i<img.length;i++) img[i].mOpacity = 0;
	img[0].style.display = "block";
	img[0].mOpacity = .99;
	setTimeout(so_xfad,snapinterval);
}
function so_xfad() {
	cOpacity = img[currentimg].mOpacity;
	xIndex = img[currentimg+1]?currentimg+1:0;
	pOpacity = img[xIndex].mOpacity;
	
	cOpacity-=.05; 
	pOpacity+=.05;
	
	img[xIndex].style.display = "block";
	img[currentimg].mOpacity = cOpacity;
	img[xIndex].mOpacity = pOpacity;
	
	setSnapOpacity(img[currentimg]); 
	setSnapOpacity(img[xIndex]);
	
	if(cOpacity<=0) {
		img[currentimg].style.display = "none";
		currentimg = xIndex;
		setTimeout(so_xfad,snapinterval);
	} else {
		setTimeout(so_xfad,50);
	}
	
	function setSnapOpacity(obj) {
		if(obj.mOpacity>.99) {
			obj.mOpacity = .99;
			return;
		}
		obj.style.opacity = obj.mOpacity;
		obj.style.MozOpacity = obj.mOpacity;
		obj.style.filter = "alpha(opacity=" + (obj.mOpacity*100) + ")";
	}
	
}
/**************************************** Top banner rotation js ends**************************************************/

/**************************************** SIDE banner rotation js STARTS**************************************************/

function loadSidebanner(){
		spk_init();

}

var dd=document, spkimage = new Array(), zspkInterval = null, currentspkimage=0,spkinterval=2000;

function spk_init() {
	if(!dd.getElementById || !dd.createElement)return;
	spkimage = dd.getElementById("spkContainer").getElementsByTagName("img");
	for(j=1;j<spkimage.length;j++) spkimage[j].xOpacity = 0;
	spkimage[0].style.display = "block";
	spkimage[0].xOpacity = .99;
	setTimeout(so_spkxfad,spkinterval);
}

function so_spkxfad() {
	dOpacity = spkimage[currentspkimage].xOpacity;
	pIndex = spkimage[currentspkimage+1]?currentspkimage+1:0;
	qOpacity = spkimage[pIndex].xOpacity;
	
	dOpacity-=.05; 
	qOpacity+=.05;
	
	spkimage[pIndex].style.display = "block";
	spkimage[currentspkimage].xOpacity = dOpacity;
	spkimage[pIndex].xOpacity = qOpacity;
	
	setSpkOpacity(spkimage[currentspkimage]); 
	setSpkOpacity(spkimage[pIndex]);
	
	if(dOpacity<=0) {
		spkimage[currentspkimage].style.display = "none";
		currentspkimage = pIndex;
		setTimeout(so_spkxfad,spkinterval);
	} else {
		setTimeout(so_spkxfad,50);
	}
	
	function setSpkOpacity(spkobj) {
		if(spkobj.xOpacity>.99) {
			spkobj.xOpacity = .99;
			return;
		}
		spkobj.style.opacity = spkobj.xOpacity;
		spkobj.style.MozSpkOpacity = spkobj.xOpacity;
		spkobj.style.filter = "alpha(opacity=" + (spkobj.xOpacity*100) + ")";
	}
	
}

/**************************************** SIDE banner rotation js ENDS**************************************************/
