//kristof.js



/*Zurueck zum Seitenanfang */
		
	var key = new Array();
key['#'] = "#oben", "_self";
function getKey(keyStroke) {
isNetscape=(document.layers);
eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
which = String.fromCharCode(eventChooser).toLowerCase();
for (var i in key) if (which == i) window.location = key[i];
}
document.onkeypress = getKey;


// Letzte Aenderung

//Dieses Skript stammt von Michael Mailer´s JavaScripts
//URL: http://www.webaid.de/js  --  eMail: mm@webaid.de

function datum()
{
	mn=new Array("Jan.","Febr.","März","April","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez.")
	d=new Date(document.lastModified)
	m=mn[d.getMonth()]
	t=d.getDate()
	jj=d.getYear()
	j=(jj>=2000)?jj:((jj<80)?jj+2000:jj+1900)
	dat=(t+". "+m+" "+j)
}

//Bilderwechsel

function wiederherstellen() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function finden(n, d) { //v4.0
  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=finden(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function tauschen() { //v3.0
  var i,j=0,x,a=tauschen.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=finden(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// Formulareingabe kontrollieren - Seite Kontakt

function formcheck() 
{
if (document.formular.name.value=="")
	{ 
alert ("Bitte geben Sie Ihren Namen ein.");
  document.formular.name.focus();
  return false; 
  	}	
if (document.formular.email.value.indexOf('@')==-1 ||
    document.formular.email.value.indexOf('.')==-1)
	{ 
alert ("Es fehlt eine gültige eMail-Adresse!");
  document.formular.email.focus();
  return false; 
  	}
   if (document.formular.meldung.value=="")
	{ 
alert ("Bitte Ihre Mitteilung nicht vergessen!");
  document.formular.meldung.focus();
  return false;
  	}
	window.location.href="dank.html";
	setTimeout('formcheck()',4000);
}


//Sound
function ton1()
{
document.getElementById("sound").Run();
}


//Farbwechsel Button
function bg(color){
	if (event.srcElement.tagName=="INPUT")
	event.srcElement.style.backgroundColor=color
}

//MS Farbwechsel
function inaktiv() { event.srcElement.className='inactive'; }
function aktiv() { event.srcElement.className='active'; }



// Kunst im Ausverkauf

function openWindow(url)
{
  win=window.open(url, "_blank","scrollbars=yes");
  win.moveTo(0,0);
  win.resizeTo(screen.width,screen.height);
}
