// JavaScript Document
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
function shareVideo() {
	var bubble = document.getElementById("share");
	var tb = document.getElementById("videoTable");
	var master = document.getElementById("master");
	

	
/*	if( bubble.style.visibility != 'visible' )
	{
		bubble.style.visibility = 'visible';
		bubble.style.height = '111px';
		tb.style.height = "800px";
		master.style.height = "500px";
		
		Effect.toggle('share', 'blind'); 
		return false;
	} else {
		bubble.style.visibility = 'hidden';
		bubble.style.height = '0px';
		tb.style.height = "";
		master.style.height = "";
		
		Effect.toggle('bubble', 'blindUp'); 
		return false;
	}*/
	
	Effect.toggle('share','blind'); 
//	alert("ola");
	return false;
}

function addMilo()
{
	var element = document.getElementById('lower_left_footer');
	//element.onclick = goMilo();
	//element.innerHTML = '<a href="#"><img src="../img/milo_img/fanMilo_de.gif" border="0" alt="milo_fan"></img></a>';

}



var walls = Array("wallpapers/thumbs/gemuese_4.gif","wallpapers/thumbs/gift_2.gif","wallpapers/thumbs/gift_4.gif","wallpapers/thumbs/gemuese_4.gif","wallpapers/thumbs/gift_2.gif","wallpapers/thumbs/gift_4.gif","wallpapers/thumbs/gemuese_4.gif","wallpapers/thumbs/gift_2.gif","wallpapers/thumbs/gift_4.gif","wallpapers/thumbs/gemuese_4.gif","wallpapers/thumbs/gift_2.gif","wallpapers/thumbs/gift_4.gif","wallpapers/thumbs/gemuese_4.gif","wallpapers/thumbs/gift_2.gif","wallpapers/thumbs/gift_4.gif","wallpapers/thumbs/gemuese_4.gif");


var wallsBig = Array("gemuese_4.png","gift_2.png","gift_4.png","gift_6.png","gift_10.png","huendeler_1.png","huendeler_8.png","pizza_3.png","praeservative_3.png","punkten_7.png","punkten_9.png","scharf_4.png","scharf_5.png","schweizer_2.png","schweizer_6.png","wc-papier_4.png");

function wallpaperInit()
{
		for(var i = 0; i < walls.length; i++)
	{
		
		var a = i+1;
		var mc = document.getElementById("wallpaper"+a);
		mc.innerHTML = "<br/><a href='#' onclick='wp(" + i + ", 1);'>1024 x 768</a>&ensp;&ensp;&ensp;&ensp;<a href='#' onclick='wp(" + i + ", 2);'>1280 x 1024</a><br/><a href='#' onclick='wp(" + i + ", 3);'>1600 x 1200</a>&ensp;&ensp;&ensp;&ensp;<a href='#' onclick='wp(" + i + ", 4);'>1920 x 1200</a>";
		//mc.style.visibility = "hidden";
	}
}

function wp( id, n)
{
//	alert(id +", "+ n);
	
	if( n == '1') {
		open("wallpapers/big/1024x768/" + wallsBig[id]);
		//window.open = "../wallpapers/big/1024x768/" + wallsBig[id];
	} else if( n == '2') {
		open("wallpapers/big/1280x1024/" + wallsBig[id]);
		//window.location = "../wallpapers/big/1280x1024/" + wallsBig[id];
	} else if( n == '3') {
		open("wallpapers/big/1600x1200/" + wallsBig[id]);
		//window.location = "../wallpapers/big/1600x1200/" + wallsBig[id];
	} else if( n == '4') {
		open("wallpapers/big/1920x1200/" + wallsBig[id]);
		//window.location = "../wallpapers/big/1900x1200/" + wallsBig[id];
	}
	
}


function twit_this(str, title)
{
	var windowWidth = 800;
	var windowHeight = 600;
	var centerWidth = (window.screen.width - windowWidth) / 2;
	var centerHeight = (window.screen.height - windowHeight) / 2;

	var stat = title +  str;

	window.open('http://twitter.com/home?status=' + encodeURIComponent(stat), 'migrolino', 'toolbar=0,status=0,scrollbars=yes,width=' + windowWidth + 
					        ',height=' + windowHeight + 
					        ',left=' + centerWidth + 
					        ',top=' + centerHeight);
	return false;
}

function fbs_click(str, title) 
{
	//alert(str);
	var windowWidth = 626;
	var windowHeight = 436;
	var centerWidth = (window.screen.width - windowWidth) / 2;
	var centerHeight = (window.screen.height - windowHeight) / 2;
				
	var url = str;
	u=  str;
	t= title;
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=' + windowWidth + 
		        ',height=' + windowHeight + 
		        ',left=' + centerWidth + 
		        ',top=' + centerHeight);
	return false;
}

