SpOnENV_SERVER_IMG = 'http://www.spiegel.de';
SpOnENV_SERVER = 'http://www.spiegel.de';
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 spon_popup(seite,breite,hoehe,scroll,rsize) {
sbars = (scroll==1)? "yes" : "no";
rsize = (rsize==1)? "yes" : "no";
if(seite.substr(0,1) == '/') seite = SpOnENV_SERVER + seite;
var win_name = breite+hoehe;
var win_attr = "menubar=no,location=no,directories=no,toolbar=no,screenX=0,screenY=0";
win_attr += ",width=" + breite + ",height=" + hoehe + ",scrollbars=" + sbars + ",resizable=" + rsize;
sponWin = open(seite,win_name,win_attr);
sponWin.focus();
}
function bilderladen(pfad,bildIds,ext) {
if(document.images) {
if(pfad.indexOf("img")==1) {
pfad = pfad + '0,1020,';
ext = ',00' + ext;
}
if(pfad.substr(0,1) == '/') pfad = SpOnENV_SERVER_IMG + pfad;
var bilder = new Array();
for(i=0;i < bildIds.length;i++) {
bilder[i] = pfad + bildIds[i] + ext;
}
chgImg = new Array();
for(i=0;i < bilder.length;i++) {
chgImg[i] = new Image();
chgImg[i].src = bilder[i];
}
}
}
function bildtausch(imgname,imgnr) {
if(document.images) {
if(imgnr < (chgImg.length)) imgname.src = chgImg[imgnr].src;
}
}
function SPONgetCookie (name)
{
function SPONgetCookieVal (offset)
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return SPONgetCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
var spMobileClients=[
"midp",
"240x320",
"blackberry",
"netfront",
"nokia",
"panasonic",
"portalmmm",
"sharp",
"sie-",
"sonyericsson",
"symbian",
"windows ce",
"benq",
"mda",
"mot-",
"opera mini",
"philips",
"pocket pc",
"sagem",
"samsung",
"sda",
"sgh-",
"vodafone",
"xda"
];
function spIsMobileClient(userAgent) {
try {
userAgent=userAgent.toLowerCase();
for (var i=0; i < spMobileClients.length; i++)
if (userAgent.indexOf(spMobileClients[i]) != -1)
return true;
}
catch (e) { // pssst.
}
return false;
}
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://m.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 spStartseitenlink() {
var ausgabe = '';
if (navigator.userAgent.indexOf("Opera") == -1) {
if (navigator.appName.indexOf("Explorer") != -1){
ausgabe = '<a id="spStartseite" href="http://www.spiegel.de/static/startseite/als_startseite_redirect.html" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.spiegel.de\');" id="spFfsidebar">Startseite<\/a>';
} else if (navigator.userAgent.indexOf("compatible") == -1) {
ausgabe = '<a id="spStartseite" href="javascript:window.open(\'http://www.spiegel.de/static/startseite/anleitung.html\',\'SponStart\',\'width=526,height=660,resizable,screenX=10,screenY=10\').focus();" id="spFfsidebar">Startseite<\/a>';
}
document.write( ausgabe );
}
}
function spBoersenbilderPreload( breite ){
if(document.images){
if (breite == 220) {
var aXName = new Array('dax','tecdax','dow');
} else {
var aXName = new Array('dax','tecdax','dow','nasdaq');
}
aTabImg = new Array();
aChart	= new Array();
for(i=0; i < aXName.length; i++){
aTabImg[i] = new Image(breite,20);
aTabImg[i].src = SpOnENV_SERVER + "/static/boerse/boersenreiter-"+breite+"-"+aXName[i]+".gif";
aChart[i] = new Image (196,91);
aChart[i].src = SpOnENV_SERVER + "/staticgen/boerse/spiegeltrans_"+aXName[i]+".gif";
}
}
}
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) {
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) {
document.write('<div style="display:none;"><img src="http://spiegel.met.vgwort.de/na/'+token+'" width="1" height="1" alt="" align="right" /></div>');
}
/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
//********************************************************************
//
//							Copyright (c) 2008 MindLab GmbH
//										 All rights reserved.
//
//====================================================================
//
// Project		: Spiegel Online
// Filename	 : nm_tr_remote.js
//
//====================================================================
//
/**
* @file
* This script can be used to implement a pixeltracking on your website
*
* @author	 $Felix Engemann$
* @version	$0.0.1$
* @date		 $31.08.2006$
*@listofchanges cha adaption for postbank help-div 2007/09/07
*@listofchanges cha adaption for postbank clientStat tracking Pixelhelp-div 2007/11/13
*@listofchanges cha adaption for postbank clientStat tracking Pixelhelp-div 2007/11/16
*@listofchanges asc generalisation for netmind 4.0 release 2007/12/10
*@listofchanges uha Anpassung Spon, kein Tracking JS, da Tracker Cookie genutzt wird
*/
//
//********************************************************************
//********************************************************************
//config Object
//********************************************************************
function cConfigPixel()
{
//-----------------------------------------------------
// members
//-----------------------------------------------------
//set to true, if you want to get the params automatically
this.m_bAutoparams = true;
//set to true, if you want to send the pixel automatically
this.m_bAutosend = true;
//The protocol to use for getting the pixel, could be either http
//or https
this.m_strPixelProtocol         = location.href.substr(0, location.href.indexOf(":"));
//the servername to get the pixel from (no protocol here, and
//no path here), you can append a port or prepend an authendication
//like: user:passwort@myserver.mydomain.com:12345
//where "user:password@" is the authentication
//      "myserver.mydomain.com" is the fully qualified servername
//      ":12345" is a port-Number
this.m_strPixelServer           = "count.spiegel.de";
//the path to request from the given server, this path could of
//course include CGI-Parameters
//example: "/mywebbug?thisismyparameter=value"
this.m_strPixelPath             = "/nm_trck.gif";
//Send Url by default
this.m_bSendUrl              = true;
//Send Referrer by default
this.m_bSendReferrer         = true;
//Send MetaTags by default
this.m_bSendMetaTags         = true;
//Send Browser Setting, Screen Infos etc.
this.m_bSendTech             = false;
//Send Browser Setting, Screen Infos etc.
this.m_bSendUrlHash              = true;
//--------------------------------------------------------
// metatags to be parsed
//--------------------------------------------------------
this.m_aMetatag = new Array(
"sp.*"
);
//--------------------------------------------------------
// Hasht parameter  to be parsed
//--------------------------------------------------------
this.m_aHashParameter = new Array(
"ref",
"from"
);
} // end class cConfigPixel
//==========================================================
// getAutoParams
//==========================================================
function config_getSendUrlHash () {
return this.m_bSendUrlHash;
}
//==========================================================
// getAutoParams
//==========================================================
function config_getAutoParams () {
return this.m_bAutoparams;
}
//==========================================================
// getAutoSend
//==========================================================
function config_getAutoSend () {
return this.m_bAutosend;
}
//==========================================================
// getPixelUrl
//==========================================================
function config_getPixelUrl () {
return this.m_strPixelProtocol+"://"+this.m_strPixelServer + this.m_strPixelPath;
}
//==========================================================
// getSendUrl
//==========================================================
function config_getSendUrl () {
return this.m_bSendUrl;
}
//==========================================================
// getSendReferrer
//==========================================================
function config_getSendReferrer () {
return this.m_bSendReferrer;
}
//==========================================================
// getSendMetatags
//==========================================================
function config_getSendMetatags () {
return this.m_bSendMetaTags;
}
//==========================================================
// getSendTech
//==========================================================
function config_getSendTech () {
return this.m_bSendTech;
}
//==========================================================
//Definition of Prototypes
//==========================================================
//methoden zur Klasse hinzufuegen
cConfigPixel.prototype.getAutoParams 	= config_getAutoParams;
cConfigPixel.prototype.getAutoSend 		= config_getAutoSend;
cConfigPixel.prototype.getPixelUrl 		= config_getPixelUrl;
cConfigPixel.prototype.getSendUrl 		= config_getSendUrl;
cConfigPixel.prototype.getSendUrlHash 	= config_getSendUrlHash;
cConfigPixel.prototype.getSendReferrer 	= config_getSendReferrer;
cConfigPixel.prototype.getSendMetatags 	= config_getSendMetatags;
cConfigPixel.prototype.getSendTech 		= config_getSendTech;
//********************************************************************
//Pixel-Object
//********************************************************************
//Contstructor for Pixel-Object
function cRemotePixel(oConfig)
{
//-----------------------------------------------------
// members
//-----------------------------------------------------
//pixel object constructor
//this.m_oImage = new Image();
this.m_arParameterList = new Array();
this.m_nParameterCount = 0;
this.m_strPixelURL     = oConfig.getPixelUrl();
//Configuration
this.m_oConfig = oConfig;
this.hasMetatagParams = false;
}//end function cRemotePixel()
//==========================================================
//methode fuer Objekt Pixel: Fuegt einen Parameter hinzu
//==========================================================
function remotepixel_addParameter(key, value)
{
arPair = new Array(key, value);
this.m_arParameterList[this.m_nParameterCount] = arPair;
this.m_nParameterCount++;
}//end function pixel_add_parameter()
//==========================================================
//method for object Pixel: add affiliate
//==========================================================
function remotepixel_addAffiliate(name)
{
this.addParameter("affiliate", name)
}//end function remotepixel_addAffiliate(name)
//==========================================================
//method for object Pixel: add url
//==========================================================
function remotepixel_addUrl()
{
this.addParameter("url", document.URL);
}//end function remotepixel_addAffiliate(name)
//==========================================================
//method for object Pixel: add referrer
//==========================================================
function remotepixel_addReferrer()
{
this.addParameter("referrer", document.referrer);
}//end function remotepixel_addAffiliate(name)
//==========================================================
//methode fuer Objekt Pixel: senden des Pixels
//==========================================================
function remotepixel_sendData()
{
strURL = this.m_strPixelURL+"?";
for(i=0; i<this.m_arParameterList.length; i++)
{
if (i>0) strURL += "&";
strURL += escape(this.m_arParameterList[i][0])+"="+escape(this.m_arParameterList[i][1]);
}//end for(i=0; i<this.m_arParameterList.length; i++)
//now set URL on Pixel
if (this.hasMetatagParams) {
var oTrackingImg = new Image();
oTrackingImg.src = strURL;
}
}//end function remotepixel_sendData()
//==========================================================
//methode fuer Objekt Pixel: auslesen der techdaten
//==========================================================
function remotepixel_getTechData () {
//--------------------------------------------------------
// variables for general settings
//--------------------------------------------------------
var javaOK		= "unknown";
var cookiesOK = "unknown";
var browsLang = "unknown";
var availheight = screen.availHeight;
var availwidth	= screen.availWidth;
var colordepth	= screen.colorDepth + " bit";
var height			= screen.height;
var width			 = screen.width;
var title			 = document.title;
//--------------------------------------------------------
// variables for plugins
//--------------------------------------------------------
var flashPlugin		 = "-";
var flashVersion		= "0";
var directorPlugin	= "-";
var wmplayerPlugin	= "-";
var realplayerPlugin= "-";
var quicktimePlugin = "-";
var adobe_svgPlugin = "-";
var adobe_pdfPlugin = "-";
var agt = navigator.userAgent.toLowerCase();
var ie	= (agt.indexOf("msie") != -1);
//accept only higher than MSIE 4
//otherwise the detectIE() function would not work
if(ie) {
ie	= (agt.indexOf("msie 4") == -1) && (agt.indexOf("msie 3") == -1);
}//end if(ie)
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
//--------------------------------------------------------
// Java and Cookies
//--------------------------------------------------------
if (navigator.javaEnabled()==true){javaOK="yes"}else{javaOK="no"}
//--------------------------------------------------------
//-- cookieEnabled only works in MSIE.
//--------------------------------------------------------
if ((navigator.cookieEnabled) && (navigator.cookieEnabled==true)) {cookiesOK="yes"} else {cookiesOK="no"}
//--------------------------------------------------------
// language
//--------------------------------------------------------
if (navigator.language)
browsLang = navigator.language;
//--------------------------------------------------------
// Plugins
//
// SVG and Quicktime are not certified Plugins and cause a warning
// in MSIE 7. Because of this fact those two plugins are not detected.
// - removed WM Player for same reason
//--------------------------------------------------------
if (ie && win) {
directorPlugin = detectIE("SWCtl.SWCtl.1");
flashPlugin = detectIE("ShockwaveFlash.ShockwaveFlash.1");
realplayerPlugin = detectIE("rmocx.RealPlayer G2 Control.1");
//wmplayerPlugin = detectIE("MediaPlayer.MediaPlayer.1");
adobe_pdfPlugin = detectIEAcrobat("Acrobat Reader");
}//end if (ie && win)
else {
nse = "";
for (var i=0;i<navigator.mimeTypes.length;i++)
nse += navigator.mimeTypes[i].type.toLowerCase();
directorPlugin = detectNS(nse, "application/x-director");
flashPlugin = detectNS(nse, "application/x-shockwave-flash");
realplayerPlugin = detectNS(nse, "audio/x-pn-realaudio-plugin");
//wmplayerPlugin = detectNS(nse, "application/x-mplayer2");
adobe_pdfPlugin = detectNS(nse, "application/pdf");
}
//save paramters into pixel
this.addParameter("nm_java", javaOK);
this.addParameter("nm_cookies", cookiesOK);
this.addParameter("nm_screen", width + "x" + height);
this.addParameter("nm_colordepth", colordepth);
this.addParameter("nm_plugin_flash", flashPlugin);
this.addParameter("nm_plugin_director", directorPlugin);
//this.addParameter("nm_plugin_wmplayer", wmplayerPlugin);
this.addParameter("nm_plugin_realplayer", realplayerPlugin);
this.addParameter("nm_plugin_acroread", adobe_pdfPlugin);
this.addParameter("nm_title", title);
}//end function pixel_getTechData ()
//==========================================================
//methode zum Auslesen der metatags
//==========================================================
function remotepixel_getMetTags () {
var aMetatag = this.m_oConfig.m_aMetatag;
//Save metatags to track into pixel-parameter-list. validation with regexp match
var strMetaTags = "";
for (var i = 0; i < document.getElementsByTagName('meta').length; i++) {
for (var j = 0; j < aMetatag.length; j++) {
var re = new RegExp(WildToReg(aMetatag[j]));
if (document.getElementsByTagName('meta')[i].getAttribute('name')) {
if ( document.getElementsByTagName('meta')[i].getAttribute('name').match(re) ) {
this.hasMetatagParams=true;
if (document.getElementsByTagName('meta')[i].getAttribute('content'))
this.addParameter(document.getElementsByTagName('meta')[i].getAttribute('name'), document.getElementsByTagName('meta')[i].getAttribute('content'));
else
this.addParameter(document.getElementsByTagName('meta')[i].getAttribute('name'), "-");
} // end if document.getElementsByTagName('meta')[i].getAttribute('name').match(re
} // end if (document.getElementsByTagName('meta')[i].getAttribute('name'))
}//end for (var j = 0; j < aMetatag.length; j++)
}//end for (var i = 0; i < document.getElementsByTagName('meta').length; i++)
}// end method remotepixel_getMetTag
//==========================================================
//methode zum Auslesen der per Hash angehängten Parameter
//==========================================================
function remotepixel_getHashParameter () {
var aParamList = this.m_oConfig.m_aHashParameter;
var strLoc=(document.location+"");
var nPos=strLoc.indexOf("#");
if (nPos != -1) {
var strHashQs=strLoc.substring(nPos+1, strLoc.length);
aParams =  remotepixel_SplitParams(strHashQs);
//Save metatags to track into pixel-parameter-list. validation with regexp match
var strHashParam = "";
for (var j = 0; j < aParamList.length; j++) {
if ( aParams[aParamList[j]] ) {
this.addParameter(aParamList[j],aParams[aParamList[j]]);
} // end if( aParams[aParamList[j]] )
}//end for (var j = 0; j < aMetatag.length; j++)
} // end if nPos != -1)
}// end method remotepixel_getMetTag
//==========================================================
//remotepixel_SplitParams
//==========================================================
function remotepixel_SplitParams(params) {
var result=[];
var pairs=params.split("&");
for (var i=0; i < pairs.length; i++) {
var kv=pairs[i].split("=");
if (kv[1] && kv[1] != "")
result[kv[0]]=kv[1];
else
result[kv[0]]="-";
}
return result;
}
//==========================================================
//Definition of Prototypes
//==========================================================
//methoden zur Klasse hinzufuegen
cRemotePixel.prototype.addParameter 	= remotepixel_addParameter;
cRemotePixel.prototype.addAffiliate 	= remotepixel_addAffiliate;
cRemotePixel.prototype.addUrl			= remotepixel_addUrl;
cRemotePixel.prototype.addReferrer		= remotepixel_addReferrer;
cRemotePixel.prototype.sendData		 	= remotepixel_sendData;
cRemotePixel.prototype.getTechData		= remotepixel_getTechData;
cRemotePixel.prototype.getMetTags	 	= remotepixel_getMetTags;
cRemotePixel.prototype.getHashParameter	= remotepixel_getHashParameter;
//==========================================================
// Acrobat
//==========================================================
function detectIEAcrobat(name) {
var acrobat=new Object();
if (window.ActiveXObject) {
for (x=2; x<10; x++) {
try {
oAcro=eval("new ActiveXObject('PDF.PdfCtrl."+x+"');");
if (oAcro) {
return 'yes';
}
}
catch(e) {}
}
try {
oAcro4=new ActiveXObject('PDF.PdfCtrl.1');
if (oAcro4) {
return 'yes';
}
}
catch(e) {}
try {
oAcro7=new ActiveXObject('AcroPDF.PDF.1');
if (oAcro7) {
return 'yes';
}
}
catch(e) {}
}
return 'no';
}//end function detectIEAcrobat(name)
//==========================================================
// IE Plugins
//==========================================================
function detectIE(ClassID) {
try {
new ActiveXObject(ClassID);
return 'yes';
}
catch(e) {
return 'no';
}
}//end function detectIE(ClassID)
//==========================================================
// Netscape and Firefox Plugins
//==========================================================
function detectNS(strMimetypes, ClassID) {
if (strMimetypes.indexOf(ClassID) != -1)
if (navigator.mimeTypes[ClassID].enabledPlugin != null)
return 'yes';
return 'no';
}//end function detectNS(strMimetypes, ClassID)
//==========================================================
// Convert Wildcard to RegEx
//==========================================================
function WildToReg(str) {
s = "";
for (i = 0; i < str.length; i++) {
c = str.charAt(i);
switch(c) {
case '*':
s = s + ".*";
break;
case '?':
s = s + ".";
break;
case '(': case ')': case '[': case ']': case '$':
case '^': case '.': case '{': case '}': case '|':
case '\\':
s = s + "\\";
s = s + c;
break;
default:
s = s + c;
break;
}//end switch(c)
}//end for (i = 0; i < str.length; i++)
s =	"^" + s + "$";
return s;
}//end function WildToReg(str)
//==========================================================
//function Pixel-Instanz anlegen
//==========================================================
function doPixelInstance(oEvent) {
oNMConfig      = new cConfigPixel();
oNMRemotePixel = new cRemotePixel(oNMConfig);
//Send PartnerName as parameter?
if(oNMConfig.getAutoParams()) {
//Send Url as parameter?
if (oNMConfig.getSendUrl())
{
oNMRemotePixel.addUrl();
}//end if (SendUrl)
//Send Hash Parameter as parameter?
if (oNMConfig.getSendUrlHash())
{
oNMRemotePixel.getHashParameter();
}//end if (SendUrlHash)
//Send referrer as parameter?
if (oNMConfig.getSendReferrer())
{
oNMRemotePixel.addReferrer();
}//end if (SendReferrer)
if(oNMConfig.getSendMetatags()) {
oNMRemotePixel.getMetTags();
}
if(oNMConfig.getSendTech()) {
oNMRemotePixel.getTechData();
}
} // end autoparams
if(oNMConfig.getAutoSend()) {
oNMRemotePixel.sendData();
}
} // end function doPixelInstance
//======================================================================================
// Load Time Execution
//======================================================================================
//
// Delivered by SpOn
if( window.addEventListener ) {
//alert ("window.addEventListener");
window.addEventListener('load',doPixelInstance,false);
} else if( document.addEventListener ) {
//alert ("document.addEventListener");
document.addEventListener('load',doPixelInstance,false);
} else if (window.attachEvent) {
//alert ("window.attachEvent");
window.attachEvent('onload', doPixelInstance);
}	else if (document.attachEvent) {
//alert ("document.attachEvent");
document.attachEvent('onload', doPixelInstance);
} else {
doPixelInstance("");
}

