/* minimotion / bildwurf Kinowerung */

/*	SCHREIBEN STUFF */

var MINI = window.MINI || {};

// MINI.schrieb("","");

MINI.schrieb = function(a,d) {
	if (a=='') {
		a='info';
		b='INFO';
	}
	if (d=='') {
		d='minimotion.ch';
		e='MINIMOTION.CH';
	}
	var n = document.getElementById('cont');
	if(!n ) return; 
	n.innerHTML = "<a href='mailto:" + a + "@" + d + "' class=\"out\">"+ b + "@" + e +"</a> ---" 
};

var MOTION = window.MOTION || {};

MOTION.mach = function(a,d) {
	if (a=='') {
		a='info';
	}
	if (d=='') {
		d='minimotion.ch';
	}
	var n = document.getElementById('contk');
	if(!n ) return; 
	n.innerHTML = "<a href='mailto:" + a + "@" + d + "' class=\"out\">"+ a + "@" + d +"</a>" 
};


function Schreib(user,domain){
	if (!user) user='info';
	if (!domain) domain='minimotion.ch';
	window.location = "mailto:" + user + "@" + domain;
}
function unBlur() {
	this.blur();
}
function addUnBlur() {
	var links = document.getElementsByTagName('a');
	for (var i=0; i<links.length; i++ ) {
		links[i].onfocus = unBlur;
	}
}
function swapFilm(film_id){
	var ziel = 'iframe/film.php?id=' + film_id;
	var blank = 'iframe/blank.html';
	if (document.getElementById) {
		var disp = document.getElementById('filmFenster').style.display;
		if (disp == 'none') {
			document.getElementById('filmFenster').style.display = 'block';
			document.getElementById('filmFenster').src = ziel;
		} else {
			document.getElementById('filmFenster').style.display = 'none';
			document.getElementById('filmFenster').src = blank;
		}
	} else if (document.all) {
		var disp = document.all['filmFenster'].style.display;
		if (disp == 'none') {
			document.all['filmFenster'].style.display = 'block';
			document.all['filmFenster'].src = ziel;
		} else {
			document.all['filmFenster'].style.display = 'none';
			document.all['filmFenster'].src = blank;
		}
	}
}
function setDisp(the_div,disp){
	if (document.getElementById) {
		document.getElementById(the_div).style.display = disp;
	} else if (document.all) {
		document.all[the_div].style.display = disp;
	}
}
function inputclean(objName) {
	var obj = MM_findObj(objName);
	if (obj) {
		obj.value = '';
	}
}

/*	DANKE ZU DREAMWEAVER */
function MM_jumpMenu(targ,selObj,restore){ //v3.0 dmw
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
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_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}