
var tt; //timer blink title

function difumina(){
    var obj = document.getElementById('tablelive');
    obj.style.display = "block";
    color += suma;
    if (!(color>=110)){
      obj.style.filter = 'alpha(opacity='+color+')';
      obj.style.opacity = color /100;

      obj.style.MozOpacity = color /100;

      obj.style.KHTMLOpacity = color /100;
      window.setTimeout("difumina();", 100);
    }
}

function blinkIt() {
 if (!document.all) return;
 else {
   for(i=0;i<document.all.tags('blink').length;i++){
      s=document.all.tags('blink')[i];
      s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';
   }
 }
}

function titulo() {
	if(document.title=="Ofertas en tiempo real")
		document.title="Nuevas Ofertas";
	else
		document.title="Ofertas en tiempo real";
}

function pausa(mili)
{
	var date = new Date();
	var curDate = null;

	do { curDate = new Date(); }
	while(curDate-date < mili);
}


function MM_openBrWindow(theURL,winName,width,height)
{
                height = height ;
                var winl = (screen.width - width) / 2;
                var wint = (screen.height - height) / 2;
                var i = width ;
                var j = height ;
                var features = 'scrollbars=no,resizable=yes,width='+width+',height='+height+',top='+wint+',left='+winl+'';
                var popupscherm;
                popupscherm=window.open(theURL,winName,features);
                popupscherm.resizeTo(i,j);
                popupscherm.focus();
}

//ampliacion de miniaturas ofertas
function colocar(ventana,logo)
{ 
  var pos = $(logo).offset();
  $(ventana).css( { "left": ( pos.left -  (($(ventana).width()-$(logo).width())/2)    ) + "px", "top":(pos.top-25) + "px" } );
  $(ventana).show();
}

function descolocar(ventana)
{
   $(ventana).hide();
}

function mostrar(cosa){
		alert('mostrar'+cosa);
                elto = document.getElementById(cosa);
                elto.style.display = 'block';
}
function ocultar(cosa){
		alert('ocultar'+cosa);
                elto = document.getElementById(cosa);
                elto.style.display = 'none';
}

function emailValido(email)
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email) )
	return (true)
	else
	return (false);
	
}
