function borrandodatos(){       if (confirm ("¿ Deseas eleminar esta fotografia? "))	     { return true ;}		 else 		 { return false ;}		 }		   function MM_reloadPage(init) {  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);function borrandodatos(){       if (confirm ("¿ Deseas eliminar estos datos? "))	     { return true ;}		 else 		 { return false ;}		 }		   function cambia(archivo) {           if (archivo != "") {             document.location=archivo;                    } }function calcula() {   var i    for (i=0 ;i< formulario.importe.length; i++){       if (document.formulario.importe[i].checked)	           break;    }    total1 = formulario.importe[i].value    posicier = formulario.dni.value ; 	posicion= (posicier * total1 ) * 1.15;    formulario.let.value = posicion;	coloresnuevos.dni.value=formulario.dni.value ;	coloresnuevos.importe.value=total1 ;  }  function resetShoppingBasket() {		index = document.cookie.indexOf("TheBasket");		document.cookie="TheBasket=.";	}				function alterError(value) {		if (value<=0.99) {			newPounds = '0';		} else {			newPounds = parseInt(value);		}		newPence = parseInt((value+.0008 - newPounds)* 100);		if (eval(newPence) <= 9) newPence='0'+newPence;		newString = newPounds + '.' + newPence;		return (newString);	}	function showItems() {		index = document.cookie.indexOf("TheBasket");		countbegin = (document.cookie.indexOf("=", index) + 1);        	countend = document.cookie.indexOf(";", index);        	if (countend == -1) {            		countend = document.cookie.length;        	}		fulllist = document.cookie.substring(countbegin, countend);		totprice = 0;document.writeln('<form><table border="0" cellspacing="2" width="100%"  class="td">');document.writeln('<TR><TD width="250" bgcolor="#CCCCCC"><b>Producto </b></TD><TD width="80" align="right" bgcolor="#CCCCCC"><b>Cantidad</b></TD><td width="100" align="right" bgcolor="#CCCCCC"><b>Importe</b></td></TR>');		itemlist = 0;		for (var i = 0; i <= fulllist.length; i++) {			if (fulllist.substring(i,i+1) == '[') {				itemstart = i+1;			} else if (fulllist.substring(i,i+1) == ']') {				itemend = i;				thequantity = fulllist.substring(itemstart, itemend);				itemtotal = 0;				itemtotal = (eval(theprice*thequantity));				temptotal = itemtotal * 100;				var tax = itemtotal / 100 * (20 - 0);    				tax = Math.floor(tax * 100)/100				totprice = totprice + itemtotal + tax;				itemlist=itemlist+1;document.writeln('<tr><td bgcolor="#f5f5f5">'+theitem+'</td><td align=right bgcolor="#f5f5f5">'+thequantity+'</td><td align=right bgcolor="#f5f5f5">'+alterError(itemtotal)+'</td></tr>');			} else if (fulllist.substring(i,i+1) == ',') {				theitem = fulllist.substring(itemstart, i);				itemstart = i+1;			} else if (fulllist.substring(i,i+1) == '#') {				theprice = fulllist.substring(itemstart, i);				itemstart = i+1;			}		} document.writeln('<tr><td colspan=2><b>Gastos de Envío</b></td><td align=right>20%</td></tr>'); document.writeln('<tr><td colspan=2><b>Total: </b></td><td align=right>USD '+alterError(totprice)+'</td></tr> </table>');			}function removeItem(itemno) {		newItemList = null;		itemlist = 0;		for (var i = 0; i <= fulllist.length; i++) {			if (fulllist.substring(i,i+1) == '[') {				itemstart = i+1;			} else if (fulllist.substring(i,i+1) == ']') {				itemend = i;				theitem = fulllist.substring(itemstart, itemend);				itemlist=itemlist+1;				if (itemlist != itemno) {					newItemList = newItemList+'['+fulllist.substring(itemstart, itemend)+']';				}			}		}		index = document.cookie.indexOf("TheBasket");		document.cookie="TheBasket="+newItemList;		top.location = "estado.php";	}function clearBasket() {		if (confirm('¿Confirma que desea reestablecer el carrito?')) {			index = document.cookie.indexOf("TheBasket");			document.cookie="TheBasket=.";			top.location = "estado.php";		}	}						function Enviar(form) {for (i = 0; i < form.elements.length; i++) {if (form.elements[i].type == "text" && form.elements[i].value == "") {alert( "Por favor complete todos los campos del formulario" ); form.elements[i].focus();return false; }}form.submit();}function Total() {		document.writeln(alterError(totprice));	}	function bderecho(e) {if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))return false;else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {alert(" El botón derecho del ratón no funciona ");return false;}return true;}function keypressed() {alert(" Las teclas no funcionan ");}	
