zacetek = new Image(105,30);
zacetek.src = "/images/menu/zacetek.gif";
zacetek_over = new Image(105,30);
zacetek_over = "/images/menu/zacetek_over.gif";
zacetek_selected = new Image(105,30);
zacetek_selected.src = "/images/menu/zacetek_selected.gif";


function show(novica,novica2)
{
		//hide the table
		document.getElementById(novica2).style.display = "none";
                document.getElementById(novica).style.display = "block";
}
function hide(novica,novica2)
{
		//hide the table
		document.getElementById(novica2).style.display = "block";
                document.getElementById(novica).style.display = "none";
}
var xmlhttp;
var id;
function prikazi(str)
{
id=str;
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="/components/arhiv.php";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
document.getElementById("prikazi"+id).style.display = "none";
document.getElementById("skrij"+id).style.display = "block";
document.getElementById("prikazi2"+id).style.display = "none";
document.getElementById("skrij2"+id).style.display = "block";
}
function skrij(str)
{
id=str;
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="/components/arhiv_skrij.php";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
document.getElementById("prikazi"+id).style.display = "block";
document.getElementById("skrij"+id).style.display = "none";
document.getElementById("prikazi2"+id).style.display = "block";
document.getElementById("skrij2"+id).style.display = "none";
}

function stateChanged()
{
if (xmlhttp.readyState==4)
{
document.getElementById(id).innerHTML=xmlhttp.responseText;
}
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

function checkMail(email)
{
var httpxml;
try
{
// Firefox, Opera 8.0+, Safari
httpxml=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
httpxml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpxml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
function stateck() 
{
if(httpxml.readyState==4)
{
document.getElementById("msg").innerHTML=httpxml.responseText;

}
}
var url="/components/ajax_email.php";
url=url+"?email="+email;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateck;
httpxml.open("GET",url,true);
httpxml.send(null);
}
