

SpOnENV_FlashvideoPopupParams  = 'width=769,height=489,scrollbars=no,resizable=no,screenX=150,screenY=100';
SpOnENV_FlashPopupParams  = 'scrollbars=no,screenX=150,screenY=100';
SpOnENV_PopTopPopupParams = 'width=500,height=310,resizable,screenX=150,screenY=100,status=no';
SpOnENV_PdfPopupParams    = 'width=600,height=550,scrollbars=no,screenX=150,screenY=100,resizable';
SpOnENV_BigaPopupParams_0   = '';
SpOnENV_BigaPopupParams_1   = '';
SpOnENV_BigaPopupParams_2   = '';
SpOnENV_BigaPopupParams_3   = '';
SpOnENV_BigaPopupParams     = '';
function goURL(frmlrname){
adresse = document.forms[frmlrname].to.options[document.forms[frmlrname].to.selectedIndex].value;
if(adresse=="") adresse = "javascript:void(0)";
if(adresse.substr(0,1) == '/') adresse = SpOnENV_SERVER + adresse;
window.location = adresse;
}

function RandomImg (Pfad,aBilder,Ext){
if (typeof(Ext)=='undefined')Ext = "";
if (Pfad =="img"){
Pfad = SpOnENV_SERVER_IMG + "/img/0,1020,";
if(Ext!="") Ext = ",00" + Ext;
} else {
Pfad = SpOnENV_SERVER_IMG + "/static/img/" + Pfad;
}
return Pfad + aBilder[Math.round(Math.random()*(aBilder.length-1))] + Ext;
}







function spIsThisBrowserMobileClient() {
return spIsMobileClient(navigator.userAgent);
}
function spRedirectIfMobileClient() {
try {
if (spIsThisBrowserMobileClient()) {
if (document.location.href.indexOf('nomobile') != -1) {
document.cookie='nomobile';
return;
}
if (document.cookie && document.cookie.indexOf('nomobile') != -1)
return;
document.location.href="http://mobil.spiegel.de?redirect=1";
}
}
catch (e) {
}
}
function spGetHashParams() {
var loc=(document.location+"");
var pos=loc.indexOf("#");
if (pos == -1)
return [];
var hashQs=loc.substring(pos+1, loc.length);
return spSplitParams(hashQs);
}
function spSplitParams(params) {
var result=[];
var pairs=params.split("&");
for (var i=0; i < pairs.length; i++) {
var kv=pairs[i].split("=");
if (kv.length == 2)
result[kv[0]]=kv[1];
}
return result;
}
function spShowOASPos(pos) {
return false;
}
function OAS_RICH(pos) {
spShowOASPos(pos);
}
var spPopupRestoreBy = new Array(0,0);
function spPopupResize(width,height) {
spPopupRestoreBy[0] -= width;
spPopupRestoreBy[1] -= height;
top.resizeBy(width, height);
return false;
}
function spPopupRestore() {
top.resizeBy(spPopupRestoreBy[0],spPopupRestoreBy[1]);
return false;
}
function spCounter(url) {
if (typeof(spon_vdz_countframe) != 'undefined') spon_vdz_countframe.location.href = SpOnENV_SERVER + url;
}
function spCounterFlash(flashid) {
spCounter('/flash/flash-' + flashid + '-count.html');
}
function spCounterGallery(galleryid) {
spCounter('/fotostrecke/fotostrecke-' + galleryid + '-count.html');
}
function spCounterContentainer(contentainerid) {
spCounter('/count/contentainer/0,,' + contentainerid + ',00.html');
}
function spFramebuster() {
if (top!=self) {
top.location.href=self.location.href;
}
}




function spBoerseShowChart(index) {
if(document.images){
document.boerseTab.src = aTabImg[index].src;
document.boerseChart.src = aChart[index].src;
}
}









function spToggleMPC(cid,nr) {
for (i=1;i<=50;i++) {
var mytab = document.getElementById('spMPCTab-'+cid+'-'+i);
if (mytab) {
if (nr == i) {
mytab.className = 'spMPCTab spMPCTabAktiv';
document.getElementById('spMPCContent-'+cid+'-'+i).style.display = 'block';
spCounterContentainer(cid);
} else {
mytab.className = 'spMPCTab';
document.getElementById('spMPCContent-'+cid+'-'+i).style.display = 'none';
}
} else {
break;
}
}
}







