<!--
	var popUpWin=0;
	function popUpWindow(URLStr, left, top, width, height,scrollbars)
	{
		try
		{		
			var str_scrollbars = 'no';
			if(popUpWin)
			{
				if(!popUpWin.closed) popUpWin.close();
			}
				if (scrollbars == 1) { str_scrollbars = 'yes'; }
				popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+str_scrollbars+',resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
		}
		catch (e)
		{
			window.status = e.message;
		}			

	}
	
	
	function goAway (destinazione,id_da_cancellare,pagina)
	{
		try
		{
			if (pagina == '') {pagina = 1};
	
			input_box = window.confirm("Cancellare la voce selezionata?");
			
			if (input_box==true) {
				location.replace(destinazione+'&id='+id_da_cancellare+'&pagina='+pagina+'&act=delete')
			} else {
				return false;
			}
		}
		catch (e)
		{
			window.status = e.message;
		}
	}
	

function FF_jumpMenu (objSelect,nomeFile) { 
  var cat= objSelect.options[objSelect.selectedIndex].value;
  document.location = nomeFile+'?link=portalesocio&cat='+cat;
}


function JumpToFile(objSelect,nomeFile,param)
{ 
	  try
	  {
		  divisore = "?";
		  //controllo se il parametro contenente il nome del file contiene il carattere ?, in caso di successo è già stato passato un 
		  //parametro alla funzione
		  if (nomeFile.indexOf('?') != -1) {
			divisore = "&";
		  }
		  var val_select= objSelect.options[objSelect.selectedIndex].value;
			location.replace ( nomeFile+divisore+param+'='+val_select );
	  }
  	  catch (e)
	  {
		window.status = e.message;
	  }
}

