// new item 
var moved = false;
var timer = null;
var nnow = 3;

function slider(){
	if(moved == false){
		moved = true;
		nnow += 1;
		if(nnow == 6) nnow = 1;
		
		for(ct = 1; ct <= 4; ct++){
			cid = "#bn"+ct;
			check = $(cid).css("left");
	
			check = check.replace("px","")
			check = eval(check);
	
			if(check <= -208){
				$(cid).animate({"left": "630px"}, 0);
			}
		}

		$("#bn1").animate({"left": "-=210px"}, "slow");
		$("#bn2").animate({"left": "-=210px"}, "slow");
		$("#bn3").animate({"left": "-=210px"}, "slow");
		$("#bn4").animate({"left": "-=210px"}, "slow", lock);
		
	}
}

function slidel(){
	if(moved == false){
		moved = true;
		nnow -= 1;
		if(nnow == 0) nnow = 5;

		for(ct = 1; ct <= 4; ct++){
			cid = "#bn"+ct;
			check = $(cid).css("left");
	
			check = check.replace("px","")
			check = eval(check);
	
			if(check >= 421){
				$(cid).animate({"left": "-210px"}, 0);
			}
		}

		$("#bn1").animate({"left": "+=210px"}, "slow");
		$("#bn2").animate({"left": "+=210px"}, "slow");
		$("#bn3").animate({"left": "+=210px"}, "slow");
		$("#bn4").animate({"left": "+=210px"}, "slow", lock);

	}
}


function lock(){
	moved = false;
}

function setNText(showid){
	$("#bn1").fadeOut("slow");
	$("#bn2").fadeOut("slow");
	$("#bn3").fadeOut("slow");
	$("#bn4").fadeOut("slow");
	
	id = "#bn" + showid;
	$(id).fadeIn("slow");
}

//timer = setTimeout('slider()', 5000);

