Hola
Prueba así
Código Javascript
:
Ver original<html>
<head>
<script language="JavaScript" type="text/JavaScript">
function idioma() {
if (navigator.userAgent.indexOf("Opera")!=-1) (language=navigator.language)
else { if (navigator.appName == "Netscape") (language=navigator.language)
else language=navigator.browserLanguage };
if(language){language=language.substring(0,2);}
else {language="zz";}
switch (language) {
case "es" : lang(); break;
} }
function lang() {
alert('entro');
document.getElementById('IdLang').style.display = (document.getElementById('IdLang').style.display == 'none') ? 'block' : 'none';
}
// -->
</script>
</head>
<body onLoad="idioma()">
<div id="IdLang" style="display:block;">Una prueba</div>
</body>
</html>
Suerte