//Calculation of current year
var today = new Date();
var year = today.getYear();
if (year < 999)
  year += 1900;


function openKULI() {
	var f = document.forms[0];
	f.nextPage.value = "/epwf61/servlet.method/com.groiss.util.DownloadHandler.handle/index.html";
	//f.nextPage.value = "/wf/servlet.method/com.groiss.kuli.gui.HTMLClient.showFrames?";
	f.submit();
	f.reset();
}

function openPrivacy() {
	var url = "/epwf61/kulicp/html/privacy.html";
	newwin = window.open(url, "privacy", "toolbar=no,menubar=no,width=400,height=200,left=550,top=250");
	newwin.focus();
}


function mailto(a1,a2) {
	document.location = "mailto:"+a1+a2+"@groiss.com";

}


function openPopup(path,name) {
	var hi, wi, pw, ph, picw, pich, pic, popup;
	
 	hi = screen.height;
 	wi = screen.width;
 	
 	pic = new Image();
 	pic.src = path;
 	picw = pic.width;
 	pich = pic.height;
 	 	
 	if(picw == 0 || pich == 0) { //Wegen IE eingebaut, da im 1. Durchlauf keine Daten ausgelesen werden
 		pic.src = path;
 		picw = pic.width;
 		pich = pic.height;
 	}
 	
 	pw = picw + 40; //40 Px mehr, damit keine sinnlosen Scrollbalken beim ersten aufpopen
 	ph = pich + 40; 
 	
	if(pw < wi && ph < hi) {
		popup = window.open(path,name,"resizable=yes,location=no,menubar=no,width="+pw+",height="+ph+",scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=no");
	}
	else if(pw < wi && ph > hi){
		popup = window.open(path,name,"resizable=yes,location=no,menubar=no,width="+pw+",height="+hi+",scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=no");
	}
	else if(pw > wi && ph < hi){
		popup = window.open(path,name,"resizable=yes,location=no,menubar=no,width="+wi+",height="+ph+",scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=no");
	}
	else {
		popup = window.open(path,name,"resizable=yes,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,fullscreen=yes,dependent=no");
	}
	popup.focus();
}