var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs)
current = 0;
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
   }
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
   }
else last();
}
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}
function ap(text) {
document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
function rotate() {
if (document.slideform.slidebutton.value == "Stop") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
   }
}

























function Direct(id) {


  if (id == "index") {
  window.location.href = "http://hightscct04l260:8888/report/report.jsp";
  
} else if (id == "coutil"){
  window.location.href = "http://hightscct04l260:82/dev60cgi/ifcgi60.exe?form=login.fmx&userid=&otherparams=useSDI=no&lookAndFeel=Oracle&colorScheme=teal&width=750&height=600";
 } else {

 var sepF = document.theForm.sepF.value;
   if (document.theForm.sepF.checked){
     sepF = "separateFrame=true";
     v_width = "750";
   } else {
     sepF = " ";
   }

  window.location.href = "http://fchfdtstapp01/dev60cgi/ifcgi60.exe?form=cu_rpt_sel.fmx&" + sepF +"&otherparams=useSDI=no&lookAndFeel=generic&USERID=applctn_user/app@dcut&colorScheme=teal&width=975&height=575";
  }
  }




function popup(v_id) {
  if (v_id == 'Default.jsp') {
    window.location.href = "Default.jsp";
  } else if (v_id == 'log.jsp') {
    window.open('login.jsp?id='+v_id,'640x480','toolbar=no,status=no,scrollbars=yes,location=no,menubar=no,directories=no,width=600,height=400')
  }
}



function popuphelp(v_id) {
window.open(v_id,'640x480','toolbar=no,status=no,scrollbars=yes,location=no,menubar=no,directories=no,width=650,height=530')
}




function checkFields() {
  if (document.form1.planid.value == "") {
  alert("Please enter plan id or select Report Type to get plan id!");
  return false;
  }
}

function checkChoice(id) {
if (id == 1 ){
 // alert(form1.mnthsum.value + " at");
    if (form1.mnthsum.value == "Disable >>"){
      form1.mnthsum.value = "Enable >>";
      form1.Fmnth.disabled = true;
      form1.Fyear.disabled = true;
    } else {
      form1.Fmnth.disabled = false;
      form1.Fyear.disabled = false;    
      form1.mnthsum.value = "Disable >>";
    }
 } else if (id == 2){
      form1.Fmnth.disabled = true;
      form1.Fyear.disabled = true;
 }
}
