function getArguments(){
	var thisUrl = new String(document.location);
	if(thisUrl.indexOf("?") != -1){
		return(thisUrl.substring(thisUrl.indexOf("?")));
	}
	return("");
}
flash = false;
function setFlash(){
	flash = true;
}
function launchIfFlash(){
	if(flash){
		launchSite();
	}else{
		document.location = "noflash.html";
	}
}
function launchSite(){
	var url = "main.html"+getArguments();
	if(screen.availWidth < 960){
		var scrollbars = "1";
	}else{
		var scrollbars = "0";
	}
	if(screen.availWidth <= 720){
		var xpos = 0;
		var ypos = 0;
		var popupwidth = screen.availWidth;
		var popupheight = screen.availHeight;
	}else{
		if(navigator.appVersion.indexOf("Mac") != -1){
			if(navigator.userAgent.indexOf("Safari") != -1){
				var popupwidth = 960;
				var popupheight = 720;
			}else if(navigator.userAgent.indexOf("MSIE") != -1){
				var popupwidth = 960;
				var popupheight = 720;
			}else{
				var popupwidth = 960;
				var popupheight = 720;
			}
		} else{
			var popupwidth = 960;
			var popupheight = 720;
		}
		var xpos = (screen.availWidth-popupwidth)/2;
		var ypos = (screen.availHeight-popupheight)/2;
	}//
	var popupvenster = window.open(url,"popup","width="+popupwidth+",height="+popupheight+",screenX="+xpos+",screenY="+ypos+",status=1,scrollbars="+scrollbars);
	popupvenster.resizeTo(popupwidth, popupheight);
	popupvenster.moveTo(xpos, ypos);
	popupvenster.resizeTo(popupwidth, popupheight);
	popupvenster.focus();
		// 
	setTimeout('gotoThanks()', '5000');
}

function gotoThanks(){
	document.location = "index.html";
}