When i write this method all of JS stops working!

Every time i add this function to my JS file everything stops working. Including alerts, rollovers…everything! Can anyone tell me what could be the problem?


function gSlike(desno, stGalerije){
    if(desno){    //if the right button is pressed
        curImage++;
        if(curImage>12){
            curImage=1;
        }
    }else{ 
        curImage--;
        if(curImage<1){
            curImage=12;
        }
    }
    switch('velika', 'images/velike/'+stGalerije+'_'+curImage+'.png';
}

It’s supposed to be the code for left and right buttons which control displaying images on the website. The “switch” functions works because i use it also for when user clicks on the thumbnail image.