Hours
HTML
<form method="post" id="addstore" action="" name="addstore">
<fieldset id="fs-0">
<table border="0" cellpadding="5">
<tr>
<td>
<input type="checkbox" name="monday" tabindex="8" value="1" /> Monday </td>
<td>
<input type="text" name="monday_open" tabindex="9" id="monday_open" size="5" value="" />
<select name="am1" id="am1" tabindex="10">
<option value="am" selected="selected" >am</option>
<option value="pm" >pm</option></select> -
<input type="text" name="monday_close" tabindex="11" id="monday_close" size="5" value="" />
<select name="pm1" id="pm1" tabindex="12">
<option value="am" >am</option>
<option value="pm" selected="selected" >pm</option>
</select>
</td>
</tr>
<tr>
<td colspan="2"><input type="checkbox" tabindex="13" name="check" id="ca-0" /> Check to copy monday to the rest of the days then adjust.</td>
</tr>
<tr>
<td>
<input type="checkbox" name="tuesday" tabindex="14" value="1" /> Tuesday </td>
<td>
<input type="text" name="tuesday_open" tabindex="15" id="tuesday_open" size="5" value="" />
<select name="am2" id="am2" tabindex="16">
<option value="am" selected="selected" >am</option>
<option value="pm" >pm</option></select> -
<input type="text" name="tuesday_close" tabindex="17" id="tuesday_close" size="5" value="" />
<select name="pm2" id="pm2" tabindex="18">
<option value="am" >am</option>
<option value="pm" selected="selected" >pm</option></select></td></tr>
<tr><td>
<input type="checkbox" tabindex="19" name="wednesday" value="1" /> Wednesday</td>
<td>
<input type="text" tabindex="20" name="wednesday_open" id="wednesday_open" size="5" value="" />
<select name="am3" id="am3" tabindex="21">
<option value="am" selected="selected" >am</option>
<option...
JavaScript
function checkAll(ca)
{
var fs=ca.id.split('-')[1];
var cboxes=document.getElementById('fs-'+fs).getElementsByTagName('input');
for (j=1; j<cboxes.length; j++)
{
cboxes[j].checked=((ca.checked==true)? true : false);
}
insertval();
}
function initCheckAll()
{
var fsets=document.getElementById('addstore').getElementsByTagName('fieldset');
for (i=0; i<fsets.length; i++)
{
document.getElementById('ca-'+i).onclick=function() {checkAll(this)}
}
}
function insertval()
{
var stime=document.form.monday_open.value;
var smorn=document.form.am1.value;
var etime=document.form.monday_close.value;
var seve=document.form.pm1.value;
document.form.tuesday_open.value=stime;
document.form.am2.value=smorn;
document.form.tuesday_close.value=etime;
document.form.pm2.value=seve;
document.form.wednesday_open.value=stime;
document.form.am3.value=smorn;
document.form.wednesday_close.value=etime;
document.form.pm3.value=seve;
document.form.thursday_open.value=stime;
document.form.am4.value=smorn;
document.form.thursday_close.value=etime;
document.form.pm4.value=seve;
document.form.friday_open.value=stime;
document.form.am5.value=smorn;
document.form.friday_close.value=etime;
document.form.pm5.value=seve;
document.form.saturday_open.value=stime;
document.form.am6.value=smorn;
document.form.saturday_close.value=etime;
document.form.pm6.value=seve;
document.form.sunday_open.value=stime;
document.form.am7.value=smorn;
document.form.sunday_close.value=etime;
document.form.pm7.value=seve;
}
function...