﻿// JScript File

      
        
function ShowCate(Cate)
{
    if (Cate == "Center") 
    {
        document.getElementById("Center").style.display = '';
        document.getElementById("Movie").style.display = 'none';
        document.getElementById("img_byCenter").src="image/bycenter_up.gif";
        document.getElementById("img_byFilm").src="image/byfilm_up.gif";
    }
    else
    {
        document.getElementById("Center").style.display = 'none';
        document.getElementById("Movie").style.display = '';
        document.getElementById("img_byCenter").src="image/bycenter_down.gif";
        document.getElementById("img_byFilm").src="image/byfilm_down.gif";
    }
    HideContent();
}
    
/***********Tab And Movie Detail Function*********/    
function ddlCenter_OnChange()
{
    HideContent();
    var CenterCode;
    CenterCode=document.getElementById("ddlCenter").options[document.getElementById("ddlCenter").selectedIndex].value;
    
    var i=0;
    for(i=document.getElementById("ddlDate").options.length;i>0;i--)
    {
        document.getElementById("ddlDate").options[i]=null;
    }
    for(i=document.getElementById("ddlMovie").options.length;i>0;i--)
    {
        document.getElementById("ddlMovie").options[i]=null;
    }
    for(i=document.getElementById("ddlShowTime").options.length;i>0;i--)
    {
        document.getElementById("ddlShowTime").options[i]=null;
    }
    if(document.getElementById("ddlCenter").selectedIndex==0)
    {
        document.getElementById("ddlShowTime").disabled=true;
        document.getElementById("ddlDate").disabled=true;
        document.getElementById("ddlMovie").disabled=true;
    }
    else
    {
        document.getElementById("ddlMovie").disabled=false;
        document.getElementById("ddlShowTime").disabled=true;
        document.getElementById("ddlDate").disabled=true;
        GetMovieName(CenterCode);
    }
    if(CenterCode == "0001")
    {
        //callGrantonCouponBlock();           
    }     
    /*if(CenterCode == "0013" || CenterCode == "0006")
    {
       callGameSplash(); 
    }*/
}

////////////////////////


function ddlMovie_OnChange()
{
    HideContent();
    var CenterCode;
    var MovieCode;
    CenterCode=document.getElementById("ddlCenter").options[document.getElementById("ddlCenter").selectedIndex].value;
    MovieCode=document.getElementById("ddlMovie").options[document.getElementById("ddlMovie").selectedIndex].value;
    var i;
    for(i=document.getElementById("ddlDate").options.length;i>0;i--)
    {
        document.getElementById("ddlDate").options[i]=null;
    }
    for(i=document.getElementById("ddlShowTime").options.length;i>0;i--)
    {
        document.getElementById("ddlShowTime").options[i]=null;
    }
    if(document.getElementById("ddlMovie").selectedIndex==0)
    {
        document.getElementById("ddlShowTime").disabled=true;
        document.getElementById("ddlDate").disabled=true;
    }
    else
    {
        document.getElementById("ddlShowTime").disabled=true;
        document.getElementById("ddlDate").disabled=false;
        GetMovieDates(CenterCode,MovieCode);
    }
}

function ddlDate_OnChange()
{
    HideContent();
    var CenterCode;
    var MovieCode;
    var MoviDate;
    CenterCode=document.getElementById("ddlCenter").options[document.getElementById("ddlCenter").selectedIndex].value;
    MovieCode=document.getElementById("ddlMovie").options[document.getElementById("ddlMovie").selectedIndex].value;
    MovieDate=document.getElementById("ddlDate").options[document.getElementById("ddlDate").selectedIndex].value;
    var i;
    for(i=document.getElementById("ddlShowTime").options.length;i>0;i--)
    {
        document.getElementById("ddlShowTime").options[i]=null;
    }

    if(document.getElementById("ddlDate").selectedIndex==0)
    {
        document.getElementById("ddlShowTime").disabled=true;
    }
    else
    {
        document.getElementById("ddlShowTime").disabled=false;
        GetMovieShows(CenterCode,MovieCode,MovieDate);
    }
}

