// JavaScript Document
function checkform()
{
 var nome_search, ordine_search;
 nome_search = document.forms['search'].nome.value;
 ordine_search = document.forms['search'].ordine.value;
 indirizzoStudio = document.forms['search'].indirizzoStudio.value;
 

 if(nome_search == "" && ordine_search == "" && indirizzoStudio == ""){
   alert("Nessun criterio di ricerca selezionato.");
   document.forms['search'].nome.focus();
   return false;
 } else  return true;

}



/**
* Apre un popup unico per l'applicazione
*/
var popUpWin=0;
var mainWindow = 0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = window.open(URLStr, 'popUpWin', 'modal=yes,directories=no,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}



function old_vedi_dettagli(codord, archivio, id)
{
	var xtop = 0;
	var xleft = 120;
	var features;
	var parameters;
	//features = 'screenX='+xleft+',screenY='+xtop+',scrollbars=yes,status=no,width=550,height=750,resizable=yes,titlebar="upload file albo",alwaysRaised=yes';
	parameters = '?codord='+codord+'&archivio='+archivio+'&id='+id;
	//	alert(parameters);
	if(archivio == 1)
		popUpWindow('http://www.ordineavvocaticrotone.it/albo/vedi_scheda.php'+parameters, 120,0,550,750);
	else if(archivio == 2)
		popUpWindow('http://www.ordineavvocaticrotone.it/albo/vedi_scheda_praticante.php'+parameters, 120,0,550,750);
	else
	{
		alert("Archivio: " + archivio + " non valido\nContattare l'assistenza\nGrazie.");
		return;
	}
}



function vedi_dettagli(codord, archivio, id)
{
        var xtop = 0;
        var xleft = 120;
        var features;
        var parameters;
        features = 'screenX='+xleft+',screenY='+xtop+',scrollbars=yes,status=no,width=550,height=750,resizable=yes,titlebar="upload file albo",alwaysRa\
ised=yes';
        parameters = '?codord='+codord+'&archivio='+archivio+'&id='+id;
//      alert(parameters);

	if(archivio == 1)
        	 io = window.open('http://www.ordineavvocaticrotone.it/albo/vedi_scheda.php'+parameters, 'Dettagli', features);
	else if(archivio == 2)
        	io = window.open('http://www.ordineavvocaticrotone.it/albo/vedi_scheda_praticante.php'+parameters, 'Dettagli', features);
	else
	{
		alert("Archivio: " + archivio + " non valido\nContattare l'assistenza\nGrazie.");
		return;
	}


        io.moveTo(120, 0);
}


lck=0;
function r(hval)
{
if ( lck == 0 )
{
document.bgColor=hval;
}
}
function l()
{
if (lck == 0)
{
lck = 1;
}
else
{
lck = 0;
}
}
<!--
// Prelevato su http://www.web-link.it
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
// end -->
