здравствуйте.Скажите,пожал уйста,что я делаю неправильно?массив не виден вне цикла
var timetable1 = { };
timetable1["timetable_start"]= timetable_start;
timetable1["timetable_finish"]= timetable_finish;
timetable1["groupName"]=groupName;
timetable1["typeFo"]=typeFo;
timetable1["enterYear"]=enterYear;
timetable1["strId"]="";
timetable1["week_day"]="";
timetable1["start_time"]="";
timetable1["duration"]="";
timetable1["subject_id"]="";
timetable1["subject_type"]="";
timetable1["subgroup_name"]="";
timetable1["upper_lower_week"]="";
timetable1["comments"]="";
timetable1["teacher_id"]="";
timetable1["room_id"]="";
timetable1["timetable_type"]="";
for (var i=0;i<numberOfDays;i++)
{
var discN=document.getElementById("dis"+i);
discNarray[i]=discN;
}
var timetable=[];
for (var i = 0; i < numberOfDays; i++)
{
timetable[i] = [];
for (var j = 0; j <=discNarray[i].value; j++)
{
timetable[i][j] = timetable1;
timetable[i][j]["week_day"]=i;
alert(timetable[i][j]["week_day"]);
var start=document.getElementById("strt_"+i+"_"+j);
timetable[i][j]["start_time"]=start.value;
var dur=document.getElementById("dur_"+i+"_"+j);
timetable[i][j]["duration"]=dur.value;
var sgp=document.getElementById("sgp_"+i+"_"+j);
timetable[i][j]["subgroup_name"]=sgp.value;
var sbt=document.getElementById("sbt_"+i+"_"+j);
timetable[i][j]["subject_type"]=sbt.value;
var sbj=document.getElementById("sbj_"+i+"_"+j);
timetable[i][j]["subject_id"]=sbj.value;
var rm=document.getElementById("rm_"+i+"_"+j);
timetable[i][j]["room_id"]=rm.value;
var cm=document.getElementById("cm_"+i+"_"+j);
timetable[i][j]["comments"]=cm.value;
}
}