function ddlMMovie_OnChange()
{
    HideContent();
    document.getElementById("hdnHoCode").value = "";
    var MovieCode;
    MovieCode=document.getElementById("ddlMMovie").options[document.getElementById("ddlMMovie").selectedIndex].value;
    var i=0;
	for(i=document.getElementById("ddlMCenter").options.length;i>0;i--)
	{
		document.getElementById("ddlMCenter").options[i]=null;
	}
	for(i=document.getElementById("ddlMDate").options.length;i>0;i--)
	{
		document.getElementById("ddlMDate").options[i]=null;
	}
	for(i=document.getElementById("ddlMShowTime").options.length;i>0;i--)
	{
		document.getElementById("ddlMShowTime").options[i]=null;
	}
	document.getElementById("ddlMCenter").disabled=false;
	document.getElementById("ddlMDate").disabled=true;
	document.getElementById("ddlMShowTime").disabled=true;
	
    GetMCenterName(MovieCode);
    //getHOCode();
}
function ddlMCenterMovie_OnChange()
{
    HideContent();
    var CenterCode;
    var MovieCode;
    CenterCode=document.getElementById("ddlMCenter").options[document.getElementById("ddlMCenter").selectedIndex].value;
    MovieCode=document.getElementById("ddlMMovie").options[document.getElementById("ddlMMovie").selectedIndex].value;
    var i;
    for(i=document.getElementById("ddlMDate").options.length;i>0;i--)
    {
        document.getElementById("ddlMDate").options[i]=null;
    }
    for(i=document.getElementById("ddlMShowTime").options.length;i>0;i--)
    {
        document.getElementById("ddlMShowTime").options[i]=null;
    }
    if(document.getElementById("ddlMCenter").selectedIndex==0)
    {
        document.getElementById("ddlMShowTime").disabled=true;
        document.getElementById("ddlMDate").disabled=true;
    }
    else
    {
        document.getElementById("ddlMShowTime").disabled=true;
        document.getElementById("ddlMDate").disabled=false;
        GetMMovieDates(CenterCode,MovieCode);
    }
    if(CenterCode == "0001")
    {
        //callGrantonCouponBlock();           
    }
    /*if(CenterCode == "0013" || CenterCode == "0006")
    {
       callGameSplash(); 
    }*/
}
function getHOCode()
{
        var CenterCode;
        var MovieCode;
        var url;
        CenterCode=document.getElementById("ddlMCenter").options[document.getElementById("ddlMCenter").selectedIndex].value;
        MovieCode=document.getElementById("ddlMMovie").options[document.getElementById("ddlMMovie").selectedIndex].value;
        xmlHttpBooking=GetXmlHttpObject()
        if (xmlHttpBooking==null)
        {
            alert ("Browser does not support HTTP Request")
            return
        }
        url="AjaxRequests/AJAXBookingBoxMap.aspx?isHOCode=1&MovieCode="+MovieCode+"&CenterCode="+CenterCode; 
        xmlHttpBooking.onreadystatechange=getHOCode_CallBack
        xmlHttpBooking.open("GET",url,true)
        xmlHttpBooking.send(null) 
   
}
function getHOCode_CallBack()
{
	if (xmlHttpBooking.readyState==4 || xmlHttpBooking.readyState=="complete")
    	{	
		    if (xmlHttpBooking.status == 200)      
		    { 
		        var str
				str = xmlHttpBooking.responseText;
				var tempCenterCode = document.getElementById("ddlMCenter").options[document.getElementById("ddlMCenter").selectedIndex].value;
				document.getElementById("hdnHoCode").value = str;
				if(tempCenterCode == "0")
				{
				    var tempMovieCode=document.getElementById("ddlMMovie").options[document.getElementById("ddlMMovie").selectedIndex].value;
				    GetMCenterName(tempMovieCode);
				}
				else
				{
				    ddlMCenter_OnChange();
			    }
		    }
		}
}
function ddlMCenter_OnChange()
{
    HideContent();
   var CenterCode;
   var MovieCode;
   CenterCode=document.getElementById("ddlMCenter").options[document.getElementById("ddlMCenter").selectedIndex].value;
   MovieCode=document.getElementById("ddlMMovie").options[document.getElementById("ddlMMovie").selectedIndex].value;
   //MovieCode=document.getElementById("hdnHoCode").value;
   //document.getElementById("ddlMMovie").options[document.getElementById("ddlMMovie").selectedIndex].value;
   var i;
   for(i=document.getElementById("ddlMDate").options.length;i>0;i--)
	{
		document.getElementById("ddlMDate").options[i]=null;
	}
	for(i=document.getElementById("ddlMShowTime").options.length;i>0;i--)
	{
		document.getElementById("ddlMShowTime").options[i]=null;
	}
	document.getElementById("ddlMCenter").disabled=false;
	document.getElementById("ddlMDate").disabled=false;
	document.getElementById("ddlMShowTime").disabled=true;
   GetMMovieDates(CenterCode,MovieCode);
}