function spShowCenterGallery(gid,nr) {
for (i=1;i<=3;i++) {
var mypic = document.getElementById('spCenterGalleryPic-'+gid+'-'+i);
if (mypic) {
if (nr == i) {
document.getElementById('spCenterGalleryPic-'+gid+'-'+i).style.display = 'inline';
document.getElementById('spCenterGalleryControl-'+gid+'-'+i).className = 'spCenterGalleryControl spActive';
spCounterGallery(gid);
} else {
document.getElementById('spCenterGalleryPic-'+gid+'-'+i).style.display = 'none';
document.getElementById('spCenterGalleryControl-'+gid+'-'+i).className = 'spCenterGalleryControl';
}
} else {
break;
}
}
}
var spEmStepWidth 	= 0.125;	// increase/decrease font every step by spEmStepWidth
var spEmBasis 		= 0.875;		// font size of spArticleBody at startup
//var spEmBasis 		= 1;		// font size of spArticleBody at startup
var spEmStep 		= -1;		// counter for current step (leave as 0)
var spEmMaxSteps 	= 1;		// maximum steps alowed
/**
* spFontSizer increase/decrease font size inside "spEmStep"
*
* use: spFontSizer(1, false), spFontSizer(-1, false) or spFontSizer(0, true)
* @param spInc set to 1 or -1
* @param spReset set to true to get initial font size
*/
function spFontSizer(spInc, spReset) {
// reset font size
if (spReset)
spEmStep = -1;
// inside allowed steps?
if (Math.abs(spEmStep + spInc) <= spEmMaxSteps) {
// increase/decrease spEmStep
spEmStep += spInc;
// set new font size for every tag inside "spEmStep"
spEmFontSize = spEmStep * spEmStepWidth + spEmBasis;
//get spArticleBody
spEmBody = document.getElementById('spMainContent');
//		spEmBody = document.getElementsByTagName('body')[0];
// set new fot size
spEmBody.style.fontSize = spEmFontSize + "em";
}
if (spEmStep == -spEmMaxSteps) {
document.getElementById("spFontsizeMinus").src = "/static/sys/v8/icons/spFontsizeMinus_lo.jpg";
}
else if (spEmStep == spEmMaxSteps) {
document.getElementById("spFontsizePlus").src = "/static/sys/v8/icons/spFontsizePlus_lo.jpg";
}
else {
document.getElementById("spFontsizePlus").src = "/static/sys/v8/icons/spFontsizePlus.jpg";
document.getElementById("spFontsizeMinus").src = "/static/sys/v8/icons/spFontsizeMinus.jpg";
}
}
/******* Social Bookmarking functions ******/
/**
* toggles SocialBookmark-Box on and off
* @param spDisplay - ture=on, false=off
*/
function spSocialBookmarkSetDisplay(spDisplay) {
spSocialBookmarkElement = document.getElementById("spSocialBookmark").style;
spSocialBookmarkElement.visibility = (spDisplay ? "visible" : "hidden");
spSocialBookmarkState=spDisplay;
}
/**
* toggle function called form Bookmark Link
* served spSocialBookmarkSetDisplay() and starts EventHandler
*/
function spSocialBookmarkToggle() {
if (!spSocialBookmarkState) {
spSocialBookmarkSetDisplay(true);
spStartMouseEvent();
}
else
spSocialBookmarkSetDisplay(false);
}
/**
* Event handler function tests where the user clicked
* and acts	according to this (switch SocialBookmark-Box off
* stops EventHandler)
*/
function spSocialBookmarkToggleDisplay(e) {
if (!e) var e = window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) // defeat Safari bug
targ = targ.parentNode;
if (targ.id == "spSocialBookmarkLink") {
spStopMouseEvent();
return false;
}
var isInDiv = false;
while(targ != null) {
if (targ.id == "spSocialBookmark") {
isInDiv=true;
break;
}
if (targ.id == "spSocialBookmarkClose")
break;
targ = targ.parentNode;
}
if (!isInDiv) {
spSocialBookmarkSetDisplay(false);
spStopMouseEvent();
}
return false;
}
/**
* starts EventHandling
*/
function spStartMouseEvent(){
if (document.addEventListener) { // DOM Level 2 Event Model
document.addEventListener("mouseup", spSocialBookmarkToggleDisplay, true);
}
else if (document.attachEvent) { // IE 5+ Event Model
document.attachEvent("onmouseup", spSocialBookmarkToggleDisplay);
}
else { // IE 4 Event Model
document.onmouseup=spSocialBookmarkToggleDisplay;
}
}
/**
* stops EventHandling
* spOldHandler is a hack for EI4 Event Model
*/
var spOldHandler = document.onmouseup;	// Eventhandler for EI 4 StopEvent
function spStopMouseEvent() {
// Unregister the capturing event handlers.
if (document.removeEventListener) { // DOM Event Model
document.removeEventListener("mouseup", spSocialBookmarkToggleDisplay, true);
}
else if (document.detachEvent) { // IE 5+ Event Model
document.detachEvent("onmouseup", spSocialBookmarkToggleDisplay);
}
else { // IE 4 Event Model
document.onmouseup = spOldHandler;
}
}
function spInArray(haystack, needle) {
for (var i in haystack) {
if (haystack[i] == needle)
return true;
}
return false;
}
var spArticleId;
function spBackToArticleHash(elemnt) {
if (typeof spArticleId != "undefined" && !isNaN(spArticleId)) {
if (elemnt.nodeName == "A" && elemnt.href != null)
elemnt.href +="#backToArticle=" + spArticleId;
}
return true;
}
function spBackToThisArticleHash(elemnt,articleid) {
if (elemnt.nodeName == "A" && elemnt.href != null) elemnt.href +="#backToArticle=" + articleid;
return true;
}
var spTmpImgSetToLoad;
// Muss ausserhalb des spEnhPaginators stehen, da per timeout aufgerufen...
function spLoadDeferImgSet(prefix) {
for (var i=0; i < spTmpImgSetToLoad.length; i++) {
var imgElement=document.getElementById(prefix + i);
if (imgElement != null)
imgElement.src = spTmpImgSetToLoad[i];
}
}
var spEnhPaginator = function(paginatorId, imageSets) {
this.pages=[];
this.controls=[];
this.imageSets=imageSets;
this.completedImageSets=(imageSets != null) ? new Array(imageSets.length) : null;
this.index=0;
this.paginatorId=paginatorId;
this.imageSetToLoad=null;
this.currentPage=null;
this.currentControl=null;
this.initDone=false;
this.onChangePage=null;
}
spEnhPaginator.prototype = {
checkInit: function() {
if (!this.initDone) {
var container=document.getElementById(this.paginatorId);
var pagesTmp=container.getElementsByTagName('DIV');
for (key=0; key < pagesTmp.length; key++) {
if (pagesTmp[key].className == 'spPaginatorPage') {
this.pages.push(pagesTmp[key]);
}
if (pagesTmp[key].className == 'spPaginatorControl' || pagesTmp[key].className == 'spPaginatorControl spActive') {
this.controls.push(pagesTmp[key]);
}
}
this.currentPage=this.pages[this.index];
this.currentControl=this.controls[this.index];
this.initDone=true;
}
},
showNext: function(element) {
this.checkInit();
var oldIndex = this.index++;
if (this.index >= this.pages.length)
this.index = 0;
if (this.onChangePage != null)
this.onChangePage(this.pages[oldIndex]);
this.switchToNewIndex();
},
showPrev: function(element) {
this.checkInit();
var oldIndex = this.index--;
if (this.index < 0)
this.index = this.pages.length - 1;
if (this.onChangePage != null)
this.onChangePage(this.pages[oldIndex]);
this.switchToNewIndex();
},
showNum: function(element) {
this.checkInit();
var oldIndex = this.index;
this.index = arguments[0];
if (this.index < 0)
this.index = this.pages.length - 1;
if (this.onChangePage != null)
this.onChangePage(this.pages[oldIndex]);
this.switchToNewIndex();
},
switchToNewIndex: function(newPage) {
this.currentPage.style.display='none';
if (this.currentControl != null)
this.currentControl.className = 'spPaginatorControl';
this.currentPage=this.pages[this.index];
this.currentControl=this.controls[this.index];
this.currentPage.style.display='block';
if (this.currentControl != null)
this.currentControl.className = 'spPaginatorControl spActive';
this.checkLoadImages();
},
checkLoadImages: function() {
if (this.imageSets != null) {
var imageSetIndex=this.index-1;
if (this.imageSets[imageSetIndex] != null && !this.completedImageSets[imageSetIndex]) {
spTmpImgSetToLoad=this.imageSets[imageSetIndex];
window.setTimeout("spLoadDeferImgSet('" + this.paginatorId + imageSetIndex + "')", 20);
this.completedImageSets[imageSetIndex]=true;
}
}
}
}
function spVideoGet(videoId) {
if (navigator.appName.indexOf("Microsoft") != -1)
return window[videoId];
else
return document[videoId];
}
function spVpPaginatorOnChangePage(element) {
if (element == null || element.childNodes == null || element.childNodes.length == 0)
return;
var node=element.firstChild;
while (node != null) {
if (node.nodeName.toUpperCase() == "OBJECT") {
var v=spVideoGet(node.id);
if (v != null) {
try {
v.stopVideo();
return;
}
catch(e) {
}
}
}
else if (node.childNodes != null && node.childNodes.length > 0)
spVpPaginatorOnChangePage(node);
node=node.nextSibling;
}
}
function spMainNaviInit() {
if (document.all && document.getElementById) {
var spNavContainer = document.getElementById("spNaviChannel");
var spNavis = spNavContainer.getElementsByTagName('ul');
for (var i in spNavis) {
var ul = spNavis[i];
// wenn 2. Ebene, ...
if (ul.nodeName == 'UL' && ul.className == 'spNaviLevel1') {
var spNavItems = spNavContainer.getElementsByTagName('li');
for (var j in spNavItems) {
var li = spNavItems[j];
//...dann 3. Ebene einblenden, falls vorhanden
if (li.nodeName == 'LI' && li.className.indexOf('spNaviSubNavigation') > -1) {
li.onmouseover = function() {
// lazy initialization
if (! this.spSubNav) {
var spSubNavTmp = this.getElementsByTagName('ul')[0];
if (spSubNavTmp && spSubNavTmp.nodeName == 'UL' && spSubNavTmp.className == 'spNaviLevel2')
this.spSubNav = spSubNavTmp;
}
if (this.spSubNav) {
this.spSubNav.style.display = "block";
}
}
li.onmouseout = function() {
// lazy initialization
if (! this.spSubNav) {
var spSubNavTmp = this.getElementsByTagName('ul')[0];
if (spSubNavTmp && spSubNavTmp.nodeName == 'UL' && spSubNavTmp.className == 'spNaviLevel2')
this.spSubNav = spSubNavTmp;
}
if (this.spSubNav)
this.spSubNav.style.display = "none";
}
}
}
}
}
}
}
var spCalendar = function(initDate, startDate, endDate, contentainer) {
this.initDate=initDate;
if (contentainer != null)
this.contentainerObject=document.getElementById(contentainer);
this.months=new Array("Januar", "Februar", "M&auml;rz", "April", "Mai", "Juni", "Juli","August", "September", "Oktober", "November", "Dezember");
this.weekDays=new Array("Mo", "Di", "Mi", "Do", "Fr", "Sa", "So");
this.year=null;
this.month=null;
this.day=null;
this.date=null;
this.startDate=startDate;
this.endDate=endDate;
}
spCalendar.prototype = {
init: function() {
if (this.isDateValid(this.initDate)) {
year=this.initDate.substring(0,4);
month=this.initDate.substring(4,6);
day=this.initDate.substring(6,8);
this.date=new Date(year, month - 1, day);
}
else {
this.date=new Date();
}
},
isDateValid: function(date) {
return (date != null && date != "" && !isNaN(date) &&	date.length == 8);
},
prepare: function() {
if (this.date != null) {
this.year=this.date.getFullYear();
this.month=this.date.getMonth()+1;
this.day=this.date.getDate();
}
},
draw: function() {
if (this.contentainerObject != null) {
this.prepare();
// Start Day of Calendar
var tmpDate=this.date;
tmpDate.setDate(1);
var firstDayOfMonth = tmpDate.getDay();
if (firstDayOfMonth > 0)
firstDayOfMonth--;
else
firstDayOfMonth=6;
var daysInMonth = 31;
if (this.month == 4 || this.month == 6 || this.month == 9 || this.month == 11)
--daysInMonth;
if (this.month == 2) {
daysInMonth = daysInMonth - 3;
if (this.year % 4 == 0)
daysInMonth++;
if (this.year % 100 == 0)
daysInMonth--;
if (this.year % 400 == 0)
daysInMonth++;
}
var table="";
table+="<div id=\"spCalenderHead\"><p>DAS SEITE-2-ARCHIV</p>";
table+="<table cellpadding=\"0\" cellspacing=\"0\">";
table+="<tr>";
if (this.hasPrevMonth())
table+="<td width=\"40\"><a href=\"javascript:void(0)\" id=\"spBtnBack\"><img src=\"/static/sys/v8/icons/pfeil-links-aktiv.jpg\" /></a></td>";
else
table+="<td width=\"40\"><img src=\"/static/sys/v8/icons/pfeil-links-inaktiv.jpg\" /></td>";
table+="<td width=\"202\">" + this.months[this.month-1] + " " + this.year + "</td>";
if (this.hasNextMonth())
table+="<td width=\"40\"><a href=\"javascript:void(0)\" id=\"spBtnNext\"><img src=\"/static/sys/v8/icons/pfeil-rechts-aktiv.jpg\" /></a></td>";
else
table+="<td width=\"40\"><img src=\"/static/sys/v8/icons/pfeil-rechts-inaktiv.jpg\" /></td>";
table+="</tr>";
table+="</table></div>";
table+="<table cellpadding=\"0\" cellspacing=\"0\" id=\"spCalender\">";
table+="<tr>";
for (var i = 0; i <= 6; i++) {
table+="<td><span>";
table+=this.weekDays[i];
table+="</span></td>";
}
table+="</tr>";
var dayCount=1;
//Rows
for (var i = 0; i <= 5; i++) {
if (dayCount <= daysInMonth) {
table+="<tr>";
// Columns
for (var j = 0; j <= 6; j++) {
if ((i == 0) && (j < firstDayOfMonth)) {
table+="<td>&nbsp;</td>";
}
else {
if (dayCount > daysInMonth) {
table+="<td>&nbsp;</td>";
}
else {
var dateString=this.year+""+(this.month < 10 ? "0"+this.month:this.month)+""+(dayCount<10?"0"+dayCount:dayCount);
var drawLink=false;
var today=false;
if (dateString == this.initDate)
today=true;
if (dateString != this.initDate) {
if (this.isDateValid(this.startDate) && this.isDateValid(this.endDate)) {
if (parseInt(dateString) >= parseInt(this.startDate) &&
parseInt(dateString) <= parseInt(this.endDate))
drawLink=true;
//alert(dateString + ">" + this.startDate +"n" + dateString + "<" + this.endDate);
}
else if (this.isDateValid(this.startDate)) {
if (parseInt(dateString) >= parseInt(this.startDate)) {
drawLink=true;
}
}
else if (this.isDateValid(this.endDate)) {
if (parseInt(dateString) < parseInt(this.endDate)) {
drawLink=true;
}
}
}
if (today)
table+="<td class=\"spActive\">" + dayCount + "</td>";
else if (this.endDate == dateString)
table+="<td><a href=\"/home/seite2/index.html\">" + dayCount + "</a></td>";
else if (drawLink)
table+="<td><a href=\"/home/seite2/archiv-"+dateString+".html\">" + dayCount + "</a></td>";
else
table+="<td>" + dayCount + "</td>";
dayCount++;
}
}
}
table+="</tr>";
}
}
table+="</table>";
this.contentainerObject.innerHTML=table;
var object=this;
var btnNext=document.getElementById("spBtnNext");
if (btnNext != null) {
btnNext.onclick=function() {
object.incMonth();
}
}
var btnBack=document.getElementById("spBtnBack");
if (btnBack != null) {
btnBack.onclick=function() {
object.decMonth();
}
}
}
},
incMonth: function() {
this.date.setMonth(this.date.getMonth()+1);
this.draw();
},
decMonth: function() {
this.date.setMonth(this.date.getMonth()-1);
this.draw();
},
hasPrevMonth: function() {
if (this.isDateValid(this.startDate)) {
var sd=this.startDate.substring(0,6);
var m=this.date.getMonth()+1;
m=m < 10 ? "0"+m:m;
var nd=this.date.getFullYear()+""+m;
return (parseInt(sd) < parseInt(nd))
}
return true;
},
hasNextMonth: function() {
if (this.isDateValid(this.endDate)) {
var sd=this.endDate.substring(0,6);
var m=this.date.getMonth()+1;
m=m < 10 ? "0"+m:m;
var nd=this.date.getFullYear()+""+m;
return (parseInt(sd) > parseInt(nd))
}
return true;
},
getNextDayLink: function() {
if (this.isDateValid(this.initDate) && this.isDateValid(this.endDate)) {
if (this.initDate < this.endDate) {
var tmp=new Date(this.date);
tmp.setDate(tmp.getDate()+1);
var m=tmp.getMonth()+1;
var d=tmp.getDate();
return tmp.getFullYear()+""+(m<10?"0"+m:m)+""+(d<10?"0"+d:d);
}
}
return "";
},
getLastDayLink:function() {
if (this.isDateValid(this.initDate) && this.isDateValid(this.startDate)) {
if (this.initDate > this.startDate) {
var tmp=new Date(this.date);
tmp.setDate(tmp.getDate()-1)
var m=tmp.getMonth()+1;
var d=tmp.getDate();
return tmp.getFullYear()+""+(m<10?"0"+m:m)+""+(d<10?"0"+d:d);
}
}
return "";
}
}
function spFlashDetectInit(){
if(!document.getElementById('spFlashDetectInitScript')){
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
if(isIE && isWin && !isOpera){
document.write('<scr'+'ipt id="spFlashDetectInitScript" type="text/vbscript">\n');
document.write('Function spGetSwfVer(i)\n');
document.write('on error resume next\n');
document.write('Dim swControl, swVersion\n');
document.write('swVersion = 0\n');
document.write('set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n');
document.write('if (IsObject(swControl)) then\n');
document.write('swVersion = swControl.GetVariable("$version")\n');
document.write('end if\n');
document.write('spGetSwfVer = swVersion\n');
document.write('End Function\n');
document.write('<\/scr'+'ipt>\n');
document.write('\n');
} else {
document.write('<scr'+'ipt id="spFlashDetectInitScript" type="text/javascript">\n');
document.write('function spGetSwfVer(i)\n');
document.write('{\n');
document.write('if (navigator.plugins != null && navigator.plugins.length > 0) {\n');
document.write('if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {\n');
document.write('var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";\n');
document.write('var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;\n');
document.write('descArray = flashDescription.split(" ");\n');
document.write('tempArrayMajor = descArray[2].split(".");\n');
document.write('versionMajor = tempArrayMajor[0];\n');
document.write('versionMinor = tempArrayMajor[1];\n');
document.write('if ( descArray[3] != "" ) {tempArrayMinor = descArray[3].split("r");} else {tempArrayMinor = descArray[4].split("r");}\n');
document.write('versionRevision=tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;\n');
document.write('// variable flashVer zusammensetzen -> analog zu ie\n');
document.write('flashVer="x " + versionMajor + "," + versionMinor + "," + versionRevision;\n');
document.write('} else {\n');
document.write('flashVer=-1;\n');
document.write('}\n');
document.write('}\n');
document.write('// MSN/WebTV 2.6 supports Flash 4\n');
document.write('else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;\n');
document.write('// WebTV 2.5 supports Flash 3\n');
document.write('else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;\n');
document.write('// older WebTV supports Flash 2\n');
document.write('else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;\n');
document.write('// Can\'t detect in all other cases\n');
document.write('else {flashVer = -1;}\n');
document.write('return flashVer;\n');
document.write('}\n');
document.write('<\/scr'+'ipt>\n');
document.write('\n');
}
}
}
function spFlashDetect(reqMajorVer, reqMinorVer, reqRevision)
{
var reqVer = parseFloat(reqMajorVer + "." + reqRevision);
// loop backwards through the versions until we find the newest version
for (var i=25;i>0;i--) {
versionStr = spGetSwfVer(i);
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
var versionArray = new Array();
var tempArray   = versionStr.split(" ");
var tempString  = tempArray[1];
versionArray    = tempString .split(",");
var versionMajor    = versionArray[0];
var versionMinor    = versionArray[1];
var versionRevision = versionArray[2];
var versionString   = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
var versionNum      = parseFloat(versionString);
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
return true;
} else {
return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );
}
}
}
}
function spLoadFlashvideo3(videoid, flashvars, divelement){
var divs = divelement.getElementsByTagName('DIV');
for (key=0; key < divs.length; key++) {
eval('spLoadFlashvideoElement'+divs[key].className+' = divs[key]');
}
try {
var params=spGetHashParams();
var oasVideoBelegung=params["oas.videobelegung"];
if (oasVideoBelegung != null)
flashvars=flashvars.replace(/FlashVars_category=\w*/gi, "FlashVars_category=" + oasVideoBelegung);
}
catch(e) {
}
if(document.getElementById){
flashvars += '&FlashVars_JS_setOAS_timeseen_url=spOasSetTimeseenUrl&FlashVars_JS_OAS_timeseen=spOasSetCurrentTimeseen&FlashVars_JS_OAS_reminder=spOasSetReminder&FlashVars_JS_showFlashDiv=spShowHiddenFlashplayerDiv2';
if ( spFlashDetect(8,0,0) ) {
spLoadFlashvideoElementspFlashvideoMovie.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+videoid+'" width="180" height="155">\n<param name="movie" value="http://www.spiegel.de/static/flash/flashvideo/180-all-010.swf" />\n<param name="quality" value="high" />\n<param name="bgcolor" value="#f2f2f2" />\n<param name="menu" value="false" />\n<param name="allowScriptAccess" value="always" />\n<param name="wmode" value="transparent" />\n<param name="FlashVars" value="'+flashvars+'" />\n<embed src="http://www.spiegel.de/static/flash/flashvideo/180-all-010.swf" name="'+videoid+'" type="application/x-shockwave-flash" width="180" height="155" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" bgcolor="#f2f2f2" menu="false" allowScriptAccess="always" wmode="transparent" FlashVars="'+flashvars+'"><\/embed>\n<\/object>\n';
spShowHiddenFlashplayerDiv2('');
} else {
spLoadFlashvideoElementspFlashvideoMovie.innerHTML = '<div style="width:100%;height:149px;padding:3px;background-color:#f0f0f0">\nDer benötigte Flash Player 8 wurde nicht gefunden.<br />\nMögliche Ursachen:<br /><br />\nJavaScript erkennt den Player nicht korrekt.<br />\n<br />\nDer Player ist nicht vorhanden.<br />\n<a href="http://www.macromedia.com/go/getflash/" target="_blank">Jetzt installieren<\/a>\n<\/div>';
spShowHiddenFlashplayerDiv2('');
spLoadFlashvideoElementspFlashvideoPicCredit.style.display = 'none';
}
}
}
function spShowHiddenFlashplayerDiv2(dummyunused){
spLoadFlashvideoElementspFlashvideoMovie.style.zIndex=3;
spLoadFlashvideoElementspFlashvideoPicCredit.style.display = 'none';
spLoadFlashvideoElementspFlashvideoVideoCredit.style.display = 'block';
}
function spOpenFlashvideoPopup(videoid){
var hashParams="";
try {
var params=spGetHashParams();
var oasVideoBelegung=params["oas.videobelegung"];
if (oasVideoBelegung != null)
hashParams="#oas.videobelegung=" + oasVideoBelegung;
}
catch(e) {
}
window.open('http://www.spiegel.de/video/video-'+videoid+'.html' + hashParams, 'SPONflashvideo', SpOnENV_FlashvideoPopupParams).focus();
}
function spOpenVideoCenter(videoid){
var hashParams="";
try {
var params=spGetHashParams();
var oasVideoBelegung=params["oas.videobelegung"];
if (oasVideoBelegung != null)
hashParams="#oas.videobelegung=" + oasVideoBelegung;
}
catch(e) {
}
location.href='http://www.spiegel.de/video/video-'+videoid+'.html' + hashParams;
}
var spOasTimeseenUrl = '';
var spOasCurrentTimeseen = -1;
function spOasSetCurrentTimeseen(seconds) {
spOasCurrentTimeseen = seconds;
}
function spOasSetTimeseenUrl(url) {
spOasTimeseenUrl = url;
}
function spOasSetReminder(html){
if (html == null || html == 'null') {
html = "";
}
document.getElementById('spOasReminder').innerHTML = html;
}
function spOasSetSubchannel(subchannelPlaylistURL, subchannelPlaylistName) {
//	alert('sPU:"'+subchannelPlaylistURL+'"');
if (subchannelPlaylistURL != '') {
if ( spFlashDetect(9,0,0) ) {
var	flashvars = 'FlashVars_lcID=' + spVpLcId + '&FlashVars_subchannelPlaylistURL=' + encodeURI(subchannelPlaylistURL) +'&FlashVars_subchannelPlaylistName=' + encodeURI(subchannelPlaylistName);
document.getElementById('spOasSubchannel').innerHTML  = '<div style="margin: 6px 0;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="spSubChannelPlayer" width="900" height="101">\n<param name="movie" value="/static/flash/flashvideo/centerplayer-subchannel-002.swf" />\n<param name="quality" value="high" />\n<param name="bgcolor" value="#f2f2f2" />\n<param name="menu" value="false" />\n<param name="allowScriptAccess" value="always" />\n<param name="wmode" value="transparent" />\n<param name="FlashVars" value="'+flashvars+'" />\n<embed src="/static/flash/flashvideo/centerplayer-subchannel-002.swf" name="spSubChannelPlayer" type="application/x-shockwave-flash" width="900" height="101" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" bgcolor="#f2f2f2" menu="false" allowScriptAccess="always" wmode="transparent" FlashVars="'+flashvars+'"><\/embed>\n<\/object>\n</div>'; }
} else {
document.getElementById('spOasSubchannel').innerHTML  = '';
}
}
function spOasTimeseenOnunload() {
if (spOasCurrentTimeseen >= 0 && spOasCurrentTimeseen < 999)
{
if (spOasTimeseenUrl)
{
TimeseenPic = new Image();
TimeseenPic.src = spOasTimeseenUrl.replace("\[sekunden.gif\]", spOasCurrentTimeseen + ".gif");
}
}
}
spFlashDetectInit();
function spAutoDbChangeModellMultiInstanz(formularname)
{
var spHerstellerIndex = document.forms[formularname].hersteller.selectedIndex;
var spHersteller = document.forms[formularname].hersteller.options[spHerstellerIndex].text;
if(spHerstellerIndex > 0)
{
document.forms[formularname].typ.length = spHerstellerModelle[spHersteller].length + 1;
document.forms[formularname].typ.options[0].text = "beliebig";
document.forms[formularname].typ.style.color = "#000000";
document.forms[formularname].typ.style.background = "#ffffff";
for (var i = 1; i < spHerstellerModelle[spHersteller].length + 1; i++) {
document.forms[formularname].typ.options[i].text = spHerstellerModelle[spHersteller][i-1];
}
document.forms[formularname].typ.selectedIndex = 0;
} else {
document.forms[formularname].typ.length = 1;
document.forms[formularname].typ.options[0].text = "beliebig";
document.forms[formularname].typ.style.color = "#666666";
document.forms[formularname].typ.style.background = "#f9f9f9";
}
}
function spAutoDbShowResultMultiInstanz(formularname) {
document.forms[formularname].submit();
}
function spAutoDbToggleViewMultiInstanz(formularname)
{
if(document.forms[formularname].spSearchExtended.value == "true") {
document.getElementById("spDivErweiterteSucheCO2"+formularname).style.display = 'none';
document.getElementById("spDivErweiterteSucheZeitraum"+formularname).style.display = 'none';
document.getElementById("spEinblendenSucheErweitert"+formularname).style.display = 'block';
document.getElementById("spEinblendenSucheKompakt"+formularname).style.display = 'none';
document.forms[formularname].spSearchExtended.value = "false";
document.forms[formularname].co2ausstoss.selectedIndex = 0;
document.forms[formularname].zeitraum.selectedIndex = 0;
}
else {
document.getElementById("spDivErweiterteSucheCO2"+formularname).style.display = 'block';
document.getElementById("spDivErweiterteSucheZeitraum"+formularname).style.display = 'block';
document.getElementById("spEinblendenSucheErweitert"+formularname).style.display = 'none';
document.getElementById("spEinblendenSucheKompakt"+formularname).style.display = 'block';
document.forms[formularname].spSearchExtended.value = "true";
}
}
function spAutoDbSetUserParamsMultiInstanz(formularname) {
if(typeof spAutoDbUserSelection_hersteller != 'undefined') {
for (var i = 1; i < document.forms[formularname].hersteller.options.length; i++) {
if(document.forms[formularname].hersteller.options[i].text == spAutoDbUserSelection_hersteller) {
document.forms[formularname].hersteller.selectedIndex = i;
spAutoDbChangeModellMultiInstanz(formularname);
}
}
}
if(typeof spAutoDbUserSelection_typ != 'undefined') {
for (var i = 1; i < document.forms[formularname].typ.options.length; i++) {
if(document.forms[formularname].typ.options[i].text == spAutoDbUserSelection_typ) {
document.forms[formularname].typ.selectedIndex = i;
}
}
}
if(typeof spAutoDbUserSelection_karosserie != 'undefined') {
for (var i = 1; i < document.forms[formularname].karosserie.options.length; i++) {
if(document.forms[formularname].karosserie.options[i].text == spAutoDbUserSelection_karosserie) {
document.forms[formularname].karosserie.selectedIndex = i;
}
}
}
if(typeof spAutoDbUserSelection_suchbegriff != 'undefined') {
document.forms[formularname].suchbegriff.value = spAutoDbUserSelection_suchbegriff;
}
if(typeof spAutoDbUserSelection_co2ausstoss != 'undefined') {
for (var i = 1; i < document.forms[formularname].co2ausstoss.options.length; i++) {
if(document.forms[formularname].co2ausstoss.options[i].text == spAutoDbUserSelection_co2ausstoss) {
document.forms[formularname].co2ausstoss.selectedIndex = i;
}
}
}
if(typeof spAutoDbUserSelection_zeitraum != 'undefined') {
for (var i = 1; i < document.forms[formularname].zeitraum.options.length; i++) {
if(document.forms[formularname].zeitraum.options[i].text == spAutoDbUserSelection_zeitraum) {
document.forms[formularname].zeitraum.selectedIndex = i;
}
}
}
if(typeof spAutoDbUserSelection_extended != 'undefined') {
document.forms[formularname].spSearchExtended.value = spAutoDbUserSelection_extended;
}
}
function spAutoDbInitMultiInstanz(formularname) {
spAutoDbChangeModellMultiInstanz(formularname);
if(document.getElementsByName('spSearchExtended')[0].value == "true") {
document.getElementById("spDivErweiterteSucheCO2"+formularname).style.display = 'block';
document.getElementById("spDivErweiterteSucheZeitraum"+formularname).style.display = 'block';
document.getElementById("spEinblendenSucheErweitert"+formularname).style.display = 'none';
document.getElementById("spEinblendenSucheKompakt"+formularname).style.display = 'block';
}
if(typeof spAutoDbUserSelection_hersteller != 'undefined') {
spAutoDbSetUserParamsMultiInstanz(formularname);
}
}
function spVgWortCount(token, channelid) {
document.write('<div style="display:none;"><img src="http://spiegel.met.vgwort.de/na/'+token+'" width="1" height="1" alt="" align="right" /></div>');
}

