function rosa( pageName ) {
	win = window.open( pageName, "xxx", "width=450,height=480,scrollbars=1,screenX=50,screenY=30,top=30,left=50" );
	win.focus();
}
function news( pageName ) {
	win = window.open( pageName, "xxx", "width=420,height=360,scrollbars=1,screenX=100,screenY=100,top=100,left=100" );
	win.focus();
}
function news( pageName ) {
	win = window.open( pageName, "xxx", "width=500,height=250,scrollbars=1,top=100,left=100 ");
	win.focus();
}
function freq() {
	win = window.open( "", "xxx", "width=560,height=320,top=200,left=200" );
	win.focus();
}
function oldnew() {
	win = window.open( "", "xxx", "width=200,height=450,scrollbars=1,top=50,left=50" );
	win.focus();
}
function dj() {
	win = window.open( "", "xxx", "width=600,height=400,scrollbars=1,top=10,left=10" );
	win.focus();
}
function docs() {
	win = window.open( "", "xxx", "width=400,height=250,scrollbars=1,resizable=1,top=100,left=100" );
	win.focus();
}
function edizione( value ) {
	if ( value != 0 ) {
		window.open( "http://" + value + ".carnico.it" );
	}
}
function newsCategory( newsCategoryID ) {
	win = window.open( "/newscategory.php?newsCategoryID=" + newsCategoryID, "newsCategory", "width=500,height=400,scrollbars=1" );
	win.focus();
}
function onda() {
	window.open( "stream.html", "stream", "width=330,height=100" );
}
function selectGiornata( selData ) {
	if ( selData != 0 ) {
		document.giornata.submit();
	}
}
function setBlink( id ) {
	if ( liv = document.getElementById( id ) ) {
		if ( liv.style.color != "#000000" && liv.style.color != "rgb(0, 0, 0)" ) {
			liv.style.color = "#000000";
		} else {
			if ( className == "pari" ) {
				liv.style.color = "#EEEEEE";
			} else {
				liv.style.color = "#FFFFFF";
			}
		}
	}
	setTimeout( "setBlink('" + id + "')", 800 );
}
function stringToNumber( s ) {
	return parseInt( ( '0' + s ), 10 );
}
function Is() { 
	var agt = navigator.userAgent.toLowerCase();
	this.major = stringToNumber( navigator.appVersion );
	this.minor = parseFloat( navigator.appVersion );
	this.nav  =	( ( agt.indexOf( 'mozilla' )!= - 1 ) &&
				( ( agt.indexOf( 'spoofer' ) == - 1 ) &&
				( agt.indexOf( 'compatible' ) == - 1 ) ) );
	this.nav2 = ( this.nav && ( this.major == 2 ) );
	this.nav3 = ( this.nav && ( this.major == 3 ) );
	this.nav4 = ( this.nav && ( this.major == 4 ) );
	this.nav5 =	( this.nav && ( this.major == 5 ) );
	this.nav6 = ( this.nav && ( this.major == 5 ) );
	this.gecko = ( this.nav && ( this.major >= 5 ) );
	this.ie = ( agt.indexOf( "msie" ) != - 1 );
	this.ie3 = ( this.ie && ( this.major == 2 ) );
	this.ie4 = ( this.ie && ( this.major == 3 ) );
	this.ie5 = ( this.ie && ( this.major == 4 ) );
	this.opera = ( agt.indexOf( "opera" ) != - 1 );
	this.nav4up = this.nav && ( this.major >= 4 );
	this.ie4up = this.ie && ( this.major >= 4 );
}
var is = new Is();
function getElt() {
	if ( is.nav4 ) {
		var currentLayer = document.layers[getElt.arguments[0]];
		for ( var i = 1; i < getElt.arguments.length && currentLayer; i++ ) {
			currentLayer = currentLayer.document.layers[getElt.arguments[i]];
		}
		return currentLayer;
	} else if ( document.getElementById && document.getElementsByName ) { 
		var name = getElt.arguments[getElt.arguments.length - 1];
		if ( document.getElementById( name ) ) {
			return document.getElementById( name );
		} else if ( document.getElementsByName( name ) ) {
			return document.getElementsByName( name )[0];
		}
	} else if ( is.ie4up ) {
		var elt = eval( 'document.all.' + getElt.arguments[getElt.arguments.length - 1] );
		return elt;
	}
}
function getWindowYOffset() {
	if ( is.nav4 ) {
		return window.pageYOffset;
	} else if ( is.ie4up ) {
		return document.body.scrollTop;
	} else if ( is.gecko ) {
		return window.pageYOffset;
	}
}
function setEltTop( elt, y ) {
	if ( is.nav4 ) {
		elt.top = y;
	} else if ( is.ie4up ) {
		elt.style.pixelTop = y;
	} else if ( is.gecko ) {
		elt.style.top = ( y + "px" );
	}
}
function getCurrentWinHeight() {
	if ( is.nav4 ) {
		return window.innerHeight;
	} else if ( is.ie4up ) {
		return document.body.clientHeight;
	} else if ( is.gecko ) {
		return window.innerHeight;
	}
}
function getEltHeight( elt ) {
	if ( is.nav4 ) {
		if ( elt.document.height ) {
			return elt.document.height;
		} else {
			return elt.clip.bottom - elt.clip.top;
		}
	}
	if ( is.ie4up ) {
		if ( elt.style.pixelHeight ) {
			return elt.style.pixelHeight;
		} else {
			return elt.clientHeight;
		}
	}
	if ( is.gecko ) {
		if ( elt.style.height ) {
			return stringToNumber( elt.style.height );
		} else {
			return stringToNumber( elt.offsetHeight );
		}
	}
	return - 1;
}
function scrollBanner( top ) {
	var elt = getElt( "floatingBanners" );
	if ( elt ) {
		setEltTop( elt, getWindowYOffset() + top );
	    setTimeout( "scrollBanner(" + top + ")", 1 );
	}
}
function initOffset() {
	elt = getElt( "floatingBanners" );
	scrollBanner( getCurrentWinHeight() - getEltHeight( elt ) - 5 );
}
function zoom( imageName ) {
	win = window.open( "/zoom.html?imageName=" + imageName, "zoom", "width=700,height=550" );
	win.focus();
}