function hint(aMsg)
  {
  window.status = aMsg;
  window.defaultstatus = aMsg;
  return true;
  }

function checkradio(field, aText, aMin, aMax, aFunct)
	{
	cnt = 0;
	if(field.length)
		{
		for(i=0;i<field.length;i++)
			{
			if(field[i].checked) { cnt++; }
			}
		}
	else
		{
		if(field.checked) { cnt++; }
		}
	if((cnt < aMin) || (cnt > aMax))
		{
		if(aFunct) aFunct(aText)
		field[0].focus;
		return false;
		}
	return true;
	}

function getradiovalue(field)
	{
	ret = "";
	for(i=0;i<field.length;i++)
		{
		if(field[i].checked) { ret += (ret?",":"") + field[i].value ; }
		}
	return ret;
	}

function checkfield(field, aText, aFunct)
	{
	if(field.value=="")
		{
		field.focus();
		if(aFunct) aFunct(aText);
		return false;
		}
	return true;
	}



function checkemail(field, aTextNone, aTextWrong, aFunct)
	{
	if(field.value=="")
		{
		field.focus();
		if(aFunct) aFunct(aTextNone);
		return false;
		}
	emailStr = field.value;
	// So darf eine email aussehen
	var emailPat=/^[a-zA-Z0-9]+((\.|-|_)[a-zA-Z0-9]+)*@([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.)*[a-zA-Z0-9]+-{0,1}[a-zA-Z0-9]+(-{0,1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,4}$/
    //regexpemail = /^[\w\-\.]+@([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.)*[a-zA-Z0-9]+-{0,1}[a-zA-Z0-9]+(-{0,1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,4}$/

	// Passt die eingegebene email in das Pattern?
	var matchArray = emailStr.match(emailPat);
	if (matchArray==null)
		{
		if(aFunct) aFunct(aTextWrong);
		field.focus();
		return false
		}
	return true;
	}

function checknumber(aName, aText, aFunct)
	{
	if((field.value=="") || isNaN(field.value))
		{
		if(aFunct) aFunct(aText);
		field.focus();
		return false;
		}
	return true;
	}

function checkdate(day,month,year,aText,aFunct)
	{
	var dteDate;
	dteDate=new Date(year,month,day);
	if(!((day==dteDate.getDate()) && (month==dteDate.getMonth()) && (year==dteDate.getFullYear()) ))
		{
		if(aFunct) aFunct(aText);
		return false;
		}
	/*
	var minDate = new Date(1987, 3, 29);
	if(minDate.getTime() < dteDate.getTime())
		{
		alert("Sie müssen zur Teilnahme am Gewinnspiel vor dem 29. April 1987 geboren sein.");
		return false;
		}
	*/
	return true;
	}

function ow(anURL)
	{
	wnd = window.open(anURL,'','toolbar=0,menubar=0,location=0,status=0,scrollbars=1,resizable=0,left=0,top=0,width=400,height=400,left=100,top=100');
	wnd.focus();
	}

function owns(anURL)
	{
	wnd = window.open(anURL,'','toolbar=0,menubar=0,location=0,status=0,scrollbars=0,resizable=0,left=0,top=0,width=400,height=400,left=100,top=100');
	wnd.focus();
	}

var MM_contentVersion = 6;
var plugin = false;
var dovb = false;
//vb-funktion vorbereiten
if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	dovb = true;
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('function MFOK() \n');
	document.write('on error resume next \n');
	document.write('MFOK = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('end function \n');
	document.write('</SCR' + 'IPT\> \n');
}
// abfragefunktion
function checkMF(){
	var MM_FlashCanPlay = false;
	plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
			var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		    for (var i = 0; i < words.length; ++i)
		    {
			if (isNaN(parseInt(words[i])))
			continue;
			var MM_PluginVersion = words[i];
		    }
			MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}else if ( dovb ) {
			MM_FlashCanPlay = MFOK();
	}
	return MM_FlashCanPlay;
}



function showflash(flashURL,widthSWF,heightSWF)
	{
	if (checkMF())
		{
		document.open();
		document.write('<!--FLASH-->');
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + widthSWF + '" height="' + heightSWF + '">');
		document.write('<param name="movie" value="' + flashURL + '">');
		document.write('<param name=quality value=high>');
		document.write('<embed src="' + flashURL + '" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + widthSWF + '" height="' + heightSWF + '"></embed>');
		document.write('</object>');
		document.close();
		}
	else
		{
		// keine Ausgabe
		document.open();
		document.write('<!--KEIN FLASH-->');
		document.close();
		}
	}

