
NS = (navigator.appName=="Netscape")?true:false;
IEE = (navigator.appName=="Microsoft Internet Explorer")?true:false;
OP = (navigator.appName=="Opera")?true:false;

version = navigator.appVersion.substr(22,1);
function resizeFF() {
	Height = window.innerHeight;
	Width = window.innerWidth;
	eHeight=document.documentElement.offsetHeight;
	eWidth=document.documentElement.offsetWidth;

	if(NS) {
		vHeight = Height-315;
		document.getElementById('leftHolder').style.minHeight = vHeight+"px"; 

	} else if(IEE && version<=6) {
		//checkCookie();
		
		eeHeight = eHeight-520;
		document.getElementById('leftHolder').style.height = eeHeight+"px"; 

	} else if(IEE && version >= 7) {
		jjHeight = eHeight-315;
		document.getElementById('leftHolder').style.minHeight = jjHeight+"px"; 
				
	} else if(OP) {
		vvHeight = Height-315;
		document.getElementById('leftHolder').style.minHeight = vvHeight+"px"; 
		
	} else {
		uuHeight = Height-315;
		document.getElementById('leftHolder').style.minHeight = uuHeight+"px"; 
	}
}





function makesure() {
	if (confirm('Ali ste prepričani, da želite izbrisati zapis?')) {
	return true;
	} else {
	return false;
	}
}


function checkformzaposlovanje ( form ) // to je za formo zaposlovanje
{
  if (form.ime.value == "") {
	alert("Prosimo vnesite ime in priimek!");
	form.ime.focus();
	return false ;
  }
  if (form.naslov.value == "") {
	alert("Prosimo vnesite vaš naslov!");
	form.naslov.focus();
	return false ;
  }
  if (!isValidEmail(form.email.value)) {
	alert("Prosimo vnesite veljaven elektronski naslov!");
	form.email.focus();
	return false ;
  }
  if (form.tel.value == "") {
	alert("Prosimo vnesite vašo telefonsko številko!");
	form.tel.focus();
	return false ;
  }
  if (form.teh.value == "") {
	alert("Prosimo vnesite vsebino sporočila!");
	form.teh.focus();
	return false ;
  }

		/*datum field brez readonly, pa neobvezen
			
		if(form.datum.value != "") {
			if (isDate(form.datum.value)==false) {
		    alert("Prosimo vnesite veljaven datum!");
					form.datum.value = "";
			    cal1.popup2();
					return false ;
			}
		}
		
		datum field brez readonly, pa obvezen

			if (isDate(form.datum.value)==false) {
		    alert("Prosimo vnesite veljaven datum!");
					form.datum.value = "";
			    cal1.popup2();
					return false ;
			}

		za readonly, obvezen
		
			if (form.datum.value) == "") {
		    alert("Prosimo vnesite veljaven datum!");
			    cal1.popup2();
					return false ;
			}

		za readonly, neobvezen ne rabiš nic

		
	*/

  return true ;
}



function isValidEmail(str) {

return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);

}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:

/* raztezovalna skripta za iFrame */

var iframeids=["myframe", "myframe2", "forumFrame"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 50 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

/* end of frame resize functions */
