﻿var MyTermsContent = "<b class='atop'><b class='a1'></b><b class='a2'></b><b class='a3'></b><b class='a4'></b></b><div style='width:600px; margin-left:20px; margin-right:20px;'><table style='width:100%; height:50px;'><tr><td><span class='header'>TERMS & CONDITIONS</span></td><td align='right'><img id='requiredClose' style='margin-left:30px;' onclick='TCS.popIn();'  class='link' src='Images/button/invalidclose.png' alt='Close' /></td></tr></table><div class='scroll'><span class='ContentValue'>This document contains the terms and conditions governing your use of this Website and your purchase of any movie tickets, goods or services from SPI Cinemas Private Limited using this Website.</span><br /><br /><span class='ContentHeader'>APPLICATION OF THESE TERMS AND CONDITIONS</span><br /><br /><span class='ContentValue'>1. You agree that your use of this Website and the purchase of any movie ticket, goods or services will be governed by these terms and conditions ('Terms of Use'). <br /><br />2. If SPI Cinemas suffers or incurs any loss or damage in connection with any breach of these Terms of Use you agree to indemnify SPI Cinemas for those losses and damages. <br /><br /></span><span class='ContentHeader'>REGISTRATION</span><br /><br /><span class='ContentValue'>1. You may be asked to provide Personal Information to SPI Cinemas before purchasing any movie ticket, goods or services from this Website, before entering any competition on the Website or before registering as a member of this Website. If you do not provide that Personal Information to SPI Cinemas, SPI Cinemas may not be able to sell you movie tickets, goods or services, enter you into that competition or register you as a member. <br /><br />2. All Personal Information SPI Cinemas collects from this Website will be maintained in accordance with SPI Cinema’s Privacy Policy. <br /><br />3. You acknowledge that if you do not register as a member of this Website, parts of this Website designed for registered members may not be accessible to you. Employees of SPI Cinemas and its related bodies corporate are entitled to become members of the Website, but are not entitled to enter any competitions on the Website. <br /><br />4. SPI Cinemas will use its reasonable endeavors to maintain the security of any Personal Information that you provide. This Website has security measures in place to protect the loss, misuse and alteration of the information under SPI Cinema’s control. However, no data transmission over the internet can be completely secure, and SPI Cinemas cannot give an absolute assurance that the information you provide to us will be secure at all times. <br /><br />5. SPI Cinemas may use techniques designed to identify fraudulent activities on the Website, such as fraudulent activities on the Website, such as fraudulent credit card use. If any unauthorized use of your credit card occurs as a result of your credit card purchase on the Website, you should notify your credit card provider in accordance with its reporting rules and procedures. <br /><br />6. You agree that SPI Cinemas may cancel your registration as a member and/or refuse you access to this Website at any time in its sole discretion. </span><br /><br /><span class='ContentHeader'>MOVIE TICKETS</span><span class='ContentValue'>Movie tickets purchased via this Website can be collected<br /><br />1. By presenting the booking number for the transaction at The Window. <br /><br />2. By printing the ticket at home and presenting the print out at the ticket tearing point to gain admission to the selected movie session. The unique barcode on the ticket can only be used once. <br /><br />3. Movie tickets purchased via this Website are non-refundable and are not available for exchange, unless required by law. <br /><br />4. Where allocated seating applies to a session you have the choice of choosing your own seat on the Website. Otherwise seat allocation for movie tickets purchased via this Website is on a 'best available' basis and is carried out by a prescribed computer program. By purchasing movie tickets via this Website you agree that: <br /><br />1. You will accept the seat allocated by SPI Cinemas to each ticket purchased; and <br /><br />2. SPI Cinemas has made no warranties or representations to you that you will be seated in a particular seat, row or section of the relevant cinema. <br /><br />5. You agree that SPI Cinemas may at its discretion, refuse to sell movie tickets to you or withdraw any movie tickets from sale via this Website. </span><br /><br /><span class='ContentHeader'>MODIFICATION OF THESE TERMS AND THIS WEBSITE</span><br /><br /> <span class='ContentValue'>You agree that SPI Cinemas may at any time, in its sole discretion, modify:<br /><br />1. The look and feel of this Website; <br /><br />2. The Website Content; or <br /><br />3. These Terms of Use, with such modifications to take effect from the time that they are posted to this Website.</span><br /></div></div><br /><b class='abottom'><b class='a4'></b><b class='a3'></b><b class='a2'></b><b class='a1'></b></b>"; var InitialContent = "<table class='initialModal'><tr><td><span id='header' class='header'>YOUR SELECTION</span></td><td align='center'><img src='Images/button/invalidclose.png' class='link' onclick='p.popIn();' alt='Close' /></td></tr></table><br/><div id='nifty' style='margin: 0 15px;width:800px;'><b class='rtop'><b class='r1'></b><b class='r2'></b><b class='r3'></b><b class='r4'></b></b><table style=' width:100%;height:65px;'><tr><td style='width:28%;' align='center' class='innertable'><span class='headerText'>MOVIE</span><br /><span id='Span0' class='headerValue'></span></td><td style='width:23%;' align='center' class='innertable'><span class='headerText'>TICKET(S) & SEAT(S)</span><br /><span id='Span1' class='headerValue'></span></td><td style='width:24%;' align='center' class='innertable'><span class='headerText'>SCREEN & CLASS</span><br /><span id='Span2' class='headerValue'></span></td><td style='width:25%;' align='center' ><span class='headerText'>DATE & TIME</span><br /><span id='Span3' class='headerValue'></span></td></tr></table><b class='rbottom'><b class='r4'></b><b class='r3'></b><b class='r2'></b><b class='r1'></b></b></div><div id='MainContent'style='margin-left:15px;'></div>"; var LoginContent = "<table class='innertable' style='height:330px; margin-left:5px;'><tr><td colspan='2'><table style='width:200px;'><tr><td><span class='LoginSignUpHeader'>LOGIN</span></td><td><span class='LoginSignUpValue'>or</span></td><td><a href='javascript:LoginMethod(2);' class='LoginSignUpHeader'>SIGN UP</a></td></tr></table></td></tr><tr><td colspan='2' class='LoginSignUpValue'>Email ID*</td></tr><tr><td><input id='txtLoginMailID' tabindex='1' onchange='LoginMethod(10);' style='width:233px; height:20px;' type='text' /></td><td class='remember'>Example: abc@yahoo.com</td></tr><tr><td id='loginMailError' class='ErrorText'></td></tr><tr><td colspan='2' class='alerts'><input id='ch_rememberme' type='checkbox'/>Remember me on this machine</td></tr><tr><td colspan='2' class='LoginSignUpValue'>Password*</td></tr><tr><td colspan='2'><input id='txtLoginPassword' onkeypress='return isPassword(event)' onkeydown='return LoginEnterButtonPressed(event)' tabindex='2' style='width:233px; height:20px;' type='password'/></td></tr><tr><td colspan='2'><a href='javascript:LoginMethod(3);' class='remember'>Forgot Password?</a></td></tr><tr><td colspan='2'><img  id='btn_booktickets' tabindex='3' onclick='LoginMethod(15);' onkeypress='LoginMethod(15);' class='link' alt='' src='Images/button/booktickets1.gif'/></td></tr></table>"; var InitialContent = "<table class='initialModal'><tr><td><span id='header' class='header'>YOUR SELECTION</span></td><td align='center'><img src='Images/button/invalidclose.png' class='link' onclick='p.popIn();' alt='Close' /></td></tr></table><br/><div id='nifty' style='margin: 0 15px;width:800px;'><b class='rtop'><b class='r1'></b><b class='r2'></b><b class='r3'></b><b class='r4'></b></b><table style=' width:100%;height:65px;'><tr><td style='width:28%;' align='center' class='innertable'><span class='headerText'>MOVIE</span><br /><span id='Span0' class='headerValue'></span></td><td style='width:23%;' align='center' class='innertable'><span class='headerText'>TICKET(S) & SEAT(S)</span><br /><span id='Span1' class='headerValue'></span></td><td style='width:24%;' align='center' class='innertable'><span class='headerText'>SCREEN & CLASS</span><br /><span id='Span2' class='headerValue'></span></td><td style='width:25%;' align='center' ><span class='headerText'>DATE & TIME</span><br /><span id='Span3' class='headerValue'></span></td></tr></table><b class='rbottom'><b class='r4'></b><b class='r3'></b><b class='r2'></b><b class='r1'></b></b></div><div id='MainContent'style='margin-left:15px;'></div>"; var VerificationCode = "<table><tr><td class='Verification'>Thank you for registering!<br /><br /></td></tr><tr><td class='LoginSignUpValue'>A verification code has been sent to your mobile number<span id='mobileNo' class='Verification'></span>.</td></tr><tr><td class='LoginSignUpValue'>Please enter the code in the space provided below, to proceed.</td></tr><tr><td style='font-family: Trebuchet MS;color: black;font-size:small; font-weight:bold; font-style:italic;'><br />Note: This is a one time procedure for new registrations only. </td></tr><tr><td class='Verification'><br />Enter verification code:</td></tr><tr><td><table><tr><td><input id='txtContinue' type='text' onkeypress='return isNumberKey(event)' maxlength='6' style='height:20px' /></td><td><img src='Images/button/continue.gif' alt='' class='link' onclick='LoginMethod(4);' /></td><td id='invalidImg'></td><td id='verificationFailed' class='LoginSignUpValue'></td></tr></table></td></tr><tr><td><a href='javascript:LoginMethod(7);' style='font-family: Trebuchet MS; color: black;font-size:small;' >Click here to resend the code to your mobile</a></td></tr> <tr><td><a href='javascript:ResendtoAnother();' style='font-family: Trebuchet MS; color: black;font-size:small;' >Click here to resend the code to another mobile</a></td></tr> </table>"; var AlertsBox = "<b class='atop'><b class='a1'></b><b class='a2'></b><b class='a3'></b><b class='a4'></b></b><table style='width:98%;'><tr><td id='tableLeft' rowspan='4' style='width:25%;'></td><td id='tableHeader' align='left' style=' font-family:Trebuchet MS; font-size:large; font-weight:bold; color: #C28E00; width:60%;'></td><td align='right' style=' width:15%;  ' ><img id='requiredClose' style='margin-left:30px;' onclick='a.popIn();'  class='link' src='Images/button/invalidclose.png' alt='Close' /></td></tr><tr><td colspan='2' id='tableline'></td></tr><tr><td id='tableBody' class='LoginSignUpValue' colspan='2'></td></tr><tr><td id='tableNote' class='remember'></td><td id='tableButton'><img id='btnOk' onclick='a.popIn();'class='link' src='Images/button/ok.gif'  alt=''/></td></tr></table><b class='abottom'><b class='a4'></b><b class='a3'></b><b class='a2'></b><b class='a1'></b></b>"; var MenuAfterLogin = "<table class='RightMenu'><tr><td style='width:15px;'></td><td ><span id='UserName' class='menuRight'></span></td><td align='right' class='whiteBar' style='width:5px;'>|</td><td><a href='javascript:LoginMethod(34);' class='menuRight'>My Profile</a></td><td align='right' class='whiteBar' style='width:5px;'>|</td><td><a href='javascript:LoginMethod(35);' class='menuRight'>Order History</a></td><td align='right' class='whiteBar' style='width:5px;'>|</td><td><a href='javascript:LoginMethod(23);' class='menuRight'>FAQ</a></td><td align='right' class='whiteBar' style='width:5px;'>|</td><td><a href='javascript:LoginMethod(36);' class='menuRight'>Contact</a></td><td align='right' class='whiteBar' style='width:5px;'>|</td><td><a href='javascript:LoginMethod(24);' style='font-family: Trebuchet MS;color:#F9B171;font-size:9pt; text-decoration:none;'>Logout</a></td></tr></table>"; var MyOkButton = "<img id='btnOk' onclick='a.popIn();'class='link' src='Images/button/ok.gif'  alt=''/>"; var MyExclamation = "<img src='Images/button/exclamation.gif' alt='' />"; var MyLine = "<hr style='width: 100%; height: -15px;'/>"; var MyInvalid = "<img src='Images/button/invalid.gif' alt='' />"; var p = new LoginPopup(); var a = new AlertPopup(); var pLoad = new LoadingPopup(); var MySeats = new SeatSelectionPopup(); var MyFlash = new FlashPopup(); var TCS = new MyTermsPopUp(); var Movie; var TicketAndSeat; var ScreenAndClass; var DateAndTime; var emailfilter = /^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i; var BodyHeight; var BodyWidth; var SignUpFlag = false; var TempEmailID; var User; var MenuIdentifier; var PaymentIdentifier = "Fuel"; var FlashVal = 0; function pageLoad() {
    ajaxpagefetcher.load("menuLeft", "HTML/LeftMenu.htm", true); try { AsynService.LoginSession(SessionResult, cbFailure); }
catch(Error){}}
function SessionResult(result) {
    if (result == "") { ajaxpagefetcher.load("menuRight", "HTML/RightMenuBeforeLogin.htm", true); url = window.location.pathname.split('/');if (url[1] == "Default.aspx" || url == ",") {popouttime(); MyFlash.popOut(); } }
else {$get('menuRight').innerHTML=MenuAfterLogin.toString();$get('UserName').innerHTML="Hi "+result.toString();}}
function ShowLoginPopup(a,b,c,d){if(a!=undefined){Movie=a.toString();TicketAndSeat=b.toString();ScreenAndClass=c.toString();DateAndTime=d.toString();}
LoginMethod(18);p.popOut();}
function LoginMethod(ID){switch(ID){case 1:ajaxpagefetcher.load("MainContent","HTML/Login.htm",true);break;case 2:ajaxpagefetcher.load("MainContent","HTML/SignUp.htm",true);break;case 3:AlertFunction("FORGOT PASSWORD",MyLine,"<img src='Images/button/Questionmark.gif' alt='' />","<span class='LoginSignUpValue'>Email ID*</span><table><tr><td><input id='txtForgotMailID' style='width:200px; height:20px;' type='text' /></td><td><img id='btnSendMailID' onclick='LoginMethod(12);' class='link' src='Images/button/please.gif'  alt=''/></td></tr><tr><td colspan='2' id='forgotErrorMessage' class='ErrorText'></td></tr></table>","Enter your Email ID to get your password.","");break;case 4:AsynService.Continue($get("txtContinue").value,verifyResult,cbFailure);break;case 5:AlertFunction("","",MyExclamation,"Kindly fill the mandatory(*) fields<br/>Correctly!<br/><br/>","Note: Empty spaces are not accepted.",MyOkButton);break;case 6:AlertFunction("","",MyExclamation,"Only Registered users can book tickets.<br/>Kindly click on Signup to register.<br/><br/>","",MyOkButton);break;case 7:AsynService.Reactivate(TempEmailID,ResendResult,cbFailure);break;case 8:$get("MainContent").innerHTML=VerificationCode.toString();break;case 9:if(emailfilter.test($get("txtSignUpMailID").value)==false){$get('loginMailError').innerHTML="Invalid email address!";return false;}
else{$get('loginMailError').innerHTML="<img src='Images/button/loader.gif' />";AsynService.CheckMailId($get("txtSignUpMailID").value,mailOnChangedResult,cbFailure);}
break;case 12:if(emailfilter.test($get("txtForgotMailID").value)==false)
$get('forgotErrorMessage').innerHTML="Invalid email address.Try again!";else{$get('forgotErrorMessage').innerHTML="";AsynService.ForgotPassword($get("txtForgotMailID").value,ForgotPwdResult,cbFailure);a.popIn();}
break;case 13:$get('passwordError').innerHTML="";if($get('txtSignUpPassword').value!=""&&$get('txtRetypePassword').value!=""){if($get('txtSignUpPassword').value!=$get('txtRetypePassword').value)
$get('passwordError').innerHTML="Mismatch password !";}
break;case 15:if($get("txtLoginMailID").value==""||$get("txtLoginPassword").value==""){LoginMethod(5);}
else{showprogress();AsynService.LoginAuthentication($get("txtLoginMailID").value,$get("txtLoginPassword").value,LoginResult,cbFailure);}
break;case 16:if($get('txtSignUpMailID').value==""||$get('txtSignUpPassword').value==""||$get('txtRetypePassword').value==""||$get('txtName').value==""||$get('txtMobileNo').value==""||$get('txtPin').value=="")
LoginMethod(5);else if(SignUpFlag==true&&$get('passwordError').innerHTML==""&&$get('mobileError').innerHTML==""&&$get('pinError').innerHTML=="")
AsynService.AddNewUser($get('txtName').value,$get('txtSignUpMailID').value,$get('txtSignUpPassword').value,$get('dropMonth').value+"/"+$get('dropDate').value+"/"+$get('dropYear').value,$get('dropGender').value,$get('txtMobileNo').value,$get('txtAddress').value,$get('dropCity').value,$get('txtPin').value,false,$get('chAlerts').checked,newUserResult,cbFailure);break;case 18:if(self.innerHeight){BodyWidth=self.innerWidth;BodyHeight=self.innerHeight;}
else if(document.documentElement&&document.documentElement.clientHeight){BodyWidth=document.documentElement.clientWidth;BodyHeight=document.documentElement.clientHeight;}
else if(document.body){BodyWidth=document.body.clientWidth;BodyHeight=document.body.clientHeight;}
break;case 19:AlertFunction("","",MyExclamation,"<br/>Please select a movie.<br/><br/>","",MyOkButton);break;case 20:AlertFunction("","",MyExclamation,"<br/>Please select a Class.<br/><br/>","",MyOkButton);break;case 21:AlertFunction("","","","The movie you have selected is rated  <span style='color:red;'>'A'</span> Patrons below the age of 18 will not be allowed.Do you wish to continue? <br/>","","<table style='width:100%;'><tr><td><img src='Images/button/yes.gif' class='link' onclick='a.popIn();LoginMethod(22);' alt='Yes'/></td><td><img src='Images/button/no.gif' class='link' onclick='a.popIn();' alt='No' /></td></tr></table>");break;case 22:a.popIn();if($get('UserName').innerHTML=="Hi Guest"){if(FinalSelectionval==""){ShowLoginPopup();}
else{var dt=currentdispdate;finaldate=dt[1].split(' ');selecteddatetime=finaldate[1]+" "+finaldate[2]+", "+st[11];FinalSelectionval=FinalSelectionval+"|"+selecteddatetime;ShowLoginPopup(st[12],st[13]+"No",st[7]+" & "+st[2],selecteddatetime);}}
else if(FinalSelectionval!=""){MySeats.popOut();var dt=currentdispdate;finaldate=dt[1].split(' ');selecteddatetime=finaldate[1]+" "+finaldate[2]+", "+st[11];FinalSelectionval=FinalSelectionval+"|"+selecteddatetime;}
break;case 23:window.open("http://www.thecinema.in/FAQ.aspx");break;case 24:AsynService.Logout(Logoutresult);break;case 25:showprogress();AsynService.LetManualSelect(FinalSelectionval,ManualSelectionResult,cbFailure);break;case 26:showprogress();AsynService.LetSystemSelection(FinalSelectionval,SystemSelectionResult,cbFailure);break;case 27:var str=guid();AsynService.Cancel(str,CancelResult);break;case 28:AlertFunction("","",MyExclamation,"<br/>Thank you for your feedback. For further queries please contact 4224 4224.<br/>","","<img id='btnOk' onclick='a.popIn();LoginMethod(29);'class='link' src='Images/button/ok.gif'  alt=''/>");break;case 29:window.location.href="Default.aspx";break;case 30:AlertFunction("","",MyExclamation,"<span style='font-family:Trebuchet MS;font-size:medium;font-weight:normal;'>We were unable to find seats together for the show and movie you selected earlier, please use the ‘Let me select my seats’ option to proceed with your booking</span>","",MyOkButton);break;case 31:LoginMethod(27);AlertFunction("","",MyExclamation,"Sorry. You have exceeded your booking time and your order has been cancelled. Kindly enter your selection again.","","<img id='btnOk' onclick='a.popIn();LoginMethod(29);'class='link' src='Images/button/ok.gif'  alt=''/>");break;case 32:AlertFunction("","",MyExclamation,"<br/>Insufficient Seat(s) Selected<br/><br/>","",MyOkButton);break;case 33:AlertFunction("","",MyExclamation,"<span style='font-family:Trebuchet MS;font-size:medium;font-weight:normal;'>You are in the middle of placing an order with us and are navigating to another page; we will have to release your order and seats before we proceed. Would you like to continue?</span>","","<table style='width:100%;'><tr><td><img src='Images/button/yes.gif' class='link' onclick='SelectedYes();' alt='Yes'/></td><td><img src='Images/button/no.gif' class='link' onclick='a.popIn();' alt='No' /></td></tr></table>");break;case 34:MenuIdentifier="Profile";ur=window.location.pathname.split('/');if(ur[1]=="Seats.aspx"||ur[1]=="Foodbeverages.aspx"||ur[1]=="Payment.aspx")
LoginMethod(33);else
window.location.href="profile.aspx";break;case 35: MenuIdentifier = "OrderHistory"; ur = window.location.pathname.split('/');if (ur[1] == "Seats.aspx" || ur[1] == "Foodbeverages.aspx" || ur[1] == "Payment.aspx")
    LoginMethod(33); else
    window.location.href = "OrderHistory.aspx"; break;  case 36:MenuIdentifier="Contact";ur=window.location.pathname.split('/');if(ur[1]=="Seats.aspx"||ur[1]=="Foodbeverages.aspx"||ur[1]=="Payment.aspx")
LoginMethod(33);else
window.location.href="ConTact.aspx";break;case 37:if($get('Grid').innerHTML.length<=15){LoginMethod(38);return false;}
else{return true;}
break; case 38: AlertFunction("", "", MyExclamation, "<br/>Please Select Your Food<br/><br/>", "", MyOkButton); break; case 39: AlertFunction("", "", MyExclamation, "<br/>Kindly Accept Our Terms & Conditions<br/><br/>", "", MyOkButton); break; case 40: AlertFunction("", "", MyExclamation, "<br/>Fuel Authentication Failed<br/><br/>", "", MyOkButton); break; case 41: AlertFunction("", "", MyExclamation, "Sorry the selection you have made is not available due to consumption by other customers. Regret the inconvenience, please make another choice.", "", MyOkButton); break; case 42: AlertFunction("", "", MyExclamation, "<br/>Error<br/>If problem persist kindly mail to cc@sathyamcinemas.com or contact 044-42244224.<br/>", "", MyOkButton); break; case 43: AlertFunction("", "", MyExclamation, "<br/>Inconsistent Data Error<br/>If problem persist kindly mail to cc@sathyamcinemas.com or contact 044-42244224.<br/>", "", MyOkButton); break; case 44: AlertFunction("", "", MyExclamation, "<br/>Unable to contact ticketing server<br/>If problem persist kindly mail to cc@sathyamcinemas.com or contact 044-42244224.<br/>", "", MyOkButton); break; case 45: AlertFunction("Paired Seats Alone", MyLine, MyInvalid, "The area you've chosed has only paired seating.Kindly choose even number of tickets and Try again", "", MyOkButton); break; case 46: var Dates = $get("dropDate"); for (var i = 1; i <= 31; i++) { var dateOption = document.createElement("option"); dateOption.value = i; dateOption.innerHTML = i; Dates.appendChild(dateOption); }
var Years=$get("dropYear");var currentTime=new Date();var year=currentTime.getFullYear();for(var ds=1920;ds<=year;ds++){var yearOption=document.createElement("option");yearOption.value=ds;yearOption.innerHTML=ds;Years.appendChild(yearOption);}
break;case 47:AlertFunction("","",MyExclamation,"<br/>Kindly view/add your food items in IE,Firefox,Chrome<br/><br/>","",MyOkButton);break;case 48:AlertFunction("","",MyExclamation,"<br/>You have insufficient balance in your Fuel card<br/><br/>","",MyOkButton);break;case 49:AlertFunction("","","","<div id='mobileBody'></div>","","");$get('tableLeft').style.width="1%";ajaxpagefetcher.load("mobileBody","HTML/Mobile.htm",true);break;case 50:AsynService.GetMyProfile(MyProfileResult,cbFailure);break;case 51:if($get('txtProPassword').value==""&&$get('txtProRePassword').value==""&&$get('txtProName').value==""&&$get('txtProAddress').value==""&&$get('txtProCity').value==""&&$get('txtProPinCode').value==""&&$get('PasswordError').innterHTML!=""&&$get('PinErrorID').innterHTML!=""){LoginMethod(5);}
else{AsynService.UpdateMyProfile($get('txtProName').value,$get('txtProPassword').value,$get('dropMonth').value+"/"+$get('dropDate').value+"/"+$get('dropYear').value,$get('txtProAddress').value,$get('txtProCity').value,$get('dropProGender').value,$get('txtProPinCode').value,UpdateMyProfileResult,cbFailure);}
break;case 52:if($get('txtProMobile').value==""){$get('ProMobileError').innerHTML="ERROR : Mobile number is required!";}
else if($get('ProMobileError').innerHTML==""){AsynService.UpdateMobileNumber($get('txtProMobile').value);LoginMethod(24);LoginMethod(29);}
break;case 53:AlertFunction("","",MyExclamation,"<br/>Your profile has been updated<br/><br/>","","<img id='btnOk' class='link' src='Images/button/ok.gif' onclick='LoginMethod(29);'  alt=''/>");break;case 54:if(FlashVal!=1){FlashVal=1;AsynService.FlashImage(1,FlashImageResult,cbFailure);}
break;default:}}
function FlashImageResult(result){$get('HomePopupID').src="Files/Flash/"+result;}
function UpdateMyProfileResult(result){if(result)
LoginMethod(53);}
function MyProfileResult(result){$get('txtProMailID').value=result[0];$get('txtProPassword').value=result[1];$get('txtProRePassword').value=result[1];$get('txtProName').value=result[2];$get('dropDate').value=result[3];$get('dropMonth').value=result[4];$get('dropYear').value=result[5];$get('txtProAddress').value=result[6];$get('txtProPhoneNumber').value=result[7];$get('txtProCity').value=result[8];$get('dropProGender').value=result[9];$get('txtProPinCode').value=result[10];}
function MobileNumberValidation(MobileID,ErrorID){var y=$get(MobileID).value;if(y.charAt(0)!="9")
{
    if (y.charAt(0) == "8" && y.charAt(3) != "" ) {
        $get(ErrorID).innerHTML = "";
    } else { $get(ErrorID).innerHTML = "ERROR : Mobile number should start with 8 or 9!"; } 
} else if (y.length < 10)
$get(ErrorID).innerHTML="ERROR : Mobile number contains 10 characters!";else if(y=="9999999999")
$get(ErrorID).innerHTML="ERROR : Invalid mobile number!";else
$get(ErrorID).innerHTML="";}
function EmailValidation(EmailID,ErrorID){$get(ErrorID).innerHTML="";if(emailfilter.test($get(EmailID).value)==false){$get(ErrorID).innerHTML="ERROR : Invalid email address !";return false;}}
function PinCodeValidation(PinCodeID,ErrorID){$get(ErrorID).innerHTML="";var x=$get(PinCodeID).value;if(x.length<6)
$get(ErrorID).innerHTML="ERROR : PinCode contains 6 characters!";}
function DumyResult(result){}
function PaymentTab(Id){PaymentIdentifier=Id;}
function Logoutresult(result){window.location.href="Default.aspx";}
function ActiveTabChanged(sender,e){PaymentIdentifier=sender.get_activeTab().get_headerText();}
function TermsAndCondition(CardNo,CardPin,amt,Terms){var val=false;if(PaymentIdentifier=="Fuel"){if($get(CardNo).value==""||$get(CardPin).value==""){LoginMethod(5);return false;}
    else if ($get(Terms).checked == false) { LoginMethod(39); return false; } else {
        var str = guid();
        showprogress();
        AsynService.FuelAuthentication($get(CardNo).value, $get(CardPin).value, str, Fuelresult, cbFailure);
        return false;
    } 
}
else if($get(Terms).checked==false){LoginMethod(39);return false;}
else{var str=guid();showprogress();return true;}}
function Foodresult(result){}
function SelectedYes() {
    if (MenuIdentifier == "Profile") { LoginMethod(27);  window.location.href = "profile.aspx"; }
    if (MenuIdentifier == "Contact") { LoginMethod(27);  window.location.href = "ConTact.aspx"; }
    if (MenuIdentifier == "OrderHistory") { LoginMethod(27);  window.location.href = "OrderHistory.aspx"; } 
}
function CancelResult(result){if(result){}
else{window.location.href="Error.aspx?ErrorCode=1-152";}}
function ManualSelectionResult(result){if(result.length>10){window.location.href="Seats.aspx?SequenceId="+result;}
else if(result=='2'){MySeats.popIn();pLoad.popIn();AsynService.Cancel(CancelResult);LoginMethod(41);}
else if(result=='3'){MySeats.popIn();pLoad.popIn();LoginMethod(30);}
else if(result=='4'){MySeats.popIn();pLoad.popIn();AsynService.Cancel(CancelResult);LoginMethod(42);}
else if(result=='5'){MySeats.popIn();pLoad.popIn();AsynService.Cancel(CancelResult);LoginMethod(43);}
else if (result == '6') { MySeats.popIn(); pLoad.popIn(); AsynService.Cancel(CancelResult); LoginMethod(42); }
else if (result == 'INVALIDOBJ') { window.location.href = "Default.aspx"; }
else{MySeats.popIn();pLoad.popIn();LoginMethod(44);}}
function SystemSelectionResult(result){if(result.length>10){window.location.href="Foodbeverages.aspx?SequenceId="+result;}
else if(result=='2'){MySeats.popIn();pLoad.popIn();AsynService.Cancel(CancelResult);LoginMethod(41);}
else if(result=='3'){MySeats.popIn();pLoad.popIn();LoginMethod(30);}
else if(result=='4'){MySeats.popIn();pLoad.popIn();AsynService.Cancel(CancelResult);LoginMethod(42);}
else if(result=='5'){MySeats.popIn();pLoad.popIn();AsynService.Cancel(CancelResult);LoginMethod(43);}
else if (result == '6') { MySeats.popIn(); pLoad.popIn(); AsynService.Cancel(CancelResult); LoginMethod(42); }
else if (result == 'INVALIDOBJ') { window.location.href = "Default.aspx"; }
else{MySeats.popIn();pLoad.popIn();LoginMethod(44);}}
function loadresult(result){}
function ResendResult(result){if(result){AlertFunction("","",MyExclamation,"Activation code Sent to your Mobile<br/> Successfully.<br/><br/>","",MyOkButton);}}
function ForgotPwdResult(result){if(result){AlertFunction("","",MyExclamation,"Your password has been send to your<br/> mail ID sucessfully!","",MyOkButton);}
else
LoginMethod(6);}
function LoginResult(result){pLoad.popIn();if(result[0]=="unknown"){LoginMethod(6);}
else if(result[0]=="incorrectPassword"){AlertFunction("INVALID PASSWORD",MyLine,MyInvalid,"The password you have entered is invalid.<br/>Pleasere- enter Correctly!","<a href='javascript:a.popIn();LoginMethod(3);' class='remember'> Forgot Password?</a>",MyOkButton);}
else if(result[4]>"30"){AlertFunction("MAXIMUM LIMIT REACHED",MyLine,MyExclamation,"You have booked 30 tickets which is the <br />maximum permitted within a day.For more<br />tickets,please contact our website.","<b>groupbookings@sathyamcinemas.com</b>",MyOkButton);}
else if (result[3] == false ) {
    if (result[5] == '57435') {
        TempEmailID = result[0];
        pLoad.popIn();
        AlertFunction("Update your Mobile No.", "", "", "<div id='mobileBody'></div>", "", ""); $get('tableLeft').style.width = "1%"; ajaxpagefetcher.load("mobileBody", "HTML/Oldcustomer.htm", true);
    }
    else {
        AsynService.VistaRegistration();
        LoginMethod(8);
        $get('mobileNo').innerHTML = '[+91' + result[2].toString() + ']';
        TempEmailID = result[0];
    }
}
else{AsynService.VistaRegistration();$get('menuRight').innerHTML=MenuAfterLogin.toString();$get('UserName').innerHTML="Hi "+result[1].toString();LoginMethod(22);p.popIn();}}
function cbFailure(error){}
function mailOnChangedResult(result){if(result==true){$get('loginMailError').innerHTML="<table><tr><td><img src='Images/button/unAvailable.gif' alt='' /></td><td style=' font-family:Trebuchet MS; font-size:small; color:Red;'>E-Mail Id already exists..</td></tr></table>";SignUpFlag=false;}
else{$get('loginMailError').innerHTML="<table><tr><td><img src='Images/button/available.gif' alt='' /></td><td style=' font-family:Trebuchet MS; font-size:small; color:Green;'>E-Mail Id is available for sign up..</td></tr></table>";SignUpFlag=true;}}
function newUserResult(result){var mobileNumber=$get('txtMobileNo').value;LoginMethod(8);$get('mobileNo').innerHTML='[+91'+mobileNumber+']';}
function verifyResult(result){if(result){$get('menuRight').innerHTML=MenuAfterLogin.toString();$get('UserName').innerHTML="Hi "+result.toString().substring(0,6);p.popIn();}
else{$get('invalidImg').innerHTML="<img src='Images/button/invalid.gif' alt='' height='30px' />";$get('verificationFailed').innerHTML="Verification Failed!";}}
function isNumberKey(evt){var charCode=(evt.which)?evt.which:event.keyCode;if(charCode>31&&(charCode<48||charCode>57))
return false;return true;}
function isPassword(evt){var charCode=(evt.which)?evt.which:event.keyCode;if(charCode==32)
return false;return true;}
function LoginEnterButtonPressed(evt){var charCode=(evt.which)?evt.which:event.keyCode;if(charCode==13)
LoginMethod(15);return true;}
function trim(str){return str.replace(/^\s+|\s+$/g,"");}
function MyTermsPopUp(){this.MyTermsDiv=null;this.backgroundTermsDiv=null;this.popOut=function(){try{$get('dropDate').style.visibility='hidden';$get('dropMonth').style.visibility='hidden';$get('dropYear').style.visibility='hidden';$get('dropGender').style.visibility='hidden';$get('dropCity').style.visibility='hidden';}
catch(err){}
this.backgroundTermsDiv=document.createElement("div");this.backgroundTermsDiv.className="backgroundTermsDiv";this.backgroundTermsDiv.style.width=BodyWidth+'px';this.backgroundTermsDiv.style.height=BodyHeight+'px';this.MyTermsDiv=document.createElement("div");this.MyTermsDiv.className="TermsDiv";this.MyTermsDiv.style.left=Math.round((BodyWidth-600)/2).toString()+'px';this.MyTermsDiv.style.top=Math.round((BodyHeight-350)/2).toString()+'px';this.MyTermsDiv.style.backgroundColor='#FFF1CC';this.MyTermsDiv.id='MyTerms';this.MyTermsDiv.Code=this;document.body.appendChild(this.backgroundTermsDiv);document.body.appendChild(this.MyTermsDiv);ajaxpagefetcher.load("MyTerms","HTML/TermsAndConditions.htm",true);}
this.popIn=function(){try{$get('dropDate').style.visibility='visible';$get('dropMonth').style.visibility='visible';$get('dropYear').style.visibility='visible';$get('dropGender').style.visibility='visible';$get('dropCity').style.visibility='visible';}
catch(err){}
if(this.MyTermsDiv!=null){document.body.removeChild(this.MyTermsDiv);this.MyTermsDiv=null;}
if(this.backgroundTermsDiv!=null){document.body.removeChild(this.backgroundTermsDiv);this.backgroundAlertDiv=null;}}}
function AlertPopup(){this.AlertsDiv=null;this.backgroundAlertDiv=null;this.popOut=function(){try{$get('apDivMovieDrop').style.visibility='hidden';}
catch(err){}
this.backgroundAlertDiv=document.createElement("div");this.backgroundAlertDiv.className="backgroundAlertDiv";this.backgroundAlertDiv.style.width=BodyWidth+'px';this.backgroundAlertDiv.style.height=BodyHeight+'px';this.AlertsDiv=document.createElement("div");this.AlertsDiv.className="AlertDiv";this.AlertsDiv.style.left=Math.round((BodyWidth-450)/2).toString()+'px';this.AlertsDiv.style.top=Math.round((BodyHeight-200)/2).toString()+'px';this.AlertsDiv.style.backgroundColor='#FFF1CC';this.AlertsDiv.id='alerts';this.AlertsDiv.Code=this;document.body.appendChild(this.backgroundAlertDiv);document.body.appendChild(this.AlertsDiv);}
this.popIn=function(){try{$get('apDivMovieDrop').style.visibility='visible';}
catch(err){}
if(this.AlertsDiv!=null){document.body.removeChild(this.AlertsDiv);this.AlertsDiv=null;}
if(this.backgroundAlertDiv!=null){document.body.removeChild(this.backgroundAlertDiv);this.backgroundAlertDiv=null;}}}
function SeatSelectionPopup(){this.SeatDiv=null;this.backgroundAlertDiv=null;this.popOut=function(){this.backgroundAlertDiv=document.createElement("div");this.backgroundAlertDiv.className="backgroundAlertDiv";this.backgroundAlertDiv.style.width=BodyWidth+'px';this.backgroundAlertDiv.style.height=BodyHeight+'px';this.SeatDiv=document.createElement("div");this.SeatDiv.className="SeatDiv";this.SeatDiv.style.left=Math.round((BodyWidth-450)/2).toString()+'px';this.SeatDiv.style.top=Math.round((BodyHeight-200)/2).toString()+'px';this.SeatDiv.id='SeatSelectionID';this.SeatDiv.Code=this;document.body.appendChild(this.backgroundAlertDiv);document.body.appendChild(this.SeatDiv);ajaxpagefetcher.load("SeatSelectionID","HTML/SeatSelection.htm",true);}
this.popIn=function(){if(this.SeatDiv!=null){document.body.removeChild(this.SeatDiv);this.SeatDiv=null;}
if(this.backgroundAlertDiv!=null){document.body.removeChild(this.backgroundAlertDiv);this.backgroundAlertDiv=null;}}}
function LoadingPopup(){LoginMethod(18);this.LoadingDiv=null;this.backgroundLoadingDiv=null;this.popOut=function(){this.backgroundLoadingDiv=document.createElement("div");this.backgroundLoadingDiv.className="backgroundLoadingDiv";this.backgroundLoadingDiv.style.width=BodyWidth+'px';this.backgroundLoadingDiv.style.height=BodyHeight+'px';this.LoadingDiv=document.createElement("div");this.LoadingDiv.className="LoadingDiv";this.LoadingDiv.style.left=Math.round((BodyWidth-100)/2).toString()+'px';this.LoadingDiv.style.top=Math.round((BodyHeight-100)/2).toString()+'px';this.LoadingDiv.id='LoadingID';this.LoadingDiv.Code=this;document.body.appendChild(this.backgroundLoadingDiv);document.body.appendChild(this.LoadingDiv);$get('LoadingID').innerHTML="<img src='Images/Loading.gif' alt='' />";}
this.popIn=function(){if(this.LoadingDiv!=null){document.body.removeChild(this.LoadingDiv);this.LoadingDiv=null;}
if(this.backgroundLoadingDiv!=null){document.body.removeChild(this.backgroundLoadingDiv);this.backgroundLoadingDiv=null;}}}
function FlashPopup(){LoginMethod(18);this.FlashDiv=null;this.backgroundFlashDiv=null;this.popOut=function(){try{$get('apDivMovieDrop').style.visibility='hidden';}
catch(err){}
this.backgroundFlashDiv=document.createElement("div");this.backgroundFlashDiv.className="backgroundLoadingDiv";this.backgroundFlashDiv.style.width=BodyWidth+'px';this.backgroundFlashDiv.style.height=BodyHeight+'px';this.FlashDiv=document.createElement("div");this.FlashDiv.className="FlashDiv";this.FlashDiv.style.left=Math.round((BodyWidth-430)/2).toString()+'px';this.FlashDiv.style.top=Math.round((BodyHeight-430)/2).toString()+'px';this.FlashDiv.id='FlashID';this.FlashDiv.Code=this;document.body.appendChild(this.backgroundFlashDiv);document.body.appendChild(this.FlashDiv);ajaxpagefetcher.load("FlashID","HTML/FlashPopOut.htm",true);}
this.popIn=function(){try{$get('apDivMovieDrop').style.visibility='visible';}
catch(err){}
if(this.FlashDiv!=null){document.body.removeChild(this.FlashDiv);this.FlashDiv=null;}
if(this.backgroundFlashDiv!=null){document.body.removeChild(this.backgroundFlashDiv);this.backgroundFlashDiv=null;}}}
function LoginPopup(){this.loginDiv=null;this.backgroundDiv=null;this.popOut=function(){try{$get('apDivMovieDrop').style.visibility='hidden';}
catch(err){}
this.backgroundDiv=document.createElement("div");this.backgroundDiv.className="backgroundDiv";this.backgroundDiv.style.width=BodyWidth+'px';this.backgroundDiv.style.height=BodyHeight+'px';this.loginDiv=document.createElement("div");this.loginDiv.className="loginDiv";this.loginDiv.style.left=Math.round((BodyWidth-827)/2).toString()+'px';this.loginDiv.style.top=Math.round((BodyHeight-492)/2).toString()+'px';this.loginDiv.Code=this;this.loginDiv.innerHTML=InitialContent.toString();document.body.appendChild(this.backgroundDiv);document.body.appendChild(this.loginDiv);if(Movie==undefined){Movie="Please Select";TicketAndSeat="Please Select";ScreenAndClass="Please Select";DateAndTime="Please Select";}
$get("Span0").innerHTML=Movie.toString();$get("Span1").innerHTML=TicketAndSeat.toString();$get("Span2").innerHTML=ScreenAndClass.toString();$get("Span3").innerHTML=DateAndTime.toString();LoginMethod(1);}
this.popIn=function(){try{$get('apDivMovieDrop').style.visibility='visible';}
catch(err){}
if(this.loginDiv!=null){document.body.removeChild(this.loginDiv);this.loginDiv=null;}
if(this.backgroundDiv!=null){document.body.removeChild(this.backgroundDiv);this.backgroundDiv=null;}}}
function ShowMyCity(){if($get('panel').style.visibility=='visible'){$get('panel').style.visibility='hidden';$get('menu_title').style.height="13px";}
else{$get('panel').style.visibility='visible';$get('menu_title').style.height="40px";}}
function AlertFunction(Header,Line,Left,Body,Note,Button){LoginMethod(18);a.popOut();$get("alerts").innerHTML=AlertsBox.toString();$get('tableHeader').innerHTML=Header;$get('tableline').innerHTML=Line;$get('tableLeft').innerHTML=Left;$get('tableBody').innerHTML=Body;$get('tableNote').innerHTML=Note;$get('tableButton').innerHTML=Button;}
function ControlToFocus(ControlID){$get(ControlID).focus();}
function guid(){ur=window.location.search.substring(1);var guid=ur.split('=');if(guid[1]!=""){return guid[1];}
else
return"";}
var ajaxpagefetcher={loadingmessage:"Loading Page, please wait...",exfilesadded:"",connect:function(containerid,pageurl,bustcache,jsfiles,cssfiles){var page_request=false;var bustcacheparameter="";if(window.XMLHttpRequest)
page_request=new XMLHttpRequest();else if(window.ActiveXObject){try{page_request=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){try{page_request=new ActiveXObject("Microsoft.XMLHTTP")}
catch(e){}}}
else
return false;var ajaxfriendlyurl=pageurl.replace(/^http:\/\/[^\/]+\//i,"http://"+window.location.hostname+"/");page_request.onreadystatechange=function(){ajaxpagefetcher.loadpage(page_request,containerid,pageurl,jsfiles,cssfiles)}
if(bustcache)
bustcacheparameter=(ajaxfriendlyurl.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime();page_request.open('GET',ajaxfriendlyurl+bustcacheparameter,true);page_request.send(null)},loadpage:function(page_request,containerid,pageurl,jsfiles,cssfiles){if(page_request.readyState==4&&(page_request.status==200||window.location.href.indexOf("http")==-1)){document.getElementById(containerid).innerHTML=page_request.responseText
for(var i=0;i<jsfiles.length;i++)
this.loadjscssfile(jsfiles[i],"js");for(var i=0;i<cssfiles.length;i++)
this.loadjscssfile(cssfiles[i],"css");this.pageloadaction(pageurl)}},createjscssfile:function(filename,filetype){if(filetype=="js"){var fileref=document.createElement('script');fileref.setAttribute("type","text/javascript");fileref.setAttribute("src",filename);}
else if(filetype=="css"){var fileref=document.createElement("link");fileref.setAttribute("rel","stylesheet");fileref.setAttribute("type","text/css");fileref.setAttribute("href",filename);}
return fileref},loadjscssfile:function(filename,filetype){if(this.exfilesadded.indexOf("["+filename+"]")==-1){var newelement=this.createjscssfile(filename,filetype);document.getElementsByTagName("head")[0].appendChild(newelement);this.exfilesadded+="["+filename+"]"}
else{var targetelement=(filetype=="js")?"script":(filetype=="css")?"link":"none"
var targetattr=(filetype=="js")?"src":(filetype=="css")?"href":"none"
var allsuspects=document.getElementsByTagName(targetelement);for(var i=allsuspects.length;i>=0;i--){if(allsuspects[i]&&allsuspects[i].getAttribute(targetattr)!=null&&allsuspects[i].getAttribute(targetattr).indexOf(filename)!=-1){var newelement=this.createjscssfile(filename,filetype);allsuspects[i].parentNode.replaceChild(newelement,allsuspects[i])}}}},pageloadaction:function(pageurl){this.onpageload(pageurl)},onpageload:function(pageurl){},load:function(containerid,pageurl,bustcache,jsfiles,cssfiles){var jsfiles=(typeof jsfiles=="undefined"||jsfiles=="")?[]:jsfiles
var cssfiles=(typeof cssfiles=="undefined"||cssfiles=="")?[]:cssfiles
this.connect(containerid,pageurl,bustcache,jsfiles,cssfiles)}}


 function Fuelresult(result) {
     if (result == "NoBalance") {
         pLoad.popIn();
         AlertFunction("", "", MyExclamation, "<br/>You have insufficient balance in your card<br/><br/>", "", MyOkButton);
         return false;
     }
     else if (result == "Invalid") {
     pLoad.popIn();
     AlertFunction("", "", MyExclamation, "<br/>Fuel Authentication Failed<br/><br/>", "", MyOkButton);
     return false;
     }
     else if (result == "1-134") {     
     window.location.href = "Error.aspx?ErrorCode=1-134";
     }
     else if (result == "2-203") {
     window.location.href = "Error.aspx?ErrorCode=2-203";
     }
     else {
         window.location.href = result;
     }

 }

 /* New code phase III - OLD CUSTOMER*/
 function Oldcustomer() {
     if ($get('txtProMobile').value == "") { $get('ProMobileError').innerHTML = "ERROR : Mobile number is required!"; }
     else if ($get('ProMobileError').innerHTML == "") {
         AsynService.UpdateMobileNumber($get('txtProMobile').value);
         AsynService.Reactivate(TempEmailID, oldcustomerresult, cbFailure);
     }

 }
 function oldcustomerresult(result) {
     if (result) {
         $get('ProMobileError').innerHTML = "Kindly Enter the Activation code below which will reach your mobile within a short time";

     }
     else {
         $get('ProMobileError').innerHTML = "";
     }
 }

 function oldcustomercontinue() {
     AsynService.Continue($get("txtContinue").value, continueres, cbFailure)
 }
 function continueres(result) {
     if (result != "") { $get('menuRight').innerHTML = MenuAfterLogin.toString(); $get('UserName').innerHTML = "Hi " + result.toString().substring(0, 6); a.popIn(); p.popIn(); }
     else { $get('ProMobileError').innerHTML = "Verification Failed !"; }
 }

 ///Another Mobile

 function ResendtoAnother() {
     AlertFunction("Send to Another Mobile", "", "", "<div id='mobileBody'></div>", "", ""); $get('tableLeft').style.width = "1%"; ajaxpagefetcher.load("mobileBody", "HTML/Anothermobile.htm", true);
 }

 function AnotherMobile() {
     AsynService.SendtoAnother(TempEmailID, $get('txtProMobile').value, oldcustomerresult, cbFailure);
     AsynService.UpdateMobileNumber($get('txtProMobile').value);
 }
 function Anothermobcontinue() {
     AsynService.Continue($get("txtanotherContinue").value, continueres, cbFailure);
 }






/**********************************************************/
/*********** New Flash Banner JavaScript Start ************/
/********** Toggle Flash Banner with Ticket Tab ***********/
 /**********************************************************/
 var brows;
 function ChangeSwf(res, browstyp) {
     brows = browstyp;
     if (res == 1) {
         thecinema.Backoffice.IBackofficeService.FlashBanners("F1", Flashresult);
     }
     else if (res == 2) {
     thecinema.Backoffice.IBackofficeService.FlashBanners("F2", Flashresult);
     }
     else if (res == 3) {
     thecinema.Backoffice.IBackofficeService.FlashBanners("F3", Flashresult);
     }
     else if (res == 4) {
     thecinema.Backoffice.IBackofficeService.FlashBanners("F4", Flashresult);
     }
     else if (res == 5) {
     thecinema.Backoffice.IBackofficeService.FlashBanners("F5", Flashresult);
     }
     else if (res == 6) {
     thecinema.Backoffice.IBackofficeService.FlashBanners("F6", Flashresult);
     }
 }
 function Flashresult(res) {

     var browserName = navigator.appName;
     var browserVer = parseInt(navigator.appVersion); 
     if (browserName == "Microsoft Internet Explorer") {
         brows = "IE";
     }
     if (res[0] == "F1") {
         if (res[1] == "F1") {
             var fp = "Files/Flash/F1.swf";
             if (brows == "IE") {
                 $get("Object5").LoadMovie(0, fp);
             }
             else {
                 document.embeds.obj_username.LoadMovie(0, fp);
             }
             Flashres(1);
         }        
     }
     else if (res[0] == "F2") {
     if (res[1] == "F2") {
         var fp = "Files/Flash/F2.swf";
         if (brows == "IE") {
             $get("Object5").LoadMovie(0, fp);
         }
         else {
             document.embeds.obj_username.LoadMovie(0, fp);
         }
         Flashres(2);
     }       
     }
     else if (res[0] == "F3") {
     if (res[1] == "F3") {
         var fp = "Files/Flash/F3.swf";
         if (brows == "IE") {
             $get("Object5").LoadMovie(0, fp);
         }
         else {
             document.embeds.obj_username.LoadMovie(0, fp);
         }
         Flashres(3);
     }       
     }
     else if (res[0] == "F4") {
     if (res[1] == "F4") {
         var fp = "Files/Flash/F4.swf";
         if (brows == "IE") {
             $get("Object5").LoadMovie(0, fp);
         }
         else {
             document.embeds.obj_username.LoadMovie(0, fp);
         }
         Flashres(4);
     }       
     }
     else if (res[0] == "F5") {
     if (res[1] == "F5") {
         var fp = "Files/Flash/F5.swf";
         if (brows == "IE") {
             $get("Object5").LoadMovie(0, fp);
         }
         else {
             document.embeds.obj_username.LoadMovie(0, fp);
         }
         Flashres(5);
     }       
     }
     else if (res[0] == "F6") {
     if (res[1] == "F6") {
         var fp = "Files/Flash/F6.swf";
         if (brows == "IE") {
             $get("Object5").LoadMovie(0, fp);
         }
         else {
             document.embeds.obj_username.LoadMovie(0, fp);
         }
         Flashres(6);
     }       
     }
 }
 


 function Flashres(res) {
     if (res == 1) {
        
         var t = document.getElementById('t6');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t1');
         t.style.backgroundColor = '#62BB43';
         t.style.borderColor = '#FFFEFF';
         var t = document.getElementById('t2');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t3');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t4');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t5');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
     }
     else if (res == 2) {
        
         var t = document.getElementById('t6');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t2');
         t.style.backgroundColor = '#62BB43';
         t.style.borderColor = '#FFFEFF';
         var t = document.getElementById('t1');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t3');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t4');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t5');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';

     }
     else if (res == 3) {
        
         var t = document.getElementById('t6');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t3');
         t.style.backgroundColor = '#62BB43';
         t.style.borderColor = '#FFFEFF';
         var t = document.getElementById('t2');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t1');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t4');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t5');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
     }
     else if (res == 4) {
        
         var t = document.getElementById('t6');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t4');
         t.style.backgroundColor = '#62BB43';
         t.style.borderColor = '#FFFEFF';
         var t = document.getElementById('t2');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t3');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t1');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t5');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
     }
     else if (res == 5) {
        
         var t = document.getElementById('t6');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t5');
         t.style.backgroundColor = '#62BB43';
         t.style.borderColor = '#FFFEFF';
         var t = document.getElementById('t2');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t3');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t4');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t1');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
     }
     else if (res == 6) {
         
         var t = document.getElementById('t6');
         t.style.backgroundColor = '#62BB43';
         t.style.borderColor = '#FFFEFF';
         var t = document.getElementById('t5');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t2');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t3');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t4');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
         var t = document.getElementById('t1');
         t.style.backgroundColor = '';
         t.style.borderColor = '#F7831E';
     }

 }

/***************************************&*************************/
/*********** New Flash Banner JavaScript End *********************/
 /*****************************************************************/








 function popouttime() {
     thecinema.Backoffice.IBackofficeService.Popuptimeout(popouttimeoutres);
 }
 function popouttimeoutres(res) {
     var t = setTimeout("MyFlash.popIn()", res * 5000);
 }


 var t;
 var asd = 1;
 var flash_count = 1;

 function timedCount(brwstype) {
  var divstyle = new String();
     divstyle = $get('FinalSelection').style.visibility;
     if (divstyle.toLowerCase() != "hidden") {
         ChangeSwf(flash_count, brwstype);
         clearTimeout(t);
         flash_count++;
         if (flash_count > 6) {
             flash_count = 1;
         }
         t = setTimeout("timedCount('" + brwstype + "')", 6000);
     }
 }
 function doTimer(brwstype) { timedCount(brwstype); }