function agregar(){
if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) {
var url="http://www.blanis.com";
var titulo="Blanis - Lubricantes, Filtros, Repuestos, Papeles en General";
window.external.AddFavorite(url,titulo);
}
else {
if(navigator.appName == "Netscape") 
alert ("Presione Crtl+D para agregar www.Blanis.com a sus Favoritos");
}
}

function reducir(objeto,porcentaje)
{
if (porcentaje == "" || porcentaje == null || porcentaje == "0") {porcentaje = "15";}
ancho = objeto.width - ((porcentaje * objeto.width) / 100);
alto = objeto.height - ((porcentaje * objeto.height) / 100);
objeto.width=ancho;
objeto.height=alto;
}

function aumentar (objeto,ancho,alto)
{
objeto.width=ancho;
objeto.height=alto;
}

function destello(_id,propiedad,var1,var2)
{
if(propiedad=='' || propiedad==null) propiedad = 'style.backgroundColor';
eval("document.getElementById('"+_id+"')."+propiedad+"='"+var1+"';");
//eval(_a+"="+_a+"=='"+var1+"'?'"+var2+"':'"+var1+"';");
setTimeout("destello('"+_id+"','"+propiedad+"','"+var2+"','"+var1+"')",500);
}

function destello2(_id,propiedad,var1,var2, font_id, font1, font2)
{
if(propiedad=='' || propiedad==null) propiedad = 'style.backgroundColor';
eval("document.getElementById('"+_id+"')."+propiedad+"='"+var1+"';");
if(font1 != '' && font_id != '' && document.getElementById(font_id))
{
	document.getElementById(font_id).style.color=font1;
}
//eval(_a+"="+_a+"=='"+var1+"'?'"+var2+"':'"+var1+"';");
setTimeout("destello2('"+_id+"','"+propiedad+"','"+var2+"','"+var1+"','"+font_id+"','"+font2+"','"+font1+"')",500);
}


function abrir_ventana(url, width, height, barras, resiz)
{
if (width == null){ width = "310"; }
if (height == null){ height = "310"; }
if (barras == null){ barras = 0; }
if (resiz == null) { resiz = 0; }
parametros= "fullscreen=0 , toolbar=0 , location=0 , status=0 , menubar=0 , scrollbars="+barras+" , resizable="+resiz+" , width="+width+" , height="+height+" , left=0 , top=0";
window.open(url , "Blanis" , parametros, false);
}

function derecha(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
alert('Gracias por visitar www.Blanis.com');
return false;
}

else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2)){
alert('Gracias por visitar www.Blanis.com');
}
}
document.onmousedown=derecha


function comprobar_value(objeto,numerico,mensaje,focus)
{
	switch (numerico)
	{
		case 2:
			if (objeto.checked != 1)
			{
				alert(mensaje);
				if (focus == 1)
				{
					objeto.focus();
				}
				return false;
			}
			else
			{
				return true;
			}
		break;
		
		case 1:
			if (!parseInt(objeto.value))
			{
				alert(mensaje);
				if (focus == 1)
				{
					objeto.focus();
				}
				return false;
			}
			else
			{
				return true;
			}
		break;
		
		default:
			if (objeto.value == "" || objeto.value == null)
			{
				alert(mensaje);
				if (focus == 1)
				{
					objeto.focus();
				}
				return false;
			}
			else
			{
				return true;
			}
		break;
	}
}

var borrado = 0;
function borrar_value(objeto)
{
	if (borrado != 1)
	{
		objeto.value='';
		borrado=1;
	}
}

function mostrar(_d,dato)
{
  var _x = document.getElementById(_d);

  if(dato != "" && dato != null)
  {
  _x.style.visibility="visible";
  _x.style.overflow="visible";
  _x.style.height=23;
  }
  else
  {
  _x.style.visibility="hidden";
  _x.style.overflow="hidden";
  _x.style.height=1;
  }
}

/* AUTO SCROLL MENU */
function setVariables(){
if (navigator.appName == "Netscape") {
v=".top=";h=".left=";dS="document.";sD="";
y="window.pageYOffset";x="window.pageXOffset";}
else {h=".pixelLeft=";v=".pixelTop=";dS="";sD=".style";
y="document.body.scrollTop";x="document.body.scrollLeft";}checkLocationA()}
movex=0,movey=0,xdiff=0,ydiff=0,ystart=0,xstart=0
function checkLocation(){
object="object1";yy=eval(y);xx=eval(x);ydiff=ystart-yy;xdiff=xstart-xx;
if ((ydiff<(-1))||(ydiff>(1))) movey=Math.round(ydiff/10),ystart-=movey
if ((xdiff<(-1))||(xdiff>(1))) movex=Math.round(xdiff/10),xstart-=movex
eval(dS+object+sD+v+ystart);eval(dS+object+sD+h+xstart);
setTimeout("checkLocation()",10)}
function checkLocationA(){ystart=eval(y);xstart=eval(x);}
/* FIN AUTO SCROLL MENU */