/*IMAGEFLOW JS
/ author: 	dominicw
/ last mod: 	20062008
*/
//http://ingwswcms01.eu.boehringer.com/wcms_pm/micardis_edit/com/Home/Expert_View/Expert_Interviews/photoflow_w.swf
var dataprefix = "";
var videoprefix = "";	

var ImageFlowdata = {
	def: {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_Doctor_Sarah_Jarvis.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_video1_dr-sarah-jarvis_klein.jpg",
			galtxt: "",
			title: 'Cardiovascular Disease',
			playTime: '12:00'
	},
	all: {
		"cd1": {	
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_Doctor_Sarah_Jarvis.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_video1_dr-sarah-jarvis_klein.jpg",
			galtxt: "Doctor Sarah Jarvis, United Kingdom",
			title: 'Cardiovascular Disease',
			playTime: '12:00'
		},
		"cd2": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/2_Professor_Peter_Sleight.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_video2_prof-peter-sleight_klein.jpg",
			galtxt: "Professor Peter Sleight, United Kingdom",
			title: 'Cardiovascular Disease',
			playTime: '12:00'
		},
		"cd3": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/3_Professor_Bryan_Williams.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_video3_prof-bryan-williams_klein.jpg",
			galtxt: "Professor Bryan Williams, United Kingdom",
			title: 'Cardiovascular Disease',
			playTime: '12:00'
		},	
		"cd4": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/4_Professor_Salim_Yusuf.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_video4_prof-salim-yusuf_klein.jpg",
			galtxt: "Professor Salim Yusuf, Canada",
			title: 'Cardiovascular Disease',
			playTime: '12:00'
		},
		"ci1": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/1_Professor_Salim_Yusuf.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/2_video1_prof-salim-yusuf_klein.jpg",
			galtxt: "Professor Salim Yusuf, Canada",
			title: 'Clinical Implications',
			playTime: '12:00'
		},
		"ci2": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/2_Professor_Giuseppe_Mancia.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/2_video2_prof-giuseppe-mancia_klein.jpg",
			galtxt: "Professor Giuseppe Mancia, Italy",
			title: 'Clinical Implications',
			playTime: '12:00'
		},
		"ci3": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/3_Professor_Salim_Yusuf.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/2_video3_prof-salim-yusuf_klein.jpg",
			galtxt: "Professor Salim Yusuf, Canada",
			title: 'Clinical Implications',
			playTime: '12:00'
		},
		"ci4": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/4_Professor_Thomas_Unger.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/2_video4_prof-thomas-unger_klein.jpg",
			galtxt: "Professor Thomas Unger, Germany",
			title: 'Clinical Implications',
			playTime: '12:00'
		},
		"it1": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/1_Professor_Bryan_Williams.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/3_video1_prof-bryan-williams_klein.jpg",
			galtxt: "Professor Bryan Williams, United Kingdom",
			title: 'Improved Tolerability',
			playTime: '12:00'
		},
		"it2": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/2_Professor_Thomas_Unger.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/3_video2_prof-thomas-unger_klein.jpg",
			galtxt: "Professor Thomas Unger, Germany",
			title: 'Improved Tolerability',
			playTime: '12:00'
		},
		"it3": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/3_Professor_Salim_Yusuf.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/3_video3_prof-salim-yusuf_klein.jpg",
			galtxt: "Professor Salim Yusuf, Canada",
			title: 'Improved Tolerability',
			playTime: '12:00'
		},
		"ce1": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/4_cost-effectiveness/1_Professor_Bryan_Williams.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/4_cost-effectiveness/4_video1_prof-bryan-williams_klein.jpg",
			galtxt: "Professor Bryan Williams, United Kingdom",
			title: 'Cost Effectiveness',
			playTime: '12:00'
		},
		"ce2": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/4_cost-effectiveness/2_Professor_Michael_Boi_hm.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/4_cost-effectiveness/4_video2_prof-michael-boihm_klein.jpg",
			galtxt: "Professor Michael Böhm, Germany",
			title: 'Cost Effectiveness',
			playTime: '12:00'
		}		
	},
	cd: {
		"cd1": {	
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_Doctor_Sarah_Jarvis.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_video1_dr-sarah-jarvis_klein.jpg",
			galtxt: "New Standard in Cardio and Vascular Protection",
			title: '(Cardivascular Disease)',
			playTime: '12:00'
		},
		"cd2": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/2_Professor_Peter_Sleight.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_video2_prof-peter-sleight_klein.jpg",
			galtxt: "New Standard in Cardio and Vascular Protection",
			title: '(Cardivascular Disease)',
			playTime: '12:00'
		},
		"cd3": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/3_Professor_Bryan_Williams.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_video3_prof-bryan-williams_klein.jpg",
			galtxt: "New Standard in Cardio and Vascular Protection",
			title: '(Cardivascular Disease)',
			playTime: '12:00'
		},	
		"cd4": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/4_Professor_Salim_Yusuf.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/1_cardivascular-disease/1_video4_prof-salim-yusuf_klein.jpg",
			galtxt: "New Standard in Cardio and Vascular Protection",
			title: '(Cardivascular Disease)',
			playTime: '12:00'
		}
	},
	ci: {
		"ci1": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/1_Professor_Salim_Yusuf.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/2_video1_prof-salim-yusuf_klein.jpg",
			galtxt: "Mode of action of NNRTI's",
			title: '(Clinical Implications)',
			playTime: '12:00'
		},
		"ci2": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/2_Professor_Giuseppe_Mancia.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/2_video2_prof-giuseppe-mancia_klein.jpg",
			galtxt: "Mode of action of NNRTI's",
			title: '(Clinical Implications)',
			playTime: '12:00'
		},
		"ci3": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/3_Professor_Salim_Yusuf.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/2_video3_prof-salim-yusuf_klein.jpg",
			galtxt: "Mode of action of NNRTI's",
			title: '(Clinical Implications)',
			playTime: '12:00'
		},
		"ci4": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/4_Professor_Thomas_Unger.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/2_clinical-implications/2_video4_prof-thomas-unger_klein.jpg",
			galtxt: "Mode of action of NNRTI's",
			title: '(Clinical Implications)',
			playTime: '12:00'
		}
	},
	it: {
		"it1": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/1_Professor_Bryan_Williams.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/3_video1_prof-bryan-williams_klein.jpg",
			galtxt: "Mode of action of NNRTI's",
			title: '(Improved Tolerability)',
			playTime: '12:00'
		},
		"it2": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/2_Professor_Thomas_Unger.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/3_video2_prof-thomas-unger_klein.jpg",
			galtxt: "Mode of action of NNRTI's",
			title: '(Improved Tolerability)',
			playTime: '12:00'
		},
		"it3": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/3_Professor_Salim_Yusuf.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/3_improved-tolerability/3_video3_prof-salim-yusuf_klein.jpg",
			galtxt: "Mode of action of NNRTI's",
			title: '(Improved Tolerability)',
			playTime: '12:00'
		}
	},
	ce: {
		"ce1": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/4_cost-effectiveness/1_Professor_Bryan_Williams.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/4_cost-effectiveness/4_video1_prof-bryan-williams_klein.jpg",
			galtxt: "Mode of action of NNRTI's",
			title: '(Cost Effectiveness)',
			playTime: '12:00'
		},
		"ce2": {
			videodata: videoprefix + "/com/Home/Expert_View/Expert_Interviews/4_cost-effectiveness/2_Professor_Michael_Boi_hm.FLV",
			galpic: dataprefix + "/com/Home/Expert_View/Expert_Interviews/4_cost-effectiveness/4_video2_prof-michael-boihm_klein.jpg",
			galtxt: "Mode of action of NNRTI's",
			title: '(Cost Effectiveness)',
			playTime: '12:00'
		}		
	}
}


