<!--

function popupWindow(name, path, focus, width, height, resizable, scrollbars, status) {
  var settings = '';

  settings = settings + 'resizable='  + (resizable  ? 'yes' : 'no') + ',';
  settings = settings + 'scrollbars=' + (scrollbars ? 'yes' : 'no') + ',';
  settings = settings + 'status='     + (status     ? 'yes' : 'no') + ',';

  if ( width ) {
    if ( height == null ) {
      height = width;
    }

    settings = settings + 'width='+width+',height='+height+',';
  }

  winhandler = window.open(path,name,settings);

  if ( focus ) {
    winhandler.focus();
  }
}

function Rotate(id, smer) {
  var element = document.getElementById(id);
	element.src='/Static/images/gui/puscica_'+smer+'.gif';
}

function Rotate2(id, smer) {
  var element = document.getElementById(id);
	element.src='/Static/images/gui/puscica_'+smer+'_2.gif';
}

function popPriporoci(id) {
	popupWindow('priporoci', '/priporocilo.html?id='+id, 1, 295, 456, false, false);
}

function popNacrt(id) {
	popupWindow('nacrt', '/nacrt.html', 1, 300, 652, true, true);
}

function popNacrt_eng(id) {
	popupWindow('sitemap', '/en/nacrt.html', 1, 300, 652, true, true);
}

function popPrint(id) {
	//if( id == undefined ){
		var locHref = window.location.href;
		var indexOfDefault = locHref.indexOf('default.html');
		if( indexOfDefault > -1 ){
			id = locHref.substring(0, indexOfDefault-1)+'/print.html';
			popupWindow('print', id, 1, 550, 600, true, true);
			return;
		}

		var indexOfDefault = locHref.indexOf('novica.html');
		if( indexOfDefault > -1 ){
			id = locHref.substring(0, indexOfDefault-1)+'/print.html';
			popupWindow('print', id, 1, 550, 600, true, true);
			return;
		}

		var indexOfDefault = locHref.indexOf('arhiv.html');
		if( indexOfDefault > -1 ){
			id = locHref.substring(0, indexOfDefault-1)+'/print-arhiv.html';
			popupWindow('print', id, 1, 550, 600, true, true);
			return;
		}

		var indexOfDefault = locHref.indexOf('zaposlitev.html');
		if( indexOfDefault > -1 ){
			id = locHref.substring(0, indexOfDefault-1)+'/print-zaposlitev.html';
			popupWindow('print', id, 1, 550, 600, true, true);
			return;
		}

		var indexOfDefault = locHref.indexOf('obrazec.html');
		if( indexOfDefault > -1 ){
			id = 'http://www.melamin.lan/podjetje/zaposlimo/print-zaposlitev.html';
			popupWindow('print', id, 1, 550, 600, true, true);
			return;
		}

		var indexOfDefault = locHref.indexOf('predogled.html');
		if( indexOfDefault > -1 ){
			id = 'http://www.melamin.lan/podjetje/zaposlimo/print-zaposlitev.html';
			popupWindow('print', id, 1, 550, 600, true, true);
			return;
		}

		else{
			id = locHref+'/print.html';
			popupWindow('print', id, 1, 550, 600, true, true);
		}
	//}
}

function popPrint_eng(id) {
	popPrint(id);
}

function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit)
		field.value = field.value.substring(0, maxlimit);
	else
		countfield.value = maxlimit - field.value.length;
}

function rollover(state, id){
	var element = document.getElementById(id);
	element.style.visibility = state;
}

function popImage(file, width, height) {
	width = width+20;
	height= height+30;
	popupWindow('Slikovni_material', file, 1, width, height, false, false, false);
}


-->