function makeBanner(){
	var so = new SWFObject("http://www.nonverbla.de/bilder/newflash.swf", "newflash", "100%", "100%", "8", "#000");
	so.addParam("scale", "noscale");
	so.addParam("wmode", "transparent");
	so.addParam("allowFullscreen", "true");
	so.write("flashcontent");
}
function fullScreen(url) {
	fullscreen = window.open(url, "fullscreen", 'top=0,left=0,width='+(screen.availWidth)+', height='+(screen.availHeight-20)+', toolbar=0, location=0, directories=0, status=0, menubar=0, scrolling=0');
}
// Motion
var Boxes = new Array();
var allPageTags = new Array();
var bannerCount = 0;
var launchCount = 0;
var loop;
var i;
var activeID = null;

function Box(_boxID, _launchID){
	var boxID = _boxID;
	var launchID = _launchID;
	
	this.theBanner = document.getElementById(boxID);
	this.theLink = document.getElementById(launchID);
	
	this.htmlHeight = Element.getHeight(_boxID)+20;
	this.topMargin = -37;
	this.actualHeight = 0;
	this.targetHeight = 171
	this.theBanner.style.height = this.actualHeight + "px";
	this.theLink.style.marginTop = this.topMargin + "px";
	
	this.reSize = function(){
		if(boxID == activeID){
			this.targetHeight = this.htmlHeight;
			this.targetMargin = 20;
		} else {
			this.targetHeight = 171;
			this.targetMargin = -37;
		}
		this.actualHeight += (this.targetHeight - this.actualHeight)/4;
		this.topMargin += (this.targetMargin - this.topMargin)/4;
		this.theBanner.style.height = this.actualHeight + "px";
		this.theLink.style.marginTop = this.topMargin + "px";
	}
	
	this.theBanner.onmouseover = function(){
		activeID = boxID;
	}
	this.theBanner.onmouseout = function(){
		activeID = null;
	}
}
function moveThem(){
	for(i=0; i < Boxes.length; i++){
		Boxes[i].reSize();
	}
}

function doCoolStuff(){
	if(!(navigator.userAgent.match(/iPhone/i)) && !(navigator.userAgent.match(/iPod/i))) {
		extractElements("banner","launch");
	}
}
function extractElements(bannerClass, launchClass) {
	var allPageTags = document.getElementsByTagName("*");
	for (var i=0; i<allPageTags.length; i++) {
		if (allPageTags[i].className == bannerClass) {
			window.bannerCount ++;
			allPageTags[i].id = ["banner"+window.bannerCount];
		}
		if (allPageTags[i].className == launchClass) {
			window.launchCount ++;
			allPageTags[i].id = ["launch"+window.launchCount];
		}
		if (allPageTags[i].tagName == "BODY") {
			allPageTags[i].id = "body";
			//allPageTags[i].style.height = Element.getHeight(allPageTags[i])+20 + "px";
		}
	}
	
	for(i=1; i <= window.bannerCount; i++){
		var myBox = new Box("banner"+i, "launch"+i);
		Boxes.push(myBox);
	}
	loop = setInterval("moveThem()", 31);
}