function ddlMDate_OnChange()
{
    HideContent();
   var CenterCode;
   var MovieCode;
   var MoviDate;
   CenterCode=document.getElementById("ddlMCenter").options[document.getElementById("ddlMCenter").selectedIndex].value;
   MovieCode=document.getElementById("ddlMMovie").options[document.getElementById("ddlMMovie").selectedIndex].value;
   MovieDate=document.getElementById("ddlMDate").options[document.getElementById("ddlMDate").selectedIndex].value;
    var i;   
    for(i=document.getElementById("ddlMShowTime").options.length;i>0;i--)
    {
        document.getElementById("ddlMShowTime").options[i]=null;
    }

    if(document.getElementById("ddlMDate").selectedIndex==0)
    {
        document.getElementById("ddlMShowTime").disabled=true;
    }
    else
    {
        document.getElementById("ddlMCenter").disabled=false;
	    document.getElementById("ddlMDate").disabled=false;
	    document.getElementById("ddlMShowTime").disabled=false;
        GetMMovieShows(CenterCode,MovieCode,MovieDate);
    }
}
            
function FormValidate()
{
    HideContent();
    if( document.getElementById("Center").style.display=="" &&  document.getElementById("Movie").style.display=="none") 
   { 
        if(document.getElementById("ddlCenter").selectedIndex==0){
            alert("Please Select The Center");
            return;
        }else if(document.getElementById("ddlCenter").value == '0014') {
            location.href='http://www.funcinemas.com/static_guwahati/index.htm';
        }else if(document.getElementById("ddlCenter").value == '0015') {
            location.href='http://www.funcinemas.com/static_gulbarga/index.htm';
        }else if(document.getElementById("ddlCenter").value == '00180000') {
           //location.href='http://www.funcinemas.com/static_goa1/index.htm';
        }else if(document.getElementById("ddlCenter").value == '0019') {
            location.href='http://www.funcinemas.com/static_goa2/index.htm';
       //}else if(document.getElementById("ddlCenter").value == '0020') {
//            location.href='http://www.funcinemas.com/static_gwalior/index.htm';
        }/*else if(document.getElementById("ddlCenter").value == '0016') {
            location.href='http://www.funcinemas.com/static_hyderabad/index.htm';
        }*/else if(document.getElementById("ddlCenter").value == '0031') {
            location.href='http://www.funcinemas.com/static_bhatinda/index.htm ';
        }else if(document.getElementById("ddlCenter").value == '0022') {
            location.href='http://www.funcinemas.com/static_latur/index.htm';
        }else if(document.getElementById("ddlCenter").value == '0026') {
            location.href='http://www.funcinemas.com/static_pinky/index.htm';
        }else if(document.getElementById("ddlCenter").value == '0029000') {
            location.href='http://www.funcinemas.com/static_hissar/index.htm';  
        }else if(document.getElementById("ddlCenter").value == '0030') {
            location.href='http://www.funcinemas.com/static_dibrugarh/index.htm';  
        /*}else if(document.getElementById("ddlCenter").value == '0028') {
            location.href='http://www.funcinemas.com/static_amritsar/index.htm';*/                           
        }else if(document.getElementById("ddlCenter").value == '002500') {
            location.href='http://www.funcinemas.com/static_kota/index.htm';            
        }else if(document.getElementById("ddlMovie").selectedIndex==0){
             window.parent.location.href= "CenterDefault.aspx?CenterCode="+document.getElementById("ddlCenter").value;
        }else if(document.getElementById("ddlDate").selectedIndex==0){
             window.parent.location.href= "Moviesynopsis.aspx?Movie="+document.getElementById("ddlMovie").value+"&CenterCode="+document.getElementById("ddlCenter").value;
        }else if(document.getElementById("ddlShowTime").selectedIndex==0){
            alert("Please Select The Movie Timing");
        }else{
            var CenterCode;
            var MovieCode;
            var MovieSession;
            CenterCode=document.getElementById("ddlCenter").options[document.getElementById("ddlCenter").selectedIndex].value;
            MovieCode=document.getElementById("ddlMovie").options[document.getElementById("ddlMovie").selectedIndex].value;
            MovieSession=document.getElementById("ddlShowTime").options[document.getElementById("ddlShowTime").selectedIndex].value;
            Path = "https://www.funcinemas.com/PaidBooking.aspx?MovieId="+MovieCode+"&MovieSessionId="+MovieSession+"&CenterCode="+CenterCode;
            
            /*GetLoginStatus();
            if(IsLogin == 0)
            {
                
                location.href = Path;
            }
            else
            {
                LoadLoginDialog(1,Path);
            }*/
            PaidBookingCallFromSchedule(Path);
        }
    } 
    else
    {
         if(document.getElementById("ddlMMovie").selectedIndex==0)
        {
            alert("Please Select The Movie");
        }
        else if(document.getElementById("ddlMCenter").selectedIndex==0)
        {
            //alert("Please Select The Center");
            window.parent.location.href= "MovieSynopsis.aspx?Movie="+document.getElementById("ddlMMovie").value;//document.getElementById("hdnHoCode").value;
        }
        else if(document.getElementById("ddlMMovie").selectedIndex != 0 && document.getElementById("ddlMCenter").selectedIndex !=0 && document.getElementById("ddlMDate").selectedIndex==0)
        {
            var CenterCode;
            var MovieCode;
            var MovieSession;
            CenterCode=document.getElementById("ddlMCenter").options[document.getElementById("ddlMCenter").selectedIndex].value;
            MovieCode=document.getElementById("ddlMMovie").options[document.getElementById("ddlMMovie").selectedIndex].value;//document.getElementById("hdnHoCode").value;
            MovieSession=document.getElementById("ddlMShowTime").options[document.getElementById("ddlMShowTime").selectedIndex].value;
            window.parent.location.href = "MovieSynopsis.aspx?Movie="+MovieCode+"&CenterCode="+CenterCode;
        }
        else if(document.getElementById("ddlMDate").selectedIndex==0)
        {
            alert("Please Select The Movie Date");
        }
        else if(document.getElementById("ddlMShowTime").selectedIndex==0)
        {
            alert("Please Select The Movie Timing");
        }
        else
        {
            var CenterCode;
            var MovieCode;
            var MovieSession;
            CenterCode=document.getElementById("ddlMCenter").options[document.getElementById("ddlMCenter").selectedIndex].value;
            MovieCode=document.getElementById("ddlMMovie").options[document.getElementById("ddlMMovie").selectedIndex].value;//document.getElementById("hdnHoCode").value;
            MovieSession=document.getElementById("ddlMShowTime").options[document.getElementById("ddlMShowTime").selectedIndex].value;
            Path="https://www.funcinemas.com/PaidBooking.aspx?MovieId="+MovieCode+"&MovieSessionId="+MovieSession+"&IsLogin=0&CenterCode="+CenterCode;
            PaidBookingCallFromSchedule(Path);
        }
    }  
}
/**********End Movie Detail Function**********/
var xmlHttpBooking;

