<!--

	function change_cost_lvr (cost, icost, total, tip_livrare) {
		document.form_cnfr_ord_cos.total_ord2.value = cost;
		document.form_cnfr_ord_cos.val_crt.value    = icost / 100;
		document.form_cnfr_ord_cos.total_ord.value  = ((icost / 100) + total).toFixed(2);
		document.getElementById('sp_cst_lvr').innerHTML = 'Cost livrare (' + tip_livrare + '):';
	}

	function keyRestrict0 (val, e, validchars) {
		var key='', keychar='';
		key = getKeyCode (e);
		if (key == null) {
			return true;
		}
		keychar = String.fromCharCode (key);
	 	keychar = keychar.toLowerCase ();
	 	validchars = validchars.toLowerCase ();
	 	if (key == 46) {
		 	return false;
	 	}
	 	if (validchars.indexOf (keychar) != -1) {
	  	return true;
  	}
	 	if (key==null || key==0 || key==8 || key==9 || key==13 || key==27) {
	  	return true;
  	}
	 	return false;
	}
	
	function getKeyCode(e) {
		if (window.event)
	  	return window.event.keyCode;
	 	else if (e)
	  	return e.which;
	 	else
	  	return null;
	}
		
	function calcul_total () {
		var sum = 0;
		var tot = 0;
		no_forms = document.form_editcos.elements.length - 3;
		for (i = 1 ; i < no_forms ; i+=3) {
			sum += parseFloat (document.form_editcos[i].value);
		}
		document.form_editcos.total_ord.value = sum.toFixed (2);
	}
	
	function page_gotop (i, w) {
 		if (w == '_top') {
			document.form_gotopag_top.gotopag.value = i;
			document.form_gotopag_top.submit();
		}
		else {
			document.form_gotopag_btm.gotopag.value = i;
			document.form_gotopag_btm.submit();
		}
	}
	
	function limitText(limitField, limitCount, limitNum) {
		if (limitField.value.length > limitNum) {
			limitField.value = limitField.value.substring (0, limitNum);
		} else {
			limitCount.value = limitNum - limitField.value.length;
		}
	}
	
//-->