if (window.Event) 
  document.captureEvents(Event.MOUSEUP); 

function nocontextmenu()  
{
	event.cancelBubble = true
	event.returnValue = false;

	return false;
}

function norightclick(e)	
{
	if (window.Event)	
	{
		if (e.which == 2 || e.which == 3)
			return false;
	}
	else
		if (event.button == 2 || event.button == 3)
		{
			event.cancelBubble = true
			event.returnValue = false;
			return false;
		}
	
}

document.oncontextmenu = nocontextmenu;		
document.onmousedown = norightclick;		
//
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=0,width=470,height=380,left = 240,top = 200');");
}


//enviar recomendacion
var myHeight = 100;
var isResizable = false;

function createTarget(form) {
_target = form.target;
_colon = _target.indexOf(":");
if(_colon != -1) {
form.target = _target.substring(0,_colon);
form.args = _target.substring(_colon+1);
} else if(typeof(form.args)=="undefined") {
form.args = "";
}
if(form.args.indexOf("{")!=-1) {
_args = form.args.split("{");
form.args = _args[0];
for(var i = 1; i < _args.length;i++) {
_args[i] = _args[i].split("}");
form.args += eval(_args[i][0]) + _args[i][1];
   }
}
form.args = form.args.replace(/ /g,"");
_win = window.open('',form.target,form.args);
if(typeof(focus)=="function")
_win.focus();
return true;
}
//problema netscape
function MM_reloadPage(init) {  //recarga la pagina si netscape 4 es maximizado
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
   document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//imagenes variables
var theImages = new Array()
theImages[0] = 'banner/imagen.jpg'
theImages[1] = 'banner/imagen1.jpg'
theImages[2] = 'banner/imagen2.jpg'
theImages[3] = 'banner/imagen3.jpg'
theImages[4] = 'banner/imagen4.jpg'
theImages[5] = 'banner/imagen5.jpg'
theImages[6] = 'banner/imagen6.jpg'
theImages[7] = 'banner/imagen7.jpg'
theImages[8] = 'banner/imagen8.jpg'
theImages[9] = 'banner/imagen9.jpg'
theImages[10] = 'banner/imagen10.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
//  mover tele
var chip1;
function pagestart()
{checkbrOK(); 
 chip1=new Chip("chip1",60,80);
 if(brOK) 
   { movechip("chip1");
       
   }
}
// -- abrir ventana
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
// --  abrir ventana 2
function popUp1(URL) {
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=200,height=100,left = 500,top = 1');");
}
// --  abrir ventana 3
function popUp1(URL) {
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=200,height=100,left = 100,top = 1');");
}
//-- alt scroll javascript
function showtip2(current,e,text){
  if (document.all&&document.readyState=="complete"){
    document.all.tooltip2.innerHTML='<marquee style="border:1px solid black">'+text+'</marquee>'
    document.all.tooltip2.style.pixelLeft=event.clientX+document.body.scrollLeft+10
    document.all.tooltip2.style.pixelTop=event.clientY+document.body.scrollTop+10
    document.all.tooltip2.style.visibility="visible"
}
  else if (document.layers){
    document.tooltip2.document.nstip.document.write('<b>'+text+'</b>')
    document.tooltip2.document.nstip.document.close()
    document.tooltip2.document.nstip.left=0
    currentscroll=setInterval("scrolltip()",100)
    document.tooltip2.left=e.pageX+10
    document.tooltip2.top=e.pageY+10
    document.tooltip2.visibility="show"
}
}
function hidetip2(){
  if (document.all)
    document.all.tooltip2.style.visibility="hidden"
    else if (document.layers){
    clearInterval(currentscroll)
    document.tooltip2.visibility="hidden"
}
}
// --siguente