﻿var arrItems1 = new Array();
var arrItemsGrp1 = new Array();

arrItems1[1] = "رياضي"; arrItemsGrp1[1] = 1;
arrItems1[3] = "تجربي"; arrItemsGrp1[3] = 1;
arrItems1[5] = "انساني"; arrItemsGrp1[5] = 1;
arrItems1[7] = "هنر"; arrItemsGrp1[7] = 1;
arrItems1[9] = "منحصرا زبان"; arrItemsGrp1[9] = 1;
arrItems1[21] = "سوم رياضي"; arrItemsGrp1[21] = 2;
arrItems1[22] = "سوم تجربي"; arrItemsGrp1[22] = 2;
arrItems1[23] = "سوم انسانى"; arrItemsGrp1[23] = 2;
arrItems1[24] = "دوم رياضي"; arrItemsGrp1[24] = 2;
arrItems1[25] = "دوم تجربي"; arrItemsGrp1[25] = 2;
arrItems1[26] = "دوم انساني"; arrItemsGrp1[26] = 2;
arrItems1[27] = "اول دبيرستان"; arrItemsGrp1[27] = 2;
arrItems1[31] = "سوم راهنمايي"; arrItemsGrp1[31] = 3;
arrItems1[32] = "سوم راهنمايي تيزهوشان"; arrItemsGrp1[32] = 3;
arrItems1[33] = "دوم راهنمايي"; arrItemsGrp1[33] = 3;
arrItems1[34] = "اول راهنمايي"; arrItemsGrp1[34] = 3;
arrItems1[41] = "پنجم دبستان"; arrItemsGrp1[41] = 4;
arrItems1[42] = "پنجم دبستان تيزهوشان"; arrItemsGrp1[42] = 4;
arrItems1[43] = "چهارم دبستان"; arrItemsGrp1[43] = 4;
arrItems1[44] = "سوم دبستان"; arrItemsGrp1[44] = 4;
arrItems1[51] = "الكترونيك فني"; arrItemsGrp1[51] = 5;
arrItems1[52] = "الكترونيك كار"; arrItemsGrp1[52] = 5;
arrItems1[53] = "الكتروتكنيك فني"; arrItemsGrp1[53] = 5;
arrItems1[54] = "الكتروتكنيك كار"; arrItemsGrp1[54] = 5;
arrItems1[55] = "كامپيوتر فني"; arrItemsGrp1[55] = 5;
arrItems1[56] = "كامپيوتر كار"; arrItemsGrp1[56] = 5;
arrItems1[57] = "ساختمان فني"; arrItemsGrp1[57] = 5;
arrItems1[58] = "ساختمان كار"; arrItemsGrp1[58] = 5;
arrItems1[59] = "معماري فني"; arrItemsGrp1[59] = 5;
arrItems1[60] = "معماري كار"; arrItemsGrp1[60] = 5;
arrItems1[61] = "ساخت و توليد فني"; arrItemsGrp1[61] = 5;
arrItems1[62] = "ساخت و توليد كار"; arrItemsGrp1[62] = 5;
arrItems1[63] = "مكانيك خودرو فني"; arrItemsGrp1[63] = 5;
arrItems1[64] = "مكانيك خودرو كار"; arrItemsGrp1[64] = 5;
arrItems1[65] = "نقشه كشي عمومي فني"; arrItemsGrp1[65] = 5;
arrItems1[66] = "نقشه كشي عمومي كار"; arrItemsGrp1[66] = 5;
arrItems1[67] = "گرافيك فني"; arrItemsGrp1[67] = 5;
arrItems1[68] = "گرافيك كار"; arrItemsGrp1[68] = 5;
arrItems1[69] = "حسابداري فني"; arrItemsGrp1[69] = 5;
arrItems1[70] = "حسابداري كار"; arrItemsGrp1[70] = 5;
arrItems1[71] = "طراحي و دوخت فني"; arrItemsGrp1[71] = 5;
arrItems1[72] = "طراحي و دوخت كار"; arrItemsGrp1[72] = 5;
arrItems1[73] = "نقاشي فني"; arrItemsGrp1[73] = 5;
arrItems1[74] = "نقاشي کار"; arrItemsGrp1[74] = 5;
arrItems1[81] = "الكترونيك"; arrItemsGrp1[81] = 6;
arrItems1[82] = "الكتروتكنيك"; arrItemsGrp1[82] = 6;
arrItems1[83] = "كامپيوتر"; arrItemsGrp1[83] = 6;
arrItems1[84] = "ساختمان"; arrItemsGrp1[84] = 6;
arrItems1[85] = "معماري"; arrItemsGrp1[85] = 6;
arrItems1[86] = "ساخت و توليد و نقشه كشي ع"; arrItemsGrp1[86] = 6;
arrItems1[87] = "مكانيك خودرو"; arrItemsGrp1[87] = 6;
arrItems1[88] = "گرافيك"; arrItemsGrp1[88] = 6;
arrItems1[89] = "حسابداري"; arrItemsGrp1[89] = 6;
arrItems1[201] = "سوم دبيرستان - رياضي"; arrItemsGrp1[201] = 7;
arrItems1[202] = "سوم دبيرستان - فيزيک"; arrItemsGrp1[202] = 7;
arrItems1[203] = "سوم دبيرستان - شيمي"; arrItemsGrp1[203] = 7;
arrItems1[204] = "سوم دبيرستان - نجوم"; arrItemsGrp1[204] = 7;
arrItems1[205] = "سوم دبيرستان - زيست شناسي"; arrItemsGrp1[205] = 7;
arrItems1[206] = "سوم دبيرستان - ادبي"; arrItemsGrp1[206] = 7;
arrItems1[207] = "دوم دبيرستان - رياضي"; arrItemsGrp1[207] = 7;
arrItems1[208] = "دوم دبيرستان - کامپيوتر"; arrItemsGrp1[208] = 7;
arrItems1[209] = "دوم دبيرستان - نجوم"; arrItemsGrp1[209] = 7;
arrItems1[210] = "دوم دبيرستان - فيزيک"; arrItemsGrp1[210] = 7;
arrItems1[211] = "دوم دبيرستان - شيمي"; arrItemsGrp1[211] = 7;
arrItems1[212] = "دوم دبيرستان - زيست شناسي"; arrItemsGrp1[212] = 7;
arrItems1[213] = "دوم دبيرستان - ادبي"; arrItemsGrp1[213] = 7;
arrItems1[214] = "اول دبيرستان - رياضي"; arrItemsGrp1[214] = 7;
arrItems1[215] = "اول دبيرستان - کامپيوتر"; arrItemsGrp1[215] = 7;
arrItems1[216] = "اول دبيرستان - نجوم"; arrItemsGrp1[216] = 7;
arrItems1[217] = "اول دبيرستان - فيزيک"; arrItemsGrp1[217] = 7;
arrItems1[218] = "اول دبيرستان - شيمي"; arrItemsGrp1[218] = 7;
arrItems1[219] = "اول دبيرستان - زيست شناسي"; arrItemsGrp1[219] = 7;
arrItems1[220] = "سوم راهنمايي - رياضي"; arrItemsGrp1[220] = 7;
arrItems1[221] = "سوم راهنمايي - فيزيک"; arrItemsGrp1[221] = 7;
arrItems1[222] = "سوم راهنمايي - شيمي"; arrItemsGrp1[222] = 7;
arrItems1[223] = "سوم راهنمايي - نجوم"; arrItemsGrp1[223] = 7;
arrItems1[224] = "سوم راهنمايي - زيست شناسي"; arrItemsGrp1[224] = 7;
arrItems1[225] = "دوم راهنمايي - رياضي"; arrItemsGrp1[225] = 7;
arrItems1[226] = "دوم راهنمايي - فيزيک"; arrItemsGrp1[226] = 7;
arrItems1[227] = "دوم راهنمايي - شيمي"; arrItemsGrp1[227] = 7;
arrItems1[228] = "دوم راهنمايي - نجوم"; arrItemsGrp1[228] = 7;
arrItems1[229] = "دوم راهنمايي - زيست شناسي"; arrItemsGrp1[229] = 7;
arrItems1[230] = "اول راهنمايي - رياضي"; arrItemsGrp1[230] = 7;


