function displayDelete(delURL)
{
 var where_to= confirm("Želite li stvarno ukloniti ovaj modul?");
 if (where_to== true)
 {
   window.location=delURL;
 }

}


function pageDelete(delURL)
{
 var where_to= confirm("Želite li stvarno obrisati ovaj stranicu?");
 if (where_to== true)
 {
   window.location=delURL;
 }

}

function pageRename(delURL) {
var inputedData =  prompt ("Upišiti novi naslov stranice", "" );
if (confirm("Da li ste sigurni da želite novi naslov: "+inputedData+"?"))
 {
   window.location=delURL+ "&name=" + inputedData;
 }

}




		
	var http = createRequestObject();
			
	function boxReq(rssID, RSSrows, status, displayID) {
			if (status == 1) {
						document.getElementById('box_'+displayID).innerHTML = '';
						document.getElementById('box_'+displayID).style.height = '0px';
						document.getElementById('box_'+displayID).style.padding = '0px';
	 					http.open('get', 'ajax-rss.asp?rssID='+rssID+'&RSSrows='+RSSrows+'&status='+status+'&displayID='+displayID); 
	 					http.send(null);
			} else {   
						document.getElementById('box_'+displayID).style.height = '';
						document.getElementById('box_'+displayID).style.padding = '10px';				
						var animacija='<div align=center><br><br><img src=/ajax/progress.gif><br><br><br><//div>';
						document.getElementById('box_'+displayID).innerHTML = animacija;
				    http.open('get', 'ajax-rss.asp?rssID='+rssID+'&RSSrows='+RSSrows+'&status='+status+'&displayID='+displayID);  
				    http.onreadystatechange = function()
				    {
				    			if ((http.readyState == 4) && (http.status == 200)) {
				    					document.getElementById('box_'+displayID).innerHTML = http.responseText;
				    			}
				    }
				    http.send(null);				    
			}
	}
	
	function boxEdit(rssID, status, displayID) {
 
						document.getElementById('box_'+displayID).style.height = '';
						document.getElementById('box_'+displayID).style.padding = '10px';				
						var animacija='<div align=center><br><br><img src=/ajax/progress.gif><br><br><br><//div>';
						document.getElementById('box_'+displayID).innerHTML = animacija;
				    http.open('get', 'ajax-edit.asp?rssID='+rssID+'&status='+status+'&displayID='+displayID);  
				    http.onreadystatechange = function()
				    {
				    			if ((http.readyState == 4) && (http.status == 200)) {
				    					document.getElementById('box_'+displayID).innerHTML = http.responseText;
				    			}
				    }
				    http.send(null);				    

	}	
	function boxEditDo(displayID, RSSrows, bgcolor ) {
 
						//document.getElementById('box_'+displayID).style.height = '';
						//document.getElementById('box_'+displayID).style.padding = '10px';				
						//var animacija='<div align=center><br><br><img src=/ajax/progress.gif><br><br><br><//div>';
						//document.getElementById('box_'+displayID).innerHTML = animacija;
						//document.getElementById('box_'+displayID).style.padding = '50px';	
						//document.getElementById('box_'+displayID).style.backgroundColor = 'lime';
						//document.getElementById('m_'+displayID+'_h').style.bgColor = 'lime';
						//var broj=document.getElementById('m_1739');	
						//broj.style.bgColor='lime';
						if (bgcolor!="") {document.getElementById('m_'+displayID+'_h').style.backgroundColor = bgcolor;}
				    http.open('get', 'ajax-editdo.asp?displayID='+displayID+'&RSSrows='+RSSrows+'&bgcolor='+bgcolor);  
				    http.onreadystatechange = function()
				    {
				    			if ((http.readyState == 4) && (http.status == 200)) {
				    					document.getElementById('box_'+displayID).innerHTML = http.responseText;
				    			}
				    }
				    http.send(null);				    

	}	
	
		function boxControl(displayID, status) {
			if (status == 1) {
						document.getElementById('box_'+displayID).innerHTML = '';
						document.getElementById('box_'+displayID).style.height = '0px';
						document.getElementById('box_'+displayID).style.padding = '0px';
	 					http.open('get', 'ajax-control.asp?displayID='+displayID+'&status='+status); 
	 					http.send(null);
			} 
			if (status == 2) {		
	 					http.open('get', 'ajax-control.asp?displayID='+displayID+'&status='+status); 
	 					http.send(null);
			} 			
			if (status == 3) {
						document.getElementById('box_'+displayID).style.height = '';
						document.getElementById('box_'+displayID).style.padding = '';					
	 					http.open('get', 'ajax-control.asp?displayID='+displayID+'&status='+status); 
				    http.onreadystatechange = function()
				    {
				    			if ((http.readyState == 4) && (http.status == 200)) {
				    					document.getElementById('box_'+displayID).innerHTML = http.responseText;
				    			}
				    }
				    http.send(null);	
			} 			
			if (status == 4) {
						document.getElementById('m_'+displayID).innerHTML = '';
						http.open('get', 'ajax-control.asp?displayID='+displayID+'&status='+status); 
	 					http.send(null);
			} 			
		}
					




var hideID=0;
var sadrzajWidth=0;
	function sakrijSadrzaj(){
								clearInterval(hideID);
								hideID = setInterval(polakoSakrijSadrzaj, 50);		
								document.cookie="sadrzaj=off";
	}

	function sakrijSadrzaj_OLD(){

		var sadrzaj = document.getElementById("sadrzaj"); 
		sadrzaj.style.visibility="hidden";
		sadrzaj.style.width="1%";
		sadrzaj.style.display="none";			
		
		var wrapper = document.getElementById("wrapper"); 
		wrapper.style.width="100%";		
	}
	
	function prikaziSadrzaj(){
		var sadrzaj = document.getElementById("sadrzaj"); 
		sadrzaj.style.visibility="visible";
		sadrzaj.style.width="17%";		
		sadrzaj.style.display="block";
		sadrzaj.style.MozOpacity=1;
	
		var wrapper = document.getElementById("wrapper"); 
		wrapper.style.width="79%";
		
		sadrzajWidth=17;
		document.cookie="sadrzaj=on";
	}						
	
	function polakoSakrijSadrzaj(){
		var sadrzaj = document.getElementById("sadrzaj"); 
		sadrzaj.style.MozOpacity=sadrzaj.style.MozOpacity-0.1
		sadrzajWidth=sadrzajWidth-1;
		sadrzaj.style.width=sadrzajWidth + '%';
		
		var wrapper = document.getElementById("wrapper"); 
		wrapper.style.width=(79+25-(sadrzajWidth*1.5)) + '%';	
		
		if (sadrzaj.style.MozOpacity<=0) {
			clearInterval(hideID);
			var sadrzaj = document.getElementById("sadrzaj"); 
			sadrzaj.style.visibility="hidden";
			sadrzaj.style.width="1%";
			sadrzaj.style.display="none";			
			
			var wrapper = document.getElementById("wrapper"); 
			wrapper.style.width="100%";
		}
		
	}
	function promijeniSG(grupa){
		var SG = document.getElementById("SG" + grupa); 
		if (SG.style.visibility=="hidden"){
			SG.style.height="";
			SG.style.visibility="visible";
			SG.style.display="block";
		} else {
			SG.style.height="0px";
			SG.style.visibility="hidden";
			SG.style.display="none";
		}
	
	}


 function CreateBookmark(title, url) {
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
 }

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=")
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1 
    c_end=document.cookie.indexOf(";",c_start)
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end))
    } 
  }
return ""
}