var map_top = 0, map_left = 0;var linecolor_origin;var mouseX, mouseY;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_swapImgRestore() { //v3.0  var i,x,a=document.MM_sr,b,temp;   for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)   //routine that checks and set the Menu that was defined in the call page  x.src=x.oSrc;  b=x.oSrc.indexOf(chooseMenu)  if(b!=-1){	temp=x.oSrc.substr(0,b)+chooseMenu+'-over.gif'	x.src=temp;	}}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 MM_reloadPage(init) {  //reloads the window if Nav4 resized  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);function SHL(f,clubname, area_left, area_top) {    //document.onmousemove = getMouseXY;  //alert("mouseX: "+mouseX+"\nmouseY"+mouseY);  //document.getElementById('C'+f).style.visibility = 'visible';    var aktiv_club = "";  aktiv_club 	+= clubname;  var fahne_rot;    //alert(aktiv_club);  if(clubname!="nothing") {  	document.getElementById('aktiv_club').innerHTML = aktiv_club;  	//alert(area_left+"\n"+area_top);  	  	//getFahneRot();  	  	if(typeof area_left == 'number' && typeof area_top == 'number') {  		//clickHandler('', area_left, area_top);  	}  	  } else {  	document.getElementById('aktiv_club').innerHTML = "&nbsp;";  	//fahne_rot = document.getElementById('content_fahne_div');  	//fahne_rot.style.visibility = "hidden";  }    //alert("f='"+f+"'\nclubname='"+clubname+"'");    if(clubname!="nothing")  	changeBG(f,1);  else  	changeBG(f,0);  }function saveImagePos(id) {		var myTarget = document.getElementById(id);	if (!myTarget) { 		myTarget = e.srcElement; 	} 	else if (myTarget == "undefined") { 		myTarget = e.srcElement; 	} 	while(myTarget!= document.body) { 		map_top += myTarget.offsetTop; 		map_left += myTarget.offsetLeft; 		myTarget = myTarget.offsetParent; 	}		//alert("maptop: "+map_top+"\nmapleft: "+map_left);	}function displayHandicapAllClubs() {		//alert("we get into the function");		var allClubs 		= document.getElementById("allClubs");	var allClubsTab		= document.getElementById("allClubsTable");		if(allClubs.style.visibility == "visible") {		allClubs.style.visibility = "hidden";		//allClubs.style.position = "absolute";		//allClubs.style.top = "0px";		//allClubs.style.left = "0px";	} else {		//allClubs.style.position = "relative";		allClubs.style.visibility = "visible";	}	}function highlightRow(id, color, fontColor, numberOfTDs) {		for(var i=0; i<numberOfTDs; i++) {				var row 					= document.getElementById(id+"_"+i);		row.style.backgroundColor 	= color;		row.style.color 			= fontColor;			}	}function clickHandler(id, area_left, area_top) {     	//alert("map_top:"+map_top+"\nmap_left:"+map_left);  	//alert("area_left:"+area_left+"\narea_top:"+area_top);  	  	fahne_rot 					= document.getElementById('content_fahne_div');  	fahne_rot.style.visibility 	= "visible";  	fahne_rot.style.position 	= "absolute";  	left						= 430 + area_left;  	top							= 278 + area_top;  	//alert(left+"\n"+right);  	fahne_rot.style.left 		= left+"px";  	fahne_rot.style.top 		= top+"px";}function getFahneRot() {     	mouseX = document.Show.MouseX.value;  	mouseY = document.Show.MouseY.value;  	  	//alert(mouseX+"\n"+mouseY);  	  	fahne_rot 					= document.getElementById('content_fahne_div');  	fahne_rot.style.visibility 	= "visible";  	fahne_rot.style.position 	= "absolute";  	left						= mouseX-10;  	top							= mouseY-10;  	  	fahne_rot.style.left 		= left+"px";  	fahne_rot.style.top 		= top+"px";}function openWindow(url, width, height) {	var popupX = (screen.width)-(width);	var popupY = (screen.height/2)-(height/2);	var pos = "left="+popupX+",top="+popupY;	winpops=window.open(url,"","width="+width+",height="+height+",scrollbars," +pos + ",resizable=yes")}function checkTournRegForm(FieldName, FieldValue, msg) {	// Source code to check form data goes here.	// Create a variable to keep track of whether the form is valid.	// Initializing this value to 1 means, in effect, that	// the form is valid unless the value changes sometime in the	// routine.	var valid = 1;	//var event = document.DBFORM.FieldName;	var event = document.getElementsByName(FieldName);		if (event != undefined && event[0].value == FieldValue) {			valid = 0;	}		// Here we decide whether to submit the form.	if (!valid) {		alert(""+msg);	} else {		document.DBFORM.submit();	}}function SetAction( ){	if((document.DBFORM.TXT_NOTIFYHANDICAP.value == "S" || document.DBFORM.TXT_NOTIFYSTARTTIME.value == "S")  && document.DBFORM.TXT_MOBILE.value == "" )		{		alert("You must enter a valid Natel nbr for SMS messages to be sent");		return false;		}		if(document.DBFORM.TXT_FIRSTNAME.value == "")		{		alert("You must enter your Firstname");		return false;		}     if(document.DBFORM.TXT_LASTNAME.value == "")		{		alert("You must enter your Surname");		return false;		}     if(document.DBFORM.TXT_ADDRESS.value == "")		{		alert("You must enter your Address");		return false;		}     if(document.DBFORM.TXT_PLZ.value == "")		{		alert("You must enter your zip code");		return false;		}     if(document.DBFORM.TXT_ORT.value == "")		{		alert("You must enter your city");		return false;		}   if(document.DBFORM.TXT_MOBILE.value == "" && document.DBFORM.TXT_EMAIL.value == "")		{		alert("You must enter your either an email address or natel number.");		return false;		} 	//	if(document.DBFORM.SENDSMS.value == "S" && document.DBFORM.NATELNBR1.value != "079" )//		{//		alert("SMS messages can only be sent to Swisscom customers");//		} 		return true;}function SetActionCalcHdcp( ){	if (isNaN(parseFloat(document.DBFORM.TXT_HDCP.value)) == 1) 		{		alert("You must enter a valid exact handicap");		return false;		} 	else {		if (parseFloat(document.DBFORM.TXT_HDCP.value) > 36 ||		    parseFloat(document.DBFORM.TXT_HDCP.value) < 0.1 ) { 		    	alert("Your exact handicap must be between 0.1 and 36.0"); 		    	return false; 		} else 			return true;	} }function SetActionForgotPassword1( ){	var isCorrect = false;	var isCorrect1 = false;	var isCorrect2 = false;	var isCorrect3 = false;	var tmp1 = document.DBFORM.MEMBERCLUBID.value	var tmp2 = document.DBFORM.TXT_ASGNBR.value	var tmp3 = document.DBFORM.TXT_SURNAME.value		if(tmp1 == "")		alert('Please Choose your homeclub');	else		isCorrect1 = true;	if(tmp2 == "")		alert('Please enter your ASG number');	else		isCorrect2 = true;	if(tmp3 == "" || tmp3.toString().length < 3)		alert('you need to enter at least 3 characters of your surname');	else		isCorrect3 = true;		if(isCorrect1 && isCorrect2 && isCorrect3)		isCorrect = true;		return isCorrect;}function SetActionForgotPassword2( ){	var isCorrect = false;	var isCorrect1 = false;	var isCorrect2 = false;	var isCorrect3 = false;	var isCorrect4 = false;	var isCorrect5 = false;	var isCorrect6 = false;	var tmp1 = document.DBFORM.MEMBERCLUBID.value	var tmp2 = document.DBFORM.TXT_ASGNBR.value	var tmp3 = document.DBFORM.TXT_FIRSTNAME.value	var tmp4 = document.DBFORM.TXT_SURNAME.value	var tmp5 = document.DBFORM.TXT_EMAIL.value	var tmp6 = document.DBFORM.TXT_TELEPHONE.value		if(tmp1 == "")		alert('Please Choose your homeclub');	else		isCorrect1 = true;	if(tmp2 == "")		alert('Please enter your ASG number');	else		isCorrect2 = true;	if(tmp3 == "")		alert('Please enter your firstname');	else		isCorrect3 = true;	if(tmp4 == "")		alert('Please enter your surname');	else		isCorrect4 = true;	if(tmp5 == "" && tmp6 == "")		alert('Please enter a valid email address or your telephone number');	else {		isCorrect5 = ValidateEmailForm();		isCorrect6 = true;	}		if(isCorrect1 && isCorrect2 && isCorrect3 && isCorrect4 && isCorrect5 && isCorrect6)		isCorrect = true;		return isCorrect;}function echeck(str) {		var at="@"		var dot="."		var lat=str.indexOf(at)		var lstr=str.length		var ldot=str.indexOf(dot)		if (str.indexOf(at)==-1){		   alert("Invalid E-mail ID")		   return false		}		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){		   alert("Invalid E-mail ID")		   return false		}		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){		    alert("Invalid E-mail ID")		    return false		}		 if (str.indexOf(at,(lat+1))!=-1){		    alert("Invalid E-mail ID")		    return false		 }		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){		    alert("Invalid E-mail ID")		    return false		 }		 if (str.indexOf(dot,(lat+2))==-1){		    alert("Invalid E-mail ID")		    return false		 }				 if (str.indexOf(" ")!=-1){		    alert("Invalid E-mail ID")		    return false		 } 		 return true						}function ValidateEmailForm(){	var emailID=document.DBFORM.TXT_EMAIL		if ((emailID.value==null)||(emailID.value=="")){		alert("Please Enter your Email ID")		emailID.focus()		return false	}	if (echeck(emailID.value)==false){		emailID.value=""		emailID.focus()		return false	}	return true }  function getTableHeight(id) { 	var table = document.getElementById("tourn_desc_"+id); 	var theight = table.style.height; 	alert("height = "+theight); }  function underlineLinkDesc(classID, id) { 	var linkDesc = document.getElementById("linkDesc_" + classID + "_" + id); 	if(linkDesc.style.textDecoration == "underline") 		linkDesc.style.textDecoration = "none"; 	else 		linkDesc.style.textDecoration = "underline"; }  function my_alert(text) { 	 	text = text.replace(/<br>/g, "\r\n"); 	alert(text); } function ShowHideLayer() {		var box		= document.getElementById("conn_box");		/* If the selected box is currently invisible, show it */	if(box.style.display == "none" || box.style.display=="") {		box.style.display = "block";	}	/* otherwise hide it */	else {		box.style.display = "none";	} }  function changeLoginLinkText(text) { 	 	var link = document.getElementById("verlauf_login_link"); 	//alert('innerHTML: '+link.innerHTML); 	link.innerHTML = text; } function changeWelcomeText(text) { 	 	var BrowserDetect = what_Browser(); 	//alert(BrowserDetect.browser); 	var welcome_text = document.getElementById("welcomeText"); 	//welcome_text.style.width = "630px";	//alert(BrowserDetect.browser); 	if(BrowserDetect.browser == "Explorer") { 		welcome_text.style.paddingTop = "11px"; 		padding_top_forIE(else_div, 9); 	}	if(BrowserDetect.browser == "Safari") { 		welcome_text.style.paddingRight = '15px'; 		welcome_text.style.paddingTop = "14px"; 		padding_top_forIE(else_div, 11); 	} 	//alert('innerHTML: '+link.innerHTML); 	welcome_text.innerHTML = text; }  function padding_top_forIE(div_id, padding) { 	div_id.style.paddingTop = padding+"px"; }  function what_Browser() { 	 	var BrowserDetect = {		init: function () {			this.browser = this.searchString(this.dataBrowser) || "An unknown browser";			this.version = this.searchVersion(navigator.userAgent)				|| this.searchVersion(navigator.appVersion)				|| "an unknown version";			this.OS = this.searchString(this.dataOS) || "an unknown OS";		},		searchString: function (data) {			for (var i=0;i<data.length;i++)	{				var dataString = data[i].string;				var dataProp = data[i].prop;				this.versionSearchString = data[i].versionSearch || data[i].identity;				if (dataString) {					if (dataString.indexOf(data[i].subString) != -1)						return data[i].identity;				}				else if (dataProp)					return data[i].identity;			}		},		searchVersion: function (dataString) {			var index = dataString.indexOf(this.versionSearchString);			if (index == -1) return;			return parseFloat(dataString.substring(index+this.versionSearchString.length+1));		},		dataBrowser: [			{				string: navigator.userAgent,				subString: "Chrome",				identity: "Chrome"			},			{ 	string: navigator.userAgent,				subString: "OmniWeb",				versionSearch: "OmniWeb/",				identity: "OmniWeb"			},			{				string: navigator.vendor,				subString: "Apple",				identity: "Safari"			},			{				prop: window.opera,				identity: "Opera"			},			{				string: navigator.vendor,				subString: "iCab",				identity: "iCab"			},			{				string: navigator.vendor,				subString: "KDE",				identity: "Konqueror"			},			{				string: navigator.userAgent,				subString: "Firefox",				identity: "Firefox"			},			{				string: navigator.vendor,				subString: "Camino",				identity: "Camino"			},			{		// for newer Netscapes (6+)				string: navigator.userAgent,				subString: "Netscape",				identity: "Netscape"			},			{				string: navigator.userAgent,				subString: "MSIE",				identity: "Explorer",				versionSearch: "MSIE"			},			{				string: navigator.userAgent,				subString: "Gecko",				identity: "Mozilla",				versionSearch: "rv"			},			{ 		// for older Netscapes (4-)				string: navigator.userAgent,				subString: "Mozilla",				identity: "Netscape",				versionSearch: "Mozilla"			}		],		dataOS : [			{				string: navigator.platform,				subString: "Win",				identity: "Windows"			},			{				string: navigator.platform,				subString: "Mac",				identity: "Mac"			},			{				string: navigator.platform,				subString: "Linux",				identity: "Linux"			}		]		};	BrowserDetect.init();		return BrowserDetect; }  function changeSearchText(event, id1, id2) { 	 	if(event.keyCode != 13) 		id2.value = id1.value; 	else 		sendSearchForm(); 	 }  function sendSearchForm() { 	//alert('form will be sent!!!'); 	document.search_form.submit(); }  function showProgress() { 	 	var div = document.getElementById("progress"); 	div.style.visibility = "visible"; 	 } function sendform( strAction) { //  alert ("Form value:" +  document.DBFORM.ACTION );     document.DBFORM.ACTION.value=strAction;	document.DBFORM.JSACTION.value=strAction;	// alert ("Form value:" +  document.DBFORM.ACTION.value );	// alert ("Form value:" +  document.DBFORM.JSACTION.value );	document.DBFORM.submit();  }