//
// Funciones varias
// (c) 2001-2002
//     Equipo de Desarrollo
//     Dpto. Diseño
//     Mundivía, S.A.
//

// detecciçon del navegador 

ns4 = (document.layers) ? true:false;
ie4 = (document.all) ? true:false;
dom = document.getElementById ? true:false;



//Disable right mouse click Script
//By YuYu 


var mensaje="Border Collie. http://www.bordercollie.es.";

///////////////////////////////////
function pulsaIE(){
	if (event.button==2){
		alert(mensaje);
		return false;
	}
}

function pulsaNS(e){
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){
			alert(mensaje);
			return false;
		}
	}
}

if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=pulsaNS;
}
else if (document.all&&!document.getElementById){
	document.onmousedown=pulsaIE;
}

document.oncontextmenu=new Function("alert(mensaje);return false")

// abrir ventana nueva

function abrir_ventana (pag,tam_x,tam_y,vent,scroll,resize,menu,tool,status) {
 var pos_x, pos_y;
 scroll = (scroll==null) ? false : scroll;
 scroll = (scroll) ? "yes" : "no";
 resize = (resize==null) ? false : resize;
 resize = (resize) ? "yes" : "no";
 menu = (menu==null) ? false : menu;
 menu = (menu) ? "yes" : "no";
 tool = (tool==null) ? false : tool;
 tool = (tool) ? "yes" : "no";
 status = (status==null) ? false : status;
 status = (status) ? "yes" : "no";
 tam_x = (tam_x==null) ? 640 : tam_x;
 tam_y = (tam_y==null) ? 300 : tam_y;

 if (ns4 || ie4) {
 	var alto=window.screen.height;
 	var ancho=window.screen.width;
	pos_x = (ancho-tam_x)/2;
	pos_y = (alto-tam_y)/2-20;
 } else {
 	pos_x = 0;
 	pos_y = 0;
 }

 return(window.open(pag, vent, "toolbar="+tool+",directories=no,menubar="+menu+",scrollbars="+scroll+",location=no,status="+status+",resizable="+resize+",width="+tam_x+",height="+tam_y+",left="+pos_x+",top="+pos_y));
}


// abrir pagina

function abrir_ventana (cual) {
 abrir_ventana(cual,590,390,null,null,'vent');
}


// cambio de color de fondo de tabla

function activa (src,accion) {
 if (accion) {
	src.bgColor="#7EBCBC";
 	src.style.cursor = 'hand';
 } else {
	src.bgColor="#C7E2E2";
 	src.style.cursor = 'default';
 }
}

