/*FUNZIONI GENERICHE UTILIZZABILI DA QUALSIASI PAGINA*/

function sendNews(lan){
	if (!lan) {lan='it';}
	nWidth=490;
	nHeight=450;
	window.open("/dynnew/"+lan+"/popup/popSendNews.phtml?link="+escape(window.location.href),"WinPopUp","width="+nWidth+",height="+nHeight+",directories=no,toolbar=no,scrollbars=no,resizable=no,status=no");
}

function submitForm(button, form){
		button.disabled=true;
		form.submit();
}

function search_arianna(lan)
{
	q=encodeURIComponent(document.frmArianna.query.value);
	if (q == '') {
		return false;
	} else {
		document.frmArianna.method = 'POST';
		document.frmArianna.action = lan + "search.phtml";
		document.frmArianna.submit();
		return false;	
	}
}


/*FUNZIONI NON GENERICHE MA CONDIVISE DA DUE O PIU' PAGINE AVENTI SIMILE STRUTTURA*/

// Funzioni di apertura popup Emulatore i-mode
function popupEmu(filename){
	filepath = "/imode/it/emu/";
        if (filename=="popupEmuHome.phtml"){
	nWidth=732;
	nHeight=560;
      }else if (filename=="popupEmuTech.phtml"){
        nWidth=350;
        nHeight=632;
      }else{
        nWidth=800;
                nHeight=600;
      }
      var nXMax = screen.width;
        var nYMax = screen.height;
      var nXOffset = (nXMax - nWidth)/2;
        var nYOffset = (nYMax - nHeight)/2;
        window.open(filepath+filename,"emu","top="+nYOffset+",left="+nXOffset+", width="+nWidth+",height="+nHeight+",directories=no,toolbar=no,scrollbars=yes,resizable=no");
    }

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
