// JavaScript Document
var i=0;
var t;
var fileNames= new Array();
var iEnd = 0;
var fileLocation = "http://www.bmaindia.com/"
//var fileLocation = "file:///e:/shiva/completed/BMA-New/"
//var fileLocation = "file:///D:/OnGoing-Projects/BMA-New/"

;
var fileClassroom=new Array("" + fileLocation + "images/Photos/Classroom/Image20.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image21.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image22.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image23.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image24.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image25.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image26.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image27.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image28.jpg",
							
							"" + fileLocation + "images/Photos/Classroom/Image03.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image04.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image06.jpg",
							
							"" + fileLocation + "images/Photos/Classroom/Image08.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image09.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image10.jpg",
							
							"" + fileLocation + "images/Photos/Classroom/Image12.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image13.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image14.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image15.jpg",
							"" + fileLocation + "images/Photos/Classroom/Image19.jpg");

var fileComputerLab=new Array("" + fileLocation + "images/Photos/ComputerLab/Image09.jpg",
							  "" + fileLocation + "images/Photos/ComputerLab/Image10.jpg",
							  "" + fileLocation + "images/Photos/ComputerLab/Image11.jpg",
							  "" + fileLocation + "images/Photos/ComputerLab/Image12.jpg",
							  "" + fileLocation + "images/Photos/ComputerLab/Image13.jpg",
							  "" + fileLocation + "images/Photos/ComputerLab/Image14.jpg",
							  "" + fileLocation + "images/Photos/ComputerLab/Image04.jpg");

var fileLibrary=new Array("" + fileLocation + "images/Photos/Library/Image14.jpg",
						  "" + fileLocation + "images/Photos/Library/Image15.jpg",
						  "" + fileLocation + "images/Photos/Library/Image16.jpg",
						  "" + fileLocation + "images/Photos/Library/Image17.jpg", 
						  "" + fileLocation + "images/Photos/Library/Image18.jpg", 
						  "" + fileLocation + "images/Photos/Library/Image01.jpg", 
						   
						   
						 
						  "" + fileLocation + "images/Photos/Library/Image05.jpg",
						  "" + fileLocation + "images/Photos/Library/Image06.jpg",
						  "" + fileLocation + "images/Photos/Library/Image07.jpg",
						  "" + fileLocation + "images/Photos/Library/Image11.jpg",
						  "" + fileLocation + "images/Photos/Library/Image12.jpg",
						  "" + fileLocation + "images/Photos/Library/Image13.jpg");

var fileCafeteria=new Array(""+ fileLocation + "images/Photos/Cafeteria/Image08.jpg",
							""+ fileLocation + "images/Photos/Cafeteria/Image09.jpg",
							""+ fileLocation + "images/Photos/Cafeteria/Image10.jpg",
							""+ fileLocation + "images/Photos/Cafeteria/Image11.jpg",
							""+ fileLocation + "images/Photos/Cafeteria/Image05.jpg",
							"" + fileLocation + "images/Photos/Cafeteria/Image06.jpg", 
							"" + fileLocation + "images/Photos/Cafeteria/Image07.jpg");

var fileAccommodation=new Array("" + fileLocation + "images/Photos/Accommodations/Image23.jpg",
								"" + fileLocation + "images/Photos/Accommodations/Image24.jpg",
								"" + fileLocation + "images/Photos/Accommodations/Image28.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image27.jpg", 
								"" + fileLocation +  "images/Photos/Accommodations/Image25.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image26.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image17.jpg",
								"" + fileLocation + "images/Photos/Accommodations/Image06.jpg",
								"" + fileLocation + "images/Photos/Accommodations/Image18.jpg",
								"" + fileLocation + "images/Photos/Accommodations/Image07.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image19.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image20.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image09.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image21.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image10.jpg",
								"" + fileLocation + "images/Photos/Accommodations/Image22.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image11.jpg",
								"" + fileLocation + "images/Photos/Accommodations/Image05.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image01.jpg",
								"" + fileLocation + "images/Photos/Accommodations/Image02.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image03.jpg", 
								"" + fileLocation + "images/Photos/Accommodations/Image04.jpg");

