﻿						var detect = navigator.userAgent.toLowerCase();
						
						function checkIt(string)
						{
							place = detect.indexOf(string) + 1;
							thestring = string;
							return place;
						}
						
						function popUpRezultat() {
						  popUp_window =
						    window.open("","popWinRezultat","width=310,height=650,toolbar=no,scrollbars=auto, screenX=200,screenY=400");
						    NS4 = (document.layers) ? 1 : 0;
						    if (NS4)
						  	window.focus();
						    else if (!checkIt('compatible'))
							window.focus()
						}
						
						function popUpArhiva() {
						  popUp_window =
						    window.open("","popWinArhiva","width=310,height=700,toolbar=no,scrollbars=yes, screenX=200,screenY=0");
						    NS4 = (document.layers) ? 1 : 0;
						    if (NS4)
						  	window.focus();
						    else if (!checkIt('compatible'))
							window.focus()
						}
						
						iIE4 = (document.all && !document.getElementById)? true:false;
						iNS4 = (document.layers)? true:false;
						iIE5 = (document.all && document.getElementById)? true:false;
						iNS6 = (document.getElementById && !document.all)? true:false;
						
						function kuki_ukljucen() {
						    if ( iIE4 || iNS4 || iIE5 || iNS6) {
							  if(iIE4 || iIE5){
						       if (navigator.cookieEnabled == true) {
							  //   document.write("Ukljuceni kukiji");
							   	   return 1 ;
							   }
							   else {
							       if (navigator.cookieEnabled == false) {
								     // document.write("Iskljuceni kukiji");
									  return 0;}
							   }
						
							  }
							  if(iNS4 || iNS6){
							  // Iskljuceno je jer ne radi kako treba za Netscape
							   // netscape.security.PrivilegeManager.enablePrivilege ('UniversalPreferencesRead');
							    //   if (navigator.preference('network.cookie.cookieBehavior') == 0) {
						                //document.write("Ukljuceni kukiji");
										return 1;
						        //   }
							    //   if (navigator.preference('network.cookie.cookieBehavior') == 1) {
								        //document.write("Iskljuceni kukiji");
									//	return 0;
								   //}
						     }
						    }
						}
						
						kukiji=kuki_ukljucen();

						if(kukiji) document.write('<input type="hidden" name="cookies" value="1" />');
						if(!kukiji) document.write('<input type="hidden" name="cookies" value="0" />');
