//***** Die Flash-Objekte auf der Hauptseite erzeugen... *****//
function removethem () {
	swfobject.removeSWF("videobgint");
	swfobject.removeSWF("vidhoiint");
	swfobject.removeSWF("vidmenflashint");
	swfobject.removeSWF("newsviechint");
	swfobject.removeSWF("newshaseint");
	swfobject.removeSWF("magneuint");
	swfobject.removeSWF("followusint");
	swfobject.removeSWF("mapmonsterint");
	swfobject.removeSWF("creativegestrueppint");
	swfobject.removeSWF("creativejobint");
}

function removetop() {
	swfobject.removeSWF('flashContent');
}

function inittop() {
	document.getElementById("content").innerHTML = '<div id="flashContent"><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></div>';
	
	var url = document.location.toString();
	var jumpto = "undefined";
	if (url.match("#")) {
		jumpto = url.split("#")[1];
	};
	var flashvars = {};
	flashvars.xmlUrl = "data/xml/hasen_de.xml";
	flashvars.jumpto = jumpto;
	var params = {};
	params.wmode = "opaque";
	params.scale = "noScale";
	params.salign = "TL";
	var attributes = {};
	attributes.id = "flashContent";
	attributes.name = "flashContent";
	swfobject.embedSWF("swf/loader.swf", "flashContent", "100%", "100%", "8.0.0", false, flashvars, params, attributes);
}

function initagain (mitohne) {
	document.getElementById("videobg").innerHTML = '<div id="videobgint"><img src="gfx/hinter-video.png" alt="Video Hintrgrund" /></div>';
	document.getElementById("vidhoi").innerHTML = '<div id="vidhoiint"><a href="javascript:void(0)"><img src="gfx/hoi.png" alt="Hoi!" /></a></div>';
	document.getElementById("vidmenflash").innerHTML = '<div id="vidmenflashint"><img src="gfx/navi-video.png" alt="Video Menue!" usemap="#navue" /></div>';
	document.getElementById("newsviech").innerHTML = '<div id="newsviechint"><img src="gfx/news_viech.png" alt="Gestr&auml;pp" border="0" /></div>';
	document.getElementById("newshase").innerHTML = '<div id="newshaseint"><img src="gfx/news_hase.png" alt="Der marcellini Hase auf seiner Webseite!" border="0" /></div>';
	document.getElementById("magneu").innerHTML = '<div id="magneuint"><img src="gfx/mag-neu.png" alt="Neu!" /></div>';
	document.getElementById("followus").innerHTML = '<div id="followusint"><img id="socialmap" src="gfx/follow_us_in.png" usemap="#sociallink" /></div>';
	document.getElementById("mapmonster").innerHTML = '<div id="mapmonsterint"><img src="gfx/monster_map.gif" alt="Schaukeltier"></div>';
	document.getElementById("creativegestruepp").innerHTML = '<div id="creativegestrueppint"><img src="gfx/creative_job_gestruepp.png" alt="marcellinis Illustratoren haben sich hier ausgetobt..." /></div>';
	document.getElementById("creativejob").innerHTML = '<div id="creativejobint"><img id="cjbutton" src="gfx/creative_job.png" alt="Need a creative Job?" onmouseover=\'jbtn("aktiv");\' onmouseout=\'jbtn("normal");\' usemap="#creative_job" /></div>';
	if (mitohne == "1" && self.name == "yes") {
		startflash();	
	}
 }

//***** Erfolgt unten ein Reload der Seite, Flash neu starten! *****/
function chkfla() {
	if (window.pageYOffset > 0 && self.name == "yes") {
		startflash();
	} else { 
		initagain(0);
	}
}

