/* preverjanje vnosnih polj */
function isEmpty(besedilo, msg)
{
	if (besedilo.value.length == 0 || besedilo.value == 'Vaš elektronski naslov')
	{
		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 isSelected(radio, msg)
{
  blnOK = false
  for (var intIndex = 0; intIndex < radio.length; intIndex++)
  {
    if (radio[intIndex].checked)
    {
      blnOK = true
    }
  }
  if (blnOK)
  {
    return true
  }
  else
  {
    alert(msg)
    return false
  }
}

		 
function ShowHide(divId)
{
	var id = document.getElementById(divId);
	if (id.style.display == "none")
	{
		eval("id.style.display = 'block';");
	}
	else
	{
		eval("id.style.display = 'none';");
	}
}	

function printframe() {
  parent.frame_print_bottom.focus();
  parent.frame_print_bottom.print();
}

function printpreview(template, folderId, contentId, name,opening, action, blnprint) {
	var strQueryString;
	strQueryString = '';
	var scrnwdth = 0;
	var scrnhght = 0;
	var wdth = 520; 
	var hght = 390;
	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;
	var languagepath = location.pathname.substr(0,4)
	if(languagepath == '/en/') {
		prn = window.open('/en/frameset_print.asp?' + location.protocol + '//' + location.host + location.pathname + '?blnPrint=true' + '&FolderId='+folderId + '&ContentId='+ContentId, '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,resizable=no');
	}
	else {
		prn = window.open('/frameset_print.asp?' + location.protocol + '//' + location.host + '/'+ template +'/'+ folderId + '/' +contentId + '/' + name + '/' + opening + '/' + action + '/' + blnprint, '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,resizable=no');
	}
	if (prn.blur) prn.focus();
}