/* dominicw 090608*/

//lightbox Call ImageFlow
function callImageFlowContent(group, element){ 
	lightbox.create({type:'callback', callback : ImageFlowContent, el : element, gr: group});	
}
function ImageFlowContent(params) {
	
	var myParams = getImageFlowdata(params.gr, params.el);	
	//video-lb braucht anderes HTML
	if(params.gr == 'videos' || params.gr == 'all'){
		var content = 	'<div id="ImageFlowPopup" class="popcontainer large">' +
							'<div class="close clearfix"><a href="#" onclick="lightbox.lb_hide();return false;" class="orange">close window</a></div>' +						
							'<div class="maincontent clearfix">' +
								'<div style="height: 300px;">' +
									'<div id="content" class="clearfix" style="padding-left: 20px;">' +
										'<div id="flashVideo" style="padding-top: 1em;">'+
											'<p>No flash player detected. For optimized usage of this website your browser should support shockwave flash. For downloading see <a href="http://www.macromedia.com/go/getflashplayer" title="Macromedia Flash Player"></a></p>'+
										'</div>' +
									'</div>' +
									'<div id="confirm" style="display: none;">' +
										'<p><strong>Copyright notice</strong></p>' +
										'<p>You are about to download an image. The Boehringer Ingelheim group of companies owns the extensive copyrights for this image. We, as owner of the copyrights, give you the right to download this image and to duplicate, publish and distribute it for your publishing activities as long as the photo bears the attribution "Image: Boehringer Ingelheim GmbH". Publication details and a voucher copy should be sent to us.</p>' +
										'<p>Any kind of changes or partial duplication, publication or distribution of the image are not permitted.</p>' +
										'<div class="clearfix"><a href="#" onclick="lightbox.lb_hide();" id="ok">Download</a><div style="padding-top:5px;"><a href="#main" id="piclink" onclick="denyDownload(); return false;">back</a></div></div>' +
									'</div>' +
								'</div>' +
							'</div>'+
							'<div id="addcontent" class="addcontent">' +
								'<div style="overflow: hidden;">'+
									'<strong>More videos:</strong>' +							
									myVideoselect +									
									'<ul class="slide clearfix">' +
										'<li class="slidebar">' +				
											'<div id="track">' +
												'<div id="handle" class="slidehandle"></div>' +
											'</div>' +
										'</li>' +
									'</ul>' +									
								'</div>' +
							'</div>' +
						'</div>' +
						'<script type="text/javascript" language="javascript">' +
							'var so = new SWFObject("/com/Home/Expert_View/Expert_Interviews/lb_player.swf", "lbflash", "320", "265", "8", "#FFFFFF");' +
							'so.addParam("quality", "low");' +
							'so.addParam("quality","HIGH");' +
							'so.addParam("allowScriptAccess","sameDomain");' +
							'so.addParam("salign", "t");' +
							'so.addParam("scale", "noborder");' +
							'so.addParam("wmode", "transparent");' +
							'so.addVariable("file", "'+myParams.videodata+'");' +
							'so.addVariable("videoinfo", "'+myParams.playTime+'");' +
							'so.addVariable("title", "'+myParams.title+'");' +
							'so.addVariable("autoStart", "true");' +
							'so.write("flashVideo");' +
							'callSliders();' +
						'</script>';
	} else {
		if (params.gr == "R_D"){
			params.gr = "Research Development";
		}
		var content =	'<div id="ImageFlowPopup" class="popcontainer large">' +
							'<div class="close clearfix"><a href="#" onclick="lightbox.lb_hide();return false;"onclick="lightbox.lb_hide();return false;" class="orange">close window</a></div>' +						
							'<div class="maincontent clearfix">' +
								'<div class="whitebg">' +
									'<div id="content" class="clearfix">' +
										'<img src="'+myParams.pic+'" alt="'+myParams.title+'" title="'+myParams.title+'" />' +
										'<div><strong>'+myParams.title+'</strong></div>' +
										'<div>'+myParams.desc+'</div>' +
										'<div>Format: JPG (RGB)</div>' +
										'<div>' +
											'<ul>' +
												'<li><a href="'+myParams.d300+'" onclick="returnDownload(\''+myParams.d300+'\'); return false;">Download 300dpi</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Size: '+myParams.s300+' KB</li>' +
												'<li><a href="'+myParams.d150+'" onclick="returnDownload(\''+myParams.d150+'\'); return false;">Download 150dpi</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Size: '+myParams.s150+' KB</li>' +
											'</ul>' +
										'</div>' +
									'</div>' +
									'<div id="confirm" style="display: none;">' +
										'<p><strong>Copyright notice</strong></p>' +
										'<p>You are about to download an image. The Boehringer Ingelheim group of companies owns the extensive copyrights for this image. We, as owner of the copyrights, give you the right to download this image and to duplicate, publish and distribute it for your publishing activities as long as the photo bears the attribution "Image: Boehringer Ingelheim GmbH". Publication details and a voucher copy should be sent to us.</p>' +
										'<p>Any kind of changes or partial duplication, publication or distribution of the image are not permitted.</p>' +
										'<div class="clearfix"><a href="#" onclick="lightbox.lb_hide();" id="ok">Download</a><div style="padding-top:5px;"><a href="#main" id="piclink" onclick="denyDownload(); return false;">back</a></div></div>' +
									'</div>' +
								'</div>' +
							'</div>'+
							'<div id="addcontent" class="addcontent">' +
								'<div style="overflow: hidden; padding-left: 3px;">'+
									'<strong>More images:</strong>' +							
									myGalselect +
									'<ul class="slide clearfix">' +
										'<li class="slidebar">' +				
											'<div id="track">' +
												'<div id="handle" class="slidehandle"></div>' +
											'</div>' +
										'</li>' +
									'</ul>' +
									'<div class="mediapool">' +
										'<a target="_blank" href="https://mediapool.boehringer-ingelheim.com/index.php?id=16&no_cache=1&tx_mediadb_pi1[mode]=search&tx_mediadb_pi1[SEARCH][activeSearch]=search&tx_mediadb_pi1[SEARCH][swords]='+params.gr+'" onclick="window.open(this.href); return false;"><img src="../../images/mediapool_mini.gif" alt="Media Pool" title="Media Pool" /></a>' +
										'View all images of this category in the <a href="https://mediapool.boehringer-ingelheim.com/index.php?id=16&no_cache=1&tx_mediadb_pi1[mode]=search&tx_mediadb_pi1[SEARCH][activeSearch]=search&tx_mediadb_pi1[SEARCH][swords]='+(params.gr)+'" onclick="window.open(this.href); return false;">media pool</a> website.' +
									'</div>' +
								'</div>' +
							'</div>' +
						'</div>' +
						'<script type="text/javascript" language="javascript">' +
							"callSliders();"+
						'</script>';
	}
	
	return content;
}
function getImageFlowdata(group, element) { 
	return (group in ImageFlowdata && element in ImageFlowdata[group]) ? ImageFlowdata[group][element] : ImageFlowdata.def;		
}
//Links mit Funktion zum Austauschen der ImageFlow Kategorie
function replaceImageFlowContent(){
	$$('ul.videoSelector a').each( function(element) {
		element.onclick = function () {
			element.blur();
			$('videoSelector').childElements().each(function(element) {element.removeClassName('active');});
			
			element.ancestors()[0].addClassName('active');
			$('flashContent').innerHTML = '';
			
			var so = new SWFObject("/com/Home/Expert_View/Expert_Interviews/photoflow_w.swf", "photoflow_w", "480", "288", "8", "#FFFFFF");
					
			so.addParam("quality", "low");
			so.addParam("quality","HIGH");
			so.addParam("allowScriptAccess","sameDomain");
			so.addParam("salign", "t");
			so.addParam("scale", "noborder");
			so.addParam("wmode", "transparent");
			if(element.title == 'R_D'){
				so.addVariable('sliderText', 'Research and Development');			
			} else if(element.title == 'Indication_Areas'){
				so.addVariable('sliderText', 'Indication Areas');
			} else if(element.title == 'Cardiovascular_Disease'){
				so.addVariable('sliderText', '(Cardiovascular Disease)');
			}else if(element.title == 'Clinical_Implications'){
				so.addVariable('sliderText', '(Clinical Implications)');
			}else if(element.title == 'Improved_Tolerability'){
				so.addVariable('sliderText', '(Improved Tolerability)');
			} else if(element.title == 'Cost_Effectiveness'){
				so.addVariable('sliderText', '(Cost Effectiveness)');
			} else {
				so.addVariable('sliderText', element.title);
			}
			so.addVariable('extXML', element.title);
			so.write("flashContent");
			//myGalselect = replaceSliderContent(element.title,element.title);			
			return false;
		}
	});
}
function replaceLightboxContent(group,element) {

	var myParams = getImageFlowdata(group, element);
	
	var tmp = '<div id="content" class="clearfix">' +
				'<img src="'+myParams.pic+'" alt="'+myParams.title+'" title="'+myParams.title+'" />' +
				'<div><strong>'+myParams.title+'</strong></div>' +
				'<div>'+myParams.desc+'</div>' +
				'<div>Format: JPG (RGB)</div>' +
				'<div>' +
					'<ul>' +
						'<li><a href="'+myParams.d300+'" onclick="returnDownload(\''+myParams.d300+'\'); return false;">Download 300dpi</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Size: '+myParams.s300+' KB</li>' +
						'<li><a href="'+myParams.d150+'" onclick="returnDownload(\''+myParams.d150+'\'); return false;">Download 150dpi</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Size: '+myParams.s150+' KB</li>' +
					'</ul>' +
				'</div>' +
			'</div>';
	
	$('content').innerHTML = tmp;
	
}