function startflash() {
// SWFOBJECT Viech hinter Video
var flashvars = {};
var params = {};
params.wmode = "transparent";
// params.id = "videoanimation";
params.allowscriptaccess = "always"; 
var attributes = {};
attributes.id = "videobgint";
attributes.name = "videobgint";
swfobject.embedSWF("swf/video_animation.swf", "videobgint", "300", "320", "8.0.0", false, flashvars, params, attributes);

// SWFOBJECT Hoi-Button vorm Video
var flashvars = {};
var params = {};
params.wmode = "transparent";
//params.id = "hoibutton";
params.allowscriptaccess = "always"; 
var attributes = {};
attributes.id = "vidhoiint";
attributes.name = "vidhoiint";
swfobject.embedSWF("swf/hoi_btn.swf", "vidhoiint", "198", "189", "8.0.0", false, flashvars, params, attributes);

// SWFOBJECT Navigation unterm Video
var flashvars = {};
var params = {};
params.wmode = "transparent";
//params.id = "videomenue";
params.allowscriptaccess = "always"; 
var attributes = {};
attributes.id = "vidmenflashint";
attributes.name = "vidmenflashint";
swfobject.embedSWF("swf/navigation.swf", "vidmenflashint", "370", "40", "8.0.0", false, flashvars, params, attributes);

// SWFOBJECT News Viech
var flashvars = {};
var params = {};
params.wmode = "transparent";
// params.id = "fliegenvieh";
params.allowscriptaccess = "always"; 
var attributes = {};
attributes.id = "newsviechint";
attributes.name = "newsviechint";
swfobject.embedSWF("swf/fliegeviech.swf", "newsviechint", "210", "220", "8.0.0", false, flashvars, params, attributes);

// SWFOBJECT News Hase
var flashvars = {};
var params = {};
params.wmode = "transparent";
// params.id = "news_hase";
params.allowscriptaccess = "always"; 
var attributes = {};
attributes.id = "newshaseint";
attributes.name = "newshaseint";
swfobject.embedSWF("swf/hase.swf", "newshaseint", "115", "230", "8.0.0", false, flashvars, params, attributes);

// SWFOBJECT Neu Button
var flashvars = {};
var params = {};
params.wmode = "transparent";
// params.id = "neubutton";
params.allowscriptaccess = "always"; 
var attributes = {};
attributes.id = "magneuint";
attributes.name = "magneuint";
swfobject.embedSWF("swf/neu_btn.swf", "magneuint", "113", "112", "8.0.0", false, flashvars, params, attributes);

// SWFOBJECT Facebook Button
var flashvars = {};
var params = {};
params.wmode = "transparent";
// params.id = "facebookbtn";
params.allowscriptaccess = "always"; 
var attributes = {};
attributes.id = "followusint";
attributes.name = "followusint";
swfobject.embedSWF("swf/facebook_btn.swf", "followusint", "281", "50", "8.0.0", false, flashvars, params, attributes);

// SWFOBJECT Monster Karte
var flashvars = {};
var params = {};
params.wmode = "transparent";
// params.id = "monstermap";
params.allowscriptaccess = "always"; 
var attributes = {};
attributes.id = "mapmonsterint";
attributes.name = "mapmonsterint";
swfobject.embedSWF("swf/affenschaukel.swf", "mapmonsterint", "245", "280", "8.0.0", false, flashvars, params, attributes);

// SWFOBJECT Gestrüpp Creative
var flashvars = {};
var params = {};
params.wmode = "transparent";
// params.id = "gestruepp";
params.allowscriptaccess = "always"; 
var attributes = {};
attributes.id = "creativegestrueppint";
attributes.name = "creativegestrueppint";
swfobject.embedSWF("swf/gestruepp.swf", "creativegestrueppint", "290", "230", "8.0.0", false, flashvars, params, attributes);

// SWFOBJECT Button Creative Job
var flashvars = {};
var params = {};
params.wmode = "transparent";
// params.id = "jobbutton";
params.allowscriptaccess = "always"; 
var attributes = {};
attributes.id = "creativejobint";
attributes.name = "creativejobint";
swfobject.embedSWF("swf/job_btn.swf", "creativejobint", "115", "115", "8.0.0", false, flashvars, params, attributes);

}


