Ciao, è possibile?

Ho "inventato" qualcosa del genere, ma ovviamente non funziona... digiuno totale di javascript...

Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<
title>Documento senza titolo</title>
<
script language="JavaScript" type="text/javascript">
<!-- 
// Prelevato ed illustrato su [url]http://www.web-link.it[/url]
if (navigator.appName == 'Netscape'
    var 
language navigator.language
else 
    var 
language navigator.browserLanguage

var 
code language.substring(0,2); 


if (
code == 'it'
        {
            (
document.getElementById("it").style.display="block";) && (document.getElementById("en").style.display="none";)
        } 
    
else {(
document.getElementById("en").style.display="block";) && (document.getElementById("it").style.display="none";)} 
 
document.location.href url 
alert
(url); 
// end --> 
</script> 

<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
#en {color:#F30}
#it {color:#3CF}
-->
</style></head>

<body>
<div id="en">prova</div>
<div id="it">prova2</div>
</body>
</html>