          function votingStar(num) {
            var numberOfVotes = num;
              for(i = 1; i <= numberOfVotes; i++) {
                document.getElementById('vote_' + i).src="/img/vote.png";
              }
            }
            
            function removeStar(num) {
            var disappearVotes = num;
              for(i = 1; i <= disappearVotes; i++) {
                document.getElementById('vote_' + i).src="/img/no-vote.png";
              }
            }
            


function passwordDisappear(obj) {
     obj.setAttribute('type','password');
}
            
function updateReqd(fieldName,value) {  
  currRow = document.getElementById("row_" + fieldName);  
  if(value) {
    currRow.setAttribute("class","requiredNotEmpty");
  } else {
    currRow.setAttribute("class","requiredEmpty");
  }
}

function compHideUploadImg(value, trID, trID2) {
  if(value != 1) {
    document.getElementById(trID).style.visibility = 'hidden';
    if(trID2) document.getElementById(trID2).style.visibility = 'hidden';
  } else {
    document.getElementById(trID).style.visibility = 'visible';
    if(trID2) document.getElementById(trID2).style.visibility = 'visible';
  }  
}


function showImage(fileurl, width, height) {
    var popWidth = window.innerWidth;
    var popHeight = window.innerHeight;
    var URL = fileurl;
    window.open(URL,'CHPhoto','width=' + width + ',height=' + height);
}


function showCompImage(file) {
    var URL = "/admin/showImage.php?file=" + file;

     var features =
       'width='        + screen.width +
       ',height='      + screen.height +
       ',directories=' + 'no' +
       ',location='    + 'no' +
       ',menubar='     + 'no' +
       ',scrollbars='  + 'yes' +
       ',status='      + 'yes' +
       ',toolbar='     + 'no' +
       ',Resizable='  + 'yes';
     info = window.open (URL, "showImage", features);
}


function slideshowPopUp(file) {
    var URL = "/admin/slideshow.php?compID=" + file;
//       'width='        + screen.width +
//       ',height='      + screen.height +
     var features =
       'width='        + 870 +
       ',height='      + 750 +
       ',directories=' + 'no' +
       ',location='    + 'no' +
       ',menubar='     + 'no' +
       ',scrollbars='  + 'yes' +
       ',status='      + 'yes' +
       ',toolbar='     + 'no' +
       ',Resizable='  + 'yes';
     info = window.open (URL, "SlideShow", features);
}