function selectChange(control, controlToPopulate, ItemArray, GroupArray) {
  var myEle ;
  var x ;
  // Empty the second drop down box of any choices
  for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null;
  if (control.name == "firstChoice") {
    // Empty the third drop down box of any choices
 }
  // ADD Default Choice - in case there are no values
  myEle = document.createElement("option") ;
  myEle.value = 0 ;
  myEle.text = "انتخاب" ;
  // controlToPopulate.add(myEle) ;
  controlToPopulate.appendChild(myEle)
  // Now loop through the array of individual items
  // Any containing the same child id are added to
  // the second dropdown box
  for ( x = 0 ; x < ItemArray.length  ; x++ ) {
    if ( GroupArray[x] == control.value ) {
      myEle = document.createElement("option") ;
      //myEle.value = x ;
      myEle.setAttribute('value',x);
      // myEle.text = ItemArray[x] ;
      var txt = document.createTextNode(ItemArray[x]);
      myEle.appendChild(txt)
      // controlToPopulate.add(myEle) ;
      controlToPopulate.appendChild(myEle)
    }
  }
}

function selectChange(control, controlToPopulate, ItemArray, GroupArray) {
  var myEle ;
  var x ;
  // Empty the second drop down box of any choices
  for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null;
  if (control.name == "firstChoice") {
    // Empty the third drop down box of any choices
  }
  // ADD Default Choice - in case there are no values
  myEle=document.createElement("option");
  theText=document.createTextNode("انتخاب");
  myEle.appendChild(theText);
  myEle.setAttribute("value","0");
  controlToPopulate.appendChild(myEle);
  // Now loop through the array of individual items
  // Any containing the same child id are added to
  // the second dropdown box
  for ( x = 0 ; x < ItemArray.length  ; x++ ) {
    if ( GroupArray[x] == control.value ) {
      myEle = document.createElement("option") ;
      //myEle.value = x ;
      myEle.setAttribute("value",x);
      // myEle.text = ItemArray[x] ;
      var txt = document.createTextNode(ItemArray[x]);
      myEle.appendChild(txt)
      // controlToPopulate.add(myEle) ;
      controlToPopulate.appendChild(myEle)
    }
  }
}



