function interna(nome) 
{   var	pag = nome.charAt(0)+nome.charAt(12);
	if (nome.charAt(0) != "F") {return pag;}
	else 
	{return "ferramenta";}
}
function interna_ing(nome) 
{   var	pag = nome.charAt(0);
	if (nome.charAt(0) != "T") {
	  if (nome.charAt(0)+nome.charAt(1) == "So")
	 	return "So";    
	  else		
		return pag;}
	else 
	{return "tolls";}
}


// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

//----------------Functions for menu mouseover IE-------------------
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {	    
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

try {
	document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

var ie = (document.all) ? 1 : 0;
var p = (ie) ? "filter" : "MozOpacity";

/* n is the element node
   v is the opacity value, from 0 to 100. */

function op(n,v){
    v = (ie) ? "alpha(opacity="+v+")" : v/100;
    n.style[p] = v;
}

function popup(pagina,w,h,s) {
  if (self.screen) { 
  sw = screen.width
  sh = screen.height
  cx = (.5*sw) - (w*.5)
  cy = (.5*sh) - (h*.5)
  var  dimentions_and_such = 'width='+w+','+'height='+h+',' + 'screenX=' +cx+','+'screenY='+cy+','+'left='+cx+','+'top='+cy+',scrollbars='+s
  }
 Pop=window.open(pagina,"popacion",dimentions_and_such);
}


/****************************************POP-UP********************************************/
function popup_scroll(URL, w,h,s) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0, width=580,height=400');");

 
}
