var nfield = 0;

var version = parseInt(navigator.appVersion);
var isNav = false;
isNav = navigator.appName == "Netscape";
var isIE = false;
if (navigator.appVersion.indexOf("MSIE") > -1) {isIE = true}
var stile = "";
if (isIE) {stile = ".style"}
var range = "";
if (isIE) {range = ".all"}

var isIE4 = isIE && (version > 3);


function intest1() {
	document.write('<table width=775 cellpadding=0 cellspacing=0 hspace=0 vspace=0>');
	document.write('<tr><td width=30><img src="images/vuoto.gif" width=30 height=1></td><td width=260><img src="images/vuoto.gif" width=260 height=1></td><td width=485><img src="images/vuoto.gif" width=485 height=1></td></tr>');
	document.write('<tr><td></td><td height=24 colspan=2 valign=bottom style="color: #636565; font-size: 13pt; font-weight: bold; font-style: normal; text-align:left; letter-spacing:2">STUDIO MEDICO DERMATOLOGICO</td></tr>');
	document.write('<tr><td style="background-color:#E4E4E4;"></td>');
}

function nav1(np) {
	document.write('<table width=100% cellpadding=0 cellspacing=0 hspace=0 vspace=0>');
	document.write('<tr>');
	ss='indx1'; if (np==0){ss='indx2'}
	document.write('<td align=center>&nbsp;<script>lnk1(\'HOME\',\'index.htm\',\'' + ss + '\',\'indx2\');</script></td><td> | </td>');
	ss='indx1'; if (np==1){ss='indx2'}
	document.write('<td align=center><script>lnk1(\'IPERIDROSI\',\'iperid.htm\',\'' + ss + '\',\'indx2\');</script></td><td> | </td>');
	ss='indx1'; if (np==2){ss='indx2'}
	document.write('<td align=center><script>lnk1(\'ANATOMIA E FISIOLOGIA\',\'anat.htm\',\'' + ss + '\',\'indx2\');</script></td><td> | </td>');
	ss='indx1'; if (np==3){ss='indx2'}
	document.write('<td align=center><script>lnk1(\'TERAPIA  JONTOFORETICA\',\'jonto.htm\',\'' + ss + '\',\'indx2\');</script></td><td> | </td>');
	ss='indx1'; if (np==4){ss='indx2'}
	document.write('<td align=center><script>lnk1(\'ALTRI TRATTAMENTI\',\'altri.htm\',\'' + ss + '\',\'indx2\');</script></td><td> | </td>');
	ss='indx1'; if (np==5){ss='indx2'}
	document.write('<td align=center><script>lnk1(\'COME CONTATTARCI\',\'contat.htm\',\'' + ss + '\',\'indx2\');</script></td>');
	document.write('</tr></table>');
}
function vi(a, b, col) {
   if (col == "b") {lcolor = 0x336699} else {lcolor = 0xffcc00}
   if (isIE4) 	{
	if (a.style.display == "none") 
		{a.style.visibility = "visible";
		b.style.backgroundColor = lcolor;}
	else
		{a.style.visibility = "hidden";
		b.style.backgroundColor = "";}
	}
}

function mostra(a) {
   if (isIE) 	{a.style.visibility = 'visible';}
	else	{a.visibility = 'visible';}
}

function ldimg(nome,fid) {
   if (isIE) 	{nome.src = fid;}
	else	{nome.src = fid;}
}

function nascondi(a) {
   if (isIE) 	{a.style.visibility = 'hidden';}
	else	{a.visibility = 'hidden';}
}

function inserisci(a) {
   if (isIE) 	{a.style.display = '';}
	else	{a.display = '';}
}

function elimina(a) {
   if (isIE) 	{a.style.display = 'none';}
	else	{a.display = 'none';}
}

function changeImage(a, fid){
	if (isIE)	{a.src = fid;}
	else	{a.src = fid;}
}

function lnk1(){
// parametri: testo, locazione, stile base, stile per mouseover
	style1 = "lnk"; style2 = "lnko";
	if (typeof(lnk1.arguments[2]) != "undefined" && lnk1.arguments[2] != "") {style1 = lnk1.arguments[2]}
	if (typeof(lnk1.arguments[3]) != "undefined" && lnk1.arguments[3] != "") {style2 = lnk1.arguments[3]}
	document.write('<a href="' + lnk1.arguments[1] + '"><span class="' + style1 + '" onmouseover="this.className=\'' + style2 + '\'" onmouseout="this.className=\'' + style1 + '\'">');
	document.write(lnk1.arguments[0]);
	document.write('</span></a>');
}

function lnk2(){
// parametri: testo, locazione, stile base, stile per mouseover, nome finestra, opzioni finestra
	style1 = "lnk"; style2 = "lnko";
	wname = "newWin";
	if (typeof(lnk2.arguments[2]) != "undefined" && lnk2.arguments[2] != "") {style1 = lnk2.arguments[2]}
	if (typeof(lnk2.arguments[3]) != "undefined" && lnk2.arguments[3] != "") {style2 = lnk2.arguments[3]}
	if (typeof(lnk2.arguments[4]) != "undefined" && lnk2.arguments[4] != "") {wname = lnk2.arguments[4]}
	ss = " "; if (typeof(lnk2.arguments[5]) != "undefined") {ss = lnk2.arguments[5]}
	opt = getopt(ss, "width=", "600");
	opt = opt + "," + getopt(ss, "height=", "400");
	opt = opt + "," + getopt(ss, "left=", "150");
	opt = opt + "," + getopt(ss, "top=", "50");
	opt = opt + "," + getopt(ss, "location=", "yes");
	opt = opt + "," + getopt(ss, "resizable=", "yes");
	opt = opt + "," + getopt(ss, "scrollbars=", "yes");
	document.write('<span class="' + style1 + '" onmouseover="this.className=\'' + style2 + '\'" onmouseout="this.className=\'' + style1 + '\'" onclick="' + wname + '=window.open(\'' + lnk2.arguments[1] + '\',\'' + wname + '\',\'' + opt + '\')">');
	document.write(lnk2.arguments[0]);
	document.write('</span>');
}

function getopt(str, param, defval) {
	n = str.indexOf(param);
	if (n < 0) {
		return param + defval}
	else	{
		ss1 = str.substr(n+param.length);
		n = ss1.indexOf(",");
		if (n < 0) 
			{return param + ss1}
		else	
			{return param + ss1.substr(0, n)}
		}
}

function clsAllW(){
	if (typeof(newWin)!='undefined'){window.newWin.close()}
	if (typeof(figWin)!='undefined'){window.figWin.close()}
	if (typeof(bacWin)!='undefined'){window.bacWin.close()}
}
