/************************************************************************/
/* Javascript Functions                                                 */
/* ==================================================================== */
/* Copyright (c) 2003 by the_bard                                       */
/*                                                                      */
/* the_bardus@hotmail.com                                               */
/* http://thebard.homedns.org/                                          */
/*                                                                      */
/************************************************************************/
/////////////////////////////////////////////////////
// RollOver/RollOut de imágenes                    //
/////////////////////////////////////////////////////


function roll(obj, id) {
	if (typeof(obj) == "string") obj = document.getElementById(obj);
	obj.style.cursor = "pointer";
	var im = obj.src.substr(obj.src.length-5,1);
	if (id==null) (im==0) ? id = 1 : id = 0
	last = obj.src.lastIndexOf("/")+1;
	path = obj.src.substr(0,last)
	nimg = path + obj.src.substr(last,obj.src.length-5-last) + id + obj.src.substr(obj.src.length-4,4);
	obj.src = nimg;
}
// /*	/////////////////////////////////////	*/ //


/////////////////////////////////////////////////////
// Preload Automático de Imágenes                  //
/////////////////////////////////////////////////////
function ImagePreload(imgArray) {
	for (i=0; i<document.images.length; i++) {
		if (document.images[i].onmouseover != null) {
			obj = document.images[i];
			var im = obj.src.substr(obj.src.length-5,1);
			(im==0) ? imo = 1 : imo = 0
			last = obj.src.lastIndexOf("/")+1;
			path = obj.src.substr(0,last)
			nimg = path + obj.src.substr(last,obj.src.length-5-last) + imo + obj.src.substr(obj.src.length-4,4);
			eval("var nimg_" + i + " = new Image();");
			eval("nimg_" + i + ".src = nimg;");
		}
	}
}



/*********************************************************/
/* Verificar el explorador utilizado                     */
/*********************************************************/
function _browser(str) {
	(navigator.userAgent.toLowerCase().indexOf(str)+1) ? ret = true : ret = false;
	return ret;
}



