	function loginpl(){
	window.open('http://my.plus.golf/?or=book','ventanatalogin','width=400,height=460,toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizable=no,top=100,left=250');	
	}
	function logoutpl(){
	window.open('https://my.plus.golf/logout.php?or=book','ventanatalogout','width=20,height=20,toolbar=no,directories=no,menubar=no,status=no,scrollbars=no,resizable=no,top=250,left=250');	
	}
	function Players(URL){
	window.open(URL,'ventanataplayers','width=760,height=465,toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizable=no,top=5,left=5');	
	}
	
	function openpl(){
	window.open('https://my.plus.golf/home','ventanaplayersm','width=500,height=600,toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizable=no,top=10,left=100');
	}
	function registerpl(){
	window.open('https://my.plus.golf/register','ventanaregplayer','width=800,height=600,toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizable=no,top=10,left=10');
	}
	function passretpl(){
	window.open('https://my.plus.golf/register/reset/','ventanapasretpl','width=800,height=600,toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizable=no,top=10,left=10');
	}
	function myaccountpl(){
	window.open('http://my.plus.golf/account','ventanapasretpl','width=800,height=600,toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizable=no,top=10,left=10');
	}	
	function notifypl(){
	window.open('http://my.plus.golf/push','ventanapasretpl','width=800,height=600,toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizable=no,top=10,left=10');
	}
	function goFullscreen(page) {
		var URLen=page;
		var windowNamen="ventanafull";
		var browserName=navigator.appName;
		var operatingSystem=navigator.platform;
		var version = parseFloat(navigator.appVersion);

		//alert(browserName);

		// Netscape check version 4.0+ on Win
		if (browserName.indexOf("Netscape")!=-1 && version>=4.0 && operatingSystem.indexOf("Win")!=-1)
		 {
		 window.open(URLen,windowNamen,'titlebar=no,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availWidth+',scrollbars=1,screenX=0,screenY=0,top=0,left=0')
		 }

		// MSIE Mac check
		else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Mac")!=-1)
		 {
		 window.open(URLen,windowNamen,'titlebar=no,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availWidth+',scrollbars=1,screenX=0,screenY=1,top=0,left=0')
		 }

		// Netscape Mac check
		else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Mac")!=-1)
		 {
		 window.open(URLen,windowNamen,'width='+screen.width+',height='+screen.height+',top=0,left=0');
		 }

		// MSIE Windows
		else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Win")!=-1)
		 {
		 //window.open(URLen,windowNamen,'fullscreen=yes')
		var win = window.open(URLen,windowNamen,'titlebar=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availHeight+',screenX=0,screenY=1,top=0,left=0')
			win.resizeTo(screen.width, screen.height);
			 //win.moveTo(1, 1);
			 //win.moveTo(0, 0);
			 //win.resizeTo(screen.width, screen.height);
		 }

		// Netscape Windows
		else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Win")!=-1)
		 {
		 window.open(URLen,windowNamen,'width='+screen.width+',height='+screen.height+',top=0,left=0');
		 }

		else
		 {
		 window.open(URLen,windowNamen);
		 }

	}
	function LeaderFull(ID){
	window.open('http://www.golfmol.com/goleader.php?ancho='+ window.screen.availWidth +'&alto=' + window.screen.availHeight + '&' + ID + '','ventanaleaderG','width=' + window.screen.availWidth+',height=' + window.screen.availWidth+',toolbar=no,directories=no,menubar=no,status=no,scrollbars=no,resizable=no,top=0,left=0');	
	}
	function infocont(ID){
	window.open('https://www.golfmol.com/incs/sp/info.contacto.in.php?id='+ ID +'','ventana_zdxq','width=480,height=270,toolbar=no,directories=no,menubar=no,status=no,scrollbars=no,resizable=no,top=10,left=5');
	}

	function nuevoAjax(){
	var xmlhttp=false;
	 try {
	  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	 } catch (e) {
	  try {
	   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (E) {
	   xmlhttp = false;
	  }
	 }

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	  xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
	}

	function cargardatos(id,php,padre){
	var readajax = document.getElementById(id);
	if (!readajax) return;

	var ajax = nuevoAjax();
	var urlText = String(php || '');
	var safeUrl = urlText.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
	var diagnosticLink = '<div style="padding:10px 12px;margin:8px 0;border:1px solid #d7ddda;border-radius:6px;background:#fff;font-size:13px;overflow-wrap:anywhere;">' +
		'<strong>URL AJAX:</strong> <a href="' + safeUrl + '" target="_blank" rel="noopener noreferrer">' + safeUrl + '</a></div>';

	readajax.innerHTML = diagnosticLink + '<p style="text-align:center;margin:0px;padding:10px;"><img src="/images/ajax-loading.gif"></p>';
	if (!ajax) {
		readajax.innerHTML = diagnosticLink + '<p style="padding:10px;color:#900;">No se pudo iniciar la solicitud AJAX.</p>';
		return;
	}

	ajax.open("GET", urlText, true);
	ajax.timeout = 20000;
	ajax.onreadystatechange = function() {
		if (ajax.readyState !== 4) return;
		if (ajax.status >= 200 && ajax.status < 300) {
			readajax.innerHTML = ajax.responseText || diagnosticLink + '<p style="padding:10px;">La respuesta AJAX llegó vacía.</p>';
		} else {
			readajax.innerHTML = diagnosticLink + '<p style="padding:10px;color:#900;"><strong>Error AJAX HTTP ' + ajax.status + '.</strong></p>' + (ajax.responseText || '');
		}
	};
	ajax.ontimeout = function() {
		readajax.innerHTML = diagnosticLink + '<p style="padding:10px;color:#900;"><strong>La solicitud AJAX superó los 20 segundos.</strong></p>';
	};
	ajax.onerror = function() {
		readajax.innerHTML = diagnosticLink + '<p style="padding:10px;color:#900;"><strong>No se pudo conectar con la URL AJAX.</strong></p>';
	};
	ajax.send(null);
	}

	function PostAjax(id,php){
	//alert(id+'\n'+php+'\n'+padre);
	var readajax;
	readajax = document.getElementById(id);
	readajax.innerHTML = '<p style="text-align:center;margin:0px;padding:10px;"><img src="/images/ajax-loading.gif"></p>';
	ajax=nuevoAjax();
	ajax.open("POST", php,true);
	ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajax.send(parameters)
	ajax.onreadystatechange=function() {
	if (ajax.readyState==4) {
	readajax.innerHTML=ajax.responseText;
	}
	}
	ajax.send(null)
	}
	
	function inscr_ok(torneo,matricula,nombre)
	{
	var agree=confirm("ATENCION ... CONFIRME que va a inscribir en este torneo al jugador:\n\n\n" + nombre + "");
	//self.frames['regt'].location.href='/do/limitada_feg_do.php?id=FEG&lang=sp&NUMF=' + torneo + '&player=' + matricula + '&st=A ';	
	location.href='/do/limitada_feg_do.php?id=FEG&lang=sp&NUMF=' + torneo + '&player=' + matricula + '&st=A ';
	if (agree)
		return true ;
	else
		return false ;
	}
	
	function inscr_prov(torneo,matricula,nombre)
	{
	var agree=confirm("INSCRIPCION PROVISORIA ...\n\nVa a inscribir en este torneo al jugador con ESTADO DE BAJA:\n\n" + nombre + "\n\nRecuerde que tiene un dia habil para abonar LA MATRICULA ANUAL DE HANDICAP. Caso contrario esta inscripcion sera cancelada.");
	//self.frames['regt'].location.href='/do/limitada_feg_do.php?id=FEG&lang=sp&NUMF=' + torneo + '&player=' + matricula + '&st=B ';	
	location.href='/do/limitada_feg_do.php?id=FEG&lang=sp&NUMF=' + torneo + '&player=' + matricula + '&st=B ';	
	if (agree)
		return true ;
	else
		return false ;
	}

	function confenter()
	{
	var agree=confirm("Please confirm you will commit to this Event ...");
	if (agree)
		return true ;
	else
		return false ;
	}
	function confirmar_del_res()
	{
	var agree=confirm("ATENCION ... CONFIRME que intenta eliminar y cancelar esta reserva");
	if (agree)
		return true ;
	else
		return false ;
	}
	function Reservar(URL){
		window.open(URL,'ventanares','width=900,height=600,toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizable=no,top=10,left=10');	
	}
	function openRound(evt, cityName) {
	  // Declare all variables
	  var i, tabcontent, tablinks;
	
	  // Get all elements with class="tabcontent" and hide them
	  tabcontent = document.getElementsByClassName("tabcontent");
	  for (i = 0; i < tabcontent.length; i++) {
		tabcontent[i].style.display = "none";
	  }
	
	  // Get all elements with class="tablinks" and remove the class "active"
	  tablinks = document.getElementsByClassName("tablinks");
	  for (i = 0; i < tablinks.length; i++) {
		tablinks[i].className = tablinks[i].className.replace(" active", "");
	  }
	
	  // Show the current tab, and add an "active" class to the button that opened the tab
	  document.getElementById(cityName).style.display = "block";
	  evt.currentTarget.className += " active";
	} 
	function veroc(id) {
		var e = document.getElementById(id);
		if(e.style.display == 'block')
			e.style.display = 'none';
		else
          e.style.display = 'block';
    }
	function vergross() {
		var e = document.getElementById('igross');
		var f = document.getElementById('inet');
		var g = document.getElementById('isfgross');
		var h = document.getElementById('isfnet');
		var j = document.getElementById('vgross');
		var k = document.getElementById('vnet');
		var l = document.getElementById('vsfgross');
		var m = document.getElementById('vsfnet');
		var p = document.getElementById('botgross');
		var r = document.getElementById('botsfgross');
		// Usa el primer panel que exista como indicador de estado (soporte RON9 back-only)
		var stateEl = e || j;
		if(!stateEl) return;
		if(stateEl.style.display == 'block') {
			if(e) e.style.display = 'none';
			if(f) f.style.display = 'block';
			if(g) g.style.display = 'none';
			if(h) h.style.display = 'none';
			if(j) j.style.display = 'none';
			if(k) k.style.display = 'block';
			if(l) l.style.display = 'none';
			if(m) m.style.display = 'none';
			if(p) p.style.backgroundColor = '#780001';
			if(r) r.style.backgroundColor = '#999';
		} else {
			if(e) e.style.display = 'block';
			if(f) f.style.display = 'none';
			if(g) g.style.display = 'none';
			if(h) h.style.display = 'none';
			if(j) j.style.display = 'block';
			if(k) k.style.display = 'none';
			if(l) l.style.display = 'none';
			if(m) m.style.display = 'none';
			if(p) p.style.backgroundColor = '#000';
			if(r) r.style.backgroundColor = '#999';
		}
    }
	function versfgross() {
		var e = document.getElementById('igross');
		var f = document.getElementById('inet');
		var g = document.getElementById('isfgross');
		var h = document.getElementById('isfnet');
		var j = document.getElementById('vgross');
		var k = document.getElementById('vnet');
		var l = document.getElementById('vsfgross');
		var m = document.getElementById('vsfnet');
		var p = document.getElementById('botgross');
		var r = document.getElementById('botsfgross');
		// Usa el primer panel stableford que exista (soporte RON9 back-only)
		var stateEl = g || l;
		if(!stateEl) return;
		if(stateEl.style.display == 'block') {
			if(e) e.style.display = 'none';
			if(f) f.style.display = 'none';
			if(g) g.style.display = 'none';
			if(h) h.style.display = 'block';
			if(j) j.style.display = 'none';
			if(k) k.style.display = 'none';
			if(l) l.style.display = 'none';
			if(m) m.style.display = 'block';
			if(p) p.style.backgroundColor = '#999';
			if(r) r.style.backgroundColor = '#090';
		} else {
			if(e) e.style.display = 'none';
			if(f) f.style.display = 'none';
			if(g) g.style.display = 'block';
			if(h) h.style.display = 'none';
			if(j) j.style.display = 'none';
			if(k) k.style.display = 'none';
			if(l) l.style.display = 'block';
			if(m) m.style.display = 'none';
			if(p) { p.style.background = ''; p.style.backgroundColor = '#999'; }
			if(r) { r.style.background = ''; r.style.backgroundColor = '#009'; }
		}
    }
	function statsswap() {
		var e = document.getElementById('grossdiv');
		var f = document.getElementById('netdiv');
	
		var p = document.getElementById('botgrosstats');
		
		if(e.style.display == 'block') {
			e.style.display = 'none';
			f.style.display = 'block';
			p.style.backgroundColor = '#780001';
		} else {
			e.style.display = 'block';
			f.style.display = 'none';
			p.style.backgroundColor = '#000';
		}
    }
