var imagethumbtovideo = new Array();
var imageposttovideo = new Array();


var entry_idtovideo='';
var optionidtovideo='';
var nvotestovideo=0;
var countimagetovideo=0;
var currentimagetovideo=0;


function nextimagetovideo(){

    var arr1=imageposttovideo.length;

    document.getElementById('previmagetovideo').style.visibility="visible";
    
    countimagetovideo+=3;

	//currentimage=countimage;
    if(countimagetovideo>=(arr1-3))
    {
       document.getElementById('nextimagetovideo').style.visibility="hidden";
    }

 
   document.getElementById('thumbimg_1tovideo').src=imagethumbtovideo[countimagetovideo];

   if(countimagetovideo>=(arr1-1))
   {
      document.getElementById('thumbimg_2tovideo').style.display="none";
   }
  else{
      
     document.getElementById('thumbimg_2tovideo').src=imagethumbtovideo[countimagetovideo+1];
   }

if(countimagetovideo>=(arr1-2))
   {
       document.getElementById('thumbimg_3tovideo').style.display="none";
   }
else{
      
document.getElementById('thumbimg_3tovideo').src=imagethumbtovideo[countimagetovideo+2];
}


   document.getElementById('thumbimg_2tovideo').src=imagethumbtovideo[countimagetovideo+1];    
}


function previmagetovideo(){
   document.getElementById('nextimagetovideo').style.visibility="visible";;


    countimagetovideo-=3;
//    currentimage=countimage;
    
   if(countimagetovideo<=0)
   {
      document.getElementById('previmagetovideo').style.visibility="hidden";;
   }
   document.getElementById('thumbimg_1tovideo').src=imagethumbtovideo[countimagetovideo];
   document.getElementById('thumbimg_2tovideo').src=imagethumbtovideo[countimagetovideo+1];
   document.getElementById('thumbimg_3tovideo').src=imagethumbtovideo[countimagetovideo+2];

  document.getElementById('thumbimg_2tovideo').style.display="block";
  document.getElementById('thumbimg_3tovideo').style.display="block";


}



function changeposttovideo(imgno){

   var divid="imageposttovideo_" + currentimagetovideo;
   document.getElementById(divid).style.display="none";

   currentimagetovideo=countimagetovideo+imgno;

   var divid="imageposttovideo_" + currentimagetovideo;
   document.getElementById(divid).style.display="block";

}