var iex=/*@cc_on!@*/false;var ie6=false/*@cc_on||@_jscript_version<5.7 @*/;var ie7=false/*@cc_on||@_jscript_version==5.7 @*/;function MM_callJS(jsStr){return eval(jsStr)}
function oglasiJump()
{var sel=$('oglasiJump');if(sel!=null)
{sel.addEvent('change',function()
{var url=sel.options[sel.selectedIndex].value;if(url!='')
location.href=url;});}}
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 verifyPassword(Password1,Password2)
{r=true
if(Password1=="")r=false
if(Password2=="")r=false
if(Password1!=Password2)r=false
return r}
function verifyRegister(Forma)
{var sMsg="";var sN="\r\n";var sHeader="Morate pravilno unijeti:"+sN+sN;if(Forma.Ime.value==""){sMsg+=" - Ime i prezime"+sN;Forma.Ime.style.backgroundColor='#ffcbcb';}else{Forma.Ime.style.backgroundColor='white';}
if(Forma.Username.value==""){sMsg+=" - Korisnicko ime"+sN;Forma.Username.style.backgroundColor='#ffcbcb';}else{Forma.Username.style.backgroundColor='white';}
if(!verifyEmail(Forma.Email.value)){sMsg+=" - Email"+sN;Forma.Email.style.backgroundColor='#ffcbcb';}else{Forma.Email.style.backgroundColor='white';}
if(!verifyPassword(Forma.Password.value,Forma.Password2.value))
{sMsg+=" - Lozinku"+sN;Forma.Password.style.backgroundColor='#ffcbcb';Forma.Password2.style.backgroundColor='#ffcbcb';Forma.Password.value='';Forma.Password2.value='';}
else
{Forma.Password.style.backgroundColor='white';Forma.Password2.style.backgroundColor='white';}
if(Forma.VerificationCode.value==""){sMsg+=" - Verifikacioni kod"+sN;Forma.VerificationCode.style.backgroundColor='#ffcbcb';}else{Forma.VerificationCode.style.backgroundColor='white';}
if(sMsg!=""){alert(sHeader+sMsg);return false;}else{return true;}}
function verifyKontakt(Forma)
{var sMsg="";var sN="\r\n";var sHeader="Morate pravilno unijeti:"+sN+sN;if(Forma.Ime.value==""){sMsg+=" - Vase ime"+sN;Forma.Ime.style.backgroundColor='#ffcbcb';}else{Forma.Ime.style.backgroundColor='white';}
if(!verifyEmail(Forma.Email.value)){sMsg+=" - Email"+sN;Forma.Email.style.backgroundColor='#ffcbcb';}else{Forma.Email.style.backgroundColor='white';}
if(Forma.Poruka.value==""){sMsg+=" - Poruku"+sN;Forma.Poruka.style.backgroundColor='#ffcbcb';}else{Forma.Poruka.style.backgroundColor='white';}
if(Forma.VerificationCode.value==""){sMsg+=" - Verifikacioni kod"+sN;Forma.VerificationCode.style.backgroundColor='#ffcbcb';}else{Forma.VerificationCode.style.backgroundColor='white';}
if(sMsg!=""){alert(sHeader+sMsg);return false;}else{return true;}}
function verifyLozinka(Forma)
{var sMsg="";var sN="\r\n";var sHeader="Morate pravilno unijeti:"+sN+sN;if(Forma.p.value==""){sMsg+=" - Staru lozinku"+sN;Forma.p.style.backgroundColor='#ffcbcb';}else{Forma.p.style.backgroundColor='white';}
if(!verifyPassword(Forma.Password.value,Forma.Password2.value))
{sMsg+=" - Novu lozinku"+sN;Forma.Password.style.backgroundColor='#ffcbcb';Forma.Password2.style.backgroundColor='#ffcbcb';Forma.Password.value='';Forma.Password2.value='';}
else
{Forma.Password.style.backgroundColor='white';Forma.Password2.style.backgroundColor='white';}
if(sMsg!=""){alert(sHeader+sMsg);return false;}else{return true;}}
function verifyLogin(Forma)
{var sMsg="";var sN="\r\n";var sHeader="Morate pravilno unijeti:"+sN+sN;if(Forma.u.value==""){sMsg+=" - Korisnicko ime"+sN;Forma.u.style.backgroundColor='#ffcbcb';}else{Forma.u.style.backgroundColor='white';}
if(Forma.p.value==""){sMsg+=" - Lozinku"+sN;Forma.p.style.backgroundColor='#ffcbcb';}else{Forma.p.style.backgroundColor='white';}
if(sMsg!=""){alert(sHeader+sMsg);return false;}else{return true;}}
function verifyPijaca(Forma)
{var sMsg="";var sN="\r\n";var sHeader="Morate pravilno unijeti:"+sN+sN;if(Forma.Tip[0].checked==false&&Forma.Tip[1].checked==false){sMsg+=" - Vrsta oglasa (kupujem / prodajem)"+sN;$('divVrsta').style.backgroundColor='#ffcbcb';}else{$('divVrsta').style.backgroundColor='white';}
if(Forma.Trajanje.value==""){sMsg+=" - Trajanje oglasa"+sN;Forma.Trajanje.style.backgroundColor='#ffcbcb';}else{Forma.Trajanje.style.backgroundColor='white';}
if(Forma.Model.value==""){sMsg+=" - Model"+sN;Forma.Model.style.backgroundColor='#ffcbcb';}else{Forma.Model.style.backgroundColor='white';}
if(Forma.Godina.value==""){sMsg+=" - Godiste"+sN;$('divGodina').style.backgroundColor='#ffcbcb';}else{$('divGodina').style.backgroundColor='white';}
if(Forma.Cijena.value==""){sMsg+=" - Cijena"+sN;Forma.Cijena.style.backgroundColor='#ffcbcb';}else{Forma.Cijena.style.backgroundColor='white';}
if(Forma.Ime.value==""){sMsg+=" - Ime"+sN;Forma.Ime.style.backgroundColor='#ffcbcb';}else{Forma.Ime.style.backgroundColor='white';}
if(Forma.Telefon.value==""){sMsg+=" - Telefon"+sN;Forma.Telefon.style.backgroundColor='#ffcbcb';}else{Forma.Telefon.style.backgroundColor='white';}
if(Forma.Lokacija.value==""){sMsg+=" - Lokacija"+sN;Forma.Lokacija.style.backgroundColor='#ffcbcb';}else{Forma.Lokacija.style.backgroundColor='white';}
if(sMsg!=""){alert(sHeader+sMsg);return false;}else{}}
function verifyVideo(Forma)
{var sMsg="";var sN="\r\n";var sHeader="Morate pravilno unijeti:"+sN+sN;if(Forma.Naslov.value==""){sMsg+=" - Naslov"+sN;Forma.Naslov.style.backgroundColor='#ffcbcb';}else{Forma.Naslov.style.backgroundColor='white';}
if(Forma.Tekst.value==""){sMsg+=" - Tekst"+sN;Forma.Tekst.style.backgroundColor='#ffcbcb';}else{Forma.Tekst.style.backgroundColor='white';}
if(Forma.Fajl.value==""){sMsg+=" - Fajl"+sN;$('divVideo').style.backgroundColor='#ffcbcb';}else{$('divVideo').style.backgroundColor='white';}
if(sMsg!=""){alert(sHeader+sMsg);return false;}else{}}
function boxTabToggleBg(divId1,divId2,boxEnable,boxDisable,bgOff,bgOn)
{$(divId1).style.color='#d70006';$(divId1).style.backgroundColor=bgOn;$(divId1).style.border='1px solid #999';$(divId1).style.borderTop='none';$(divId2).style.color='#c79d9d';$(divId2).style.backgroundColor=bgOff;$(divId2).style.border='none';$(divId2).style.borderTop='1px solid #999';$(boxEnable).style.visibility='visible';$(boxEnable).style.display='block';$(boxDisable).style.visibility='hidden';$(boxDisable).style.display='none';}
function doVote(forma)
{var myRequest=new Request({url:forma.action,data:forma,onRequest:function()
{$('divAnketa').set('html','loading...');},onSuccess:function(responseText)
{$('divAnketa').set('html',responseText);},onFailure:function()
{$('divAnketa').set('html','Greska :(');}});myRequest.post();return false;}
function doAnketa(URI)
{var myRequest=new Request({url:URI,method:'get',onRequest:function()
{$('divAnketa').set('html','loading...');},onSuccess:function(responseText)
{$('divAnketa').set('html',responseText);},onFailure:function()
{$('divAnketa').set('html','Greska :(');}});myRequest.send();return false;}
