function schliessen(element){document.getElementById(element).innerHTML='';document.getElementById(element).outerHTML='<div id="'+element+'"></div>';}
function oeffnen(element,file,breite,hoehe,name,titlealt){var ausfuehren=1;var type='';var video='';
if (!document.getElementById(element)){ausfuehren=0;alert('show media impossible. please report.');}
nPos=file.indexOf('http://');var file_help=file.substr(nPos+7);
nPos=file_help.indexOf('/');file_help=file_help.substr(0,nPos);
switch(file_help){
case "vimeo.com":
case "www.youtube.com":
case "video.mpora.com":
type='swf';
ausfuehren=0;
break;
default:file.replace('%2E','.');nPos=file.lastIndexOf('.');type=file.substr(nPos+1);break;}
var divhead1='<div id="'+element+'" name="'+element+'" style="position:fixed;left:25px;top:25px;width:'+breite+'px;heigth:'+hoehe+'px;z-index:2000;';
var divhead2='"><div align="right"><span class="closeDIV"><a href="javascript:schliessen(';
var swf='application/x-shockwave-flash';
switch(type){
case "divx":
type='video/divx';
video=1;
var codebase='http://go.divx.com/plugin/DivXBrowserPlugin.cab';
var pluginpage='http://go.divx.com/plugin/download/';
var classid='clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616';
var string=divhead1+divhead2+"'"+element+"'"+')">close[x]</a></span><br><object classid="'+classid+'" width="'+breite+'" height="'+hoehe+'" codebase="'+codebase+'"><param name="previewImage" value="" /><param name="loop" value="true" /><param name="autoPlay" value="true"/><param name="allowContextMenu" value="true"/><param name="src" value="'+file+'"/><embed type="'+type+'" width="'+breite+'" src="'+file+'" height="'+hoehe+'" previewImage="" loop="true" allowContextMenu="true" autoPlay="true" pluginspage="'+pluginpage+'"></embed></object></div></div>';
break;
case "swf":
type=swf;
video=1;
var codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0';
var pluginpage='http://www.macromedia.com/go/getflashplayer';
var classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
var string=divhead1+divhead2+"'"+element+"'"+')">close[x]</a></span><br><object classid="'+classid+'" width="'+breite+'" height="'+hoehe+'" codebase="'+codebase+'"><param name="movie" value="'+file+'"><param name="quality" value="high"><param name="LOOP" value="false"><embed name="embflash" id="embflash" src="'+file+'" quality="high" loop="false" pluginspage="'+pluginpage+'" type="'+type+'" width="'+breite+'" height="'+hoehe+'"></embed></object></div></div>';
break;
case "m4v":
video=1;
ausfuehren=0;
var divhead1='<div id="'+element+'" name="'+element+'" style="position:fixed;left:25px;top:25px;width:'+breite+'px;heigth:'+hoehe+'px;z-index:2000;border-bottom: 1px solid rgb(0,0,0);';
type=swf;
var string=divhead1+divhead2+"'"+element+"'"+')">close[x]</a></span><br><embed src="'+file+'" type="'+type+'" width="'+breite+'" height="'+hoehe+'" allowscriptaccess="always" allowfullscreen="true"></embed></div></div>';
break;
case "jpg":
case "JPG":
type='image/jpg';
var string=divhead1+'cursor:-moz-zoom-out;'+divhead2+"'"+element+"'"+')">close[x]</a></span><br><img src="'+file+'" alt="'+titlealt+'" title="'+titlealt+'" onclick="javascript:schliessen('+"'"+element+"'"+')""  width="'+breite+'" height="'+hoehe+'" border=1 /></div></div>';
break;
default:alert("unknown typ. please report.");ausfuehren=0;break;}
if (ausfuehren==1) {document.getElementById(element).innerHTML=string;}
if (video==1) {pageTracker._trackEvent('Video','Klick',titlealt);}
}
