	var vnext = vcurrnet + 1;
	var vprev = vcurrnet - 1;
	
	var sec = 0;
	
	
	var nn4 = (navigator.appName.indexOf("Netscape") > -1 && navigator.appVersion.indexOf("4") > -1) ? true : false
 

//function for forcing form submission
function checkEnter(e, path, txt){
	
var characterCode
	 if(e && e.which){
	 e = e
	 characterCode = e.which
	 }
	 else{
	 e = event
	 characterCode = e.keyCode
	 }	 
	 if(characterCode == 13){
	 //var srch = document.getElementById(searchvalue).value;
	 var srch = document.getElementById(txt).value;
	 window.location = path + srch;
	
 	
	
 	
	 }

	
}



function doSearch(){
						
						var kerko = document.getElementById('kerko').value;
						
								
						
						kerko = kerko.replace("ë", "e");
						
						kerko = kerko.replace("ç", "c");
						kerko = kerko.replace("Ç", "C");
						kerko = kerko.replace("Ë", "E");
					
						
						document.location = 'http://www.kosova-sot.info/tempks/kerko/' + kerko ;
					}


		
	function my_timer() {
		
			if(slide_me != false) {
				sec = sec + 1;
				if(sec > delay){
				sec = 0;
				
				if(vnext == max_items){
					vnext = 1;
				}
				
				
				if(vnext < max_items){
					change(vnext);
				}
				
				
				}
				//document.getElementById('status').innerHTML =sec;
					
				
				t = window.setTimeout("my_timer()", 1000);
			}
		}
		
	
	
	
	function rst(){
			
			sec = 0;	
	}
	
	
	
		
	function setEffect(ef){
			
			efekti = ef;
	}
	
	
	
	

	
	
	
	
	function next() {
		if(vcurrnet < max_items){
			vnext = vnext + 1;
		}
		
		
		vcurrnet = vnext - 1;
		
		if(vcurrnet > 1){
		vprev = vcurrnet - 1;
		}
		
		
		if(vcurrnet > 1){
		$('#prev').show();
		}

		if(vcurrnet == 1){
		$('#prev').hide();
		}


		if(vnext > max_items - 1){
		$('#next').hide();
		}
		else
		{
		$('#next').show();	
		}

		
		
		for(g = 1; g < max_items; g++) {
			$('#int' + g).removeClass("active");
		}
		$('#int' + vcurrnet).addClass("active");

}



function change(d) {
	

	var d  = Number(d);
	var nxt = 0;
	
	nxt = d + 1;
	vnext =nxt;
	vprev = d - 1;
	vcurrnet = d;
	
		for(g = 1; g < max_items; g++) {
			$('#int' + g).removeClass("active");
		}
		$('#int' + vcurrnet).addClass("active");

		Effect();
		
		if(vnext > max_items - 1){
		$('#next').hide();
		}
		else
		{
		$('#next').show();
		}
		
		if(vcurrnet == 1){
		$('#prev').hide();
		}
		else
		{
		$('#prev').show();
		}
}
	
	
	
	
	
	



function changec(d) {
	var d  = Number(d);
	var nxt = 0;

nxt = d + 1;
	vnext =nxt;
	vprev = d - 1;
	vcurrnet = d;
	
		for(g = 1; g < max_items; g++) {
			$('#int' + g).removeClass("active");
		}
		$('#int' + vcurrnet).addClass("active");

		 rst();
		Effect();
		
		if(vnext > max_items - 1){
		$('#next').hide();
		}
		else
		{
		$('#next').show();
		}
		
		if(vcurrnet == 1){
		$('#prev').hide();
		}
		else
		{
		$('#prev').show();
		}
}
	

	
	function prev() {
		if(vcurrnet > 1) {
		vnext = vnext - 1;
		}

		if(vprev > 0) {
		vcurrnet = vnext - 1;
		}
		
		if(vprev > 0) {
			vprev = vcurrnet - 1;
		}
			
		
		if(vcurrnet > 1){
		$('#prev').show();
		}

		if(vcurrnet == 1){
		$('#prev').hide();
		}
		
		
		if(vnext > max_items - 1){
		$('#next').hide();
		}
		else
		{
		$('#next').show();	
		}
		
		
		for(g = 1; g < max_items; g++) {
			$('#int' + g).removeClass("active");
		}
		$('#int' + vcurrnet).addClass("active");		
		
	}
	
	
	
	
	
		function Effect() {
		
				switch(efekti)
				{
				case 'fadeIn':
				  $('.images').hide();
				  $('#images' + vcurrnet).fadeIn();
				  break;
				
				
				
				case 'slideDown':
				
			
				  $('.images').hide();
				   $('#images' + vcurrnet).slideDown();
				  break;
				
				
				case 'toogle':
				
			
				  $('.images').hide();
				   $('#images' + vcurrnet).animate({width:  'toggle'});
				   
				  break;
				  
				  
				  
				  				  
/*				   $('#images' + vcurrnet).animate({
height:10, width:10, opacity: .8
}, 1000, "linear", function(){
	//alert("all done");
	} );*/

				  
				
				
				
				default:
				  $('.images').hide();
				  $('#images' + vcurrnet).fadeIn();
				}
			
			
			
	
		}
					
					
					
					$(document).ready(function(){
											   
											   
										$('.images').hide();
										$('#images' + vcurrnet).show();
										
										change(vnext);
										my_timer();
											
										
							
											var tpp = '';
											for(g = 1; g < max_items; g++) {
											
												tpp = tpp + '<span id="int' + g + '" class="controls" onClick="change(\' ' + g + ' \' );">' + g + '</span>';
											}
							
							
											//$('#myDiv').html(tpp);
											$('#int' + vcurrnet).addClass("active");
											
											
											//rotate();
							
						

																
										//document.getElementById('pre').value = vprev;
										//document.getElementById('cur').value = vcurrnet;
										//document.getElementById('nxt').value = vnext;
										
										
										if(vprev == 0) {
											$('#prev').hide();
										}
										

							
								
								$('#next').click(function() {
										next();
									
										//document.getElementById('pre').value = vprev;
										//document.getElementById('cur').value = vcurrnet;
										//document.getElementById('nxt').value = vnext;
										
										Effect();

										
											
											
										
										
										});

								$('#prev').click(function() {
										prev();
												//document.getElementById('pre').value = vprev;
										//document.getElementById('cur').value = vcurrnet;
										//document.getElementById('nxt').value = vnext;
										
										Effect();
										
										});
								
								
								

							
								
								


});
					
					
			
	
