Ok, innanzitutto grazie per la tua disponibilità.
Adesso ti incollo tutta la index, anche se è molto lunga.
Premetto che uso html, javascript, php e smarty (non so se ne hai sentito mai parlare), quindi se vedi del codice strano è quello.

codice:
{*Smarty*}
<!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" dir="ltr" lang="en-US" xml:lang="en">
<head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>xxxx </title>
    
    <script type="text/javascript" src="jsp/script.js"></script>
    <script type="text/javascript" src="jsp/gesdoc.js"></script>
	<script type="text/javascript" src="jsp/contenuto.js"></script>    
	<script type="text/javascript" src="jsp/format.js"></script>
    <script type="text/javascript" src="jsp/form.js"></script>
    <script type="text/javascript" src="jsp/query.js"></script>
    <script type="text/javascript" src="jsp/date.js"></script>
    <script type="text/javascript" src="jsp/codfis.js"></script>
    <script type="text/javascript" src="jsp/menu.js"></script>
    <script type="text/javascript" src="jsp/pophelp.js"></script>
    <script type="text/javascript" src="jsp/editor.js"></script>
    <script type="text/javascript" src="jsp/print.js"></script>
    <script type="text/javascript" src="jsp/document.js"></script>
    <!--
    INCLUDE IL FILE SALVA DATI DIFFERENZIATO PER TIPO DI PAGINA
    //-->
    <script type="text/javascript" src="jsp/{$fsav}.js"></script>

    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
    
    
	<link rel="stylesheet" href="gesdoc.css" type="text/css" media="screen" />
    
	<script type="text/javascript" src="DatePicker/prototype.js"></script>
    <script type="text/javascript" src="DatePicker/scriptaculous.js"></script>
    <script type="text/javascript" src="DatePicker/datepicker.js"></script>
    <link rel="stylesheet" type="text/css" href="DatePicker/datepicker.css"></link>
    
    
</head>
<body  onload="setClass();{if $focus!=''} this.document.getElementById('{$focus}').focus(); {/if}" 
	   onunload="savedata('{$chkv}');"  >
<div id="art-page-background-simple-gradient">
        <div id="art-page-background-gradient"></div>
    </div>
    <div id="art-main">
      <div class="art-sheet">
            <div class="art-sheet-tl"></div>
            <div class="art-sheet-tr"></div>
            <div class="art-sheet-bl"></div>
            <div class="art-sheet-br"></div>
            <div class="art-sheet-tc"></div>
            <div class="art-sheet-bc"></div>
            <div class="art-sheet-cl"></div>
            <div class="art-sheet-cr"></div>
            <div class="art-sheet-cc"></div>
            <div class="art-sheet-body">
                <div class="art-header">
                    <div class="art-header-png"></div>
                    <div class="art-header-jpeg"></div>
                    
                </div>
                <div class="art-nav">
                	<div class="l"></div>
                	<div class="r"></div>
                    <form id="mainform" name="mainform" action="" method="post" enctype="multipart/form-data">
                	<ul class="art-menu">
                		[*]<span class="l"></span><span class="r"></span><span class="t">Home</span>[*]<span class="l"></span><span class="r"></span><span class="t">Chi siamo</span>
                		[*]<span class="l"></span><span class="r"></span><span class="t">Lo Studio</span>[*]<span class="l"></span><span class="r"></span><span class="t">Profili</span>[*]<span class="l"></span><span class="r"></span><span class="t">Servizi</span>
						[*]<span class="l"></span><span class="r"></span><span class="t">Dove Siamo</span>[*]<span class="l"></span><span class="r"></span><span class="t">Contatti</span>
						{if $user != ''}
						[*]<span class="l"></span><span class="r"></span><span class="t">Torna all'area riservata</span>
						{/if}
                	[/list]
                </div>
                <div class="art-content-layout">
                    <div class="art-content-layout-row">
                        <div class="art-layout-cell art-content">
                            <div class="art-post">
                                <div class="art-post-tl"></div>
                                <div class="art-post-tr"></div>
                                <div class="art-post-bl"></div>
                                <div class="art-post-br"></div>
                                <div class="art-post-tc"></div>
                                <div class="art-post-bc"></div>
                                <div class="art-post-cl"></div>
                                <div class="art-post-cr"></div>
                                <div class="art-post-cc"></div>
                                <div class="art-post-body">
                                	<div class="art-postcontent">
                                               {include file = "$contenuto.tpl"}
                            				   {include file="formparm.tpl"}
                                					<input name="contenuto" type="hidden" id="contenuto" value='{$contenuto}'/>
								
                                 						 </form> 
									</div>
                                            <div class="cleared"></div>
                            		<div class="cleared"></div>
                                </div>
                            </div>
                            
                        </div>
                      <div class="art-layout-cell art-sidebar1">
                            <div class="art-block">
                                <div class="art-block-tl"></div>
                                <div class="art-block-tr"></div>
                                <div class="art-block-bl"></div>
                                <div class="art-block-br"></div>
                                <div class="art-block-tc"></div>
                                <div class="art-block-bc"></div>
                                <div class="art-block-cl"></div>
                                <div class="art-block-cr"></div>
                                <div class="art-block-cc"></div>
                                <div class="art-block-body">
                                            <div class="art-blockheader">
                                                <div class="l"></div>
                                                <div class="r"></div>
                                                 <div class="t">Area Riservata</div>
                                            </div>
                                            <div class="art-blockcontent">
                                                <div class="art-blockcontent-tl"></div>
                                                <div class="art-blockcontent-tr"></div>
                                                <div class="art-blockcontent-bl"></div>
                                                <div class="art-blockcontent-br"></div>
                                                <div class="art-blockcontent-tc"></div>
                                                <div class="art-blockcontent-bc"></div>
                                                <div class="art-blockcontent-cl"></div>
                                                <div class="art-blockcontent-cr"></div>
                                                <div class="art-blockcontent-cc"></div>
                                                <div class="art-blockcontent-body">
                                            
                                                            {if $logout == 0}
                                        <div><form method="post" id="newsletterform" action="index.php">Nome Utente:<input type="text" name="username" id="s" style="width: 75%"/>

			Password:<input type="password" name="password" id="s" style="width: 75%"/>
                                        <button class="Button" type="submit" name="search">

                                                <span class="btn">
                                                    <span class="t">Accedi</span>
                                                    <span class="r"><span></span></span>
                                                    <span class="l"></span>
                                                </span>
                                        </button>
                                        </form></div>
									{else}
									<div><form method="post" id="newsletterform" action="index.php">   Loggato come {$user}
                                        <button class="Button" type="submit" name="search">
                                             <span class="btn">
                                                <span class="t">Logout</span>
                                                  <span class="r"><span></span></span>
                                                   <span class="l"></span>
                                               </span>
                                        </button>
									  <input type="hidden" name="logout"/>
                                        </form></div>
									{/if}
                                            
                                            
                                            		<div class="cleared"></div>
                                                </div>
                                            </div>
                            		<div class="cleared"></div>
                                </div>
                            </div>
il codice continua ma nel messaggio non entra...