// funcion rollover //
function roll(obj) {
	var im = obj.src.substr(obj.src.length-5,1);
	(im==0) ? imo = 1 : imo = 0
	obj.style.cursor = "hand";
	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);
	obj.src = nimg;
}
//	//	//	//	//	//	//	//	//

// popups imagen //
function wopenp(obj, format) {
	//alert(obj.src);
	var im = obj.src.substr(obj.src.length-5,1);
	last = obj.src.lastIndexOf("/")+1;
	path = obj.src.substr(0,last)
	nimg = path + obj.src.substr(last,obj.src.length-5-last) + "2wo." + format;
	//alert(nimg);
	window.open("popup.asp?img=" + nimg, 'wo', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,width=337,height=309,left=0,top=0,screenLeft=110,screenTop=110,resizable=no');
}
//	//	//	//	//	//	//	//	//

// popups imagen //
function wopenpt(obj, format) {
	//alert(obj.src);
	var im = obj.src.substr(obj.src.length-5,1);
	last = obj.src.lastIndexOf("/")+1;
	path = obj.src.substr(0,last)
	nimg = path + obj.src.substr(last,obj.src.length-5-last) + "2wo." + format;
	//alert(nimg);
	//	window.open("popup.asp?img=" + nimg, 'wo', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,width=337,height=309,left=0,top=0,screenLeft=110,screenTop=110,resizable=no');
	w = screen.width*0.9;
	h = screen.height*0.8;
	l = (screen.width-w)/2;
	t = (screen.height-h)/2
	window.open("popup.asp?img=" + nimg + "&a=1", 'wot', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,width=' + w + ',height=' + h + ',left=' + l + ',top=' + t + ',' + l + ',screenTop=' + t + ',resizable=yes');
}
//	//	//	//	//	//	//	//	//

// Tamaño de imagen de fondo //
function imgbgs() {
	document.images["imgbg"].width = document.body.offsetWidth/1.9;
}
//	//	//	//	//	//	//	//	//

// preload de las imágenes //
function imgpreload() {
	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;");
		}
	}
}
//	//	//	//	//	//	//	//	//

// ventanas notas //
function abrenota(url) {
	window.open(url,'opinion','menubar=no,width=430,height=550');
}
//	//	//	//	//	//	//	//	//

// cambio fondo de productos MouseOver //
function cprodc(obj) {
	if (obj.className == "prodC") {
		obj.className = "prodB";
	}
	else {
		obj.className = "prodC"
	}
}
//	//	//	//	//	//	//	//	//