function GetXmlHttpObject()
{ 

    var objXMLHttp=null
    if (window.XMLHttpRequest)
    {
        objXMLHttp=new XMLHttpRequest()
    }
    else if (window.ActiveXObject)
    {
        objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
    }
   
    return objXMLHttp
}


function GetMovieName(CenterCode)
{ 
        xmlHttpBooking=GetXmlHttpObject()
        if (xmlHttpBooking==null)
        {
            alert ("Browser does not support HTTP Request")
            return
        }
        var url="AjaxRequests/AJAXBookingBox.aspx?CenterCode="+CenterCode; 
        xmlHttpBooking.onreadystatechange=MovieName_CallBack
        xmlHttpBooking.open("GET",url,true)
        xmlHttpBooking.send(null)        
      
}


function MovieName_CallBack()
{

	if (xmlHttpBooking.readyState==4 || xmlHttpBooking.readyState=="complete")
    	{	
		    if (xmlHttpBooking.status == 200)      
		    { 
		        var str
				str = xmlHttpBooking.responseText;
                           
				var temp=str.split("|");
				var i=0;
				for(i=document.getElementById("ddlMovie").options.length;i>0;i--)
				{
				    document.getElementById("ddlMovie").options[i]=null;
				}
				i=0;
				while(i < temp.length-1)
				{
				    document.getElementById("ddlMovie").options.add(new Option(temp[i+1],temp[i]));
				    i = i + 2;
				    
				}
		    }
	    }
}

function GetMovieDates(CenterCode,MovieCode)
{ 
        
        xmlHttpBooking=GetXmlHttpObject()
        if (xmlHttpBooking == null)
        {
            alert ("Browser does not support HTTP Request")
            return
        }
        var url="AjaxRequests/AJAXBookingBox.aspx?CenterCode="+CenterCode+"&MovieCode="+MovieCode; 
       
        xmlHttpBooking.onreadystatechange=MovieDate_CallBack
        xmlHttpBooking.open("GET",url,true)
        xmlHttpBooking.send(null)        
      
}


