function calculate()
{

  var f=document.forms.frm;

  if (f.from_month.selectedIndex<12 && f.weeks.selectedIndex==4) f.from_month.selectedIndex=12; 

  if (f.till_month.selectedIndex<12 && f.weeks.selectedIndex==4) f.from_month.selectedIndex=12; 

    switch (f.weeks.selectedIndex)
    {
      case 0: /* group (20 h/w) */ 
 if (f.from_month.selectedIndex==12) f.from_month.selectedIndex=0; 
        f.till_month.selectedIndex=f.from_month.selectedIndex+1; 
        f.konaklama.value=250;
f.sig.value=15;
f.reg.value=7;


        
      break;
      case 1: /* group (20 h/w) */ 
 if (f.from_month.selectedIndex==12) f.from_month.selectedIndex=0; 
        f.till_month.selectedIndex=f.from_month.selectedIndex+2; 
        f.konaklama.value=500;
f.sig.value=30;
f.reg.value=15;


      break;
      case 2: /* individual (16 h/w) */ 
 if (f.from_month.selectedIndex==12) f.from_month.selectedIndex=0; 
        f.till_month.selectedIndex=f.from_month.selectedIndex+3; 
        f.konaklama.value=750;
f.sig.value=45;
f.reg.value=25;

      break;
      case 3: /* group (20 h/w) + individual (4 h/w) */ 
 if (f.from_month.selectedIndex==12) f.from_month.selectedIndex=0; 
        f.till_month.selectedIndex=f.from_month.selectedIndex+5; 
        f.konaklama.value=1000;
f.sig.value=60;
f.reg.value=30;

   

      break;
      case 4: /* group (20 h/w) + individual (10 h/w) */ 
        f.from_month.selectedIndex=12; 
        f.till_month.selectedIndex=12; 
        f.konaklama.value=900;
f.sig.value=75;
f.reg.value=50;



      break;
case 5: /* group (20 h/w) + individual (10 h/w) */ 
 if (f.from_month.selectedIndex==12) f.from_month.selectedIndex=0; 
        f.till_month.selectedIndex=f.from_month.selectedIndex+3; 
        f.konaklama.value=480;
f.sig.value=45;
f.reg.value=25;


      break;
    }

f.total_cost.value=Math.round(f.taksi.value)+Math.round(f.vize.value)+Math.round(f.bilet.value)+Math.round(f.dan.value)+Math.round(f.konaklama.value)+Math.round(f.sig.value)+Math.round(f.reg.value);


  }
