function bgEscuro(){
	sombra = document.getElementsByTagName('blockquote');
	for(i=0;i<sombra.length;i++){
		if(sombra[i].className=="sombra"){
			sombra[i].style.height = sombra[i].parentNode.offsetHeight + "px";
			sombra[i].style.width = sombra[i].parentNode.offsetWidth + "px";
		}
		if(sombra[i].className=="paginacao"){
			pg = sombra[i].getElementsByTagName('a');
			tam = 0;
			mar = 8;
			for(a=0;a<pg.length;a++){
				tam = pg[a].offsetWidth + tam + mar;
			}
			sombra[i].style.width = tam + "px";
		}
	}
	myLightWindow = new lightwindow();
}
function check(x,y){
	if(y == "M"){
		lista = x.parentNode.parentNode;
		for(i=0;i<lista.getElementsByTagName('ul').length;i++){
			lista.getElementsByTagName('span')[i].className="";
			lista.getElementsByTagName('ul')[i].className="";
		}
		for(i=0;i<x.parentNode.parentNode.getElementsByTagName('input').length;i++){
			lista.getElementsByTagName('input')[i].checked=false;
			lista.getElementsByTagName('input')[i].parentNode.className="";
		}
		x.className="checked";
		x.parentNode.getElementsByTagName('ul')[0].className="checked";
	}
	else if(y == "L"){
		for(i=0;i<x.parentNode.getElementsByTagName('li').length;i++){
			x.parentNode.getElementsByTagName('li')[i].className="";
		}
		x.className="checked";
		x.getElementsByTagName('input')[0].checked=true;
	}
	else{
		lista = x.parentNode.parentNode;
		for(i=0;i<lista.getElementsByTagName('span').length;i++){
			lista.getElementsByTagName('span')[i].className="";
		}
		x.className="checked";
	}
}

/* Obtain an always-valid function equivalent to 
* document.getElementById() 
*/ 

if(document.getElementById) { 
	var getRefById = function(id) { 
		return document.getElementById(id); 
	}; 
} else if(document.all) { 
	var getRefById = function(id) { 
		return document.all[id]; 
	}; 
} else { 
	var getRefById = function() { 
		return null; 
	}; 
} 

function selectTxt(id,href){
	alert(id)
	alert(href)
	var d, i; 
	
	/* Quit now if no fragment id is present. */ 
	if(-1 == (i = href.indexOf('#'))) {return;} 
	
	/* Get reference to destination using extracted fragment id. */ 
	d = getRefById(href.substring(i + 1));

	/* Do nothing if we're already at target, or couldn't get 
	* destination. 
	*/ 
	alert(d);
	if(d && activeAnchor != d) { 
	alert("tem d")
	/* If there is a currently active link, remove the styling. */ 
		if(activeAnchor) { 
			activeAnchor.className = "inativo"; 
		} 
		/* Apply style to new link. */ 
		if(d) { 
			oldStyle = d.className; 
			d.className += ' activeLink'; 
			activeAnchor = d; /* Store reference for next invocation. */ 
		} 
	}else{
		alert("nao tem d")
	}

}

function createSWFObjectGeneral(urlString, container,name,width,height,vars){
	var so = new SWFObject(urlString,name,width,height,'8');
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','true');
	so.addParam('wmode','transparent');
	so.addParam('flashvars',vars);
	so.addVariable('width',width);
	so.addVariable('height',height);
	so.addVariable('wmode','transparent')
	so.addVariable('javascriptid',name);
	so.addVariable('enablejs','true');
	so.addVariable('flashvars',vars);
	so.write(container);
}

