// en este array cargamos todos los dominios que queremos que sean excluidos de la reescritura
var exclude = [];
exclude.push("e-planning");
exclude.push("nspmotion");
exclude.push("dnmotion");

/* version 1.1 by Eguy - Modified by Ale Weller*/
/*
*  clearObject: Limpia el recuadro de "Activar este control"
*    @obj: Parametro opcional con el Object del flash, si viene null limpia todos los object del HTML
*/
function clearObject(obj){
	if(obj==null){
		var theObjects = document.getElementsByTagName("object");
		for (var i=0; i < theObjects.length; i++) {
		  for (var j in theObjects[i].childNodes)
		  {
		  	if( ( theObjects[i].childNodes[j].name == "movie" ) && ( !isIn(String(theObjects[i].childNodes[j].value), exclude) ) )
		  	{
		  			theObjects[i].outerHTML=theObjects[i].outerHTML;
		  			break;
		  	}
		  }
		}
	}else{
		obj.outerHTML = obj.outerHTML;
	}
}
/*
*  isIn: Limpia el recuadro de "Activar este control"
*    @str: Parametro obligatorio, contiene el string en el que será buscado los items de list.
*    @list: Parametro obligatorio, contiene un array con el listado de palabras a buscar en str.
*/
function isIn(str,list)
{
	var retValue = false;
	for (var i=0 ; i< list.length;i++)
	{
		if(str.indexOf(list[i],0) > 0){
			retValue = true;
			break;
		}
	}
	return retValue;
}

clearObject(document.getElementById(null));
