	
	function LoadHB(count,limit) {
		$('#homebanner'+count).fadeIn(900);
		$('#homebanner'+count).fadeOut(6100);
		count++;
		if (count > limit) {
			count = 1;
		  }
		setTimeout("LoadHB("+count+","+limit+");",7000);
		//alert(count+" : , : "+limit);
	}
	
	function LoadHB2(count,limit) {
		$('#homebannerB'+count).fadeIn(900);
		$('#homebannerB'+count).fadeOut(6100);
		count++;
		if (count > limit) {
			count = 1;
		  }
		setTimeout("LoadHB2("+count+","+limit+");",7000);
		//alert(count+" : , : "+limit);
	}
	
	function LoadHB3(count,limit) {
		$('#homebannerA'+count).fadeIn(900);
		$('#homebannerA'+count).fadeOut(6100);
		count++;
		if (count > limit) {
			count = 1;
		  }
		setTimeout("LoadHB3("+count+","+limit+");",7000);
		//alert(count+" : , : "+limit);
	}
	function LoadHB4(count,limit) {
		$('#homebannerC'+count).fadeIn(900);
		$('#homebannerC'+count).fadeOut(6100);
		count++;
		if (count > limit) {
			count = 1;
		  }
		setTimeout("LoadHB4("+count+","+limit+");",7000);
		//alert(count+" : , : "+limit);
	}
	
function openImage(URL,w,h) {
				day = new Date();
				id = day.getTime();
				var left = (screen.width/2)-(w/2);
				var top = (screen.height/2)-(h/2);
				eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+w+',height='+h+',left='+left+',top='+top);");
			}
			
/*carousel functions*/
var carouselChangevar = 0;
var carouselM;
var carouselImgall = 0;

function carouselPick(content){
	carouselChangevar = content;
	count = 0;
	i = 1;
	
	while(i <= carouselImgall){
		document.getElementById("fbm"+i).style.display = "none";
		
		i++;
	}
	
	//document.getElementById("fbm"+content).style.display = "block";
	Effect.Appear("fbm"+content);
}

function carouselChange(){
	carouselChangevar++;
	
	if(carouselChangevar > carouselImgall){ carouselChangevar = 1; }
	
	carouselPick(carouselChangevar);
	
	carouselM = setTimeout("carouselChange();",8000);
}

function carouselLoadme(total){
	carouselImgall = total;
	
	carouselChange();
}

function carouselPause(){
	clearTimeout(carouselM);

}

function carouselPlay(){
	carouselM = setTimeout("carouselChange();",8000);

}

function carouselPrev(){
	clearTimeout(carouselM);
	
	if(carouselChangevar == 1){
		carouselChangevar = carouselImgall;
	}else{
		carouselChangevar--;
	}
	
	carouselPick(carouselChangevar);
	
	carouselM = setTimeout("carouselChange();",8000);

}

function carouselNext(){
	clearTimeout(carouselM);
	
	if(carouselChangevar == carouselImgall){
		carouselChangevar = 1;
	}else{
		carouselChangevar++;
	}
	
	carouselPick(carouselChangevar);
	
	carouselM = setTimeout("carouselChange();",8000);

}
//carouselLoadme('5');

