
/* 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 -
 */

/* - custom.js - */
// http://www.vetter-pharma.com/portal_javascripts/custom.js?original=1
var counter=0;var stillPressed=false;
function slideLeft(){var newsCount=document.getElementById('newsCount').value;newsCount=parseInt(newsCount);if(!stillPressed&&newsCount>3&&counter<3){element=document.getElementById('slide-container');new Effect.Move(element,{x:-289,y:0,afterFinish:function(){stillPressed=false}});counter=counter+1;stillPressed=true}}
function slideRight(){if(!stillPressed&&!counter==0){element=document.getElementById('slide-container');new Effect.Move(element,{x:289,y:0,afterFinish:function(){stillPressed=false}});counter=counter-1;stillPressed=true}}
function setImageCorners(){var elements=jq('.image');string_='<span class="corner-topleft"></span><span class="corner-topright"></span><span class="corner-bottomleft"></span><span class="corner-bottomright"></span>'
for(var i=0;i<elements.length;i++){var element=elements[i];var image=element.getElementsByTagName('img')[0];jQuery("#"+element.id).append(string_);jQuery("#"+element.id).css("width",image.width)}}
jq(setImageCorners);
function changeImage(urlPreview,url,title,description){var element=$('previewImg');element.src=urlPreview;element.title=title;element.alt=title;var element=$('previewImgUrl');element.href=url;element.title=title;var element=$('imgTitle');element.innerHTML=title;var element=$('thumbLegend');element.innerHTML=description}
function ToggleEffect(element,imagee){if($(element).getStyle('display')=='block')
$(imagee).src='plus.gif';else
$(imagee).src='minus.gif';new Effect.toggle(element,'',{duration:1})}

/* - popup.js - */
// http://www.vetter-pharma.com/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()}

