/*Hinweis Urheberrecht
Programmierung, Inhalte, Design und sonstige Bestandteile unterstehen dem Urheberrecht / Copyright (C) by Erotik-Kleinanzeigen.com
Unberechtigte Vervielfältigung, Nutzung, Speicherung, Wiedergabe, Verwendung und/oder Modifizierung ist ausdrücklich untersagt und wird 
in jedem Fall straf- und/oder zivilrechtlich verfolgt. Kopierte Dateien können von uns automatisch ermittelt werden.*/

//Sekunden bis zur Anzeige
xSecond = 5;

//target: blank oder self
var target = 'self'

//Link
var url = 'http://www.erotik-sexsuchmaschine.com';

//schließen Kreuz "close_w.gif = weiss", "close_s.gif = grau/schwarz"
var myClose = 'http://www.erotik-kleinanzeigen.com/banner_werbung/xmas/close_w.gif';

//config top
var tMessage		= '';
var tAlign			= 'center';
var tFontSize		= '15px';
var tFontStyle	= 'italic';
var tFontFamily	= 'arial';
var tFontWeight	= 'bold';
var tColor			= '#ff0';

//config center
var cMessage		= '';
var cAlign			= 'left';
var cFontSize		= '32px';
var cFontStyle	= 'italic';
var cFontFamily	= 'verdana';
var cFontWeight	= 'bold';
var cColor			= '#fff';

//config bottom
var bMessage		= '';
var bAlign			= 'left';
var bFontSize		= '15px';
var bFontStyle	= 'normal';
var bFontFamily	= 'arial';
var bFontWeight	= 'normal';
var bColor			= '#fff';
function xDiv(){
	var body	= document.getElementsByTagName('body')[0];
	var xmas	= document.createElement('div');
	var sxmas	= document.createElement('div');
	var ul		= document.createElement('ul');
	var tLi		= document.createElement('li');
	var cLi		= document.createElement('li');
	var bLi		= document.createElement('li');
	var close	= document.createElement('img');
	var shade	= document.createElement('img');
	var tText	= document.createTextNode(tMessage);
	var cText	= document.createTextNode(cMessage);
	var bText	= document.createTextNode(bMessage);
	xmas.setAttribute('id','xmas');
	sxmas.setAttribute('id','sxmas');
	close.setAttribute('alt','');
	shade.setAttribute('alt','');
	close.setAttribute('src',myClose);
	shade.setAttribute('src','http://www.erotik-kleinanzeigen.com/banner_werbung/xmas/schatten.png');
	shade.setAttribute('id','schatten');
	close.onclick = function(){xClose();};
	if (target == 'self') {
  	ul.onclick = function(){
  		top.location.href = url;
  	};
  }else{
		ul.onclick = function(){
  		window.open(url);
  	};
	}
	tLi.style.color=tColor;
	tLi.style.textAlign=tAlign;
	tLi.style.font=tFontStyle+' '+tFontWeight+' '+tFontSize+' '+tFontFamily;
	cLi.style.color=cColor;
	cLi.style.textAlign=cAlign;
	cLi.style.font=cFontStyle+' '+cFontWeight+' '+cFontSize+' '+cFontFamily;
	bLi.style.color=bColor;
	bLi.style.textAlign=bAlign;
	bLi.style.font=bFontStyle+' '+bFontWeight+' '+bFontSize+' '+bFontFamily;
	var xNavigator = navigator.userAgent.search('MSIE 7.0');
	if(xNavigator!=-1){
		shade.className='IE7';
	}
	tLi.appendChild(tText);
	cLi.appendChild(cText);
	bLi.appendChild(bText);
	ul.appendChild(tLi);
	ul.appendChild(cLi);
	ul.appendChild(bLi);
	xmas.appendChild(close);
	xmas.appendChild(ul);
	sxmas.appendChild(shade);
	body.appendChild(sxmas);
	body.appendChild(xmas);
	window.setTimeout("xBewegen(-300)", xSecond*1000);
}
function xClose(id){

	//alert('ja');
	document.getElementById('xmas').style.display='none';
	document.getElementById('sxmas').style.display='none';
}
function xBewegen(top)  {
  document.getElementById('xmas').style.top = top + 'px';
  document.getElementById('sxmas').style.top = top + 'px';
  top = top*1+4;
  if(top < 100) {
    setTimeout("xBewegen('" + top + "')", 1);
  }else{
		xTopBewegen(top);
	}
}
function xTopBewegen(top){
  document.getElementById('xmas').style.top = top + 'px';
  document.getElementById('sxmas').style.top = top + 'px';
  top = top*1-3;
  if(top > 15) {
    setTimeout("xTopBewegen('" + top + "')", 1);
  }	
}
xDiv();