function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function openPopUp(aObj)
{
	var win = openwin(aObj.href,'dardenneWin',462,350);
	win.focus();
	return false;
}
	
function openwin(url,name,width,height) {
	if (window.screen) {
		cw = Math.floor((screen.availWidth-width)/2);
		ch = Math.floor((screen.availHeight-height)/2);
	}
	return window.open(url,name,'width='+width+',height='+height+',top='+ch+',left='+cw+',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');
}


/* fuer Pressebilder: */

flag = false;
function showPrev(imgUrl,w,h) {
    if (flag!=false) pwin.close();
    pwin = window.open("","Preview","width=" + (w+10) + ",height=" + (h+10));
    pwin.document.writeln("<html><head><title>Augenklinik Dardenne - Preview");
    pwin.document.writeln("</title></head><body>");
    pwin.document.writeln("<body style='margin:5px;'>");
    pwin.document.writeln("<img src='" + imgUrl + "'>");
    pwin.document.writeln("</body></html>");
    pwin.focus;
    flag = true;
}

/* fuer Callback-Formular: */

function checkDisplay (fID,showValue) {
    if (!document.getElementById) return;
    if ( document.forms['callback'].elements['An_uns_geraten'].value == showValue)
      document.getElementById(fID).style.visibility = "visible";
    else
      document.getElementById(fID).style.visibility = "hidden";
}
