﻿function cambiaColoreSfondo( colore ) {	
	document.getElementsByTagName('body')[0].style.backgroundColor = colore;
}
var oldColor = "";
function transizioneColoreSfondo( colore ) {	
	var bodyStyleRef	= document.getElementsByTagName('body')[0].style;
	//var bodyColor		= document.getElementsByTagName('body')[0].style.backgroundColor;		
	if(oldColor == ""){	oldColor = "f2f2f2";};	
	var durata		= 1;	
	bgTween = new ColorTween( bodyStyleRef, 'backgroundColor', Tween.regularEaseInOut, oldColor, colore, durata );
	bgTween.start();
	oldColor = colore;		
}
function getURLParam( strParamName )
{
  // la riga commentata cerca nel frame corrente
  //var tmpURL = window.location.href;  
  // questa stringa cerca nel frameset contenitore
  var tmpURL = parent.document.location.href;  
  var regexS = "[\\?&]"+strParamName+"=([^&#]*)";
  var regex = new RegExp( regexS );  
  var results = regex.exec( tmpURL );
  if( results == null )
    return "";
  else
    return results[1];
}