function mmenu(mID) {
	var menu = document.getElementById(mID);
	var display = menu.style.display;
	menu.style.display = (display == "block") ? "none" : "block";
	

	menu.parentNode.style.listStyleImage = (display == "block") ? "url(cartellachiusa.gif)" : "url(cartellaaperta.gif)";
}

	function controllaForm (objForm)
	{
			try
			{
				var str_errori = '';
				var segnato = false;
				var checkbox_presente = false;
				var numEl = objForm.elements.length;
				
				for (x=0;x<numEl;x++)
				{
					if (objForm.elements[x].id == 'controlla')
					{
						if (objForm.elements[x].value == '')
						{
							str_errori += '\ncompilare il campo obbligatorio ' + objForm.elements[x].name;
						}
						if (objForm.elements[x].type == 'checkbox')
						{
								//prima controllo se il checkbox è presente
								checkbox_presente = true
							if (objForm.elements[x].checked == true)
							{
								segnato = true;
							}
						}
						if (objForm.elements[x].name == 'cap')
						{
							if (isNaN(objForm.elements[x].value))
							{
								str_errori += '\ncap non corretto';
							} else
							{
								if (objForm.elements[x].value.length < 5)
								{
									str_errori += '\ncap non corretto';
								}
							}
						}
					}
		
					if (objForm.elements[x].name == 'email' && objForm.elements[x].value != '')
					{
						var valCampoMail = objForm.elements[x].value;
						if (valCampoMail.indexOf('@') == -1 || valCampoMail.indexOf('@') == '' )
						{
							str_errori += '\nmail non corretta';
						} else
						{
							indice = valCampoMail.indexOf('@');
							if (valCampoMail.indexOf('.',indice) == -1)
							{
								str_errori += '\nmail non corretta';
							}
						}
					}
					
				}
				
				if (segnato == false && checkbox_presente == true)
				{
					str_errori += '\nscegliere almeno una tipologia di pagamento';
				}
				if (str_errori != '')
				{
					var regexp = /_/g;
					//str_errori.replace(regexp," ");
					alert (str_errori.replace(regexp," "));
					//alert (str_errori);
					return false;
				}
			return true;
		}
		catch (e)
		{
			window.status = e.message;
		}
	}
	
	function controllaSemplice (objForm) {
		try
		{
			var str_errori = '';
			var numEl = objForm.elements.length;
			
			for (x=0;x<numEl;x++) {
				if (objForm.elements[x].id == 'controlla') {
					if (objForm.elements[x].value == '') {
						str_errori += '\ninserire testo nel campo di ricerca';
					}
				}
			}
			
			if (str_errori != '') {
				alert (str_errori);
				return false;
			}
			return true;
		}
				catch (e)
		{
			window.status = e.message;
		}
	}
	
	function controllaFormUpload (objForm) {
		try
		{
			var numEl = objForm.elements.length;
			var str_errori = ''		
			for (x=0;x<numEl;x++) {
				if (objForm.elements[x].id == 'controlla' && objForm.elements[x].value == '') {
					str_errori = 'non è stato caricato il file';
				}
			}
			if (str_errori != '') {
				alert (str_errori)
				return false;
			}
			return true;
		}
		catch (e)
		{
			window.status = e.message;
		}		
	}
	
	function torna () {
		location.replace ('default.asp');
	}
	function via () {
		window.setTimeout ('torna()',4000);
	}

	function getEvalObj (strObj) {
		try
		{
			var obj;
			if (document.all) {
				obj = eval ('document.all.' + strObj)
			} else if (document.getElementById) {
				obj = document.getElementById('' + strObj + '')
			} else if (document.layers) {
				//alert('layers')
			}
			return obj;
		}
		catch (e)
		{
			window.status = e.message;
		}		
	}

	function mostra (str_obj) {
		try
		{
			var obj = getEvalObj( str_obj );
			//alert (typeof (obj) + '\n' + obj.id)
			//alert(obj.style.display)
			/*
				mostra o meno l'elenco delle offerte ricevute in registrati / default.asp
			*/
			if (obj.style.display == '') {
				obj.style.display = 'none';
			} else {
				obj.style.display = '';
			}
		}
		catch (e)
		{
			window.status = e.message;
		}		

	}

	function cambia_riserva (objFrom, objTo) {
		try
		{
			objTo.value = objFrom.value;
		}
		catch (e)
		{
			window.status = e.message;
		}		
	}
	
	function attiva (obj, obj2, obj3) {
		try
		{
			if (obj.checked == true) {
				obj2.disabled = false;
				obj3.disabled = false;
			} else if (obj.checked == false) {
				obj2.disabled = true;
				obj3.disabled = true;
			}
		}
		catch (e)
		{
			window.status = e.message;
		}		
	}

	function cambiaColore (obj)
	{
		try
		{
			if (obj.style.background != "rgb(165,167,200)" && obj.style.color != "rgb(255,255,255)") {
				obj.style.background = "rgb(165,167,200)";
				obj.style.color = "rgb(255,255,255)";
			} else {
				obj.style.background = "";
				obj.style.color = "";
			}
		}
		catch (e)
		{
			window.status = e.message;
		}		
		
	}
	
	function coloraSfondo (obj, sfondoPresente, colorName)
	{
		try
		{
			if (sfondoPresente == true) {
				var colore_sfondo_base = 'rgb(245,245,245)';
			} else {
				var colore_sfondo_base = '';
			}
			var colore_sfondo = colorName;
	
			if (obj.style.backgroundColor != colore_sfondo ) {
				obj.style.backgroundColor  = colore_sfondo;
			} else {
				obj.style.backgroundColor = colore_sfondo_base;
			}
		}
		catch (e)
		{
			window.status = e.message;
		}	
	}
	
	function testoInBold(obj) {
		try
		{
			var testo = prompt("inserisci il testo da formattare","");
			//obj.value = obj.value + testo.bold();
			if (testo!=null) {
			obj.value = obj.value + '<b>' + testo + '</b>'
			}
			obj.focus();
		}
		catch (e)
		{
			window.status = e.message;
		}			
			
	}
	
	function creaLink(obj) {
		try
		{
			var testoPerLink = prompt("inserisci il testo da rendere linkabile","");
			var collegamento = prompt("inserisci il collegamento al sito (www.sito.xyz)","");
			collegamento = "http://" + collegamento;
				//obj.value = obj.value + testoPerLink.link(collegamento);
			if (testoPerLink!=null && collegamento!=null){
			obj.value = obj.value + '<a href="' + collegamento+'" target="_blank">' + '<b>' + testoPerLink + '</b>' + '</a>';
			}
			obj.focus();
		}
		catch (e)
		{
			window.status = e.message;
		}		
	}
	
	function MailTo() {
		try
		{
			//non in uso
			var mail = prompt("inserisci l'indirizzo email","");
			document.all.body.value = document.all.body.value + mail.link("mailTo:" + mail);
		}
		catch (e)
		{
			window.status = e.message;
		}		
	}
	
	function aggiungiFirma(obj,firma,str_link) {
		try
		{
			//testo = <%=replace(testo,"<br />",vbcrlf%>
			obj.value = obj.value + '\n\n'+ firma + '\n---------------------' + '\n' + str_link;
			obj.focus();
		}
		catch (e)
		{
			window.status = e.message;
		}		
	}	
	
	