function MovieDate_CallBack()
{
	if (xmlHttpBooking.readyState==4 || xmlHttpBooking.readyState=="complete")
    	{	
		    if (xmlHttpBooking.status == 200)      
		    { 
		        var str
				str = xmlHttpBooking.responseText;
				var temp=str.split("|");
				var i=0;
				for(i=document.getElementById("ddlDate").options.length;i>0;i--)
				{
				    document.getElementById("ddlDate").options[i]=null;
				}
				i=0;
				
				while(i<temp.length-1)
				{
				    document.getElementById("ddlDate").options.add(new Option(temp[i+1],temp[i]));
				    i=i+2;
				}
		    }
	    }
}


function GetMovieShows(CenterCode,MovieCode,MovieDate)
{ 
        
        xmlHttpBooking=GetXmlHttpObject()
        if (xmlHttpBooking == null)
        {
            alert ("Browser does not support HTTP Request")
            return
        }
        var url="AjaxRequests/AJAXBookingBox.aspx?CenterCode="+CenterCode+"&MovieCode="+MovieCode+"&MovieDate="+MovieDate; 
        xmlHttpBooking.onreadystatechange=MovieShow_CallBack
        xmlHttpBooking.open("GET",url,true)
        xmlHttpBooking.send(null)        
      
}


function MovieShow_CallBack()
{
	if (xmlHttpBooking.readyState==4 || xmlHttpBooking.readyState=="complete")
    	{	
		    if (xmlHttpBooking.status == 200)      
		    { 
		        var str
				str = xmlHttpBooking.responseText;
				var temp=str.split("|");
				var i=0;
				for(i=document.getElementById("ddlShowTime").options.length;i>0;i--)
				{
				    document.getElementById("ddlShowTime").options[i]=null;
				}
				i=0;
				
				while(i<temp.length-1)
				{
				    document.getElementById("ddlShowTime").options.add(new Option(temp[i+1],temp[i]));
				    i=i+2;
				}
		    }
	    }
}





function GetMCenterName(MovieCode)
{ 
        
        xmlHttpBooking=GetXmlHttpObject()
        if (xmlHttpBooking == null)
        {
            alert ("Browser does not support HTTP Request")
            return
        }
        var url="AjaxRequests/AJAXBookingBox.aspx?MovieCode="+MovieCode; 
     
        xmlHttpBooking.onreadystatechange=MCenterName_CallBack
        xmlHttpBooking.open("GET",url,true)
        xmlHttpBooking.send(null)        
      
}


function MCenterName_CallBack()
{
	if (xmlHttpBooking.readyState==4 || xmlHttpBooking.readyState=="complete")
    	{	
		    if (xmlHttpBooking.status == 200)      
		    { 
		        var str
				str = xmlHttpBooking.responseText;
         
				var temp=str.split("|");
				var i=0;
				for(i=document.getElementById("ddlMCenter").options.length;i>0;i--)
				{
				    document.getElementById("ddlMCenter").options[i]=null;
				}
				i=0;
				
				while(i<temp.length-1)
				{
				    document.getElementById("ddlMCenter").options.add(new Option(temp[i+1],temp[i]));
				    i=i+2;
				}
		    }
	    }
}


function GetMMovieDates(CenterCode,MovieCode)
{ 
        
        xmlHttpBooking=GetXmlHttpObject()
        if (xmlHttpBooking==null)
        {
            alert ("Browser does not support HTTP Request")
            return
        }
        var url="AjaxRequests/AJAXBookingBox.aspx?CenterCode="+CenterCode+"&MovieCode="+MovieCode; 
       
        xmlHttpBooking.onreadystatechange=MMovieDate_CallBack
        xmlHttpBooking.open("GET",url,true)
        xmlHttpBooking.send(null)        
      
}


function MMovieDate_CallBack()
{
	if (xmlHttpBooking.readyState==4 || xmlHttpBooking.readyState=="complete")
    	{	
		    if (xmlHttpBooking.status == 200)      
		    { 
		        var str
				str = xmlHttpBooking.responseText;
				var temp=str.split("|");
				var i=0;
				for(i=document.getElementById("ddlMDate").options.length;i>0;i--)
				{
				    document.getElementById("ddlMDate").options[i]=null;
				}
				i=0;
				
				while(i<temp.length-1)
				{
				    document.getElementById("ddlMDate").options.add(new Option(temp[i+1],temp[i]));
				    i=i+2;
				}
		    }
	    }
}


