$(function() {
	$('#slider').cycle();
});
	
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable) {
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function openwin (url,w,h) {
	var wstat
	var ns4up = (document.layers) ? 1 : 0
	var ie4up = (document.all) ? 1 : 0
	var xsize = screen.width
	var ysize = screen.height
	var breite=w
	var hoehe=h
	var xpos=(xsize-breite)/2
	var ypos=(ysize-hoehe)/2
	Fenster1 = window.open(url,"popupwindow","scrollbars=0,status=yes,toolbar=no,location=no,directories=no,resizable=no,menubar=no,width="+breite+",height="+hoehe+",screenX="+xpos+",screenY="+ypos+",top="+ypos+",left="+xpos)
	Fenster1.focus();
}

function MailUnCrypt(s) {	//
	var n=0;
	var r="";
	for(var i=0; i < s.length; i++) {
		n=s.charCodeAt(i);
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-(-1));
	}
	return r;
}
function link_MailUnCrypt(s)	{	//
	location.href=MailUnCrypt(s);
}


// Begin. Specify URLs to randomly select from and pop-under. Edit & add freely.
var popunder=new Array()
popunder[0]="popup.php"

// Specify the width and height of new popunder window (in pixels).
var width = '658';
var height = '570';
if(document.all){
	width = width-5;
	height = height-5;
}

var p = 'scrollbars=no,resizable=no,toolbar=no,' + //these are obvious variables. set "yes" or "no".
'menubar=no,status=no,location=no,left=85,top=20,height=' + //yes/no, & the screen location
height + ',width=' + width;

// Load new PopUnder only once per browser session? (0=no, 1=yes)
// Putting 0 will cause the Popunder to load every time page is loaded
// Specifying 1 will cause it to load only once per session
var one_time=1

// That's it! Don't edit the code below unless you're really good. :-P //

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if the cookie exists
offset += search.length
end = document.cookie.indexOf(";", offset); // set the index of beginning value

if (end == -1) // set the index of the end of cookie value
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function loadornot(){
if (get_cookie('popunder')==''){
load_pop_power()
// cookie, der 5 Stunden hält
var time = new Date();
var exp = new Date(time.getTime()+18000000);
document.cookie="popunder=yes; expires="+exp.toGMTString();
}
}

function load_pop_power(){
win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p)
win2.blur()
window.focus()
}

if (one_time==0)
load_pop_power()
else
loadornot()
