var times = 0; function validate(field) { var valid = "0123456789,." var maxone = ",."; //bara en av dessa tecken. var ok = "yes"; var count = 0; var temp; for (var i=0; i1) ok = "no"; } if (ok == "no") { field.value = ""; field.focus(); field.select(); } } function logout() { document.location = 'Servlet?page=14&action=logout'; return false; } //The detailed info popup window function showDetails(anr) { MyWindow=window.open('Servlet?page=11&anr='+anr,'MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=480,height=640'); return false; } //The detailed info popup window function showMallForm() { MyWindow=window.open('mallorder.jsp','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=400,height=250'); return true; } function validateSize(formobject,selectobject) { if ( (selectobject!=null) && (selectobject.options[0].selected) ) { alert('Du måste välja en variant (färg, storlek och dylikt).'); } else { formobject.submit(); } } function validateDeliveryPayment(formobject,deliveryobject,paymentobject) { if ( (deliveryobject!=null) && (deliveryobject.options[0].selected) ) { alert('Du måste välja ett leveranssätt'); } else if ( (paymentobject!=null) && (paymentobject.options[0].selected) ) { alert('Du måste välja ett betalningssätt'); } else { formobject.submit(); } } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function getIndex(what,which) { for (var i=0;i < what.elements.length;i++) if (what.elements[i].name == which) return i; return -1; }