// JavaScript Document
var browserNameApp = navigator.appName;
var browserAppVer=parseInt(navigator.appVersion);
//
var NT = false;
var IE = false;
var NTSC = 'Netscape';
var MIE = 'Microsoft Internet Explorer';
var Browser = new Object();
Browser.Name = browserNameApp;
Browser.Version = browserAppVer;
//
if (Browser.Name == MIE){
	IE = true;	
}
if (Browser.Name == NTSC){
	NT = true;	
}


/*****************************************************************************
*	METODO QUE Obtiene las dimensiones disponibles en anchoi y alto del browser.
******************************************************************************/
function getBrowserDimensiones() {
	
	var addWidth = document.all? document.body.scrollLeft : pageXOffset
	var addHeight = document.all? document.body.scrollTop : pageYOffset
	
	var bWidth = document.all?  document.body.clientWidth : window.innerWidth
	var bHeight = document.all?   document.body.clientHeight : window.innerHeight
	
	Browser._width =  bWidth + addWidth;
	Browser._height =  bHeight + addHeight;
	//
	return Browser;
}
function captureSizeWindow() {
	var myWidth = 0, myHeight = 0;
	if (typeof (window.innerWidth) == 'number') {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	var ventana = new Object();
	ventana.width = myWidth;
	ventana.height = myHeight;
	return ventana;
}
/*****************************************************************************
*	METODO QUE DESIGNA LA POSICION DEL MOUSE A UN OBJETO.
******************************************************************************/
function getCursorBrowserPosition(e) {
    e = e || window.event;
    var BrowserCursorPos = {_x:0, _y:0};
    if (e.pageX || e.pageY) {
        BrowserCursorPos._x = e.pageX;
        BrowserCursorPos._y = e.pageY;
    } 
    else {
        var de = document.documentElement;
        var b = document.body;
        BrowserCursorPos._x = e.clientX + 
            (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0);
        BrowserCursorPos._y = e.clientY + 
            (de.scrollTop || b.scrollTop) - (de.clientTop || 0);
    }
    return BrowserCursorPos;
}


