﻿var CinemaData = new Array(); var engmoviearr = new Array(); var ticketdetails = new Array(); var selectticket = new Array(); var imgarr = new Array(50); var moreCinemaData = 0; var selectedCinemaLanguage; var moreStage = 1; var SeatRequired = 2; var loadingStage = true; var Curval = ""; var selectionStage = 1; var movieRating = ""; var movieName = ""; var movieRating = ""; var movieID = ""; var MovieLang = ""; var MovieShowId = ""; var serviceCharges = ""; var ticketamount = 0; var gray = "#717171"; var Blue = "#717171"; var green = "#5da62d"; var Red = "#ce322b"; var totalservicecharge = 0; var currentdispdate = ""; var FinalSelectionval = ""; var stagesel = "1"; var identifyticketsel = ""; var Sessionselect = ""; var Sessionselectno = "1"; var filepath = "Files/Movies/"; var valuetag; var savedateid, savemovieid; var queryvar; var Session_All = "1"; var Temp_Session_Show_Name; var k = 0; var Temp_Session_Show_No; var Prev_Session_No = "Session_0"; var Curr_Seat_no = ""; var Prev_Seat_no = ""; var Seat_Event = 0; var Temp_Seat_Sel = "0"; var img_height = 0; var img_width = 0; var h = 0; var tbl; var tbdy; var idCurr = "ALL"; var clicked = "ALL"; var tUp; var tDown; var calHeight; var srcContent; var srcContainer; var currContainerH; var currContentH; var srcConHeight = 0; var Tabcount = 0; var checkcount = 1; var aroCount1 = 0; var aroCount2 = 0; var aroCount3 = 0; var aroCount4 = 0; var Location_Id = 0; var ThtOptCheck = 0; function buttondateN() { try { selectionStage = 1; thecinema.Backoffice.IBackofficeService.GetDate(DateDynamicLoadN) } catch (a) { RiseError() } } function DateDynamicLoadN(s) { Initial_Seat_Select(); var d, m, p; var j; $get("MainDiv").innerHTML = ""; identifyticketsel = ""; var b = document.createElement("table"); var c = document.createElement("tbody"); var r, g; b.className = "tablestyle"; r = document.createElement("tr"); var o = navigator.appName; var l = parseInt(navigator.appVersion); for (j = 0; j <= (s.length - 1); j++) { var a = $get("MainDiv"); var n = s[j].split("|"); p = n[1].split(" "); var f = n[0].substring(0, 3) + " " + p[1]; g = document.createElement("td"); g.innerHTML = f; g.value = p[2]; r.appendChild(g); g.id = "but" + j; g.className = "TCell"; g.style.color = "Black"; g.style.width = "23px"; g.style.fontFamily = "tahoma"; g.style.fontSize = "10"; g.style.fontWeight = "bold"; g.style.textAlign = "center"; g.style.borderStyle = "solid"; g.style.borderWidth = "2px"; if (o == "Microsoft Internet Explorer" && l >= 4 && l < 7) { g.style.borderColor = "#FFF" } else { g.style.borderColor = "transparent" } g.width = "23px"; b.cellSpacing = "12"; if (Number(n[2] >= SeatRequired)) { g.style.backgroundColor = green } else { if (Number(n[2]) < SeatRequired) { g.style.backgroundColor = Red; g.style.cursor = "pointer" } else { if (n[2] == "FALSE") { g.style.backgroundColor = gray } } } c.appendChild(r); b.appendChild(c); a.appendChild(b); g.onmouseover = function() { if (this.style.backgroundColor == "#5da62d" || this.style.backgroundColor == green || this.style.backgroundColor == "rgb(93, 166, 45)") { this.style.cursor = "pointer"; var v = this.style.borderColor; var u = v.split(" "); if (o == "Microsoft Internet Explorer" && l >= 4 && l < 7) { if (trim(u[0]) == "#FFF" || trim(u[0]) == "#fff") { this.style.borderColor = "White"; this.style.color = "White" } } else { if (trim(u[0]) == "Transparent" || trim(u[0]) == "transparent") { this.style.borderColor = "White"; this.style.color = "White" } } } }; g.onmouseout = function() { var v = this.style.borderColor; var u = v.split(" "); if (trim(u[0]) == "white" || trim(u[0]) == "White" || trim(u[0]) == "#ffffff") { if (o == "Microsoft Internet Explorer" && l >= 4 && l < 7) { this.style.borderColor = "#FFF"; this.style.color = "Black" } else { this.style.borderColor = "transparent"; this.style.color = "Black" } } }; g.onclick = function() { if (this.style.backgroundColor == "#5da62d" || this.style.backgroundColor == green || this.style.backgroundColor == "rgb(93, 166, 45)") { var F = ""; for (j = 0; j <= (s.length - 1); j++) { F = "but" + j; var A = $get(F).style.borderColor; var E = A.split(" "); if (trim(E[0]) == "Orange" || trim(E[0]) == "orange" || trim(E[0]) == "#ffa500") { if (o == "Microsoft Internet Explorer" && l >= 4 && l < 7) { $get(F).style.borderColor = "#FFF"; $get(F).style.color = "Black" } else { $get(F).style.borderColor = "transparent"; $get(F).style.color = "Black" } } } } if (this.style.backgroundColor == "#5da62d" || this.style.backgroundColor == green || this.style.backgroundColor == "rgb(93, 166, 45)") { this.style.borderColor = "Orange"; this.style.color = "White" } var w = this.innerHTML; var u = this.value; var v = this.style.backgroundColor; if ((v == "#717171") || (v == "rgb(113, 113, 113)")) { } else { m = w.split(" "); if (m[0] == "Mon") { m[0] = "Monday" } else { if (m[0] == "Tue") { m[0] = "Tuesday" } else { if (m[0] == "Wed") { m[0] = "Wednesday" } else { if (m[0] == "Thu") { m[0] = "Thursday" } else { if (m[0] == "Mon") { m[0] = "Monday" } else { if (m[0] == "Fri") { m[0] = "Friday" } else { if (m[0] == "Sat") { m[0] = "Saturday" } else { if (m[0] == "Sun") { m[0] = "Sunday" } } } } } } } } d = m[0] + " | " + m[1] + " " + u; var y = (d).split("|", 3); arr = y[1].split(" ", 3); var B = new Date(); var C = B.getFullYear(); if (arr[2] == "January" && C != (B.getFullYear() + 1)) { C = (B.getFullYear() + 1) } $get("ctl00_Content_Home_Label11").innerHTML = y[0] + ", " + addZero(arr[1]) + " " + arr[2]; $get("selecteddate").innerHTML = DateSupprN(y[0], arr[1], arr[2], C.toString()); var z = new String(); z = $get("FinalSelection").style.visibility; shadow(); if (z.toLowerCase() == "hidden") { var x = '<table id="myTable1" class="ticketable"  cellpadding="0" cellspacing="0"><tbody id="myTbody">'; x += '<tr class="rowspacing"  valign="baseline"><table class="tableboarder" ><tbody><tr valign="middle">'; x += '<td class="colname"> Please wait.....</td>'; x += "</tr></tbody></table></tr>"; x += "</tbody></table>"; var D = $get("Sessiondiv"); D.innerHTML = x; FetchingMovieDetailBasedonDateN(d); $get("selectedscreenclass").innerHTML = "&lt;Please Select&gt;"; $get("selectedTime").innerHTML = "&lt;Please Select&gt;"; $get("selectedtotalcost").innerHTML = "&lt;Please Complete Selection&gt;"; getTicketDetail(); stagesel = "2" } else { FetchingMovieDetailBasedonDateN(d); $get("selectedmoviename").innerHTML = "&lt;Please Select&gt;"; $get("selectedscreenclass").innerHTML = "&lt;Please Select&gt;"; $get("selectedTime").innerHTML = "&lt;Please Select&gt;"; $get("selectedtotalcost").innerHTML = "&lt;Please Complete Selection&gt;" } } } } if (selectionStage == 1) { var q = ""; for (j = 0; j <= (s.length - 1); j++) { q = "but" + j; var e = $get(q).style.backgroundColor; if (e == "#5da62d" || e == "rgb(93, 166, 45)") { $get(q).onclick(); break } } } ReadQueryString(s, d) } function DateSupprN(m, e, j, g) { var f = ""; if (e == 1 || e == 21 || e == 31) { f = "st" } else { if (e == 2 || e == 22) { f = "nd" } else { if (e == 3 || e == 23) { f = "rd" } else { f = "th" } } } var d = j.split(1, 3); var c = g.substring(2, 4); var l = m.substring(0, 3) + ", " + d + " " + e + f; return l } function addZero(a) { return ((a < 10) ? "0" : "") + a } function FetchingMovieDetailBasedonDateN(a) { try { ImageProgressOn(); thecinema.Backoffice.IBackofficeService.GetMovieInfo(a, ProcessingResultN) } catch (b) { RiseError() } } function HandleClose() { thecinema.Backoffice.IBackofficeService.SessionExpire() } function ProcessingResultN(a) { ImageProgressOff(); CinemaData = a; loadLanguageListN(CinemaData); moreStage = 1; ImageLoadingN(Curval, moreStage, SeatRequired); loadingStage = true } function ImageProgressOn() { for (i = 1; i < 9; i++) { imgLabelid = "Image" + i; labelid = "MovieName" + i; $get(imgLabelid).className = "LoadingProgress"; $get(imgLabelid).src = "Images/movieloader1.gif"; $get(imgLabelid).style.cursor = "default"; $get(imgLabelid).style.display = "block"; $get(labelid).style.visibility = "hidden" } } function ImageProgressOff() { for (i = 1; i < 9; i++) { imgLabelid = "Image" + i; labelid = "MovieName" + i; $get(imgLabelid).style.display = "none" } } function FirstStageHide() { stagesel = "2"; var a = new String(); a = $get("MovieSelect").style.visibility; if (a.toLowerCase() == "hidden" || a == "") { $get("MovieSelect").style.visibility = "visible" } $get("tickettab").style.visibility = "visible"; $get("FinalSelection").style.visibility = "hidden"; $get("Flash_Banner").style.visibility = "hidden"; $get("MovieSelect").style.visibility = "visible"; $get("Selected_Movie_Info").style.visibility = "visible" } function UndoTicketSelection() { $get("selectedscreenclass").innerHTML = "&lt;Please Select&gt;"; $get("selectedTime").innerHTML = "&lt;Please Select&gt;"; $get("selectedtotalcost").innerHTML = "&lt;Please Select&gt;"; $get("selectedtotalcost").innerHTML = "&lt;Please Complete Selection&gt;" } function ProcessingMovieSelection(a) { FirstStageHide(); if (a[1] == "True") { $get("ReadMore").style.visibility = "visible"; $get("Read").href = a[2] } else { $get("ReadMore").style.visibility = "hidden" } $get("MovieSynopsis").innerHTML = a[0]; movieName = a[3]; $get("MovieNameBold").innerHTML = movieName + " (" + movieRating + ")" } function MovieStatusLoading() { $get("selmovielbl").innerHTML = "Please wait"; $get("selmovieimg").title = "Please wait"; $get("selmovielbl").style.backgroundColor = green; $get("selmovieimg").style.cursor = "default"; $get("selmovieimg").src = "Images/movieloader1.gif"; $get("selectedmoviename").innerHTML = "Please wait"; $get("MovieSynopsis").innerHTML = "Please wait"; $get("MovieNameBold").innerHTML = "Please wait" } function MovieSelection(c) { var e = new String(); var f = ""; var g = ""; e = $get(c).style.cursor; if (e.toLowerCase() == "pointer") { var j = $get("Sessiondiv"); j.innerHTML = ""; $get("selectedscreenclass").innerHTML = "&lt;Please Select&gt;"; $get("selectedTime").innerHTML = "&lt;Please Select&gt;"; $get("selectedtotalcost").innerHTML = "&lt;Please Complete Selection&gt;"; shadow(); stagesel = "2"; MovieStatusLoading(); FirstStageHide(); var a = $get(c).longdesc; var l = a.split("|"); if (l.length > 7) { f = l[6]; g = l[5]; MovieLang = l[7] } else { f = l[5]; g = l[4]; MovieLang = l[6] } FinalSelectionval = ""; var b = '<table id="myTable1" class="ticketable"  cellpadding="0" cellspacing="0"><tbody id="myTbody">'; b += '<tr class="rowspacing"  valign="baseline"><table class="tableboarder" ><tbody><tr valign="middle">'; b += '<td class="colname"> Please wait.....</td>'; b += "</tr></tbody></table></tr>"; b += "</tbody></table>"; var j = $get("Sessiondiv"); j.innerHTML = b; $get("selmovielbl").innerHTML = f; $get("selmovieimg").title = f; $get("selmovielbl").style.backgroundColor = "Orange"; $get("selmovieimg").style.cursor = "default"; $get("selmovieimg").src = g; $get("selectedmoviename").innerHTML = f; movieRating = l[1]; movieName = f; movieID = l[0]; movieRating = l[1]; $get("MovieNameBold").innerHTML = movieName + " (" + movieRating + ")"; try { thecinema.Backoffice.IBackofficeService.GetMovieDetails(l[0], ProcessingMovieSelection); selectionStage = 2; thecinema.Backoffice.IBackofficeService.GetSerivceCharge(Charges); getTicketDetail() } catch (d) { RiseError() } } } function Charges(a) { serviceCharges = a } function getTicketDetail() { $get("Sessionimages").style.visibility = "hidden"; var e = $get("ctl00_Content_Home_Label11").innerHTML; var b = e.replace(",", "|"); var a = '<table id="myTable1" class="ticketable"  cellpadding="0" cellspacing="0"><tbody id="myTbody">'; a += '<tr class="rowspacing"  valign="baseline"><table class="tableboarder" ><tbody><tr valign="middle">'; a += '<td class="colname"> Please wait.....</td>'; a += "</tr></tbody></table></tr>"; a += "</tbody></table>"; var c = $get("Sessiondiv"); c.innerHTML = a; Sessionselectno = "0"; Location_Id = 0; Session_All = "1"; Prev_Session_No = "Session_0"; thecinema.Backoffice.IBackofficeService.GetTicketDetail(movieID, b, TicketStatus); h = 0; clicked = "ALL"; var d = document.getElementById("scrollContent"); d.innerHTML = ""; d.innerHTML = '<table id="ThtOptTable" cellpadding="0" cellspacing="0"  class="TheatreOpt"></table>'; TheatreOptionsLoad() } function TicketStatus(b) { ticketdetails = b; identifyticketsel = ""; if (b.length != 0) { Session_All = "1"; SessionDisplay(Sessionselectno, Location_Id); $get("Sessiondiv").style.top = "0px" } else { for (var a = 0; a < 6; a++) { Temp_Session_Show_Name = "Session_" + a.toString(); Session_Gray_out(Temp_Session_Show_Name); $get(Temp_Session_Show_Name).style.cursor = "default" } SessionDisplay(0, Location_Id) } } function Session_Images_Display(f) { var c = 0; var a = 0; var g = 0; var e = 0; Session_Orange("Session_0"); $get("Session_0").style.cursor = "pointer"; var l = 0; for (var d = 1; d < 6; d++) { if (ticketdetails[l].DaySessionNo == d) { for (var b = 0; b < ticketdetails[l].TicketTypes.length; b++) { if ((ticketdetails[l].TicketTypes[b].LocationId == f) || (f == 0)) { Temp_Session_Show_Name = "Session_" + d.toString(); Session_Faded_Orange(Temp_Session_Show_Name); $get(Temp_Session_Show_Name).style.cursor = "pointer" } else { c += 1 } } if (c == ticketdetails[l].TicketTypes.length) { Temp_Session_Show_Name = "Session_" + d.toString(); Session_Gray_out(Temp_Session_Show_Name); $get(Temp_Session_Show_Name).style.cursor = "default" } if (l < (ticketdetails.length - 1)) { l += 1 } c = 0 } else { Temp_Session_Show_Name = "Session_" + d.toString(); Session_Gray_out(Temp_Session_Show_Name); $get(Temp_Session_Show_Name).style.cursor = "default" } } } function Session_Event_Handller(a, c) { var b = a.substring(8, 9); if ($get(a).style.cursor != "default") { if (!(b == Sessionselectno)) { if (c == 1) { Session_Orange(a) } else { if (c == 2) { Session_Faded_Orange(a) } else { if (c == 2) { Session_Faded_Orange(a) } else { if (c == 3) { Session_Orange(a); Sessionselectno = b; if (a == "Session_0") { Session_All = "1" } else { Session_All = "0" } SessionDisplay(Sessionselectno, Location_Id); ticketscr(); scroller.startScroll(0, 5); Session_Faded_Orange(Prev_Session_No); Prev_Session_No = a; scroller.stopScroll() } } } } } } } function Session_Orange(a) { switch (a) { case "Session_0": $get("Session_0").style.backgroundPosition = "0px -391px"; break; case "Session_1": $get("Session_1").style.backgroundPosition = "0px 0px"; break; case "Session_2": $get("Session_2").style.backgroundPosition = "0px -79px"; break; case "Session_3": $get("Session_3").style.backgroundPosition = "0px -156px"; break; case "Session_4": $get("Session_4").style.backgroundPosition = "0px -234px"; break; case "Session_5": $get("Session_5").style.backgroundPosition = "0px -313px"; break } } function Session_Faded_Orange(a) { switch (a) { case "Session_0": $get("Session_0").style.backgroundPosition = "0px -417px"; break; case "Session_1": $get("Session_1").style.backgroundPosition = "0px -27px"; break; case "Session_2": $get("Session_2").style.backgroundPosition = "0px -105px"; break; case "Session_3": $get("Session_3").style.backgroundPosition = "0px -183px"; break; case "Session_4": $get("Session_4").style.backgroundPosition = "0px -261px"; break; case "Session_5": $get("Session_5").style.backgroundPosition = "0px -339px"; break } } function Session_Gray_out(a) { switch (a) { case "Session_0": $get("Session_0").style.backgroundPosition = "0px -444px"; break; case "Session_1": $get("Session_1").style.backgroundPosition = "0px -53px"; break; case "Session_2": $get("Session_2").style.backgroundPosition = "0px -131px"; break; case "Session_3": $get("Session_3").style.backgroundPosition = "0px -209px"; break; case "Session_4": $get("Session_4").style.backgroundPosition = "0px -287px"; break; case "Session_5": $get("Session_5").style.backgroundPosition = "0px -365px"; break } } function SessionDisplay(u, g) { identifyticketsel = ""; var n = 0; var w, s, q, e = 0; var y = 0; var b = 0; var d = "Not Available", D = "", x = "", v = 0, A = 0; $get("Sessionimages").style.visibility = "visible"; var m = $get("Sessiondiv"); m.innerHTML = ""; var f = ""; for (w = 0; w < ticketdetails.length; w++) { if (ticketdetails[w].DaySessionNo == u || Session_All == "1") { if ((Session_All == "1") && (b == 0)) { Session_Images_Display(g); b += 1 } for (s = 0; s < ticketdetails[w].TicketTypes.length; s++) { if (g == ticketdetails[w].TicketTypes[s].LocationId || g == 0) { n = 1; v = 1; f += '<table cellpadding="0" cellspacing="0"><tr>'; D = ticketdetails[w].TicketTypes[s].SessionID; D = D + "|" + ticketdetails[w].TicketTypes[s].Time; var o = ticketdetails[w].TicketTypes[s].Time; d = splitTicketTime(o); var z = ticketdetails[w].TicketTypes[s].SessionName.split("|"); var C = z[0] + "| " + d; var B = ticketdetails[w].TicketTypes[s].TicketDetail.split("|"); if (B.length == 11) { f += '<td class="screenLocation">' + ticketdetails[w].TicketTypes[s].LocationName + " - </td>"; f += '<td class="colname">' + C + "</td>" } else { if (B.length == 6) { f += '<td class="screenLocation">' + ticketdetails[w].TicketTypes[s].LocationName + " - </td>"; f += '<td class="colname">' + C + "</td>" } else { f += '<td class="screenLocation">' + ticketdetails[w].TicketTypes[s].LocationName + " - </td>"; f += '<td class="colname">' + C + "</td>" } } var a = new Number(); a = (B.length - 1) / 5; for (q = 0; q <= B.length - 2; q = q + 5) { a = a - 1; x = D + "|" + B[q] + "|" + B[q + 1] + "|" + B[q + 2] + "|" + B[q + 3] + "|" + B[q + 4] + "|" + ticketdetails[w].TicketTypes[s].SessionName + "|" + movieRating; var p = B[q + 4].split("."); var c = ticketdetails[w].TicketTypes[s].SessionName.split("|"); var l = B[q] + c[0] + e + "|" + ticketdetails[w].DaySessionNo; var r = ""; if (B[q] == "Elite") { r = "Elite" } else { if (B[q] == "Premium") { r = "Prem" } else { if (B[q] == "Economy") { r = "Econ" } } } if (SeatRequired <= Number(B[q + 3])) { if (B.length == 11) { f += '<td id="' + l + '" class="colgreen" headers="' + x + '" onclick="ticketSelected(\'' + l + "')\">" + r + "/" + p[0] + "</td>" } else { if (B.length == 6) { f += '<td id="' + l + '" class="colgreen" headers="' + x + '" onclick="ticketSelected(\'' + l + "')\">" + r + "/" + p[0] + "</td>" } else { f += '<td id="' + l + '" class="colgreen" headers="' + x + '" onclick="ticketSelected(\'' + l + "')\">" + r + "/" + p[0] + "</td>" } } } else { if (B.length == 11) { f += '<td id="' + l + '" class="colread" headers="' + x + '" onclick="ticketSelected(\'' + l + "')\">" + r + "/" + p[0] + "</td>" } else { if (B.length == 6) { f += '<td id="' + l + '" class="colread" headers="' + x + '" onclick="ticketSelected(\'' + l + "')\">" + r + "/" + p[0] + "</td>" } else { f += '<td id="' + l + '" class="colread" headers="' + x + '" onclick="ticketSelected(\'' + l + "')\">" + r + "/" + p[0] + "</td>" } } } e = e + 1; if (a == 0) { } else { f += '<td class="colspace"></td>' } A = A + 1 } if (v == 1) { f += '</tr><tr class="colspace"></tr></table>'; v = 0 } y = 0 } else { y = 1 } } } } if ((A != 0 || y == 0) && (n == 1)) { } else { grayOutSessions(); f += '<table cellpadding="0" cellspacing="0"><tr>'; f += '<td class="colname"> Sorry, this show is not available. Please check other show times. </td>'; f += "</tr></table>"; y = 0 } n = 0; m.innerHTML = f; Session_All == "0" } function ticketSelected(Id) { var color = $get(Id).className; var tickettype = $get(Id).headers; var temp = "", i, temp1 = ""; if (color != "colread" && color != "colread1" && color != "colread2") { var shtemp = Id.split("|"); if (shtemp.length > 0) { MovieShowId = shtemp[1] } else { MovieShowId = "1" } var selected = tickettype.split("|"); if (selected[2] == "Elite" && (selected[7] == "San")) { if (Number(SeatRequired % 2) != 0) { LoginMethod(45); FinalSelectionval = ""; return false } } if (selectticket.length >= 1) { if (color == "colgreen") { $get(Id).className = "ticketselected" } else { $get(Id).className = "ticketselected1" } temp = Id + "|" + color; selectticket.push(temp); for (i = 0; i < selectticket.length; i++) { try { temp1 = selectticket[i].split("|"); var reid = temp1[0] + "|" + temp1[1]; if (reid != Id) { $get(reid).className = temp1[2] } } catch (Error) { } } } else { if (color == "colgreen") { $get(Id).className = "ticketselected" } else { $get(Id).className = "ticketselected1" } temp = Id + "|" + color; selectticket.push(temp) } totalservicecharge = SeatRequired * serviceCharges; ticketamount = Number(selected[6]); var totalamount = eval(ticketamount * Number(SeatRequired)); var screenclass = selected[7] + ", " + selected[2] + "(" + ticketamount + ")"; var tag = tickettype + "|" + screenclass; var GrandTotal = totalamount + totalservicecharge; $get("selectedscreenclass").innerHTML = screenclass; $get("selectedTime").innerHTML = splitTicketTime(selected[1]); $get("selectedtotalcost").innerHTML = ticketamount + " x " + Number(SeatRequired) + " = " + totalamount + " + " + totalservicecharge + " (Booking Charges) = Rs." + GrandTotal; $get("selectedtotalcost").headers = tag; var displaydate = $get("selecteddate").innerHTML; currentdispdate = displaydate.split(","); identifyticketsel = "1"; FinalSelectionval = tag + "|" + splitTicketTime(selected[1]) + "|" + movieName + "|" + SeatRequired + "|" + movieID + "|" + MovieLang + "|" + MovieShowId + "|" + totalamount + "|" + serviceCharges } else { FinalSelectionval = "" } } function splitTicketTime(d) { var a = ""; var c = d.split(" "); if (c.length > 2) { var b = c[1].split(":"); a = b[0] + ":" + b[1] + " " + c[2] } return a } function LoadAutomaticeShowTab(b) { try { switch (b) { case "1": showchange("Images/CinemaShows/morning1-n.gif", "show1"); GetShowNumber(); break; case "2": showchange("Images/CinemaShows/noon1-n.gif", "show2"); break; case "3": showchange("Images/CinemaShows/matinee1-n.gif", "show3"); break; case "4": showchange("Images/CinemaShows/evening1-n.gif", "show4"); break; default: showchange("Images/CinemaShows/night1-n.gif", "show5") } } catch (a) { } } function ImageLoadingN(selectedCinemaLanguage, Stage, setavail) { var val = selectedCinemaLanguage.split(","), n = 0; var i = 0, j = 0, imgLabelno = 1, labelid = 0; var intialPos = 0, finalPos = 0; var imgLabelid, tagid, temp1, temp2, temp3, mCinema = 0; if (Stage == 1) { if (val[0] == "Sort by all") { intialPos = CinemaData[0] * 2 + 1; finalPos = CinemaData.length - 1 } else { intialPos = val[1] * 1; finalPos = val[2] * 1 } } else { if (val[0] == "Sort by all") { var maincount = CinemaData[0] * 2 + 1; n = CinemaData.length - 1; temp1 = (n - maincount); temp2 = eval(temp1 - eval(9 * 8 * eval(Stage - 1))); intialPos = eval(maincount + eval(9 * 8 * eval(Stage - 1))); temp3 = intialPos + Number(72); if (Number(temp3 < n)) { finalPos = temp3 - 1; mCinema = 1 } else { finalPos = n; mCinema = 0 } } else { var maincount = Number(val[1]); n = Number(val[2]); temp1 = (n - intialPos); temp2 = eval(temp1 - 9 * 8 * eval(Stage - 1)); intialPos = eval(maincount + eval(9 * 8 * eval(Stage - 1))); temp3 = intialPos + Number(72); if (Number(temp3 <= n)) { finalPos = temp3; mCinema = 1 } else { finalPos = n; mCinema = 0 } } } for (j = intialPos; j <= finalPos; j = j + 9 * 1) { if (imgLabelno < 9) { imgLabelid = "Image" + imgLabelno; labelid = "MovieName" + imgLabelno; $get(imgLabelid).style.display = "block"; $get(labelid).style.visibility = "visible"; $get(imgLabelid).src = ""; tagid = CinemaData[j] + "|" + CinemaData[j + 1] + "|" + CinemaData[j + 2] + "|" + CinemaData[j + 3]; if (CinemaData[j + 7].toUpperCase() == "TRUE") { tagid = tagid + "|" + CinemaData[j + 8] } tagid = tagid + "|" + CinemaData[j + 6]; var mname = CinemaData[j + 4].split("|"); var lang = ""; if (mname.length > 2) { lang = mname[2] } else { lang = mname[1] } $get(labelid).innerHTML = mname[0]; $get(imgLabelid).title = mname[0]; $get(imgLabelid).longdesc = tagid + "|" + mname[0] + "|" + lang; if (mname[1] == "FALSE" || CinemaData[j + 5] == "" || mname.length == 1) { $get(labelid).style.backgroundColor = Blue; $get(imgLabelid).style.cursor = "default" } else { if (eval(setavail) > CinemaData[j + 5]) { $get(labelid).style.backgroundColor = Red; $get(imgLabelid).style.cursor = "pointer" } else { if (eval(setavail) <= CinemaData[j + 5]) { $get(labelid).style.backgroundColor = green; $get(imgLabelid).style.cursor = "pointer" } } } if (CinemaData[j + 6] != "NULL") { $get(imgLabelid).src = CinemaData[j + 6] } else { $get(imgLabelid).src = filepath + "notimage.jpg" } $get(imgLabelid).className = "MovieImageSize"; $get(labelid).className = "MovieLabelSize"; imgLabelno = imgLabelno + 1 } } for (i = imgLabelno; i < 9; i++) { imgLabelid = "Image" + i; $get(imgLabelid).style.display = "none"; labelid = "MovieName" + i; $get(labelid).style.visibility = "hidden" } intialLeftRightImage(Stage, mCinema); loadingStage = false } function intialLeftRightImage(d, b) { var c, e; e = countTotalRecord(); c = e; var a = new Number(RegExp.$1); if (c > 72 && d == 1) { if (/MSIE (\d+\.\d+);/.test(navigator.userAgent) && (a == 6)) { $get("RightArrow").src = "Images/Home/RightOrange_arrow.gif"; $get("LeftArrow").src = "Images/Home/LeftGray_arrow.gif" } else { $get("RightArrow").src = "Images/Home/RightOrange_arrow.png"; $get("LeftArrow").src = "Images/Home/LeftGray_arrow.png" } $get("ctl00_Content_Home_lblRight").style.color = "#1E1E20"; $get("ctl00_Content_Home_lblLeft").style.color = "#7A766B"; $get("RightArrow").style.cursor = "pointer"; $get("LeftArrow").style.cursor = "default" } else { if (c > 72 && d >= 2) { if (/MSIE (\d+\.\d+);/.test(navigator.userAgent) && (a == 6)) { $get("LeftArrow").src = "Images/Home/LeftOrange_arrow.gif" } else { $get("LeftArrow").src = "Images/Home/LeftOrange_arrow.png" } $get("LeftArrow").style.cursor = "pointer"; $get("ctl00_Content_Home_lblLeft").style.color = "#1E1E20"; if (Number(b) == 1) { if (/MSIE (\d+\.\d+);/.test(navigator.userAgent) && (a == 6)) { $get("RightArrow").src = "Images/Home/RightOrange_arrow.gif" } else { $get("RightArrow").src = "Images/Home/RightOrange_arrow.png" } $get("ctl00_Content_Home_lblRight").style.color = "#1E1E20"; $get("RightArrow").style.cursor = "pointer" } else { if (/MSIE (\d+\.\d+);/.test(navigator.userAgent) && (a == 6)) { $get("RightArrow").src = "Images/Home/RightGray_arrow.gif" } else { $get("RightArrow").src = "Images/Home/RightGray_arrow.png" } $get("ctl00_Content_Home_lblRight").style.color = "#7A766B"; $get("RightArrow").style.cursor = "default" } } else { if (/MSIE (\d+\.\d+);/.test(navigator.userAgent) && (a == 6)) { $get("RightArrow").src = "Images/Home/RightGray_arrow.gif"; $get("LeftArrow").src = "Images/Home/LeftGray_arrow.gif" } else { $get("RightArrow").src = "Images/Home/RightGray_arrow.png"; $get("LeftArrow").src = "Images/Home/LeftGray_arrow.png" } $get("ctl00_Content_Home_lblRight").style.color = "#7A766B"; $get("ctl00_Content_Home_lblLeft").style.color = "#7A766B"; $get("RightArrow").style.cursor = "default"; $get("LeftArrow").style.cursor = "default" } } } function LeftArrowClick() { if (eval(moreStage) > 1) { moreStage = moreStage - 1; ImageLoadingN(Curval, moreStage, SeatRequired) } } function RightArrowClick() { var totalpage, n; n = countTotalRecord(); totalpage = n / 72; if (eval(moreStage) < totalpage) { moreStage = moreStage + 1; ImageLoadingN(Curval, moreStage, SeatRequired) } } function countTotalRecord() { var b = Curval.split(","), d = 0, a = 0, c = 0; if (b[0] == "Sort by all") { a = CinemaData[0] * 2 + 1; d = CinemaData.length; c = (d - a) } else { a = b[1]; d = b[2]; c = (d - a) } return c } function loadLanguageListN(r) { var m, g, f, d; var e = r[0]; var m, p = 0, b; b = e * 2; $get("SelectMovies").length = 1; for (m = 1; m <= b; m++) { var c = $get("SelectMovies"); if (c.selectedIndex >= 0) { var s = document.createElement("option"); s.id = "Option" + m; s.text = r[m]; m = m + 1; s.value = r[m]; var q = c.options[c.selectedIndex]; try { c.add(s, q) } catch (o) { c.add(s, c.selectedIndex) } } } var a = $get("SelectMovies"); if (a.selectedIndex >= 0) { var s = document.createElement("option"); s.id = "Option" + 0; s.text = "Sort by all"; s.value = "Sort by all"; s.selected = "selected"; Curval = "Sort by all,Sort by all"; a.onchange = function() { var l = $get("SelectMovies").selectedIndex; var j = $get("SelectMovies")[l].text; var n = $get("SelectMovies")[l].value; moreStage = 1; Curval = j + "," + n; ImageLoadingN(Curval, moreStage, SeatRequired) }; a.selectedIndex = 0; var q = a.options[a.selectedIndex]; try { a.add(s, q) } catch (o) { a.add(s, a.selectedIndex) } a.options[a.length - 1] = null; ImageLoadingN(Curval, moreStage, SeatRequired) } } function shadow() { setTimeout("Animateoner()", 500); hideselect(); $get("overeffect").style.display = "block"; $get("flashdiv").style.display = "block" } function shadowOnError() { hideselect(); $get("overeffect").style.display = "block"; $get("flashdiv").style.display = "block"; t = setTimeout("shadowOnError()", 3000) } function RiseError() { $get("aniimg").src = "Images/error.gif"; $get("aniimg").className = "Animateimgerror"; $get("aniimg").style.zIndex = "2000"; shadowOnError() } function Animateoner() { showselect(); $get("overeffect").style.display = "none"; $get("flashdiv").style.display = "none" } var IE = document.all ? true : false; function hideselect() { try { document.body.className = "hideselectbox"; if (IE) { document.documentElement.style.overflow = "hidden" } } catch (a) { } } function showselect() { document.body.className = ""; if (IE) { document.documentElement.style.overflow = "" } } var Message = ""; var place = 1; function scrollIn() { window.status = Message.substring(0, place); if (place >= Message.length) { place = 1; window.setTimeout("scrollOut()", 300) } else { place++; window.setTimeout("scrollIn()", 100) } } function scrollOut() { window.status = Message.substring(place, Message.length); if (place >= Message.length) { place = 1; window.setTimeout("scrollIn()", 50) } else { place++; window.setTimeout("scrollOut()", 80) } } function startTime() { var c = new Date(); var b = c.getHours(); var a = c.getMinutes(); var e = c.getSeconds(); var d = "AM"; if (b > 11) { d = "PM" } if (b > 12) { b = b - 12 } if (b == 0) { b = 12 } a = checkTime(a); e = checkTime(e); $get("ctl00_Content_Home_lbl_station").innerHTML = "Chennai  | " + b + ":" + a + " " + d; setTimeout("startTime()", 500) } function checkTime(a) { if (a < 10) { a = "0" + a } return a } var img = ""; var imgsel = ""; var temp = "2"; function change(b, a) { if (imgsel != a) { $get(a).src = b } } function Getnooftickets() { SeatRequired = Number(Temp_Seat_Sel); totalservicecharge = SeatRequired * serviceCharges; $get("selectednoofticket").innerHTML = SeatRequired; var totalamount = eval(ticketamount * Number(SeatRequired)); totalservicecharge = eval(SeatRequired * serviceCharges); $get("selectedtotalcost").innerHTML = "Rs. " + totalamount + " + " + totalservicecharge + " (Booking Charges)"; if (selectionStage == 1) { ImageLoadingN(Curval, moreStage, SeatRequired) } else { $get("selectedscreenclass").innerHTML = "&lt;Please Select&gt;"; $get("selectedTime").innerHTML = "&lt;Please Select&gt;"; $get("selectedtotalcost").innerHTML = "&lt;Please Complete Selection&gt;"; SessionDisplay(Sessionselectno, Location_Id) } } function ticketchange(a, b) { if (b == "Img0") { $get(b).src = a; imgsel = "Img0"; reset("Images/SeatNumber/blue1.png", "Img1"); reset("Images/SeatNumber/blue2.png", "Img2"); reset("Images/SeatNumber/blue3.png", "Img3"); reset("Images/SeatNumber/blue4.png", "Img4"); reset("Images/SeatNumber/blue5.png", "Img5"); reset("Images/SeatNumber/blue6.png", "Img6"); reset("Images/SeatNumber/blue7.png", "Img7"); reset("Images/SeatNumber/blue8.png", "Img8"); reset("Images/SeatNumber/blue9.png", "Img9"); temp = "1"; return true } else { if (b == "Img1") { $get(b).src = a; imgsel = "Img1"; reset("Images/SeatNumber/blue0.png", "Img0"); reset("Images/SeatNumber/blue2.png", "Img2"); reset("Images/SeatNumber/blue3.png", "Img3"); reset("Images/SeatNumber/blue4.png", "Img4"); reset("Images/SeatNumber/blue5.png", "Img5"); reset("Images/SeatNumber/blue6.png", "Img6"); reset("Images/SeatNumber/blue7.png", "Img7"); reset("Images/SeatNumber/blue8.png", "Img8"); reset("Images/SeatNumber/blue9.png", "Img9"); temp = "2" } else { if (b == "Img2") { $get(b).src = a; imgsel = "Img2"; reset("Images/SeatNumber/blue0.png", "Img0"); reset("Images/SeatNumber/blue1.png", "Img1"); reset("Images/SeatNumber/blue3.png", "Img3"); reset("Images/SeatNumber/blue4.png", "Img4"); reset("Images/SeatNumber/blue5.png", "Img5"); reset("Images/SeatNumber/blue6.png", "Img6"); reset("Images/SeatNumber/blue7.png", "Img7"); reset("Images/SeatNumber/blue8.png", "Img8"); reset("Images/SeatNumber/blue9.png", "Img9"); temp = "3" } else { if (b == "Img3") { $get(b).src = a; imgsel = "Img3"; reset("Images/SeatNumber/blue0.png", "Img0"); reset("Images/SeatNumber/blue1.png", "Img1"); reset("Images/SeatNumber/blue2.png", "Img2"); reset("Images/SeatNumber/blue4.png", "Img4"); reset("Images/SeatNumber/blue5.png", "Img5"); reset("Images/SeatNumber/blue6.png", "Img6"); reset("Images/SeatNumber/blue7.png", "Img7"); reset("Images/SeatNumber/blue8.png", "Img8"); reset("Images/SeatNumber/blue9.png", "Img9"); temp = "4" } else { if (b == "Img4") { $get(b).src = a; imgsel = "Img4"; reset("Images/SeatNumber/blue0.png", "Img0"); reset("Images/SeatNumber/blue1.png", "Img1"); reset("Images/SeatNumber/blue2.png", "Img2"); reset("Images/SeatNumber/blue3.png", "Img3"); reset("Images/SeatNumber/blue5.png", "Img5"); reset("Images/SeatNumber/blue6.png", "Img6"); reset("Images/SeatNumber/blue7.png", "Img7"); reset("Images/SeatNumber/blue8.png", "Img8"); reset("Images/SeatNumber/blue9.png", "Img9"); temp = "5" } else { if (b == "Img5") { $get(b).src = a; imgsel = "Img5"; reset("Images/SeatNumber/blue0.png", "Img0"); reset("Images/SeatNumber/blue1.png", "Img1"); reset("Images/SeatNumber/blue2.png", "Img2"); reset("Images/SeatNumber/blue3.png", "Img3"); reset("Images/SeatNumber/blue4.png", "Img4"); reset("Images/SeatNumber/blue6.png", "Img6"); reset("Images/SeatNumber/blue7.png", "Img7"); reset("Images/SeatNumber/blue8.png", "Img8"); reset("Images/SeatNumber/blue9.png", "Img9"); temp = "6" } else { if (b == "Img6") { $get(b).src = a; imgsel = "Img6"; reset("Images/SeatNumber/blue0.png", "Img0"); reset("Images/SeatNumber/blue1.png", "Img1"); reset("Images/SeatNumber/blue2.png", "Img2"); reset("Images/SeatNumber/blue3.png", "Img3"); reset("Images/SeatNumber/blue4.png", "Img4"); reset("Images/SeatNumber/blue5.png", "Img5"); reset("Images/SeatNumber/blue7.png", "Img7"); reset("Images/SeatNumber/blue8.png", "Img8"); reset("Images/SeatNumber/blue9.png", "Img9"); temp = "7" } else { if (b == "Img7") { $get(b).src = a; imgsel = "Img7"; reset("Images/SeatNumber/blue0.png", "Img0"); reset("Images/SeatNumber/blue1.png", "Img1"); reset("Images/SeatNumber/blue2.png", "Img2"); reset("Images/SeatNumber/blue3.png", "Img3"); reset("Images/SeatNumber/blue4.png", "Img4"); reset("Images/SeatNumber/blue5.png", "Img5"); reset("Images/SeatNumber/blue6.png", "Img6"); reset("Images/SeatNumber/blue8.png", "Img8"); reset("Images/SeatNumber/blue9.png", "Img9"); temp = "8" } else { if (b == "Img8") { $get(b).src = a; imgsel = "Img8"; reset("Images/SeatNumber/blue0.png", "Img0"); reset("Images/SeatNumber/blue1.png", "Img1"); reset("Images/SeatNumber/blue2.png", "Img2"); reset("Images/SeatNumber/blue3.png", "Img3"); reset("Images/SeatNumber/blue4.png", "Img4"); reset("Images/SeatNumber/blue5.png", "Img5"); reset("Images/SeatNumber/blue6.png", "Img6"); reset("Images/SeatNumber/blue7.png", "Img7"); reset("Images/SeatNumber/blue9.png", "Img9"); temp = "9" } else { if (b == "Img9") { $get(b).src = a; imgsel = "Img9"; reset("Images/SeatNumber/blue0.png", "Img0"); reset("Images/SeatNumber/blue1.png", "Img1"); reset("Images/SeatNumber/blue2.png", "Img2"); reset("Images/SeatNumber/blue3.png", "Img3"); reset("Images/SeatNumber/blue4.png", "Img4"); reset("Images/SeatNumber/blue5.png", "Img5"); reset("Images/SeatNumber/blue6.png", "Img6"); reset("Images/SeatNumber/blue7.png", "Img7"); reset("Images/SeatNumber/blue8.png", "Img8"); temp = "10" } } } } } } } } } } } function reset(b, a) { $get(a).src = b } function showMouseoverchange(b, a) { if (Sessionselect != a) { $get(a).src = b } } function GetShowNumber() { SessionDisplay(Sessionselectno, Location_Id) } function showchange(a, b) { if (b == "show1") { $get(b).src = a; Sessionselect = "show1"; Sessionimgreset("Images/CinemaShows/noon2-n.gif", "show2"); Sessionimgreset("Images/CinemaShows/matinee2-n.gif", "show3"); Sessionimgreset("Images/CinemaShows/evening2-n.gif", "show4"); Sessionimgreset("Images/CinemaShows/night2-n.gif", "show5"); Sessionselectno = "1"; return true } else { if (b == "show2") { $get(b).src = a; Sessionselect = "show2"; Sessionimgreset("Images/CinemaShows/morning2-n.gif", "show1"); Sessionimgreset("Images/CinemaShows/matinee2-n.gif", "show3"); Sessionimgreset("Images/CinemaShows/evening2-n.gif", "show4"); Sessionimgreset("Images/CinemaShows/night2-n.gif", "show5"); Sessionselectno = "2" } else { if (b == "show3") { $get(b).src = a; Sessionselect = "show3"; Sessionimgreset("Images/CinemaShows/morning2-n.gif", "show1"); Sessionimgreset("Images/CinemaShows/noon2-n.gif", "show2"); Sessionimgreset("Images/CinemaShows/evening2-n.gif", "show4"); Sessionimgreset("Images/CinemaShows/night2-n.gif", "show5"); Sessionselectno = "3" } else { if (b == "show4") { $get(b).src = a; Sessionselect = "show4"; Sessionimgreset("Images/CinemaShows/morning2-n.gif", "show1"); Sessionimgreset("Images/CinemaShows/noon2-n.gif", "show2"); Sessionimgreset("Images/CinemaShows/matinee2-n.gif", "show3"); Sessionimgreset("Images/CinemaShows/night2-n.gif", "show5"); Sessionselectno = "4" } else { if (b == "show5") { $get(b).src = a; Sessionselect = "show5"; Sessionimgreset("Images/CinemaShows/morning2-n.gif", "show1"); Sessionimgreset("Images/CinemaShows/noon2-n.gif", "show2"); Sessionimgreset("Images/CinemaShows/matinee2-n.gif", "show3"); Sessionimgreset("Images/CinemaShows/evening2-n.gif", "show4"); Sessionselectno = "5" } } } } } } function Sessionimgreset(b, a) { $get(a).src = b } var scroller = null; function scr() { try { var a = $get("Scroller-1"); scroller = new jsScroller(a, 400, 170) } catch (b) { } } function jsScroller(o, w, h) { var self = this; var list = o.getElementsByTagName("div"); for (var i = 0; i < list.length; i++) { if (list[i].className.indexOf("Scroller-Container") > -1) { o = list[i] } } this._setPos = function(x, y) { if (x < this.viewableWidth - this.totalWidth) { x = this.viewableWidth - this.totalWidth } if (x > 0) { x = 0 } if (y < this.viewableHeight - this.totalHeight) { y = this.viewableHeight - this.totalHeight } if (y > 0) { y = 0 } this._x = x; this._y = y; with (o.style) { left = this._x + "px"; top = this._y + "px" } }; this.reset = function() { this.content = o; this.totalHeight = o.offsetHeight; this.totalWidth = o.offsetWidth; this._x = 0; this._y = 0; with (o.style) { left = "0px"; top = "0px" } }; this.scrollBy = function(x, y) { this._setPos(this._x + x, this._y + y) }; this.scrollTo = function(x, y) { this._setPos(-x, -y) }; this.stopScroll = function() { if (this.scrollTimer) { window.clearInterval(this.scrollTimer) } }; this.startScroll = function(x, y) { this.stopScroll(); this.scrollTimer = window.setInterval(function() { self.scrollBy(x, y) }, 100) }; this.swapContent = function(c, w, h) { o = c; var list = o.getElementsByTagName("div"); for (var i = 0; i < list.length; i++) { if (list[i].className.indexOf("Scroller-Container") > -1) { o = list[i] } } if (w) { this.viewableWidth = w } if (h) { this.viewableHeight = h } this.reset() }; this.content = o; this.viewableWidth = w; this.viewableHeight = h; this.totalWidth = o.offsetWidth; this.totalHeight = o.offsetHeight; this.scrollTimer = null; this.reset() } function ticketscr() { try { var a = $get("Scroller-Session"); scroller = new ticketScroller(a, 450, 110) } catch (b) { } } function ticketScroller(o, w, h) { var self = this; var list = o.getElementsByTagName("div"); for (var i = 0; i < list.length; i++) { if (list[i].className.indexOf("Scroller-SessionContainer") > -1) { o = list[i] } } this._setPos = function(x, y) { if (x < this.viewableWidth - this.totalWidth) { x = this.viewableWidth - this.totalWidth } if (x > 0) { x = 0 } if (y < this.viewableHeight - this.totalHeight) { y = this.viewableHeight - this.totalHeight } if (y > 0) { y = 0 } this._x = x; this._y = y; with (o.style) { left = this._x + "px"; top = this._y + "px" } }; this.reset = function() { this.content = o; this.totalHeight = o.offsetHeight; this.totalWidth = o.offsetWidth; this._x = 0; this._y = 0; with (o.style) { left = "0px"; top = "0px" } }; this.scrollBy = function(x, y) { this._setPos(this._x + x, this._y + y) }; this.scrollTo = function(x, y) { this._setPos(-x, -y) }; this.stopScroll = function() { if (this.scrollTimer) { window.clearInterval(this.scrollTimer) } }; this.startScroll = function(x, y) { this.stopScroll(); this.scrollTimer = window.setInterval(function() { self.scrollBy(x, y) }, 100) }; this.swapContent = function(c, w, h) { o = c; var list = o.getElementsByTagName("div"); for (var i = 0; i < list.length; i++) { if (list[i].className.indexOf("Scroller-Container") > -1) { o = list[i] } } if (w) { this.viewableWidth = w } if (h) { this.viewableHeight = h } this.reset() }; this.content = o; this.viewableWidth = w; this.viewableHeight = h; this.totalWidth = o.offsetWidth; this.totalHeight = o.offsetHeight; this.scrollTimer = null; this.reset() } function imgswapIn(imageID) { try { var tagText = $get(imageID).longdesc; var temp = tagText.split("|"); if (eval(temp.length) > 7) { $get(imageID).src = temp[4] } } catch (Error) { } } function imgswapOut(imageID) { try { var tagText = $get(imageID).longdesc; var temp = tagText.split("|"); if (eval(temp.length) > 7) { $get(imageID).src = temp[5] } } catch (Error) { } } function ReadQueryString(p, b) { queryvar = window.location.search.substring(1); if (queryvar != "") { queryinfo = queryvar.split("&"); f = queryinfo[0].split("="); querymovie = queryinfo[1].split("="); savedateid = f[1]; savemovieid = querymovie[1] } else { savedateid = ""; savemovieid = "" } if (savedateid != "" || savemovieid != "") { if (selectionStage == 1) { var n = new Date(savedateid); if (n != "NaN" || n != "undefined" || n != "" || n != null) { var g = new Array(7); g[0] = "Sunday"; g[1] = "Monday"; g[2] = "Tuesday"; g[3] = "Wednesday"; g[4] = "Thursday"; g[5] = "Friday"; g[6] = "Saturday"; var e = g[n.getDay()]; var a = new makeArray("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var d = n.getMonth() + 1; var f = n.getDate(); var m = n.getYear(); var o = f + " " + a[d]; var l = ""; for (i = 0; i <= (p.length - 1); i++) { var j = p[i].split("|"); l = "but" + i; var c = $get(l).style.backgroundColor; if (c == "#5da62d" || c == "rgb(93, 166, 45)") { if ((trim(j[0]) == trim(e)) && (trim(j[1]) == trim(o))) { $get(l).onclick(); FirstFetchingMovieDetailBasedonDateN(b); $get("selectedscreenclass").innerHTML = "&lt;Please Select&gt;"; $get("selectedTime").innerHTML = "&lt;Please Select&gt;"; $get("selectedtotalcost").innerHTML = "&lt;Please Complete Selection&gt;"; break } } } } } } } function makeArray() { for (i = 0; i < makeArray.arguments.length; i++) { this[i + 1] = makeArray.arguments[i] } } function FirstFetchingMovieDetailBasedonDateN(a) { try { thecinema.Backoffice.IBackofficeService.GetMovieInfo(a, FirstProcessingResultN) } catch (b) { RiseError() } } function FirstProcessingResultN(b) { var a = savemovieid; for (i = 0; i <= (b.length - 1); i++) { if (a == b[i]) { valuetag = b[i] + "|" + b[i + 1] + "|" + b[i + 2] + "|" + b[i + 3] + "|" + b[i + 4] + "|" + b[i + 5] + "|" + b[i + 6] + "|" + b[i + 7] + "|" + b[i + 8] } } FirstMovieSelection() } function FirstMovieSelection() { if (valuetag == null || valuetag == "" || valuetag == "undefined" || valuetag == "NaN") { } else { var c = valuetag.split("|"); shadow(); MovieStatusLoading(); FirstStageHide(); movieRating = c[1]; movieName = c[4]; movieID = c[0]; var a = c[8]; $get("selmovielbl").innerHTML = movieName; $get("selmovieimg").title = movieName; $get("selmovielbl").style.backgroundColor = green; $get("selmovieimg").style.cursor = "default"; $get("selmovieimg").src = a; $get("selectedmoviename").innerHTML = movieName; $get("MovieNameBold").innerHTML = movieName + " (" + movieRating + ")"; try { thecinema.Backoffice.IBackofficeService.GetMovieDetails(movieID, ProcessingMovieSelection); selectionStage = 2; thecinema.Backoffice.IBackofficeService.GetSerivceCharge(Charges); getTicketDetail() } catch (b) { RiseError() } } } var scrollernew = null; function scrnew() { try { var a = document.getElementById("ScrollerNew-1"); scrollernew = new jsScrollernew(a, 285, 90) } catch (b) { } } function jsScrollernew(o, w, h) { var self = this; var list = o.getElementsByTagName("div"); for (var i = 0; i < list.length; i++) { if (list[i].className.indexOf("ScrollerNew-Container") > -1) { o = list[i] } } this._setPos = function(x, y) { if (x < this.viewableWidth - this.totalWidth) { x = this.viewableWidth - this.totalWidth } if (x > 0) { x = 0 } if (y < this.viewableHeight - this.totalHeight) { y = this.viewableHeight - this.totalHeight } if (y > 0) { y = 0 } this._x = x; this._y = y; with (o.style) { left = this._x + "px"; top = this._y + "px" } }; this.reset = function() { this.content = o; this.totalHeight = o.offsetHeight; this.totalWidth = o.offsetWidth; this._x = 0; this._y = 0; with (o.style) { left = "0px"; top = "0px" } }; this.scrollBy = function(x, y) { this._setPos(this._x + x, this._y + y) }; this.scrollTo = function(x, y) { this._setPos(-x, -y) }; this.stopScrol = function() { if (this.scrollTimer) { window.clearInterval(this.scrollTimer) } }; this.startScrol = function(x, y) { this.stopScrol(); this.scrollTimer = window.setInterval(function() { self.scrollBy(x, y) }, 40) }; this.swapContent = function(c, w, h) { o = c; var list = o.getElementsByTagName("div"); for (var i = 0; i < list.length; i++) { if (list[i].className.indexOf("ScrollerNew-Container") > -1) { o = list[i] } } if (w) { this.viewableWidth = w } if (h) { this.viewableHeight = h } this.reset() }; this.content = o; this.viewableWidth = w; this.viewableHeight = h; this.totalWidth = o.offsetWidth; this.totalHeight = o.offsetHeight; this.scrollTimer = null; this.reset() } scrollStep = 1; timerLeft = ""; timerRight = ""; function scrollDivLeft() { clearTimeout(timerRight); $get("MainDiv").scrollLeft -= scrollStep; timerRight = setTimeout("scrollDivLeft('" + $get("MainDiv") + "')", 10) } function scrollDivRight() { clearTimeout(timerLeft); $get("MainDiv").scrollLeft += scrollStep; timerLeft = setTimeout("scrollDivRight('" + $get("MainDiv") + "')", 10) } function stopMe() { clearTimeout(timerRight); clearTimeout(timerLeft) } function Initial_Seat_Select() { var a = ""; Seat_White("Seat_td0"); Seat_Green("Seat_td1"); for (var b = 2; b < 10; b++) { a = "Seat_td" + b.toString(); Seat_White(a) } Prev_Seat_no = "Seat_td1"; SeatRequired = 2 } function Seat_Event_Handller(c, a) { var b = c.substring(7, 8); if (!(b == (Temp_Seat_Sel - 1))) { if (a == 1) { Seat_Orange(c) } else { if (a == 2) { Seat_White(c) } else { if (a == 3) { Seat_Green(c); Seat_White(Prev_Seat_no); Prev_Seat_no = c } } } } } function Seat_White(a) { switch (a) { case "Seat_td0": $get("Seat_td0").style.backgroundPosition = "0px 0px"; break; case "Seat_td1": $get("Seat_td1").style.backgroundPosition = "0px -27px"; break; case "Seat_td2": $get("Seat_td2").style.backgroundPosition = "0px -53px"; break; case "Seat_td3": $get("Seat_td3").style.backgroundPosition = "0px -79px"; break; case "Seat_td4": $get("Seat_td4").style.backgroundPosition = "0px -105px"; break; case "Seat_td5": $get("Seat_td5").style.backgroundPosition = "0px -131px"; break; case "Seat_td6": $get("Seat_td6").style.backgroundPosition = "0px -157px"; break; case "Seat_td7": $get("Seat_td7").style.backgroundPosition = "0px -183px"; break; case "Seat_td8": $get("Seat_td8").style.backgroundPosition = "0px -209px"; break; case "Seat_td9": $get("Seat_td9").style.backgroundPosition = "0px -235px"; break } } function Seat_Orange(a) { switch (a) { case "Seat_td0": $get("Seat_td0").style.backgroundPosition = "0px -261px"; break; case "Seat_td1": $get("Seat_td1").style.backgroundPosition = "0px -287px"; break; case "Seat_td2": $get("Seat_td2").style.backgroundPosition = "0px -313px"; break; case "Seat_td3": $get("Seat_td3").style.backgroundPosition = "0px -339px"; break; case "Seat_td4": $get("Seat_td4").style.backgroundPosition = "0px -365px"; break; case "Seat_td5": $get("Seat_td5").style.backgroundPosition = "0px -391px"; break; case "Seat_td6": $get("Seat_td6").style.backgroundPosition = "0px -417px"; break; case "Seat_td7": $get("Seat_td7").style.backgroundPosition = "0px -443px"; break; case "Seat_td8": $get("Seat_td8").style.backgroundPosition = "0px -469px"; break; case "Seat_td9": $get("Seat_td9").style.backgroundPosition = "0px -495px"; break } } function Seat_Green(a) { switch (a) { case "Seat_td0": $get("Seat_td0").style.backgroundPosition = "0px -520px"; Temp_Seat_Sel = "1"; break; case "Seat_td1": $get("Seat_td1").style.backgroundPosition = "0px -546px"; Temp_Seat_Sel = "2"; break; case "Seat_td2": $get("Seat_td2").style.backgroundPosition = "0px -572px"; Temp_Seat_Sel = "3"; break; case "Seat_td3": $get("Seat_td3").style.backgroundPosition = "0px -598px"; Temp_Seat_Sel = "4"; break; case "Seat_td4": $get("Seat_td4").style.backgroundPosition = "0px -624px"; Temp_Seat_Sel = "5"; break; case "Seat_td5": $get("Seat_td5").style.backgroundPosition = "0px -650px"; Temp_Seat_Sel = "6"; break; case "Seat_td6": $get("Seat_td6").style.backgroundPosition = "0px -676px"; Temp_Seat_Sel = "7"; break; case "Seat_td7": $get("Seat_td7").style.backgroundPosition = "0px -702px"; Temp_Seat_Sel = "8"; break; case "Seat_td8": $get("Seat_td8").style.backgroundPosition = "0px -728px"; Temp_Seat_Sel = "9"; break; case "Seat_td9": $get("Seat_td9").style.backgroundPosition = "0px -754px"; Temp_Seat_Sel = "10"; break } } function Seat_White(a) { switch (a) { case "Seat_td0": $get("Seat_td0").style.backgroundPosition = "0px 0px"; break; case "Seat_td1": $get("Seat_td1").style.backgroundPosition = "0px -27px"; break; case "Seat_td2": $get("Seat_td2").style.backgroundPosition = "0px -54px"; break; case "Seat_td3": $get("Seat_td3").style.backgroundPosition = "0px -81px"; break; case "Seat_td4": $get("Seat_td4").style.backgroundPosition = "0px -108px"; break; case "Seat_td5": $get("Seat_td5").style.backgroundPosition = "0px -135px"; break; case "Seat_td6": $get("Seat_td6").style.backgroundPosition = "0px -162px"; break; case "Seat_td7": $get("Seat_td7").style.backgroundPosition = "0px -189px"; break; case "Seat_td8": $get("Seat_td8").style.backgroundPosition = "0px -216px"; break; case "Seat_td9": $get("Seat_td9").style.backgroundPosition = "0px -243px"; break } } function Seat_Orange(a) { switch (a) { case "Seat_td0": $get("Seat_td0").style.backgroundPosition = "0px -270px"; break; case "Seat_td1": $get("Seat_td1").style.backgroundPosition = "0px -297px"; break; case "Seat_td2": $get("Seat_td2").style.backgroundPosition = "0px -324px"; break; case "Seat_td3": $get("Seat_td3").style.backgroundPosition = "0px -351px"; break; case "Seat_td4": $get("Seat_td4").style.backgroundPosition = "0px -378px"; break; case "Seat_td5": $get("Seat_td5").style.backgroundPosition = "0px -405px"; break; case "Seat_td6": $get("Seat_td6").style.backgroundPosition = "0px -432px"; break; case "Seat_td7": $get("Seat_td7").style.backgroundPosition = "0px -459px"; break; case "Seat_td8": $get("Seat_td8").style.backgroundPosition = "0px -486px"; break; case "Seat_td9": $get("Seat_td9").style.backgroundPosition = "0px -513px"; break } } function Seat_Green(a) { switch (a) { case "Seat_td0": $get("Seat_td0").style.backgroundPosition = "0px -540px"; Temp_Seat_Sel = "1"; break; case "Seat_td1": $get("Seat_td1").style.backgroundPosition = "0px -567px"; Temp_Seat_Sel = "2"; break; case "Seat_td2": $get("Seat_td2").style.backgroundPosition = "0px -594px"; Temp_Seat_Sel = "3"; break; case "Seat_td3": $get("Seat_td3").style.backgroundPosition = "0px -621px"; Temp_Seat_Sel = "4"; break; case "Seat_td4": $get("Seat_td4").style.backgroundPosition = "0px -648px"; Temp_Seat_Sel = "5"; break; case "Seat_td5": $get("Seat_td5").style.backgroundPosition = "0px -675px"; Temp_Seat_Sel = "6"; break; case "Seat_td6": $get("Seat_td6").style.backgroundPosition = "0px -702px"; Temp_Seat_Sel = "7"; break; case "Seat_td7": $get("Seat_td7").style.backgroundPosition = "0px -729px"; Temp_Seat_Sel = "8"; break; case "Seat_td8": $get("Seat_td8").style.backgroundPosition = "0px -756px"; Temp_Seat_Sel = "9"; break; case "Seat_td9": $get("Seat_td9").style.backgroundPosition = "0px -783px"; Temp_Seat_Sel = "10"; break } } function grayOutSessions() { for (var c = 0; c < 6; c++) { Temp_Session_Show_Name = "Session_" + c.toString(); Session_Gray_out(Temp_Session_Show_Name); $get(Temp_Session_Show_Name).style.cursor = "default" } var b = $get("Sessiondiv"); var a = ""; a += '<table cellpadding="0" cellspacing="0"><tr>'; a += '<td class="colname"> Sorry, this show is not available. Please check other show times. </td>'; a += "</tr></table>"; b.innerHTML = a } function TheatreOptionsLoad() { thecinema.Backoffice.IBackofficeService.GetTabDetails(TheatreOptionsLoadSuccess, cbFailure) } function TheatreOptionsLoadSuccess(l) { if (l != null && l.length > 1) { var b = document.getElementById("TheatreOptionsDiv"); b.visibility = "visible"; var a = document.getElementById("scrollContainer"); a.visibility = "visible"; var d = 1; var j = "ThtOpt"; inc = 1; tbl = document.getElementById("ThtOptTable"); tbdy = document.createElement("tbody"); rowcreation(j + d, "Images/Theatres/ALL_O.gif", 0); d += 1; for (var f in l) { var g = l[f]; rowcreation(j + d, "Images/Theatres/" + g.Location_TabName.toUpperCase() + "_FO.gif", g.Location_Id); d += 1 } tbl.appendChild(tbdy); initScroll() } else { var b = document.getElementById("TheatreOptionsDiv"); b.visibility = "hidden"; var a = document.getElementById("scroll_Container_Others"); a.visibility = "hidden"; var e = document.getElementById("ArrowUpDiv"); e.visibility = "hidden"; var c = document.getElementById("ArrowDownDiv"); c.visibility = "hidden" } } function cbFailure() { alert("Data not retreived!") } function rowcreation(a, g, d) { var c = document.createElement("tr"); var f = document.createElement("td"); var e = g.split("/"); var b = e[2].split("_"); switch (b[0]) { case "ALL": f.innerHTML = "<img id=" + b[0] + ' width="22px" height="26px" src=' + g + ' onmouseover="ThtOpt_EventHandller(' + b[0] + ", '1', " + d + ');" onmouseout="ThtOpt_EventHandller(' + b[0] + ", '2', " + d + ');" onclick="ThtOpt_EventHandller(' + b[0] + ", '3', " + d + ');">'; f.height = "26px"; f.width = "22px"; h = h + 26; break; case "SATHYAM": f.innerHTML = "<img id=" + b[0] + ' width="22px" height="56px" src=' + g + ' onmouseover="ThtOpt_EventHandller(' + b[0] + ", '1', " + d + ');" onmouseout="ThtOpt_EventHandller(' + b[0] + ", '2', " + d + ');" onclick="ThtOpt_EventHandller(' + b[0] + ", '3', " + d + ');">'; f.height = "56px"; f.width = "22px"; h = h + 56; break; case "ESCAPE": f.innerHTML = "<img id=" + b[0] + ' width="22px" height="45px" src=' + g + ' onmouseover="ThtOpt_EventHandller(' + b[0] + ", '1', " + d + ');" onmouseout="ThtOpt_EventHandller(' + b[0] + ", '2', " + d + ');" onclick="ThtOpt_EventHandller(' + b[0] + ", '3', " + d + ');">'; f.height = "45px"; f.width = "22px"; h = h + 45; break; case "SAMPLE": f.innerHTML = "<img id=" + b[0] + ' width="22px" height="45px" src=' + g + ' onmouseover="ThtOpt_EventHandller(' + b[0] + ", '1', " + d + ');" onmouseout="ThtOpt_EventHandller(' + b[0] + ", '2', " + d + ');" onclick="ThtOpt_EventHandller(' + b[0] + ", '3', " + d + ');">'; f.height = "45px"; f.width = "22px"; h = h + 48; break } f.id = a; f.style.cursor = "pointer"; c.appendChild(f); tbdy.appendChild(c) } function ThtOpt_EventHandller(a, b, d) { idCurr = a.id; var c; switch (b) { case "1": if (clicked != idCurr) { c = document.getElementById(idCurr); c.src = "Images/Theatres/" + idCurr + "_O.gif" } break; case "2": if (clicked != idCurr) { c = document.getElementById(idCurr); c.src = "Images/Theatres/" + idCurr + "_FO.gif" } break; case "3": if (clicked != idCurr) { c = document.getElementById(idCurr); c.src = "Images/Theatres/" + idCurr + "_O.gif"; var e = document.getElementById(clicked); e.src = "Images/Theatres/" + clicked + "_FO.gif"; Location_Id = d; Sessionselectno = "0"; Session_All = "1"; Prev_Session_No = "Session_0"; SessionDisplay(Sessionselectno, Location_Id); clicked = idCurr } break } } function scrollDataUp() { var c = srcContent.style.top.split("px"); if (c[0] < 0) { if (aroCount3 == 0) { var b = document.getElementById("ThOptarrowDown"); b.src = "Images/Theatres/MoveDown_O.gif"; aroCount3 += 1; aroCount1 = 0; aroCount2 = 0 } srcContent.style.top = ((c[0] * 1) + 1) + "px" } else { if (aroCount4 == 0) { var a = document.getElementById("ThOptarrowUp"); a.src = "Images/Theatres/MoveUp_GR.gif"; aroCount4 += 1 } } } function startScrollUp(a) { tUp = setInterval("scrollDataUp()", a) } function scrollDataDown() { var c = srcContent.style.top.split("px"); if (c[0] > calHeight) { if (aroCount1 == 0) { var a = document.getElementById("ThOptarrowUp"); a.src = "Images/Theatres/MoveUp_O.gif"; aroCount1 += 1; aroCount3 = 0; aroCount4 = 0 } srcContent.style.top = (c[0] - 1) + "px" } else { if (aroCount2 == 0) { var b = document.getElementById("ThOptarrowDown"); b.src = "Images/Theatres/MoveDown_GR.gif"; aroCount2 += 1 } } } function startScrollDown(a) { tDown = setInterval("scrollDataDown()", a) } function stopScroll() { clearInterval(tUp); clearInterval(tDown) } function initScroll() { srcContent = document.getElementById("scrollContent"); srcContent.style.width = srcContent.clientWidth + "px"; srcContent.style.height = srcContent.clientHeight + "px"; srcContainer = document.getElementById("scrollContainer"); currContainerH = srcContainer.clientHeight; currContentH = srcContent.clientHeight; calHeight = -((currContentH - currContainerH)); srcContainer.style.cursor = "crosshair" } function initMouse(b) { var a = document.getElementById(b); if (a.addEventListener) { a.addEventListener("DOMMouseScroll", moveObject, false) } a.onmousewheel = moveObject } function exitMouse(b) { var a = document.getElementById(b); if (b.removeEventListener) { b.removeEventListener("DOMMouseScroll", dealWayOut, false) } else { if (b.detachEvent) { b.detachEvent("onmousewheel", dealWayOut) } } } function dealWayOut() { } function moveObject(b) { var d = 0; if (!b) { b = window.event } if (b.wheelDelta) { d = b.wheelDelta / 120 } else { if (b.detail) { d = -b.detail / 3 } } if (b.preventDefault) { b.preventDefault() } b.returnValue = false; var a = document.getElementById("scrollContent"); var c = a.style.top.split("px"); c[0] = parseInt(c[0]) + (d * 10); if ((c[0] >= calHeight) && (c[0] <= 0)) { a.style.top = c[0] + "px" } };