var fileCampus=new Array(""+ fileLocation + "images/Photos/Campus/Image12.jpg",
						 "" + fileLocation + "images/Photos/Campus/Image13.jpg",
						 "" + fileLocation + "images/Photos/Campus/Image09.jpg",
						 "" + fileLocation + "images/Photos/Campus/Image10.jpg", 
						 "" + fileLocation + "images/Photos/Campus/Image14.jpg",
						 "" + fileLocation + "images/Photos/Campus/Image15.jpg", 
						 "" + fileLocation + "images/Photos/Campus/Image11.jpg", 
						 "" + fileLocation + "images/Photos/Campus/Image06.jpg",
						 "" + fileLocation + "images/Photos/Campus/Image16.jpg", 
						 "" + fileLocation + "images/Photos/Campus/Image17.jpg", 
						 "" + fileLocation + "images/Photos/Campus/Image08.jpg",
						 "" + fileLocation + "images/Photos/Campus/Image18.jpg", 
						 "" + fileLocation + "images/Photos/Campus/Image19.jpg");

var fileGym=new Array(""+ fileLocation + "images/Photos/Gym/DSC_9822.jpg",
							""+ fileLocation + "images/Photos/Gym/DSC_9825.jpg",
							""+ fileLocation + "images/Photos/Gym/DSC_9828.jpg",
							""+ fileLocation + "images/Photos/Gym/DSC_9839.jpg");


function assignFile(fileNo)
{
  switch(fileNo)
  {
  	case 0:
	  fileNames = fileClassroom;
	  break;
	case 1:
	  fileNames = fileComputerLab;
	  break;
	case 2:
	  fileNames = fileLibrary;
	  break;
	case 3:
	  fileNames = fileCafeteria;
	  break;
	case 4:
	  fileNames = fileAccommodation;
	  break;
	case 5:
	  fileNames = fileCampus;
	  break;
	case 6:
	  fileNames = fileGym;
	  break;
	//default:
//	  break;
  }
  iEnd = fileNames.length;
  showPhoto(fileNo)
  document.getElementById("virtualRoom").src = fileNames[0];
  i=0;
}

function moveRight()
{
    (i<iEnd-1)?i++:i=0;
    document.getElementById("virtualRoom").src = fileNames[i];
}
function moveLeft()
{
    i=(i>0)?i-1:iEnd-1;
    document.getElementById("virtualRoom").src = fileNames[i];
}

function showPhoto(n)
{
	var DivLink = new Array();
	var DivLinkBold = new Array();
	DivLink[0] = '<a href="javascript:assignFile(0)" class="virtualTourMenu">01. Class Room</a>';
	DivLinkBold[0] = '<a href="javascript:assignFile(0)" class="virtualTourMenuSelected">01. Class Room</a>';
	DivLink[1] = '<a href="javascript:assignFile(1)" class="virtualTourMenu">02. Computer Labs</a>';
	DivLinkBold[1] = '<a href="javascript:assignFile(1)" class="virtualTourMenuSelected">02. Computer Labs</a>';
	DivLink[2] = '<a href="javascript:assignFile(2)" class="virtualTourMenu">03. Library</a>';
	DivLinkBold[2] = '<a href="javascript:assignFile(2)" class="virtualTourMenuSelected">03. Library</a>';
	DivLink[3] = '<a href="javascript:assignFile(3)" class="virtualTourMenu">04. Cafeteria</a>';
	DivLinkBold[3] = '<a href="javascript:assignFile(3)" class="virtualTourMenuSelected">04. Cafeteria</a>';
	DivLink[4] = '<a href="javascript:assignFile(4)" class="virtualTourMenu">05. Accommodation</a>';
	DivLinkBold[4] = '<a href="javascript:assignFile(4)" class="virtualTourMenuSelected">05. Accommodation</a>';
	DivLink[5] = '<a href="javascript:assignFile(5)" class="virtualTourMenu">06. Campus</a>';
	DivLinkBold[5] = '<a href="javascript:assignFile(5)" class="virtualTourMenuSelected">06. Campus</a>';
	DivLink[6] = '<a href="javascript:assignFile(6)" class="virtualTourMenu">07. Gym</a>';
	DivLinkBold[6] = '<a href="javascript:assignFile(6)" class="virtualTourMenuSelected">07. Gym</a>';

ContainerText = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
	ContainerText = ContainerText + '<td width="15" align="left" valign="top">&nbsp;</td><td height="40" align="right" valign="top"><strong><a href="javascript:HidePhoto()" class="footerLinks"><span class="font18">X</span></a></strong> &nbsp;&nbsp;&nbsp;&nbsp;</td></tr>';
	for (i=0;i<7;i++)
	{
		ContainerText = ContainerText + '<tr><td width="15" height="20" align="center" valign="middle">&nbsp;</td><td height="20" align="left" valign="top">';
		ContainerText+=(i==n)?DivLinkBold[i]:DivLink[i];
		ContainerText = ContainerText + '</td></tr>';
	}
	ContainerText += '</table>';
	document.getElementById("menuSpacer").innerHTML=ContainerText;
}

