		 

function changeIt(objName,imgstr,lst,objPic)
{ 

 		   first = 0;
            last = lst;
            current = 0;
//The image object accessed through its id we mentioned in the DIV block which is going to be visible currently
var obj = document.getElementById(objName);
var obj1 = document.getElementById(objName+'1');

var imgarr= new Array();
var imgarr = imgstr.split(','); 
//Group Display
for(i=0;i<=lst;i++)
{
if(i == 0)
{
document.getElementById(objPic+[i]).style.display = "block";
document.getElementById(objPic+[i]+'1').style.display = "block";
}
else
{
document.getElementById(objPic+[i]).style.display = "none";
document.getElementById(objPic+[i]+'1').style.display = "none";
}
}

//An array that hold the IDs of images that we mentioned in their DIV blocks
var objId = new Array();

var cnt = imgarr.length;

//Storing the image IDs into the array starts here
for(var i=0; i<cnt; i++)
{
objId[i]= imgarr[i];
}

//Storing the image IDs into the array ends here

//A counter variable going to use for iteration
var i;

//A variable that can hold all the other object references other than the object which is going to be visible
var tempObj;

//The following loop does the display of a single image based on its ID. The image whose ID we passed into this function will be the
//only image that is displayed rest of the images will be hidden based on their IDs and that part has been handled by the else part
//of the if statement within this loop.
for(i=0;i<objId.length;i++)
{
if(objName == objId[i])

{
obj.style.display = "block";
obj1.style.display = "block";
}
else
{
tempObj = document.getElementById(objId[i]);
tempObj1 = document.getElementById(objId[i]+'1');
tempObj.style.display = "none";
tempObj1.style.display = "none";
}
}
return;
}






