﻿function insertFlashHeader(flashfile,textfile,language,width,height) {
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" id="');
document.write(flashfile);
document.write('" width="' + width + '" height="' + height + '">');
document.write('<param name="movie" value="' + flashfile + '.swf">');
document.write('<param name="bgcolor" value="#ffffff">');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="quality" value="high">');
document.write('<param name="allowscriptaccess" value="samedomain">');
document.write('<param name=FlashVars value="L=' + language +  '&content=' + textfile + '">');
document.write('<embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" name="');
document.write(flashfile);
document.write('" width="' + width + '" height="' + height + '" src="');
document.write(flashfile);
document.write('.swf" FlashVars="L=' + language +  '&content=' + textfile + '" bgcolor="#D9D3C2" quality="high" allowscriptaccess="samedomain" wmode="transparent">');
document.write('<noembed>');
document.write('</noembed>');
document.write('</embed>');
document.write('</object>');
}


var fontSizeAct = "0";

function fontSizeUp() {
  fsa = parseInt(fontSizeAct);
  if (fsa < 3) {
  fsa += 1;
  fontSizeAct = fsa.toString();
  var fsz = 0.8 + fsa / 10;
  var fszString = fsz.toString();
  document.getElementById('page').style.fontSize = fszString.substr(0,3) + "em";
  document.cookie = 'fontSizeAct=' + fontSizeAct + ';';
  //alert(fsa);
  }
}

function fontSizeDown() {
  fsa = parseInt(fontSizeAct);
  if (fsa > 0) {
  fsa -= 1;
  fontSizeAct = fsa.toString();
  var fsz = 0.8 + fsa / 10;
  var fszString = fsz.toString();
  document.getElementById('page').style.fontSize = fszString.substr(0,3) + "em";
  document.cookie = 'fontSizeAct=' + fontSizeAct + ';';
  //alert(fsa);
  }
}

function setFontSize(size) {
  var fsz = 0.8 + size / 10;
  var fszString = fsz.toString();
  document.getElementById('page').style.fontSize = fszString.substr(0,3) + "em";
  document.cookie = 'fontSizeAct=' + size.toString() + ';';
}


function insertFlashMovie(movie,width,height,title) {
var pfad = 'fileadmin/videos/';
var server = 'http%3A//' + window.location.host + '/';
document.write('<object type="application/x-shockwave-flash" data="' + pfad + 'player_flv_maxi.swf" width="' + width + '" height="' + height + '">');
document.write('<param name="movie" value="' + pfad + 'player_flv_maxi.swf" />');
document.write('<param name="allowFullScreen" value="true" />');
document.write('<param name="FlashVars" value="flv=' + movie + '&amp;title=' + title + '&amp;height=' + height + '&amp;bgcolor1=DBE4F4&amp;bgcolor2=95B6DF&amp;showstop=1&amp;showvolume=1&amp;showtime=2&amp;showfullscreen=1&amp;playercolor=1E4382&amp;loadingcolor=95B6DF&amp;buttonovercolor=95B6DF&amp;sliderovercolor=95B6DF&amp;playeralpha=70&amp;showiconplay=0&amp;iconplaybgcolor=555555&amp;iconplaybgalpha=50&amp;showtitleandstartimage=1&amp;startimage=' + server + pfad + 'start.jpg" />');


document.write('<embed type="application/x-shockwave-flash" name="player_flv_maxi.swf" width="' + width + '" height="' + height + '" ');
document.write('src="' + pfad + 'player_flv_maxi.swf" FlashVars="flv=' + movie + '&amp;title=' + title + '&amp;height=' + height + '&amp;bgcolor1=DBE4F4&amp;bgcolor2=95B6DF&amp;showstop=1&amp;showvolume=1&amp;showtime=2&amp;showfullscreen=1&amp;playercolor=1E4382&amp;loadingcolor=95B6DF&amp;buttonovercolor=95B6DF&amp;sliderovercolor=95B6DF">');
document.write('<noembed>');
document.write('</noembed>');
document.write('</embed>');

document.write('</object>');
}



function externalLinkAnalytics(name) {
	// Punkte durch - ersetzen
	var retval = name.replace(new RegExp( "\\.", "g" ),'-');
	// Gewuenschten Dateinamen bauen
	return '/extern/' + retval + '.html';
}