function replaceLightboxContentVideo(group,element) {
	
	var myParams = getImageFlowdata(group, element);
	
	var so = new SWFObject("/com/Home/Expert_View/Expert_Interviews/lb_player.swf", "lbflash", "320", "265", "8", "#FFFFFF");
	so.addParam("quality", "low");
	so.addParam("quality","HIGH");
	so.addParam("allowScriptAccess","sameDomain");
	so.addParam("salign", "t");
	so.addParam("scale", "noborder");
	so.addParam("wmode", "transparent");
	so.addVariable("file", myParams.videodata);
	so.addVariable("videoinfo", myParams.playTime);
	so.addVariable("title", myParams.title);
	so.addVariable("autoStart", "true");
	so.write("flashVideo");
	
}
//Slider größe bestimmen und initieren
function callSliders() {
	tmp = $('galselect').childElements('li');
	gWidth = (tmp.length * tmp[0].getWidth()+70);
	$('galselect').setStyle({width: gWidth+'px'});
	var callbacks = {
		onSlide: function(value, slider){
			$('galselect').setStyle({'marginLeft': '-'+gWidth*(value/1.2) +'px'})
		},
		onChange: function(value, slider){
			$('galselect').setStyle({'marginLeft': '-'+gWidth*(value/1.2) +'px'})
		}
	}
	new Control.Slider('handle', 'track', {
		onSlide: callbacks.onSlide, onChange: callbacks.onChange
	});
};
//SliderList Inhalt bestimmen, HTML generieren und RETURN
function replaceSliderContent(group,name){
	var insert = ['<ul id="galselect" class="galselect">'];
	var groupObj = ImageFlowdata[group]
	for (name in groupObj) { 
		var data = groupObj[name]
			insert.push('<li><a href="#" id="'+name+'" onclick="replaceLightboxContentVideo(\''+group+'\',\''+name+'\');this.blur();return false;"><img src="'+data.galpic+'" alt="'+data.galtxt+'" /><span>'+data.galtxt+'</span></a><div class="galery">'+data.title+'</div></li>')
	}	
	insert.push('</ul>');	
	return insert.join('');
}

//DownloadLink bereitstellen
function returnDownload(path) {	
	path = "http://www.micardis.com" + path;
	$$('#ImageFlowPopup div#confirm a#ok').each(function (element) { element.onclick = function () {window.open(path, "Download");lightbox.lb_hide(); }});
	$$('#ImageFlowPopup div#content').each(function (element) { element.setStyle({display: 'none'}) });
	$$('#ImageFlowPopup div#confirm').each(function (element) {element.setStyle({display: 'block'}) });	
}
//Toggle Copyright Notice
function denyDownload(href) {
	$$('#ImageFlowPopup div#content').each(function (element) { element.setStyle({display: 'block'}) });
	$$('#ImageFlowPopup div#confirm').each(function (element) { element.setStyle({display: 'none'}) });
}
//galselect image active setzen
function markImage(el){
	$('videoSelector').childElements().each(function(element) {element.removeClassName('active');});
	$(el).up().addClassName('active');	
}

function toAS(el,pos){		
	var movie = window.document.photoflow_w;
	movie.SetVariable("_root.clickPos", pos);
	movie.SetVariable("_root.clicked", "1");
	el.blur();
}

var myVideoselect = replaceSliderContent('all');

