function initActionLink() {
	var args = initActionLink.arguments;
	openiFrameFancyBox(args[0]);
}
// initialise plugins - superfish
function initFancyBox() {
	var args = initFancyBox.arguments;
	$(document).ready(function() {
		$("a#"+args[0]).fancybox({
			'zoomOpacity'			: true,
			'overlayShow'			: true,
			'hideOnContentClick'	: true,
			'showNavArrows'			: false,
			'showCloseButton'		: true,
			'transitionIn'			: 'elastic',
			'transitionOut'			: 'elastic'			
		});
	});
}
function initFancyBox4Images() {
	var args = initFancyBox4Images.arguments;
	var oNode = null;
	switch (args[1].substr(0,4)) {
		case ('file'):			
			if (args[1].lastIndexOf(".pdf") > 0){
				if ((oNode = document.getElementById(args[0])) != null) {
					for(i=0; i < oNode.childNodes.length; i++) {
						if (oNode.childNodes[i].tagName == 'IMG') {
							oNode.childNodes[i].src = 'xSystem/images/icons/pdf.gif';
						}
					}
				}
				openiFrameFancyBox(args[0]);
				break;
			}
			initFancyBox(args[0]);	
			break;
		case ('http'):
			openiFrameFancyBox(args[0]);
			break;
					//xSystem/images/icons/pdf.gif
	}	
}
function openiFrameFancyBox4Frm() {
	var args = openiFrameFancyBox4Frm.arguments;
	if (args[0] != ''){
		$("#"+args[0]).fancybox({
			'width'				: 500,
			'height'			: 600,		
			'autoScale'			: false,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe',
			'showCloseButton'	: true
		});	
	}

}
function openiFrameFancyBox4Video() {
	var args = openiFrameFancyBox4Video.arguments;
	if (args[0] != ''){
		$("#"+args[0]).fancybox({
			'autoScale'			: true,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe',
			'showCloseButton'	: true			
		});	
	}
}
function openiFrameFancyBox() {
	var args = openiFrameFancyBox.arguments;
	var iFrameURL = args[0];
	var iFrameWidth = args[1];
	var iFrameHeight = args[2];
		//	
	if (iFrameURL != ''){
		if (iFrameWidth == null) {
			iFrameWidth = 800;
		}
		if (iFrameHeight == null) {
			iFrameHeight = 600;
		}
		$("#"+args[0]).fancybox({
			'width'				: iFrameWidth,
			'height'			: iFrameHeight,
			'autoScale'			: false,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe',
			'showCloseButton'	: true			
		});	
	}
}

function imgProdukt() {
	var args =imgProdukt.arguments;
	var oElem = args[0];
	var isOver = args[1];
	var path =(isOver==true)?"bunt/":"sw/";
	var key = args[2];

	if (isOver == true) {
		oElem.src = "xSystem/images/produkteLEFT/"+domainPath+"bunt/"+key+".jpg";
	} else {
		path = (((typeof(produkte[mainAlias])=='undefined')||(key==mainAlias))?'bunt/':'sw/')
		oElem.src = "xSystem/images/produkteLEFT/"+domainPath+path+key+".jpg";
	}	
}
function switchImgProdukte() {
	var oElem = null;
	var pathDefault = ((typeof(produkte[mainAlias])=='undefined')?'bunt/':'sw/')

	for (keyProdukt in produkte) {
		if ((oElem = document.getElementById('imgProdukt_'+keyProdukt)) != null) {		
			path = ((keyProdukt == mainAlias)?"bunt/":pathDefault);
			oElem.src = "xSystem/images/produkteLEFT/"+domainPath+path+keyProdukt+".jpg";
			if (keyProdukt==mainAlias) {
				oElem.parentNode.href= "xSystem/images/produkteLEFT/"+domainPath+"popup/"+keyProdukt+".jpg";
				oElem.parentNode.id= "aProdukt_PopUp_"+keyProdukt;
				oElem.parentNode.id= "aProdukt_PopUp_"+keyProdukt;
			}

		}
		
	}
}
function news2FancyBox() {
	var args =news2FancyBox.arguments;
	openFancyBox(args[0]);
}
function switch_event_stoerer() {
	var args = switch_event_stoerer.arguments;
	var oNode = new Array();
	oNode['img_stoerer'] = args[1];
	if ((oNode['event_stoerer'] = document.getElementById(args[0])) != null) {
		oNode['event_stoerer'].src = args[2];			
		setOpacity(document.getElementById('stoerer'),args[3]);
		if ((oNode['blog_stoerer'] = document.getElementById('blogstoerer')) != null) {
				oNode['blog_stoerer'].style.display= ((args[3] == 100)?"none":"block");
		}
		
/*		
	opacity:0.60;
	filter:alpha(opacity=60);		
*/	
	}
}
function setOpacity() {
	var args = setOpacity.arguments;
	args[0].style.opacity = args[1]/100;
	args[0].style.filter = 'alpha(opacity=' + args[1] + ')';
}
function initFade() {
	var args = initFade.arguments;
	for (var i=0;i<11;i++)
		setTimeout('setOpacity('+document.getElementById('stoerer')+','+i*10+')',100*i);
	return false;
}