function getCount(str_textArea, str_countChar, maxChar)
{
		try
		{
			var TextArea = getEvalObj( str_textArea );
			var cntChar = getEvalObj( str_countChar );
			
			var sCur = "", chCur = "";
			var iLines = 0, iChars = 0;
			for (var iPos = 0; iPos < TextArea.value.length; iPos++) {
				if (TextArea.value.substring(iPos, iPos + 1) == '\n') {
					maxChar -= 50;
				}
			}
			cntChar.value = (maxChar - TextArea.value.length);
			
			if (TextArea.value.length > maxChar) {
				TextArea.value = TextArea.value.substring(0,maxChar);
			}
		}
		catch (e)
		{
			window.status = e.message;
		}	
}

	function setBorder (strObj) {
		try
		{
			var obj = getEvalObj (strObj);
			
			if (obj.style.border == '') {
				obj.style.border = '#CCCCCC 2px dashed';
			} else {
				obj.style.border = '';
			}
		}
		catch (e)
		{
			window.status = e.message;
		}		
	}
	
function makevisible(obj,which){
		try
		{
			var browser = navigator.userAgent.indexOf('MSIE');
			if ( which ==1 ) {
				if (browser != -1) {
					obj.filters.alpha.opacity = 100;
				} else {
					obj.style.MozOpacity = 1;
				}
			} else {
				if (browser != -1) {
					obj.filters.alpha.opacity = 35;
				} else {
					obj.style.MozOpacity = 0.35;
				}
			}
		}
		catch (e)
		{
			window.status = e.message;
		}	
}	

	function popUp (str_obj,int_show, str_height, str_frase)
	{
		try
		{
			var obj = getEvalObj (str_obj);
			
			//obj.style.display = 'none';
			
				obj.style.color = '#000000';
				obj.style.width = '300px';
				obj.style.height = str_height;
				//obj.style.letterSpacing = '0.2em';
				obj.style.position = 'absolute';
				obj.style.padding = '15px';
				//obj.style.border = '#C34838 5px solid';
				obj.style.border = '#0855A3 3px solid';
				obj.style.zIndex = '100';
				//obj.style.background = '#DDBC88';
				obj.style.background = '#ecf2ff';
				obj.style.textAlign = 'justify';
				
				obj.innerHTML = str_frase;
				
				
			if (int_show == 1) {
				obj.style.display = '';
				
			} else if (int_show == 0) {
				obj.style.display = 'none';
			}
		}
		catch (e)
		{
			window.status = e.message;
		}		
	}
	
 var menuActive = 0
 var menuOn = 0
 var divName = null;
 var timeOn = null
 var TipBox = null;
  
function showTipBox(div_name,imgName)
{
	 if (timeOn != null) clearTimeout(timeOn)
	//TipBox = document.getElementById(imgName);
	hideLayer(div_name)
}

function hideLayer(div_name)
{
	if (divName == null) divName = document.getElementById(div_name);

	if (divName)
	{
		if (divName.style.display == 'none')
		{
			//divName.style.top += TipBox.style.top;
			//divName.style.left += TipBox.style.left;
			divName.style.display = '';
		}
		else
		{
			divName.style.display = 'none';
		}
	}
}

function linkTimer()
{
	timeOn = setTimeout("btnOut()",500)
}

function btnOut()
{
	hideLayer(divName)
}
	
	
//-->