
self.name = 'eshop';
self.focus();

/*
hover = function() {
	if (document.getElementById("nav"))
	{
		var sfEls2 = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls2.length; i++) {
		  sfEls2[i].onmouseover=function() {
			this.className+=" hover";
		  }
		  sfEls2[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hover\\b"), "");
		  }
		}
	}
	if (document.getElementById("nav-meta-menu-language-selection"))
	{
		var sfEls = document.getElementById("nav-meta-menu-language-selection").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
		  sfEls[i].onmouseover=function() {
			this.className+=" hover";
		  }
		  sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hover\\b"), "");
		  }
		}
	}
  }
if (window.attachEvent) window.attachEvent("onload", hover);
*/

function ChangeImg(img,dim,dimh) {
 document.getElementById("CombiPic").src = img;
  if ( dim != '' )
 	document.getElementById("CombiPic").width = dim;
  if ( dimh != '' )
  	document.getElementById("CombiPic").height = dimh;
}

function SwapImg(img,targetid,imgwidth,imgheight) {
	// alert(img);
	// alert(targetid);
	document.getElementById(targetid).src = img;
	// alert(targetid);
	/*
	if (imgwidth != '')
		{document.getElementById("smallpic").width = 200;}
	if ( imgheight != '' )
		{document.getElementById("smallpic").height = imgheight;}
		*/
}


// Contact form verification
function pruef(vname, name, email, message)
{
	if (document.kontakt.vorname.value == "")
	{
		alert(vname);
		document.kontakt.vorname.focus();
		return;
	}
	
	if (document.kontakt.name.value == "")
	{
		alert(name);
		document.kontakt.name.focus();
		return;
	}

	if ( document.kontakt.email.value.search(/^[A-Za-z0-9_\.\*\+\-]+@[0-9a-zA-Z\-\.]+\.[A-Za-z]+$/) )
	{
		alert(email);
		document.kontakt.email.focus();
		return;
	}

	if ( document.kontakt.nachricht.length > 240 )
	{
		alert(message);
		document.kontakt.nachricht.focus();
		return;
	}
	
	document.kontakt.submit();

}

function filldateform(fieldname)
{
	if (document.myform.form_geburtstag)
	{
		document.myform.form_geburtstag.value = document.myform.form_geburtstag_year.value + "-" + document.myform.form_geburtstag_month.value + "-" + document.myform.form_geburtstag_day.value;
	}
	if (document.myform.form_event_date)
	{
		document.myform.form_event_date.value = document.myform.form_event_date_year.value + "-" + document.myform.form_event_date_month.value + "-" + document.myform.form_event_date_day.value;
	}
}

function initdateform()
{
	if (document.myform.form_geburtstag)
	{
	
		if (document.myform.form_geburtstag.value != "")
		{
			document.myform.form_geburtstag_day.value = document.myform.form_geburtstag.value.substring(8,10);
			document.myform.form_geburtstag_month.value = document.myform.form_geburtstag.value.substring(5,7);
			document.myform.form_geburtstag_year.value = document.myform.form_geburtstag.value.substring(0,4);
		}
		if (document.myform.form_geburtstag.value == "0000-00-00")
		{
			document.myform.form_geburtstag.value = "";
		}
	}

	if (document.myform.form_event_date)
	{
	
		if (document.myform.form_event_date.value != "")
		{
			document.myform.form_event_date_day.value = document.myform.form_event_date.value.substring(8,10);
			document.myform.form_event_date_month.value = document.myform.form_event_date.value.substring(5,7);
			document.myform.form_event_date_year.value = document.myform.form_event_date.value.substring(0,4);
		}
		if (document.myform.form_event_date.value == "0000-00-00")
		{
			document.myform.form_event_date.value = "";
		}
	}

}


function clear()
{
	document.kontakt.vorname.value = "";
	document.kontakt.name.value = "";
	document.kontakt.email.value = "";
	document.kontakt.telefon.value = "";
	document.kontakt.nachricht.value = "";
	document.kontakt.vorname.focus();
}

function show(object) {
  if (document.getElementById) {
    document.getElementById(object).style.visibility = 'visible';
  }
  else if (document.layers && document.layers[object]) {
    document.layers[object].visibility = 'visible';
  }
  else if (document.all) {
    document.all[object].style.visibility = 'visible';
  }
}

function hide(object) {
  if (document.getElementById) {
    document.getElementById(object).style.visibility = 'hidden';
  }
  else if (document.layers && document.layers[object]) {
    document.layers[object].visibility = 'hidden';
  }
  else if (document.all) {
    document.all[object].style.visibility = 'hidden';
  }
}


