
function procesaFormConfig() {
if (document.fConfig.bahNOTIFCOIN.checked) { 
	document.fConfig.cNOTIFCOIN.value='1';
	} else {
	document.fConfig.cNOTIFCOIN.value='0';
	}
document.fConfig.submit();
}

function procesaform() {
if (document.fConfig.bahNOTIFCOIN.checked) { 
	document.fConfig.cNOTIFCOIN.value='1';
	} else {
	document.fConfig.cNOTIFCOIN.value='0';
	}
document.f.submit();
}

function procesaFormBate() {
document.f.submit();
}

function correo(dom,tld,us) {
url="mailto:"+us+"@"+dom+"."+tld;
document.location=url;
}

function procesaFormAlta() {
if (document.f.cNOMBRE.value && document.f.cCLAVE.value && document.f.cEMAIL.value && document.f.dezaoito.checked) {
	document.f.submit();
	} else {
		alert("<?php echo _ERROALTAFALTANDATOS ?>");
	}
}


function ajaxFunction()
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
	  document.f.cNOMBRE.value=unescape(xmlHttp.responseText);
      }
    }
  xmlHttp.open("GET","suxerir-nome.php",true);
  xmlHttp.send(null);
  }

function isIE(versionNumber) {
var detect = navigator.userAgent.toLowerCase();
if(!(navigator && navigator.userAgent && navigator.userAgent.toLowerCase)) {
  	        return false;
   	    } else {
  	        if(detect.indexOf('msie') + 1) {
  	            // browser is internet explorer
  	            var ver = function() {
  	                // http://msdn.microsoft.com/workshop/author/dhtml/overview/browserdetection.asp
  	                // Returns the version of Internet Explorer or a -1
 	                // (indicating the use of another browser).
  	                var rv = -1; // Return value assumes failure
   	                if (navigator.appName == 'Microsoft Internet Explorer') {
   	                    var ua = navigator.userAgent;
   	                    var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
   	                    if (re.exec(ua) != null) {
  	                        rv = parseFloat( RegExp.$1 );
   	                    }
   	                }
  	                return rv;
  	            };
   	            var valid = true;
  	            // if the version can be found and the version is less than our version number it is invalid
  	            if ((ver > -1) && (ver < versionNumber)) {
  	                valid = false;
  	            }
   	            return valid;
				//return ver;
  	        } else {
   	             return false
				// Se non é IE, devolvemos OK
				//return true;
   	        }
   	    }
 }
 
 function versionIE() {
 if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
 var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
 if (ieversion>=8)
  return 8;
 else if (ieversion>=7)
  return 7;
 else if (ieversion>=6)
  return 6;
 else if (ieversion>=5)
  return 5;
}
else
  return -1;
 }
 