function keyenter(field,e)
{
var key;
if (window.event)
   key = window.event.keyCode;
if (key > 31)
  if (key < 128)
  {
    if (window.event)
      window.event.keyCode=' !"#$%،گ)(×+و-./0123456789:ك,=.؟@ِذ}ىُيلا÷ـ،/’د×؛َءٍف‘{ًْإ~جژچ^_پشذزيثبلاهتنمئدخحضقسفعرصطغظ&lt;|&gt;ّ'.charCodeAt(key-32);
  }
}

function isnumeric(field,e)
{
var key;
if (window.event)
   key = window.event.keyCode;
if (key > 47 && key < 58 )
  {
    if (window.event)
      window.event.keyCode='0123456789'.charCodeAt(key-48);
  }
 else
 	window.event.keyCode = 0;
 	
}



function open_win(what_link,x,y){ 
var the_url = ""
var the_x = 650;
var the_y = 500;
the_x -= 0;
the_y -= 0;
var how_wide = screen.availWidth;
var how_high = screen.availHeight;
if(what_link != ""){the_url=what_link;}
var the_toolbar = "no";
var the_addressbar = "no";
var the_directories = "no";
var the_statusbar = "no";
var the_menubar = "no";
var the_scrollbars = "Yes";
var the_do_resize =  "no";
var the_copy_history = "no";
top_pos = (how_high/2) -  (the_y/2);
left_pos = (how_wide/2) -  (the_x/2);
if (window.outerWidth ){
var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",outerWidth="+the_x+",outerHeight="+the_y+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos;
site=open(the_url, "DisplayWindow", option);
var Opera = (navigator.userAgent.indexOf('Opera') != -1);
if(Opera){
site.resizeTo(the_x,the_y);
site.moveTo(0,0);
}
}
else
{
var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",Width="+the_x+",Height="+the_y+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos;
site=open('', "DisplayWindow", option);
site.location=the_url;
if(site.open){site.focus();return false;}
site.resizeTo(the_x,the_y);
}
} 

function open_win1(what_link,x,y){ 
var the_url = ""
var the_x = 650;
var the_y = 500;
the_x -= 0;
the_y -= 0;
var how_wide = screen.availWidth;
var how_high = screen.availHeight;
if(what_link != ""){the_url=what_link;}
var the_toolbar = "no";
var the_addressbar = "no";
var the_directories = "no";
var the_statusbar = "no";
var the_menubar = "no";
var the_scrollbars = "Yes";
var the_do_resize =  "no";
var the_copy_history = "no";
top_pos = (how_high/2) -  (the_y/2);
left_pos = (how_wide/2) -  (the_x/2);
if (window.outerWidth ){
var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",outerWidth="+the_x+",outerHeight="+the_y+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos;
site=open(the_url, "DisplayWindow", option);
var Opera = (navigator.userAgent.indexOf('Opera') != -1);
if(Opera){
site.resizeTo(the_x,the_y);
site.moveTo(0,0);
}
}
else
{
var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",Width="+the_x+",Height="+the_y+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos;
site=open('', "DisplayWindow", option);
site.location=the_url;
if(site.open){site.focus();return false;}
site.resizeTo(the_x,the_y);
}
} 