document.write('<div align="center" style="width:100%; display:none; position:absolute; background-color:#332e56; height:100%; top:0px; left:0px; z-index:99;" id="VirtualTourPhotoPage" class="translucent" onClick="HidePhoto()"></div>');
document.write('<div id="VirtualTourPhoto" style="width:703px; border:0px; height:377px; z-index:100; display:none; position:absolute; background:#ffffff;">');
document.write('<div style="width:703px; height:369px; background:url(' + fileLocation + 'images/ajaxBG.gif) bottom repeat-x;">');
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td width="8" align="left" valign="top"><img src="' + fileLocation + 'images/ajaxBorderLT.gif" width="8" height="8"></td>');
document.write('<td align="left" valign="top" bgcolor="#FFFFFF"></td>');
document.write('<td align="left" valign="top" bgcolor="#FFFFFF"></td>');
document.write('<td align="left" valign="top" bgcolor="#FFFFFF"></td>');
document.write('<td width="8" align="left" valign="top"><img src="' + fileLocation + 'images/ajaxBorderRT.gif" width="8" height="8"></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>');
document.write('<td width="14" height="18" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>');
document.write('<td align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>');
document.write('<td width="14" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>');
document.write('<td align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td align="left" valign="top">&nbsp;</td>');
document.write('<td height="324" align="left" valign="top">&nbsp;</td>');
document.write('<td align="left" valign="top">');
    document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
        document.write('<tr>');
            document.write('<td width="431" height="324" align="left" valign="top">');
                document.write('<div align="left" style="width:215px; height:324px; z-index:100; position:absolute; float:left; top:26px; background:url(' + fileLocation + 'images/spacer.gif);">');
                document.write('<img src="' + fileLocation + 'images/Prev.gif" alt="Previous" style="margin-top:25px; cursor:pointer" id="prevButton" onClick="moveLeft()">');
                document.write('</div>');
                document.write('<div align="center" style="width:431px; height:324px; z-index:90; position:absolute; float:left; top:26px;">');
                document.write('<img src="" id="virtualRoom" width="431" height="314"></div>');
                document.write('<div align="right" style="width:215px; height:324px; z-index:100; position:absolute; float:left; left:240px; background:url(' + fileLocation + 'images/spacer.gif);">');
                document.write('<img src="' + fileLocation + 'images/Next.gif" alt="Next" style="margin-top:25px; cursor:pointer" id="nextButton" onClick="moveRight()">');
                document.write('</div>');
            
            document.write('</td>');
            document.write('<td align="left" valign="top">');
                document.write('<div id="menuSpacer">');
                    document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%">');
                    document.write('<tbody>');
                    document.write('<tr>');
                    document.write('<td align="left" valign="top" width="15">&nbsp;</td>');
                    document.write('<td align="right" height="40" valign="top">');
                    document.write('<strong>');
                    document.write('<a href="javascript:HidePhoto()" class="footerLinks"><span class="font18">X</span></a></strong> &nbsp;&nbsp;&nbsp;&nbsp;</td>');
                    document.write('</tr>');
                    document.write('<tr>');
                    document.write('<td align="center" height="20" valign="middle" width="15">&nbsp;</td>');
                    document.write('<td align="left" height="20" valign="top">');
                    document.write('<a href="javascript:assignFile(0)" class="virtualTourMenuSelected">01. Class Room</a>');
                    document.write('</td>');
                    document.write('</tr>');
                    document.write('<tr>');
                    document.write('<td align="center" height="20" valign="middle" width="15">&nbsp;</td>');
                    document.write('<td align="left" height="20" valign="top">');
                    document.write('<a href="javascript:assignFile(1)" class="virtualTourMenu">02. Computer Labs</a>');
                    document.write('</td>');
                    document.write('</tr>');
                    document.write('<tr>');
                    document.write('<td align="center" height="20" valign="middle" width="15">&nbsp;</td>');
                    document.write('<td align="left" height="20" valign="top">');
                    document.write('<a href="javascript:assignFile(2)" class="virtualTourMenu">03. Library</a>');
                    document.write('</td>');
                    document.write('</tr>');
                    document.write('<tr>');
                    document.write('<td align="center" height="20" valign="middle" width="15">&nbsp;</td>');
                    document.write('<td align="left" height="20" valign="top">');
                    document.write('<a href="javascript:assignFile(3)" class="virtualTourMenu">04. Cafeteria</a>');
                    document.write('</td>');
                    document.write('</tr>');
                    document.write('<tr>');
                    document.write('<td align="center" height="20" valign="middle" width="15">&nbsp;</td>');
                    document.write('<td align="left" height="20" valign="top">');
                    document.write('<a href="javascript:assignFile(4)" class="virtualTourMenu">05. Accommodation</a>');
                    document.write('</td>');
                    document.write('</tr>');
                    document.write('<tr>');
                    document.write('<td align="center" height="20" valign="middle" width="15">&nbsp;</td>');
                    document.write('<td align="left" height="20" valign="top">');
                    document.write('<a href="javascript:assignFile(5)" class="virtualTourMenu">06. Campus</a>');
                    document.write('</td>');
                    document.write('</tr>');
                    document.write('<tr>');
                    document.write('<td align="center" height="20" valign="middle" width="15">&nbsp;</td>');
                    document.write('<td align="left" height="20" valign="top">');
                    document.write('<a href="javascript:assignFile(6)" class="virtualTourMenu">07. Gym</a>');
                    document.write('</td>');
                    document.write('</tr>');
                    document.write('</tbody>');
                    document.write('</table>');
                document.write('</div>');
				document.write('<div>');
                	document.write('<table width="100%" border="0" cellspacing="0" cellpadding="10">');
                      document.write('<tr>');
                        document.write('<td height="110" align="left" valign="bottom" class="font11">Click on the right side of the photo to view next and left for previous photo</td>');
                      document.write('</tr>');
                      document.write('<tr>');
                        document.write('<td align="left" valign="top"><img src="' + fileLocation + 'images/photoGalleryIcon.gif" alt="Photo Gallery" width="174" height="33"></td>');
                      document.write('</tr>');
                  document.write('</table>');
                document.write('</div>');

            document.write('</td>');
        document.write('</tr>');
    document.write('</table>');
document.write('</td>');
document.write('<td align="left" valign="top">&nbsp;</td>');
document.write('<td align="left" valign="top">&nbsp;</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td height="18" align="left" valign="top">&nbsp;</td>');
document.write('<td align="left" valign="top">&nbsp;</td>');
document.write('<td align="right" valign="bottom">&nbsp;</td>');
document.write('<td align="left" valign="top">&nbsp;</td>');
document.write('<td align="left" valign="top">&nbsp;</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td align="left" valign="bottom"><img src="' + fileLocation + 'images/ajaxBorderLB.gif" width="8" height="8"></td>');
document.write('<td align="left" valign="bottom" style="background:url(' + fileLocation + 'images/ajaxBG.gif) bottom repeat-x;"></td>');
document.write('<td align="left" valign="bottom" style="background:url(' + fileLocation + 'images/ajaxBG.gif) bottom repeat-x;"></td>');
document.write('<td align="left" valign="bottom" style="background:url(' + fileLocation + 'images/ajaxBG.gif) bottom repeat-x;"></td>');
document.write('<td align="left" valign="bottom"><img src="' + fileLocation + 'images/ajaxBorderRB.gif" width="8" height="8"></td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');
document.write('</div>');
