// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults


function check_comment_submit() {
  if (document.new_comment_submission.comment_body.value == "") {
    document.new_comment_submission.comment_body.focus();
    alert("Comment Body is Required");
    return false;
  }
}

function alternate(id){
 if(document.getElementsByTagName){
   var table = document.getElementById(id);
   var rows = table.getElementsByTagName("tr");
   for(i = 0; i < rows.length; i++){
 //manipulate rows
     if(i % 2 == 0){
       rows[i].className = "odd";
     }else{
       rows[i].className = "even";
     }
   }
 }
}

function showVideoIfVideo(o){
    if(o.value == 8){
        $$(".video-options").each(Element.show);
    }else{
        $$(".video-options").each(Element.hide);
    }
}