
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - popup.js - */
// http://www.hsm.eu/portal_javascripts/popup.js?original=1
var newWin=null;
function closeWin(){if(newWin!=null){if(!newWin.closed)
newWin.close()}}
function popUp(strURL,strType,strHeight,strWidth){closeWin();var strOptions="";if(strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;if(strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;if(strType=="elastic") strOptions="scrollbars,resizable,height="+strHeight+",width="+strWidth;newWin=window.open(strURL,'newWin',strOptions);newWin.focus()}
function setParentUrl(strURL){window.opener.location.href=strURL;splitted=strURL.split('?');if(strURL!=splitted){strURL=splitted[0]}
parent.focus()}

/* - ++resource++lightbox/light.js - */
// http://www.hsm.eu/portal_javascripts/++resource++lightbox/light.js?original=1
function getLightboxImages(){var newDiv=document.createElement("div");newDiv.id='lightbox-input';document.body.appendChild(newDiv);var elementTD=document.getElementById('region-content');if(elementTD){var elements=elementTD.getElementsByTagName('img');for(var i=0;i<elements.length;i++){var element=elements[i];if(element.parentNode.rel!="lightbox[image]"){if(element.src.search(/resolveUid/)!=-1){if(element.className.search(/no-lightbox/)==-1){element.onclick=openLightbox;element.onmouseover=element.style.cursor='pointer'}}}}}}
function openLightbox(){var splittedUrl=this.src.split('/');if(splittedUrl[splittedUrl.length-1].substring(0,5)=='image'){var uid=splittedUrl[splittedUrl.length-2]} else{var uid=splittedUrl[splittedUrl.length-1]}
new Ajax.Request('/@@lightbox/render',{method:'post',parameters:'?uid='+uid,onSuccess:onLightboxSuccess,onComplete:onLightboxComplete})}
function onLightboxComplete(transport){}
function onLightboxSuccess(transport){var element=document.getElementById('lightbox-input');element.innerHTML=transport.responseText;var lightboxImage=document.getElementById('lightbox-image');var Imglight=document.getElementById('lightbox-image-preview');document.getElementById('lightbox-container').style.height=document.body.offsetHeight+'px';document.getElementById('lightbox-container').style.display='';Effect.Appear('lightbox-image',{duration:2.0});lightboxImage.style.left=((element.offsetWidth/2)-(lightboxImage.getWidth()/2))+'px';document.getElementById('lightbox-info').style.width=(Imglight.width)+'px'}
function closeLightbox(){document.getElementById('lightbox-image').style.display='none';document.getElementById('lightbox-container').style.display='none'}
registerPloneFunction(getLightboxImages);
