//cargarImagenes('');

function cargarImagenes() {
	var d = document;
	if (!d.imagenes)
		d.imagenes = new Array();
	var i, j = d.imagenes.length, a = cargarImagenes.arguments;
	for (i = 0; i < a.length; i++) {
		d.imagenes[j] = new Image;
		d.imagenes[j++].src = a[i];
	}
}

function mOver(obj, id) {
	obj.style.background = 'url(/images/cms/productos_tipos/' + id + '_os.jpg) no-repeat scroll left top';
}

function mOut(obj) {
	obj.style.background = '';
}

function mOverS(obj, id) {
	obj.style.background = '#195c91 url(/images/cms/productos/' + id + '_os.jpg) no-repeat scroll right top';
}

function mOutS(obj) {
	obj.style.background = '#195c91';
}




function validarTexto(formulario, campo, mensaje) {
	if(document.forms[formulario].elements[campo].value == '') {
		alert(mensaje);
		document.forms[formulario].elements[campo].focus();
		return false;
	}
	return true;
}

function validarEmail(formulario, campo, mensaje) {
   if(!document.forms[formulario].elements[campo].value.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)) {
		alert(mensaje);
		document.forms[formulario].elements[campo].focus();
		return false;
   }
	return true;
}




function crearFlash(url, width, height, wmode, alternate) {
	if (navigator.userAgent.indexOf('MSIE') != -1) {
    	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + width + '" height="' + height + '">');
	    document.write('<param name="movie" value="' + url + '" />');
	}
	else
    	document.write('<object type="application/x-shockwave-flash" data="' + url + '" width="' + width + '" height="' + height + '">');
	document.write('<param name="menu" value="false" />');
	if (wmode)
		document.write('<param name="wmode" value="' + wmode + '" />');
	if (alternate)
		document.write(alternate);
	document.write('</object>');
}
