var verticalpos="fromtop"
var startX = 3;
var startY = 5;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;


function ml(id)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	if(d.layers)el.style=el;
  if (!el.currentStyle || el.currentStyle.position == 'fixed') return false;
  el.sP=function(x,y){ if(y + 'px' != this.style.top) this.style.top=y + 'px';};
	// el.x = startX;
	if (verticalpos=="fromtop") {
    el.y = startY;
  }
	else {
  	el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
	  el.y -= startY;
	}
	el.style.position = 'absolute'
	el.style.right = startY + 'px'
	return el;
}


function stayTopLeft()
{
	if (verticalpos=="fromtop"){
		var pY = ns ? pageYOffset : document.documentElement.scrollTop;
		ftlObj.y = (pY + startY) // /8;
	}
	else{
		var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
		ftlObj.y = (pY - startY - ftlObj.y) // /8;
	}

  ftlObj.sP(ftlObj.x, ftlObj.y);

	setTimeout("stayTopLeft()", 150);
}


function ocultar(id) {
  var e = document.getElementById(id);
  e.style.display = e.style.display == 'none' ? '' : 'none';
}


function post(host, url, base, id) {
  window.location = host + '/' + base + '/' + url;
  return true;
}


function getVariableUrl(variable){
	var regexS = "[\\?&]"+variable+"=([^&#]*)";
	var regex = new RegExp (regexS);
	var tmpURL = window.location.href;
	var results = regex.exec(tmpURL);
	if(results == null) {
		return "";
	} else {
		return results[1];
    }
}
