// JavaScript Document

defaultStatus = "Zimag Logistics" 
document.oncontextmenu = function(){return false} 

// No permite que se copie el texto
function disableselect(e){
    return false
}
function reEnable(){
    return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
    document.onmousedown=disableselect
    document.onclick=reEnable
}


////// VERIFICA CAMPOS GENERAL//////
function validaForm() {
			return verificaCampos();
		}
		function verificaCampos() {
			for (var i=0;i<document.form.length;i++) {
				o = document.form[i];
				if ((o.getAttribute('obligatorio')!=null) && (o.value.length == 0)) {
					alert('El campo "' + o.getAttribute('leyenda') + '" no fue llenado');
					o.focus();
					return false;
				}
			}
			return true;
		}

function DisplayImage(img){
	var partes = img.title.split(',');
	var picURL = partes[0];
	var picWidth = partes[1];
	var picHeight = partes[2];
	var picTitle = img.alt;
	newWindow=window.open("",'newWin','toolbar=no,width='+picWidth+',height='+picHeight);
	newWindow.document.write('<html><head><title>'+picTitle+'<\/title><script src="js/seguridad.js" type="text/javascript"><\/script><\/head><body background="'+picURL+'"><\/body><\/html>');
	newWindow.resizeBy(picWidth-newWindow.document.body.clientWidth,picHeight-newWindow.document.body.clientHeight);
	newWindow.focus();
	document.oncontextmenu = function(){return false}
}