/*
*-------------------------------------------------------
*Copyright (c) 2006 Hi-Think s.n.c. All Rights Reserved.
*
* This software is the confidential and proprietary information
* of Hi-Think s.n.c. ("Confidential Information").
* You shall not disclose such Confidential Information and shall
* use it only in accordance with the terms of the license
* agreement you entered into with Hi-Think s.n.c.
*-----------------------------------------------------------------
*/

/**
 * 
 * hifuvarie.js
 *
 *	funzioni varie:
 *	disabilita un elemento di un form.
 *
 *	@param id,value: id dell'elemento da nascondere, value il valore del menu a tendina.
 *
 *	@package amministrazione
 *	@author Alberto Coccoli
 *	@version $Id: hifuvarie.js,v 1.1 2007/08/01 07:36:02 acoccoli Exp $
 */

/**
 * Utilizzata da hitpmanudett.tpl,
 * se nel menu a tendina seleziono "pagina custom" tolgo il campo
 * inputText e mostro i link pes scegliere e vedere la pagina custom.
 */
function testTipoLink(id,value)
{
	if (value == '1')
	{	document.getElementById("url"+id).style.display="none";
		document.getElementById("pag"+id).style.display="inline";
	}
	else
	{	document.getElementById("url"+id).style.display="inline";
		document.getElementById("pag"+id).style.display="none";
	}
} // function


function popup(mypage,myname,w,h,scroll)
{
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
	if(win.window.focus)
	{	win.window.focus();
	}
} // function


