	var countr=1;
	var once=0;
	//var totalSlide=4;
	var obWidth=648;
	var actualWidth=obWidth*totalSlide
	var timeDelay=4000;
	var cVal;
	autoRun=0;
			
	document.getElementById('containr').style.marginLeft='0px';
	document.getElementById('containr').style.width=(actualWidth+(obWidth*3))+'px';
		
	function calculat(m,p,btn){
		ID='containr';
		
		if(m==1 && p==1 && btn==0){ 
		
			clearTimeout (autoRun);
			if(countr==totalSlide){HT=actualWidth-obWidth; minus(HT, ID);countr=1; }
			else{HT=obWidth; plus(HT, ID); countr++; }	
			btn=1; 
			autoRun =setTimeout("calculat("+m+","+p+","+btn+")",timeDelay);
		
		}else if(m==0 && p==1 && btn==1){
			
			clearTimeout (autoRun);
			if(countr==1){HT=actualWidth-obWidth; plus(HT, ID); countr=totalSlide; }
			else{ HT=obWidth; minus(HT, ID); countr--; }
			m=1;
			autoRun =setTimeout("calculat("+m+","+p+","+btn+")",timeDelay);
		
		}else if(m==1 && p==1 && btn==1){
			
			if(once==0){once=1;autoRun = setTimeout("calculat("+m+","+p+","+btn+")",timeDelay); }else{
				clearTimeout (autoRun);
				
				if(countr==totalSlide){HT=actualWidth-obWidth; minus(HT, ID);countr=1;  ;}
				else{HT=obWidth; plus(HT, ID); countr++;}	
				
				autoRun =setTimeout("calculat("+m+","+p+","+btn+")",timeDelay);
			}				
		} 	
	}
	
	var counter=1;
	var first=0;
	var totalSlides=2;
	var objWidth=439;
	var acWidth=objWidth*totalSlides
	var timDelay=6000;
	var curVal;
	autoRuns=0;
	
	function calc(m,p,btn){
		ID='container';
		
		if(m==1 && p==1 && btn==0){ 
		
			//clearTimeout (autoRuns);
			if(counter==totalSlides){HT=acWidth-objWidth; minus(HT, ID);counter=1; }
			else{HT=objWidth; plus(HT, ID); counter++; }	
			btn=1; 
			autoRuns =setTimeout("calc("+m+","+p+","+btn+")",timDelay);
		
		}else if(m==0 && p==1 && btn==1){
			
			//clearTimeout (autoRuns);
			if(counter==1){HT=acWidth-objWidth; plus(HT, ID); counter=totalSlides; }
			else{ HT=objWidth; minus(HT, ID); counter--; }
			m=1;
			//autoRuns =setTimeout("calc("+m+","+p+","+btn+")",timDelay);
		
		}else if(m==1 && p==1 && btn==1){
			//if(first==0){first=1;autoRuns = setTimeout("calc("+m+","+p+","+btn+")",timDelay); }else{
				//clearTimeout (autoRuns);
				
				//if(counter==totalSlides){HT=acWidth-objWidth; minus(HT, ID);counter=1;  ;}
				//else{HT=objWidth; plus(HT, ID); counter++;}	
				
				//autoRuns =setTimeout("calc("+m+","+p+","+btn+")",timDelay);
			//}				
		} 	
	}
	
	calculat(1,1,1);
	calc(1,1,1);
	
	function plus(_travel, ID){
		var OB=document.getElementById(ID);
		var OBH=OB.style.marginLeft.replace("px", "")*1
		ease=Math.ceil(_travel/6);
		OB.style.marginLeft=(OBH-ease)+"px";		
		_travel=_travel-ease;	
		if(_travel>0){setTimeout("plus("+_travel+",'"+ID+"')",15);	}
	}	
	function minus(_travel, ID){		
		ease=Math.ceil(_travel/6);
		var OB=document.getElementById(ID);
		var OBH=OB.style.marginLeft.replace("px", "")*1
		OB.style.marginLeft=(OBH+ease)+"px";	
		_travel=_travel-ease;	
		if(_travel>0){setTimeout("minus("+_travel+",'"+ID+"')",15);}
	}

	function next()	{		calculat(1,1,0); }
	function previous()	{	calculat(0,1,1); }
	
	function nextImg()	{		calc(1,1,0); }
	function previousImg()	{	calc(0,1,1); }
	
	function posP(c){		cVal=c;			calculat(1,0,1);		}
	
	function imgHover(){document.getElementById(ID);}
	function imgOut(){document.getElementById(ID);}
	
	
