function setCookie(cookieName,cookieValue,nDays)
{var today=new Date();var expire=new Date();if(nDays==null||nDays==0)nDays=1;expire.setTime(today.getTime()+3600000*24*nDays);document.cookie=cookieName+"="+escape(cookieValue)+";expires="+expire.toGMTString();}
var now=new Date();var t_hour=now.getHours().toString();var t_min=now.getMinutes().toString();if(t_hour.length==1)t_hour="0"+t_hour;if(t_min.length==1)t_min="0"+t_min;setCookie('jsTime',t_hour+t_min,1000);function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function binFill(Img){var Loc='/upl/ilustracije/';var Item=document.getElementById('Bin');Item.value=Loc+Img;}
function MM_callJS(jsStr){return eval(jsStr)}
function verifyEmail(Address)
{AtPos=Address.indexOf("@")
StopPos=Address.lastIndexOf(".")
r=true
if(Address=="")r=false
if(AtPos==-1||StopPos==-1)r=false
if(StopPos<AtPos)r=false
if(StopPos-AtPos==1)r=false
return r}
function windowPopup(URL,Name,Width,Height,Options)
{return window.open(URL,Name,"width="+Width+",height="+Height+Options);}
function sendPage(Request)
{var Name='WindowSend';var URL='/send.php'+Request;windowPopup(URL,Name,550,600,'');}
function printPage(Request)
{var Name='WindowPrint';var URL='/print.php'+Request;windowPopup(URL,Name,640,600,',scrollbars=yes');}
function popupPage(Request)
{var Name='WindowPopup';var URL='/popup.php'+Request;windowPopup(URL,Name,640,600,'');}
function checkSend(Forma)
{var sMsg="";var sN="\r\n";var sHeader="Niste podesili sledeca polja:"+sN+sN;if(Forma.Ime.value==""){sMsg+=" - Vase ime"+sN;Forma.Ime.style.backgroundColor='#f3d9d9';}else{Forma.Ime.style.backgroundColor='white';}
if(Forma.Ime2.value==""){sMsg+=" - Ime primaoca"+sN;Forma.Ime2.style.backgroundColor='#f3d9d9';}else{Forma.Ime2.style.backgroundColor='white';}
if(!verifyEmail(Forma.Email.value)){sMsg+=" - Email"+sN;Forma.Email.style.backgroundColor='#f3d9d9';}else{Forma.Email.style.backgroundColor='white';}
if(sMsg!=""){alert(sHeader+sMsg);return false;}else{return true;}}
function checkMisljenje(Forma)
{var sMsg="";var sN="\r\n";var sHeader="Niste podesili sledeca polja:"+sN+sN;if(Forma.Tekst.value==""){sMsg+=" - Vase misljenje"+sN;Forma.Tekst.style.backgroundColor='#f3d9d9';}else{Forma.Tekst.style.backgroundColor='white';}
if(sMsg!=""){alert(sHeader+sMsg);return false;}else{return true;}}
function checkPristupnica(Forma)
{var sMsg="";var sN="\r\n";var sHeader="Niste podesili sledeca polja:"+sN+sN;if(Forma.ImePrezime.value==""){sMsg+=" - Ime i prezime"+sN;Forma.ImePrezime.style.backgroundColor='#f3d9d9';}else{Forma.ImePrezime.style.backgroundColor='white';}
if(Forma.DatumRodjenjaMjesto.value==""){sMsg+=" - Datum rodjenja i mjesto"+sN;Forma.DatumRodjenjaMjesto.style.backgroundColor='#f3d9d9';}else{Forma.DatumRodjenjaMjesto.style.backgroundColor='white';}
if(Forma.JMBG.value==""){sMsg+=" - Maticni broj"+sN;Forma.JMBG.style.backgroundColor='#f3d9d9';}else{Forma.JMBG.style.backgroundColor='white';}
if(Forma.Adresa.value==""){sMsg+=" - Adresa stanovanja"+sN;Forma.Adresa.style.backgroundColor='#f3d9d9';}else{Forma.Adresa.style.backgroundColor='white';}
if(Forma.Mjesto.value==""){sMsg+=" - Mjesto - opstina"+sN;Forma.Mjesto.style.backgroundColor='#f3d9d9';}else{Forma.Mjesto.style.backgroundColor='white';}
if(Forma.Drzava.value==""){sMsg+=" - Drzava"+sN;Forma.Drzava.style.backgroundColor='#f3d9d9';}else{Forma.Drzava.style.backgroundColor='white';}
if(Forma.Telefon.value==""){sMsg+=" - Kontakt telefon"+sN;Forma.Telefon.style.backgroundColor='#f3d9d9';}else{Forma.Telefon.style.backgroundColor='white';}
if(!verifyEmail(Forma.Email.value)){sMsg+=" - Email"+sN;Forma.Email.style.backgroundColor='#f3d9d9';}else{Forma.Email.style.backgroundColor='white';}
if(Forma.SDPCaptha.value==""){sMsg+=" - Verifikacioni kod"+sN;Forma.SDPCaptha.style.backgroundColor='#f3d9d9';}else{Forma.SDPCaptha.style.backgroundColor='white';}
if(sMsg!=""){alert(sHeader+sMsg);return false;}else{return true;}}
function checkPitanje(Forma)
{var sMsg="";var sN="\r\n";var sHeader="Niste podesili sledeca polja:"+sN+sN;if(Forma.ImePrezime.value==""){sMsg+=" - Ime i prezime"+sN;Forma.ImePrezime.style.backgroundColor='#f3d9d9';}else{Forma.ImePrezime.style.backgroundColor='white';}
if(Forma.Email.value==""){sMsg+=" - Ime i prezime"+sN;Forma.Email.style.backgroundColor='#f3d9d9';}else{Forma.Email.style.backgroundColor='white';}
if(!verifyEmail(Forma.Email.value)){sMsg+=" - Email"+sN;Forma.Email.style.backgroundColor='#f3d9d9';}else{Forma.Email.style.backgroundColor='white';}
if(Forma.Poruka.value==""){sMsg+=" - Ime i prezime"+sN;Forma.Poruka.style.backgroundColor='#f3d9d9';}else{Forma.Poruka.style.backgroundColor='white';}
if(Forma.SDPCaptha.value==""){sMsg+=" - Verifikacioni kod"+sN;Forma.SDPCaptha.style.backgroundColor='#f3d9d9';}else{Forma.SDPCaptha.style.backgroundColor='white';}
if(sMsg!=""){alert(sHeader+sMsg);return false;}else{return true;}}
function bijeli(id)
{document.getElementById(id).className="menuk";}
function makni(id)
{document.getElementById(id).className="";}
var iframeids=["myframe"]
var iframehide="yes"
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1?16:0
function resizeCaller(){var dyniframe=new Array()
for(i=0;i<iframeids.length;i++){if(document.getElementById)
resizeIframe(iframeids[i])
if((document.all||document.getElementById)&&iframehide=="no"){var tempobj=document.all?document.all[iframeids[i]]:document.getElementById(iframeids[i])
tempobj.style.display="block"}}}
function resizeIframe(frameid){var currentfr=document.getElementById(frameid)
if(currentfr&&!window.opera){currentfr.style.display="block"
if(currentfr.contentDocument&&currentfr.contentDocument.body.offsetHeight)
currentfr.height=currentfr.contentDocument.body.offsetHeight+FFextraHeight;else if(currentfr.Document&&currentfr.Document.body.scrollHeight)
currentfr.height=currentfr.Document.body.scrollHeight;if(currentfr.addEventListener)
currentfr.addEventListener("load",readjustIframe,false)
else if(currentfr.attachEvent){currentfr.detachEvent("onload",readjustIframe)
currentfr.attachEvent("onload",readjustIframe)}}}
function readjustIframe(loadevt){var crossevt=(window.event)?event:loadevt
var iframeroot=(crossevt.currentTarget)?crossevt.currentTarget:crossevt.srcElement
if(iframeroot)
resizeIframe(iframeroot.id);}
function loadintoIframe(iframeid,url){if(document.getElementById)
document.getElementById(iframeid).src=url}
if(window.addEventListener)
window.addEventListener("load",resizeCaller,false)
else if(window.attachEvent)
window.attachEvent("onload",resizeCaller)
else
window.onload=resizeCaller<!--Copyright 2006,2007 Bontrager Connection,LLC
var cX=0;var cY=0;var rX=0;var rY=0;function UpdateCursorPosition(e){cX=e.pageX;cY=e.pageY;}
function UpdateCursorPositionDocAll(e){cX=event.clientX;cY=event.clientY;}
if(document.all){document.onmousemove=UpdateCursorPositionDocAll;}
else{document.onmousemove=UpdateCursorPosition;}
function AssignPosition(d){if(self.pageYOffset){rX=self.pageXOffset;rY=self.pageYOffset;}
else if(document.documentElement&&document.documentElement.scrollTop){rX=document.documentElement.scrollLeft;rY=document.documentElement.scrollTop;}
else if(document.body){rX=document.body.scrollLeft;rY=document.body.scrollTop;}
if(document.all){cX+=rX;cY+=rY;}
d.style.left=(cX+10)+"px";d.style.top=(cY+10)+"px";}
function HideContent(d){if(d.length<1){return;}
document.getElementById(d).style.display="none";}
function ShowContent(d,p,s){if(d.length<1){return;}
var pp=document.getElementById(p);pp.src=s;}
function ReverseContentDisplay(d){if(d.length<1){return;}
var dd=document.getElementById(d);AssignPosition(dd);if(dd.style.display=="none"){dd.style.display="block";}
else{dd.style.display="none";}}
