function openWindow(windowName, file, width, height, scrollbars, resizeable, menubar) {
	var properties="width=" + width
	properties+=",height=" + height
	properties+=",scrollbars=" + scrollbars
	properties+=",resizable=" + resizeable
	properties+=",menubar=" + menubar;
	win=window.open (file, windowName, properties);
	return win
}

function Popup(file, width, height)  {
	var win=openWindow("Popup", file, width, height, "yes", "no", "no");
}

function openPPDSelection() {
	var width=490;
   var height=281;
	var widthProp=(document.body.clientWidth ? document.body.clientWidth : window.innerWidth);
   var heightProp=(document.body.clientHeight ? document.body.clientHeight : window.innerHeight);
	var left=(widthProp-width) / 2 + 40;
	var top=(heightProp-height)/ 2 + 170;
	var win=openWindow("Popup", "/ppd_auswahl.php", width, height, "no", "no", "no");
   win.moveTo(left, top);
}

function mod(val1, val2) {
	return val1-(Math.floor(val1/val2)*val2);
}

// Link-Animation
var colors=new Array("6699cc", "6a9bc7", "709ec0", "75a2b7", "7ca6ae", "84aaa3", "8daf99",
								"96b48d", "9fb981", "a8be74", "b1c467", "bac95b", "c4cf4f", "cdd342",
								"d6d837", "dfdd2b", "e7e221", "ede617", "f4ea0f", "f9ed07", "fff000");
var numColors=colors.length;
var numIterations=5;
var delay=30;
function setBorder(objId, color) {
	var style=document.getElementById(objId).style;
	//style.border="1px solid " + color;
	style.backgroundColor=color;
}
function highlightCdLink() {
	var timer, iterationWait=0;
	for(var i=0; i<=numIterations; i++) {
		var modi=mod(i,2);
		var inc=(modi==0 ? 1 : -1);
		var colorIndex=(modi==0 ? 0 : numColors-1);
		timer=numColors*delay*i;
		iterationWait+=(modi==0 ? 400 : 0);
		for(var j=0; j<numColors; j++) {
			var timeout=(j*delay)+timer+iterationWait;
			setTimeout("setBorder('cdlink', '#" + colors[colorIndex] + "')",timeout);
			colorIndex+=inc;
		}
	}
}
function eyeCatcher() {
	setTimeout("highlightCdLink()",0);
	setTimeout("highlightCdLink()",9000);
}