function confirm_delete(){
  return confirm("Are you sure you want to delete this entry?");
}

function thumb(id){
var big_thumb=document.getElementById('big_thumb');
var thumb=document.getElementById(id);
var name=thumb.name;
var value="<a href='#'><img src='thumbs/"+name+"' name='"+name+"' class='avatar'  onclick='go_big(this.name);'></a>";
big_thumb.innerHTML=value;
}

function go_big(name){
  link='http://primesal.com/big/'+name;
  window.open(link, 'myWindow2','status = 1, resizable = 1');
}

/*top news slide show*/
	var tab=1;
	var t;
	
	/*Change article in top slide show*/
	function change_art(target){
		document.getElementById('top').innerHTML = document.getElementById('a' + target).innerHTML;
		clearTimeout(t);
	}
	
	/*Next button to forward article in top*/
	function next(total){
		if(tab == total){
		  tab=1;
		}else{
		  tab = tab + 1;
		}
		change_art(tab);
	}
	
	/*Back button to backward article in top*/
	function back(total){
		if(tab <= 1){
			tab=total;
		}else{
			tab = tab - 1;
		}
		change_art(tab);
	}

	/*Top slide show*/
	function slide(total){
	document.getElementById('top').innerHTML = document.getElementById("a" + tab).innerHTML;
	setTimeout("tab=(tab+1)",4999);
	if (tab == total){
	tab = 0;
	}
	t=setTimeout('slide('+total+')',5000);
	}

/*************** START AJAX FUNCTIONS ****************/	
	var ajaxRequest;
	function check_browser(){
		try{
			//Opera + firefox + safari
			ajaxRequest = new XMLHttpRequest();
			
		} catch (e){
			// Internet Explorer Browsers
			try{
				ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try{
					ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e){
					// Ajax not supported by browser
					alert("Your browser broke!");
					return false;
				}
			}
		}
	}

	function load_page(link,container,height,width){
	
	check_browser();
	if(link=='slidear.php'){
	  var path = link+'?code='+Math.random();
	}else{
	  var path=link;
	}
		ajaxRequest.onreadystatechange = function(){
		      if (ajaxRequest.readyState == 1 || ajaxRequest.readyState == 2){
		           document.getElementById(container).innerHTML = "<div class='load' style=\"width:" + width + "px; height:" + height + ";\"><img src = 'images/load.gif'></div>";
		      }
			if(ajaxRequest.readyState == 4){
				 document.getElementById(container).innerHTML = ajaxRequest.responseText;
			}
		}
		ajaxRequest.open("GET",path, true);
		ajaxRequest.send(null); 
	}
	
	function pop(link) {
    window.open(link, "myWindow","status = 1, height = 500, width =680, resizable = 1")
  }

	
/*************** END AJAX FUNCTIONS ****************/