function GetMMovieShows(CenterCode,MovieCode,MovieDate)
{ 
        
        xmlHttpBooking=GetXmlHttpObject()
        if (xmlHttpBooking==null)
        {
            alert ("Browser does not support HTTP Request")
            return
        }
        var url="AjaxRequests/AJAXBookingBox.aspx?CenterCode="+CenterCode+"&MovieCode="+MovieCode+"&MovieDate="+MovieDate; 
        xmlHttpBooking.onreadystatechange=MMovieShow_CallBack
        xmlHttpBooking.open("GET",url,true)
        xmlHttpBooking.send(null)        
      
}


function MMovieShow_CallBack()
{
	if (xmlHttpBooking.readyState==4 || xmlHttpBooking.readyState=="complete")
    	{	
		    if (xmlHttpBooking.status == 200)      
		    { 
		        var str
				str = xmlHttpBooking.responseText;
			
				var temp=str.split("|");
				var i=0;
				for(i=document.getElementById("ddlMShowTime").options.length;i>0;i--)
				{
				    document.getElementById("ddlMShowTime").options[i]=null;
				}
				i=0;
				
				while(i<temp.length-1)
				{
				    document.getElementById("ddlMShowTime").options.add(new Option(temp[i+1],temp[i]));
				    i=i+2;
				}
		    }
	    }
}
function InstCenterCall(display,HeaderText)
{
    //To get the page name
    var url = window.location.href;
    var nohttp = url.split('//')[1];    
    var hostPort = nohttp.split('/')[1];
    var page =  hostPort.split('?')[0].toLowerCase();  
    var strDisplayUP = "";
    var strDisplayDOWN = "";
    var divTop ="";
    var ContentArray = new Array(4)
    //ContentArray[0] = "240 width/22left//650 top//center-27 top<ul><li>Select the centre name</li><li>Click the arrow button</li> <li>Go to centre main page</li><li>View/book from full schedule displayed by date.</li>Or <li>To Directly go to the booking page:</li><li>Select from centre/movie/date/show time dropdowns</li><li>Click the arrow button</li></ul>";
    // Center tab : Center Drop down
        ContentArray[0] = "<table  style=\"background-color:#FFFFFF;\" width=\"220px\" cellpadding=\"2\" cellspacing=\"2\"><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Select the centre name</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Click the arrow button</td></tr> <tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Go to centre main page</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>View/book from full schedule displayed by date.</td></tr><tr><td align='center' colspan='2' valign='middle' >OR</td></tr><tr><td align='left' valign='top' colspan='2'>To Directly go to the booking page:</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Select from centre/movie/date/show time dropdowns</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top' >Click the arrow button</td></tr></table>";
    // Center tab : Movie Drop down
        ContentArray[1] = "<table  style=\"background-color:#FFFFFF;\" width=\"220px\" cellpadding=\"2\" cellspacing=\"2\"><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Select movie running in centre above</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Click the arrow button</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Go to the movie synopsis page</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>View/book from the datewise schedule of movie.<tr><td align='center' valign='middle' colspan='2'>OR</td></tr><tr><td align='left' valign='top' colspan='2'>To Directly go to the booking page:</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Select from centre/movie/date/show time dropdowns</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Click the arrow button</td></tr></table>";
    // Movie tab : Movie Drop down
        ContentArray[2] = "<table  style=\"background-color:#FFFFFF;\" width=\"220px\" cellpadding=\"2\" cellspacing=\"2\"><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Select a movie</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Click the arrow button</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Go to movie synopsis page</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Select centre from drop down</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>View/book from the datewise schedule of movie.<tr><td align='center' valign='middle' colspan='2'>OR</td></tr><tr><td align='left' valign='top' colspan='2'>To Directly go to the booking page:</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Select from movie/centre/date/show time dropdowns</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Click the arrow button</td></tr></table>";
    // Movie tab : Center Drop down
        ContentArray[3] = "<table  style=\"background-color:#FFFFFF;\" width=\"220px\" cellpadding=\"2\" cellspacing=\"2\"><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Select centre running the movie above</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Click the arrow button</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Go to the movie synopsis page</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>View/book from the datewise schedule of movie. <tr><td align='center' colspan='2' valign='middle'>OR</td></tr><tr><td align='left' valign='top' colspan='2'>To Directly go to the booking page:</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Select from centre/movie/date/show time dropdowns</td></tr><tr><td align='left' valign='top' ><img src=\"image/siteimages/Help_bullet.gif\" alt=\"\"/  style=\"border:0;\"></td><td align='left' valign='top'>Click the arrow button</td></tr></table>";
    //Fun rewards : CRM toolTip
        ContentArray[4] = "<table  style=\"background-color:#FFFFFF;\" width=\"220px\" cellpadding=\"2\" cellspacing=\"2\"><tr><td align='left' valign='top' style='text-align:justify;' >Please put your registered Mobile No. (Now your Fun Rewards No.) & the password SMSed to you while replacing the card number.<br/><br/>To re-receive password, please SMS <b>FUNPASS</b> to 57575.</td></tr></table>";    
    // To set the position of div
    var div_dropContent = window.parent.document.getElementById('HelpTip');
    var w = 380;
    var h = 244;
    var xc = Math.round((document.body.clientWidth/2)-(w/82))
    var yc = Math.round((620/2)-(h/2))
    /*alert((document.body.clientWidth/2)-(w/82));
    alert(xc);

    if(page == "default.aspx" || page == "centerdefault.aspx" || page == "")
    {
        xc = Math.round((document.body.clientWidth/2)-(w/82))
    }
    else
    {
        xc = Math.round((document.body.clientWidth/2)-(w/142))
    }*/
    div_dropContent.style.left = xc + "px";
    div_dropContent.style.top  = yc + "px";
    
    ////////////////////////////////////
    
    ////To create header of table //////////////
        strDisplayUP = "<table cellpadding=\"0\" cellspacing=\"0\"  border=\"0\"><tr><td><table cellpadding=\"0\" cellspacing=\"0\"  border=\"0\"><tr><td style=\"width:1px;\"><img src=\"image/siteimages/CommHdLeft.gif\" alt=\"\"/></td><td class=\"AllPagesHeaderBgStrip\" width=\"200px\">"+ HeaderText +"</td><td class=\"AllPagesHeaderBgStrip\" align=\"right\" ><a href=\"javascript:void(0);\" onclick=\"javascript:HideContent();\" class=\"AllPagesHeaderBgStrip\"><img src=\"image/siteimages/Help_close.gif\" alt=\"\"/  style=\"border:0;\" ></a></td><td align='right'><img src=\"image/siteimages/CommHdRight.gif\" alt=\"\"/></td></tr><tr><td colspan=\"4\" style=\"background-color:#AF251C;\" align='center' valign='middle'><b>";
   //////////////////////////////////////////////
   
    if(display == 0 || display == 2) // For Center tab: Center drop down & For Movie Tab : Movie drop down
    {
        strDisplayDOWN = "</b></td></tr><tr><td colspan=\"4\" style=\"background-color:#AF251C;\" align='center' valign='middle' height=\"3px\" ></td></tr></table></td><td><div id='divHelpArrow' style=\"position:absolute;top:40px;\"><img src=\"image/siteimages/Help-arrow.gif\" alt=\"\"/></div></td></tr></table>";
    }
    else if(display == 1 || display == 3)// For Center tab: Movie drop down & For Movie Tab : Center drop down
    {
        strDisplayDOWN = "</b></td></tr><tr><td colspan=\"4\" style=\"background-color:#AF251C;\" align='center' valign='middle' height=\"3px\" ></td></tr></table></td><td><div id='divHelpArrow' style=\"position:absolute;top:77px;\"><img src=\"image/siteimages/Help-arrow.gif\" alt=\"\"/></div></td></tr></table>";
    }
    else if(display == 4) 
    {
        w = 380;
        h = 244;
        xc = Math.round((document.body.clientWidth/2)-(w/82));
        yc = 340//380;//Math.round((550/2)-(h/10))
        div_dropContent.style.left = xc + "px";
        div_dropContent.style.top  = yc + "px";
        strDisplayDOWN = "</b></td></tr><tr><td colspan=\"4\" style=\"background-color:#AF251C;\" align='center' valign='middle' height=\"3px\" ></td></tr></table></td><td><div id='divHelpArrow' style=\"position:absolute;top:40px;\"><img src=\"image/siteimages/Help-arrow.gif\" alt=\"\"/></div></td></tr></table>";    
    }
       
    div_dropContent.style.visibility="visible";
    div_dropContent.innerHTML = strDisplayUP+ContentArray[display]+strDisplayDOWN;
    div_dropContent.style.display = 'block';
    setTimeout("HideContent()",100000)  
}
function HideContent()
{
    var div_dropContent = window.parent.document.getElementById('HelpTip');
    if(div_dropContent != null)
    {
            div_dropContent.style.display = 'none';
    }
}
function callGrantonCouponBlock()
{
           var div_Splash = window.parent.document.getElementById('SplashImg_Granton');
           //div_Splash.style.height = (window.parent.document.body.scrollHeight )+ 'px';//document.body.parentNode.scrollHeight + 'px';
           div_Splash.style.display = 'block';
                      
            w = 511;
            h = 344;
            xc = Math.round((document.body.clientWidth/2)-(w/2))
	        yc = Math.round((650/2)-(h/2))
            
            div_Splash.style.left = xc + "px";
            div_Splash.style.top  = yc + "px";
            
            var div_temp = document.getElementById('div_CenterPop');
            
            if(div_temp == null)
            {
                div_temp = document.getElementById('div_Centerscreen');
            }
            else if(div_temp == null)
            {
                div_temp = document.getElementById('div_CommScreen1');
            }            
            else if(div_temp == null)
            {
                div_temp = document.getElementById('div_CommScreen');
            }                          
           div_temp.style.height = (document.body.scrollHeight)+ (document.body.parentNode.scrollHeight) + 'px';
           div_temp.style.display = 'block';
           
           //setTimeout("HideGrantonCouponBlock()",10000) 
}
function callGameSplash()
{
           var div_Splash = window.parent.document.getElementById('SplashImg_Game');
           //div_Splash.style.height = (window.parent.document.body.scrollHeight )+ 'px';//document.body.parentNode.scrollHeight + 'px';
           div_Splash.style.display = 'block';
                      
            w = 511;
            h = 344;
            xc = Math.round((document.body.clientWidth/2)-(w/2))
	        yc = Math.round((650/2)-(h/2))
            
            div_Splash.style.left = xc + "px";
            div_Splash.style.top  = yc + "px";
            
            var div_temp = document.getElementById('div_CenterPop');
            
            if(div_temp == null)
            {
                div_temp = document.getElementById('div_Centerscreen');
            }
            else if(div_temp == null)
            {
                div_temp = document.getElementById('div_CommScreen1');
            }            
            else if(div_temp == null)
            {
                div_temp = document.getElementById('div_CommScreen');
            }                          
           div_temp.style.height = (document.body.scrollHeight)+ (document.body.parentNode.scrollHeight) + 'px';
           div_temp.style.display = 'block';
           
           setTimeout("HideGrantonCouponBlock()",10000) 
}
function HideGrantonCouponBlock()
{
            var div_Splash = window.parent.document.getElementById('SplashImg_Granton');
            div_Splash.style.display = 'none';
            div_Splash = window.parent.document.getElementById('SplashImg_Game');
            div_Splash.style.display = 'none';            
            var div_temp;
            if(document.getElementById('div_CenterPop') != null)
            {
                div_temp = document.getElementById('div_CenterPop');
                div_temp.style.display = 'none';
            }
            if(document.getElementById('div_Centerscreen') != null)
            {
               div_temp = document.getElementById('div_Centerscreen');
               div_temp.style.display = 'none';
            }          
            if(document.getElementById('div_CommScreen1') != null)
            {
                div_temp = document.getElementById('div_CommScreen1');
                div_temp.style.display = 'none';
            }     
            else if(document.getElementById('div_CommScreen') != null)
            {
                div_temp = document.getElementById('div_CommScreen');
                div_temp.style.display = 'none';
            }                
}

function checkPageForBookingBoxBanner()
{
    var url = window.location.href;
    var nohttp = url.split('//')[1];    
    var hostPort = nohttp.split('/')[1];
    var page =  hostPort.split('?')[0].toLowerCase(); 
    /*if(page == "paidbooking.aspx")
    {*/
        //document.getElementById("divBannerBookingBox").innerHTML = "<p style='text-align :center;'><iframe src='http://d8.zedo.com/jsc/d8/ff2.html?n=1163;c=8/7;s=3;d=17;w=200;h=400' frameborder='0' marginheight='0' marginwidth='0' scrolling='no' allowtransparency='true' width='200' height='400'></iframe></p>";
        document.getElementById("divBannerBookingBox").innerHTML = "&nbsp;";
    //}
}

function checkForQuiz()
{
    var url = window.location.href;
    var nohttp = url.split('//')[1];    
    var hostPort = nohttp.split('/')[1];
    var page =  hostPort.split('?')[0].toLowerCase();  
    if(page == "quiz.aspx")
    {
        PaidBookingCallFromSchedule('Quiz.aspx?cc=1');
    }
}