var win=null;
function mostrarimagen(url_imagen,titulo){
 	var img = new Image();
 	img.src = url_imagen;
	win=window.open('','','width=540,height=405,scrollbars=no,resizable=0,toolbar=0');
	win.document.write ('<html>\n');
	win.document.write (' <head>\n');
	win.document.write ('  <title>'+titulo+'</title>\n');
	win.document.write (' </head>\n');
	win.document.write (' <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">\n');
	win.document.write ('  <img src="' + url_imagen + '">\n');
	win.document.write (' </body>\n');
	win.document.write ('</html>\n');	
}


function agregar(){
//IE
if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) {
var url="http://www.rodriganez.com.ar"; //Cambia esta direccion por la de tu web
var titulo="Rodriganez Joyas"; //Cambia esta nombre por el de tu web
window.external.AddFavorite(url,titulo);
}
//Para Firefox
else {
if(navigator.appName == "Netscape")
//Hay que modificar el nombre por el de vuestra pagina
window.sidebar.addPanel("Rodriganez Joyas", "http://www.rodriganez.com.ar","");
}
}




usuario="ventas" 
dominio="rodriganez.com.ar" 
conector="@" 


function dame_correo(){ 
   return usuario + conector + dominio 
} 

function escribe_enlace_correo(){ 
   document.write("<a href='mailto:" + dame_correo() + "'>" + dame_correo() + "</a>") 
} 

	function showFull(id) { //SHOW/HIDE JS
		var block = document.getElementById(id);
		if(block.style.display == 'none' || block.style.display == '')
			block.style.display = 'block';
		else
			block.style.display = 'none';
		}
		function showID(id) { 
			var block = document.getElementById(id);
			block.style.display = 'block';
		}
		function hideID(id) { 
			var block = document.getElementById(id);
			block.style.display = 'none';
		} 
		
function SoloNumeros(e) {
	        tecla = (document.all)?e.keyCode:e.which;
	        if (tecla==8)  return true;
	        patron = /\d/;
	       // SumarTotales();
	        return patron.test(String.fromCharCode(tecla));
	}
	
	
	
	function showFull(id) { 
			var block = document.getElementById(id);
			if(block.style.display == 'none' || block.style.display == '')
				block.style.display = 'block';
			else
				block.style.display = 'none';
			
		}
		

function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}


var win=null;
function mostrarimagen(url_imagen,titulo){
 	var img = new Image();
 	img.src = url_imagen;
	win=window.open('','','width=540,height=405,scrollbars=no,resizable=0,toolbar=0');
	win.document.write ('<html>\n');
	win.document.write (' <head>\n');
	win.document.write ('  <title>'+titulo+'</title>\n');
	win.document.write (' </head>\n');
	win.document.write (' <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">\n');
	win.document.write ('  <img src="' + url_imagen + '">\n');
	win.document.write (' </body>\n');
	win.document.write ('</html>\n');	
}


var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
var dayarray2=new Array("Dom","Lun","Mar","Mier","Jue","Vie","Sab")
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
var montharray2=new Array("Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic")

function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate=""+dayarray[day]+", "+daym+" de "+montharray[month]+" "+year
var cdate2=""+" "+daym+"/"+montharray2[month]+"/"+year+" - "+hours+":"+minutes+":"+seconds+" "+dn
+" "
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById){
document.getElementById("clock").innerHTML=cdate
var Clocki=document.getElementById("ClockToSave")
if (Clocki)
	Clocki.value=cdate2
}else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}


function getthedate_Save(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate2=""+" "+daym+"/"+montharray2[month]+"/"+year+" - "+hours+":"+minutes+":"+seconds+" "+dn
+" "

document.getElementById('ClockToSave').value=cdate2;

}


	
function Zeros() {
		var Controles=document.cart.elements.length;
		var ch='';
		var prod='';
		var pre='';
		var suma=0;
		
		for(i=0; i<Controles; i++) {
			if (document.cart.elements[i].type=="text" && document.cart.elements[i].name.indexOf('Total',0)!=-1 && document.cart.elements[i].value.indexOf('.',0)==-1) {
				document.cart.elements[i].value +=".00";
			 }
		}
		
}
function Redondear(cantidad, decimales) {
		var cantidad = parseFloat(cantidad);
		var decimales = parseFloat(decimales);
		decimales = (!decimales ? 2 : decimales);
		return Math.round(cantidad * Math.pow(10, decimales)) / Math.pow(10, decimales);
	}
	

