/////////////////////////////////////////////////
///// flash javascript //////////////////////////
/////////////////////////////////////////////////
var beIE = document.all?true:false
/////////////////////////////////////////////////////////////////////////////
////// dimensioni schermo ///////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
var W = screen.availWidth;
var H = screen.availHeight;
function maximize(){
	self.moveTo(0,0);
	self.resizeTo(W,H);
}
/////////////////////////////////////////////////////////////////////////////
// utility generiche ////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
function popUp(url,name,sizex,sizey) {
newwin = window.open(url, name, "width=" + sizex + ",height=" + sizey + ",toolbar=no,location=no,directories=no,status=0,resizable=yes,scrollbars=yes,menubar=no");
newwin.moveTo(((screen.width/2)-(sizex/2)),((screen.height/2)-(sizey/2)));
}
function addBookmark(title,url) {
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}
///////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////// dimensioni fisse /
///////////////////////////////////////////////////////////////////////////
function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";
}
function setFlashSize(divid, newW, newH){
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
function getVARfromURL(){
	var is_input = document.URL.indexOf('=');
	if (is_input != -1) { 
		var variabile = document.URL.substring(is_input+1, document.URL.length);
		return variabile;
	} else {
		return false;
	}
}
function embedResizer(){
	var	fromArray = document.URL.split('/');
	var indx = fromArray.length-1;
	var suffix = "";
	if(indx != -1) {
		var from = "";
		for (var i = 3; i <= indx; i++){
			if(i<indx){
		 		from = from+fromArray[i]+'/';
				suffix = suffix+'../';
			} else {
				from = from+fromArray[i];
			}
		}
	} else {
		var from = false;
	}
	document.write(
	  '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\n'+
	  '  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"\n'+
	  '  ID=resizer WIDTH=100% HEIGHT=100%>\n'+
	  '  <PARAM NAME="movie" VALUE="'+suffix+'resizer.swf?startFrom='+from+'&suffix='+suffix+'"/>\n'+
	  '  <PARAM NAME="quality" VALUE=HIGH />\n'+
	  '  <PARAM NAME="play" value="true" />\n'+
	  '  <PARAM NAME="FlashVars" value="allowResize=true" />\n'+
	  '  <PARAM NAME="bgcolor" VALUE=#000000 />\n'+
	  '  <EMBED src="'+suffix+'resizer.swf?startFrom='+from+'&suffix='+suffix+'"\n'+
	  '    bgcolor=#00000 WIDTH=100% HEIGHT=100% \n'+
	  '    pluginspage="http://www.macromedia.com/go/getflashplayer" \n'+
	  '    TYPE="application/x-shockwave-flash" \n'+
	  '    play="true">\n'+
	  '  </EMBED>\n'+
	  '</OBJECT>\n'
	);
}
///////////////////////////////////////////////////////////////////////////
//////////////////////////////// made by miller/freddox ///////////////////
///////////////////////////////////////////////////////////////////////////

