var strQueryString;
strQueryString = '';


function natisni()
{
  parent.okvir_natisni_spodaj.focus();
  parent.okvir_natisni_spodaj.print();
}

function predogledtiskanja()
{
  var scrnwdth = 0;
  var scrnhght = 0;
  var wdth = 640;
  var hght = 450;
  var lft;
  var tp;
  if((window.screen) && (screen.width) && (screen.height)) {scrnwdth = screen.width; scrnhght = screen.height;}
  if(scrnwdth != 0) lft = (scrnwdth - wdth)/2;
  if(scrnhght != 0) tp = (scrnhght - hght)/2;
  var prn = null;
  prn = window.open('/okvir-natisni.asp?' + location.protocol + '//' + location.host + location.pathname + '?blnPrint=true' + strQueryString, 'prnwnd', 'width=' + wdth + ',height=' + hght + ',left=' + lft + ',top=' + tp + ',screenX=' + lft + ',screenY=' + tp + ',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes');
  if (prn.blur) prn.focus();
}

function printpreview()
{
  var scrnwdth = 0;
  var scrnhght = 0;
  var wdth = 640;
  var hght = 450;
  var lft;
  var tp;
  if((window.screen) && (screen.width) && (screen.height)) {scrnwdth = screen.width; scrnhght = screen.height;}
  if(scrnwdth != 0) lft = (scrnwdth - wdth)/2;
  if(scrnhght != 0) tp = (scrnhght - hght)/2;
  var prn = null;
  prn = window.open('/en/frameset-print.asp?' + location.protocol + '//' + location.host + location.pathname + '?blnPrint=true' + strQueryString, 'prnwnd', 'width=' + wdth + ',height=' + hght + ',left=' + lft + ',top=' + tp + ',screenX=' + lft + ',screenY=' + tp + ',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes');
  if (prn.blur) prn.focus();
}

function doEnter(key)
{
	if (key == 13)
	{
    	window.document.onsubmit = document.form.submit();
		return;
	}
	else
	{
	}
}

/* preverjanje vnosnih polj */

function isEmpty(besedilo, msg)
{
  if (besedilo.value.length == 0)
  {
	alert(msg)
	besedilo.focus()
	return false
  } 
  return true
}

function isEmail(besedilo, msg)
{
	if (besedilo.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
		return true;
	else
	{
		alert(msg);
		besedilo.focus();
		return false;
	}
}

function SearchCheck()
{
	if (isEmpty(document.iskalnik.Query, 'Vnesite iskalni niz!'))
	{
		return true;
	}
	else
	{
		return false;
	}
}

function SearchCheckEn()
{
	if (isEmpty(document.iskalnik.Query, 'Enter search string!'))
	{
		return true;
	}
	else
	{
		return false;
	}
}
/* preverjanje vnosnih polj */



function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=580,height=700,left = 390,top = 162');");
}

function popup(url)
{
  var scrnwdth = 0;
  var scrnhght = 0;
  wdth = 640
  hght = 450;
  var lft;
  var tp;
  if((window.screen) && (screen.width) && (screen.height)) {scrnwdth = screen.width; scrnhght = screen.height;}
  if(scrnwdth != 0) lft = (scrnwdth - wdth)/2;
  if(scrnhght != 0) tp = (scrnhght - hght)/2;
  var popup = null;
  popup = window.open('/okvir-popup.asp?' + url, 'popupwnd', 'width=' + wdth + ',height=' + hght + ',left=' + lft + ',top=' + tp + ',screenX=' + lft + ',screenY=' + tp + ',menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=yes');
  if (popup.blur) popup.focus();
}

function popupen(url)
{
  var scrnwdth = 0;
  var scrnhght = 0;
  wdth = 640
  hght = 450;
  var lft;
  var tp;
  if((window.screen) && (screen.width) && (screen.height)) {scrnwdth = screen.width; scrnhght = screen.height;}
  if(scrnwdth != 0) lft = (scrnwdth - wdth)/2;
  if(scrnhght != 0) tp = (scrnhght - hght)/2;
  var popup = null;
  popup = window.open('/en/frame-popup.asp?' + url, 'popupwnd', 'width=' + wdth + ',height=' + hght + ',left=' + lft + ',top=' + tp + ',screenX=' + lft + ',screenY=' + tp + ',menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=yes');
  if (popup.blur) popup.focus();
}

function popupcms(url, width, height)
{
  var scrnwdth = 0;
  var scrnhght = 0;
  wdth = width
  hght = height;
  var lft;
  var tp;
  if((window.screen) && (screen.width) && (screen.height)) {scrnwdth = screen.width; scrnhght = screen.height;}
  if(scrnwdth != 0) lft = (scrnwdth - wdth)/2;
  if(scrnhght != 0) tp = (scrnhght - hght)/2;
  var popupcms = null;
  popupcms = window.open(url, 'popupcmswnd', 'width=' + wdth + ',height=' + hght + ',left=' + lft + ',top=' + tp + ',screenX=' + lft + ',screenY=' + tp + ',menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=yes');
  if (popupcms.blur) popupcms.focus();
}

function popupdis(url)
{
  var scrnwdth = 0;
  var scrnhght = 0;
  wdth = screen.width-200;
  hght = screen.height-200;
  var lft;
  var tp;
  if((window.screen) && (screen.width) && (screen.height)) {scrnwdth = screen.width; scrnhght = screen.height;}
  if(scrnwdth != 0) lft = (scrnwdth - wdth)/2;
  if(scrnhght != 0) tp = (scrnhght - hght)/2;
  var popupdis = null;
  popupdis = window.open(url, 'popupdiswnd', 'width=' + wdth + ',height=' + hght + ',left=' + lft + ',top=' + tp + ',screenX=' + lft + ',screenY=' + tp + ',menubar=yes,toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,resizable=yes');
  if (popupdis.blur) popupdis.focus();
}


function RefreshImage(valImageId) {
	var objImage = document.images[valImageId];
	if (objImage == undefined) {
		return;
	}
	var now = new Date();
	objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}