window.status=":: HostingLoft ::";

NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;

function comprobaframes() 
{
    if ((window.opener) || ((top.aux_mn && top.big_elec)))
    {

    }
    else 
    {
	var aux;

	aux=top.location.href.substring(top.location.href.indexOf('/',8),top.location.href.length);

	top.location.href="/?cos="+aux;

    }
}



function mostra_menu(Menu,actiu,e) 
{

NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;

if (actiu) {
            if (NS4) {
                 mitad=window.innerWidth/2;
                 altura=window.innerHeight/2;
                  if (e.pageX<mitad) {
                                 posicion=e.pageX-100;
                    } else { 
                              posicion=window.innerWidth-e.pageX-180;
                             }

                  if (e.pageY<altura) {
                                alto=e.pageY;
                        } else {
                                  alto=e.pageY;
                                 }

                                //document.layers[Menu].top =100px;
                                //document.layers[Menu].left =100px;
                                //alert(e.pageX);
                                document.layers[Menu].left=posicion;
	                        document.layers[Menu].top=alto;
                               document.layers[Menu].visibility = "show";
             } else {
                 mitad=document.body.offsetWidth/2;
                 altura=document.body.offsetHeight/2;
     if (event.x<mitad) {
                         posicion=35+event.x;
                         } else { 
                                 posicion=document.body.offsetWidth-event.x-10;
                                 }
                  jeight=document.body.scrollTop;

     if (event.y<altura) {
                         alto=e.y+jeight;
                          } else {
                                  alto=e.y+jeight; 
                                   }

                               document.all[Menu].style.top =alto;
                               document.all[Menu].style.left =posicion;
                               document.all[Menu].style.visibility ="visible";
                        }
                } else {
                        if (NS4) {
                                document.layers[Menu].visibility = "hide";
                        } else {
                                document.all[Menu].style.visibility = "hidden";
                        }
                }
}

function abrir_atencion(link)
{
	   window2 = window.open(link,'ventana','top=50,left=50,width=400,height=520,resizable=no,scrollbars=no,toolbar=no,statusbar=no');
	   window2.focus();
}
function abrir_consejos(link)
{
	   window2 = window.open(link,'ventana','top=50,left=50,width=300,height=340,resizable=no,scrollbars=no,toolbar=no,statusbar=no');
	   window2.focus();
}
function  happyhours() {
  window.open("happyhours.php","Happyhours","width=250,height=250,scrollbars=no,resizable=no");
}


function addToFavorite(favTitle){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, unescape(favTitle));
  }
}



function agregar(){
if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) {
var url="http://www.hostingloft.com/";
var titulo="HostingLoft";
window.external.AddFavorite(url,titulo);
}
else {
if(navigator.appName == "Netscape") 
alert ("Presione Crtl+D para agregar este sitio en sus Bookmarks");
}
}

function agragar(){
if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) {
var url="http://www.hostingloft.com/";
var titulo="HostingLoft";
window.external.AddFavorite(url,titulo);
}
else {
if(navigator.appName == "Netscape")
alert ("Presione Crtl+D para agregar este sitio en sus Bookmarks");
}
}

function makedefault()
{ 
}
