
var json = {
	movies: [


	{id: 46496, name: 'Chronicle', postname: 'chronicle', schedules: [ {cinema: 'TriNoma Cinema 7', runtime: '11:35, 1:45, 3:55, 6:05, 8:15, 10:25' } ,  {cinema: 'SM Southmall Cinema 7', runtime: '1:00, 3:00, 5:00, 7:00, 9:00 ' } ,  {cinema: 'Cash and Carry Cinema 1', runtime: '1:30, 3:30, 5:30, 7:30, 9:30' } ,  {cinema: 'SM Megamall Cinema 8', runtime: '1:20, 3:25, 5:30, 7:35, 9:40' } ,  {cinema: 'Robinsons Metro East Cinema 4', runtime: '12:45, 2:50, 4:55, 7:00, 9:05 ' } ,  {cinema: 'SM Sta. Mesa Cinema 2', runtime: '12:50, 3:00, 5:10, 7:20, 9:30' } ,  {cinema: 'Festival Supermall Cinema 2', runtime: '11:45, 1:45, 3:45, 5:45, 7:45, 9:45' } ,  {cinema: 'SM Fairview Cinema 9', runtime: '1:20, 3:15, 5:10, 7:05, 9:00 ' } ,  {cinema: 'Greenbelt 3 Cinema 1', runtime: '1:45, 3:50, 5:55, 8:00, 10:05' } ,  {cinema: 'SM Manila Cinema 5', runtime: '12:45, 2:30, 4:15, 6:00, 7:45, 9:30 ' }   ] }, 	

	{id: 46495, name: 'Man on a Ledge', postname: 'man-on-a-ledge', schedules: [ {cinema: 'Greenhills Theater Mall Cinema 2', runtime: '12:10, 2:45, 5:20, 7:55, 10:30 ' } ,  {cinema: 'Festival Supermall Cinema 9', runtime: '11:45, 2:20, 4:55, 7:30' } ,  {cinema: 'Glorietta 4 Cinema 4', runtime: '11:20, 1:30, 3:40, 5:50, 8:00, 10:10 ' } ,  {cinema: 'SM Sta. Mesa Cinema 5', runtime: '12:50, 3:00, 5:10, 7:20, 9:30' } ,  {cinema: 'Robinsons Metro East Cinema 3', runtime: '1:35, 4:05, 6:35, 9:05' } ,  {cinema: 'TriNoma Cinema 1', runtime: '1:15, 3:25, 5:35, 7:45, 9:55 ' } ,  {cinema: 'SM San Lazaro Cinema 1', runtime: '2:45, 4:50, 6:55, 9:00 ' } ,  {cinema: 'SM Sucat Cinema 2', runtime: '11:50, 2:00, 4:10, 6:20, 8:30' } ,  {cinema: 'Gateway Cineplex 6', runtime: '1:50, 4:25, 7:00, 9:35' } ,  {cinema: 'Robinsons Place Pioneer Cinema 4', runtime: '1:30, 3:50, 6:10, 8:30' }   ] }, 	

	{id: 46491, name: 'The Descendants', postname: 'the-descendants', schedules: [ {cinema: 'Gateway Cineplex 4', runtime: '7:10, 9:40 ' } ,  {cinema: 'TriNoma Cinema 3', runtime: '8:00, 10:25 ' } ,  {cinema: 'Shangri-la Plaza Mall Cinema 3', runtime: '6:50, 9:10' } ,  {cinema: 'SM Manila Cinema 7', runtime: '7:10, 9:30 ' } ,  {cinema: 'Market Market Cinema 7', runtime: '6:35, 9:00 ' } ,  {cinema: 'SM Southmall Cinema 8', runtime: '7:00, 9:30 ' } ,  {cinema: 'Greenhills Promenade Cinema 5', runtime: '8:00, 10:30 ' } ,  {cinema: 'Newport Ultra Cinema 1', runtime: '9:15, 11:45 ' } ,  {cinema: 'Robinsons Galleria Cinema 4', runtime: '7:40, 10:00 ' } ,  {cinema: 'Power Plant Cinema 3', runtime: '7:00, 9:30' }   ] }, 	

	{id: 46487, name: 'Journey 2: The Mysterious Island', postname: 'journey-2-the-mysterious-island', schedules: [ {cinema: 'Robinsons Galleria Cinema 2', runtime: '12:00, 2:00, 4:00, 6:00, 8:00, 10:00 ' } ,  {cinema: 'SM Valenzuela Cinema 1', runtime: '12:25, 2:30, 4:35, 6:40, 8:45' } ,  {cinema: 'Festival Supermall Cinema 4', runtime: '11:40, 2:00, 4:20' } ,  {cinema: 'Robinsons Metro East Cinema 2', runtime: '11:50, 2:00, 4:10, 6:20, 8:30' } ,  {cinema: 'Shangri-la Plaza Mall Cinema 1', runtime: '1:50, 4:10, 6:30, 8:50' } ,  {cinema: 'SM Manila Cinema 3', runtime: '12:30, 2:30, 4:30, 6:30, 8:30' } ,  {cinema: 'Eastwood Mall Gold Cinema-6', runtime: '2:10, 5:00, 7:50, 10:40' } ,  {cinema: 'SM City Bicutan Cinema 1', runtime: '11:40, 2:00, 4:20, 6:40, 9:00' } ,  {cinema: 'Robinsons Galleria Cinema 6', runtime: '12:30, 2:30, 4:30, 6:30, 8:30 ' } ,  {cinema: 'The Podium Cinema 1', runtime: '1:30, 3:50, 6:05, 8:25 ' }   ] }, 	

	{id: 46486, name: 'The Grey', postname: 'the-grey', schedules: [ {cinema: 'SM North EDSA Cinema 9', runtime: '12:10, 2:30, 4:50, 7:10, 9:30' } ,  {cinema: 'SM Southmall Cinema 3', runtime: '1:15, 3:50, 6:25, 9:00' } ,  {cinema: 'Gateway Cineplex 8', runtime: '1:35, 4:10, 6:45, 9:20' } ,  {cinema: 'SM Manila Cinema 2', runtime: '11:30, 2:00, 4:30, 7:00, 9:30' } ,  {cinema: 'Festival Supermall Cinema 5', runtime: '11:45, 2:20, 4:55, 7:30, 10:05' } ,  {cinema: 'Power Plant Cinema 4', runtime: '12:30, 3:00, 5:30, 8:00, 10:30' } ,  {cinema: 'SM Fairview Cinema 11', runtime: '2:15, 4:30, 6:45, 9:00 ' } ,  {cinema: 'Market Market Cinema 2', runtime: '11:20, 1:50, 4:20, 6:50, 9:20' } ,  {cinema: 'Greenbelt 3 Cinema 5', runtime: '1:20, 3:45, 6:10, 8:35, 11:00' } ,  {cinema: 'Alabang Town Center Cinema 5', runtime: '12:30, 3:05, 5:40, 8:15' }   ] }, 	

	{id: 46485, name: 'The Girl With the Dragon Tattoo', postname: 'the-girl-with-the-dragon-tattoo-2', schedules: [ {cinema: 'Gateway Cineplex 7', runtime: '11:00, 2:20, 5:40, 9:00 ' } ,  {cinema: 'Eastwood Mall Ultra Cinema-7', runtime: '1:25, 4:40, 7:55, 10:50 ' } ,  {cinema: 'TriNoma Cinema 6', runtime: '12:25, 3:35, 6:45, 9:55 ' } ,  {cinema: 'Alabang Town Center Cinema 2', runtime: '12:40, 4:00, 7:20, 10:45 ' } ,  {cinema: 'Cinerama Cineworld 1', runtime: '11:30, 2:30, 5:30, 8:30' } ,  {cinema: 'Newport Cinema 4', runtime: '10:15, 1:15, 4:15, 7:15, 10:15' } ,  {cinema: 'Greenhills Theater Mall Cinema 1', runtime: '12:35, 4:00, 7:20, 10:40 ' } ,  {cinema: 'Robinsons Galleria Cinema 1', runtime: '12:15, 3:30, 6:45, 10:00' } ,  {cinema: 'Shangri-la Plaza Mall Cinema 2', runtime: '12:00, 3:10, 6:25, 9:40 ' } ,  {cinema: 'Market Market Cinema 3', runtime: '11:45, 2:50, 5:55, 9:00 ' }   ] }, 	

	{id: 46483, name: 'Haywire', postname: 'haywire', schedules: [ {cinema: 'SM Fairview Cinema 4', runtime: '2:00, 4:10, 6:20, 8:30' } ,  {cinema: 'SM Mall of Asia Premiere', runtime: '6:50, 9:00 ' } ,  {cinema: 'SM Sta. Mesa Cinema 10', runtime: '1:00, 3:00, 5:00, 7:00, 9:00 ' } ,  {cinema: 'Robinsons Galleria Cinema 10', runtime: '7:45, 10:00 ' } ,  {cinema: 'SM North EDSA Cinema 10', runtime: '1:30, 3:30, 5:30, 7:30, 9:30' } ,  {cinema: 'Shangri-la Plaza Mall Cinema 3', runtime: '2:25, 4:50' } ,  {cinema: 'SM Southmall Cinema 6', runtime: '11:45, 1:50' } ,  {cinema: 'Glorietta 4 Cinema 2', runtime: '11:35, 1:40' } ,  {cinema: 'Gateway Cineplex 9', runtime: '1:50, 4:20, 6:50, 9:20 ' } ,  {cinema: 'SM San Lazaro Cinema 4', runtime: '7:45, 9:30' }   ] }, 	

	{id: 46482, name: 'My Cactus Heart', postname: 'my-cactus-heart', schedules: [ {cinema: 'SM Muntinlupa Cinema 4', runtime: '12:25, 3:00, 5:35, 8:10 ' } ,  {cinema: 'SM Southmall Cinema 2', runtime: '12:50, 3:00' } ,  {cinema: 'SM Manila Cinema 9', runtime: '12:50, 3:00, 5:10, 7:20, 9:30' } ,  {cinema: 'SM Megamall Cinema 12', runtime: '12:40, 2:55, 5:10, 7:25, 9:40' } ,  {cinema: 'SM Marikina Cinema 6', runtime: '1:30, 4:10, 6:50, 9:30' } ,  {cinema: 'SM Fairview Cinema 1', runtime: '12:40, 2:45, 4:50, 6:55, 9:00' } ,  {cinema: 'SM Sucat Cinema 3', runtime: '12:15, 2:30' } ,  {cinema: 'SM Mall of Asia Premiere', runtime: '2:30, 4:40' } ,  {cinema: 'Festival Supermall Cinema 10', runtime: '12:45, 2:55, 5:05, 7:15, 9:30' } ,  {cinema: 'SM Sta. Mesa Cinema 6', runtime: '1:00, 3:00, 5:00, 7:00, 9:00' }   ] }, 	

	{id: 46477, name: 'The Darkest Hour', postname: 'the-darkest-hour', schedules: [ {cinema: 'Gateway Cineplex 1', runtime: '2:15, 4:30, 6:45, 9:00' } ,  {cinema: 'Robinsons Metro East Cinema 1', runtime: '4:40, 6:50, 9:00' } ,  {cinema: 'SM Muntinlupa Cinema 3', runtime: '1:15, 3:30, 5:45, 8:00' } ,  {cinema: 'Festival Supermall Cinema 2', runtime: '11:00, 1:10, 3:20, 5:30, 7:40, 9:50 ' } ,  {cinema: 'Greenhills Promenade Cinema 3', runtime: '1:00, 3:15, 5:30, 7:45, 10:00' } ,  {cinema: 'Greenbelt 1 Cinema 2', runtime: '12:35, 2:40, 4:45, 6:50, 8:55' } ,  {cinema: 'SM Mall of Asia Cinema 2', runtime: '12:30, 2:30, 4:30, 6:30, 8:30, 10:30' } ,  {cinema: 'Robinsons Galleria Cinema 7', runtime: '1:20, 3:30, 5:40, 7:50, 10:00' } ,  {cinema: 'Gateway Globe Platinum Cinema', runtime: '2:15, 4:30, 6:45, 9:00' } ,  {cinema: 'Power Plant Cinema 5', runtime: '1:20, 3:20, 5:20, 7:20, 9:20' }   ] }, 	

	{id: 46475, name: 'Contraband', postname: 'contraband', schedules: [ {cinema: 'Eastwood City Walk Cinema-2', runtime: '2:50, 5:30 ' } ,  {cinema: 'Power Plant Cinema 6', runtime: '12:35, 3:05, 5:35 ' } ,  {cinema: 'SM Megamall Cinema 9', runtime: '7:10, 9:40 ' } ,  {cinema: 'Robinsons Galleria Cinema 10', runtime: '12:00, 2:30, 5:00' } ,  {cinema: 'TriNoma Cinema 3', runtime: '11:00, 1:25 ' } ,  {cinema: 'SM Southmall Cinema 2', runtime: '5:00, 7:15, 9:30 ' }   ] }, 	

	{id: 46473, name: 'Underworld Awakening', postname: 'underworld-awakening', schedules: [ {cinema: 'SM Mall of Asia Cinema 3', runtime: '2:30, 4:30, 6:30, 8:30, 10:30' } ,  {cinema: 'Ali Mall Cineplex 2', runtime: '1:30, 3:50, 6:10, 8:30' } ,  {cinema: 'SM Fairview Cinema 5', runtime: '2:30, 4:30, 6:30, 8:30' } ,  {cinema: 'SM Muntinlupa Cinema 1', runtime: '1:20, 3:40, 6:00, 8:20 ' } ,  {cinema: 'SM Mall of Asia Center Stage', runtime: '1:30, 3:30' } ,  {cinema: 'Robinsons Galleria Cinema 9', runtime: '1:00, 3:00, 5:00, 7:00, 9:00' } ,  {cinema: 'TriNoma Cinema 4', runtime: '12:00, 2:10' } ,  {cinema: 'Festival Supermall Cinema 8', runtime: '5:45, 7:45, 9:45 ' } ,  {cinema: 'SM Southmall Cinema 1', runtime: '1:30, 3:30, 5:30, 7:30, 9:30' } ,  {cinema: 'SM Megamall Cinema 3', runtime: '12:30, 2:45, 5:00, 7:15, 9:30 ' }   ] }, 	

	{id: 46471, name: 'Sherlock Holmes: A Game of Shadows', postname: 'sherlock-holmes-a-game-of-shadows', schedules: [ {cinema: 'SM Manila Cinema 12', runtime: '1:30, 4:00, 6:30, 9:00 ' } ,  {cinema: 'SM Marikina Cinema 8', runtime: '2:00, 4:30, 7:00, 9:30' }   ] }	
				]
	};


selectbox	 = "<select name=\"movie\" style=\"margin:0px; padding: 0px; font-size: 11px;\" onChange=\"if(this.value != '') { get_schedule(this.value); } else { document.getElementById('schedule').innerHTML=''; } \">";
selectbox	+= "<option value=\"\"></option>";

	selectbox += "<option value=\"0\">Chronicle</" + "option>" + "\n";
  	

	selectbox += "<option value=\"1\">Man on a Ledge</" + "option>" + "\n";
  	

	selectbox += "<option value=\"2\">The Descendants</" + "option>" + "\n";
  	

	selectbox += "<option value=\"3\">Journey 2: The Mysterious Island</" + "option>" + "\n";
  	

	selectbox += "<option value=\"4\">The Grey</" + "option>" + "\n";
  	

	selectbox += "<option value=\"5\">The Girl With the Dragon Tattoo</" + "option>" + "\n";
  	

	selectbox += "<option value=\"6\">Haywire</" + "option>" + "\n";
  	

	selectbox += "<option value=\"7\">My Cactus Heart</" + "option>" + "\n";
  	

	selectbox += "<option value=\"8\">The Darkest Hour</" + "option>" + "\n";
  	

	selectbox += "<option value=\"9\">Contraband</" + "option>" + "\n";
  	

	selectbox += "<option value=\"10\">Underworld Awakening</" + "option>" + "\n";
  	

	selectbox += "<option value=\"11\">Sherlock Holmes: A Game of Shadows</" + "option>" + "\n";
  	
selectbox += "</" + "select>";
  
  
function get_schedule(id)
{
	var sched = json;
  
  if(id)
  {
    sched = json.movies[id].schedules;
    slot  = '';
    slot  = '<div style="padding: 8px 8px 0px 8px; background-color: #FFFFFF; margin: 5px 0px 5px 0px; z-index: 99999; border: 2px solid #cc0000; _width: 150px;">';
    slot += '<div align="center" style="padding-bottom: 8px;"><a href="http://www.spot.ph/movie/' + json.movies[id].id + '/' + json.movies[id].postname + '" target="_top" style="color: #C00; font-weight: bold; text-decoration: none; font-size: 12px; font-family: arial;">' + json.movies[id].name + '</a></' + 'div>';
    
    if(sched.length > 0)
    {
			
      slot += '<div style="border: 1px solid #333; border-bottom: none;">';
      for(i=0; i < sched.length; i++) {
				
      	slot += '<div style="padding: 4px 4px 2px;"><strong>' + json.movies[id].schedules[i].cinema + '</strong></' + 'div>';
        slot += '<div style="border-bottom: 1px solid #333; padding: 4px 4px 2px;">' + json.movies[id].schedules[i].runtime + '</' + 'div>';

      }
      slot += '</' + 'div>';

    } else {

			slot += '<div>No screening time available. Pls click <a href="http://www.spot.ph/?p=' + json.movies[id].id + '" target="_top" style="text-decoration: underline; cursor: pointer">here</' + 'a> for details</' + 'div>';

    }

  slot += '<div align="right" style="padding: 4px 0;"><span style="color: #cc0000; cursor: pointer" onClick="document.getElementById(\'schedule\').innerHTML=\'\'"><strong>[Close]</strong></' + 'span></' + 'div>';
    slot += '</' + 'div>';
    document.getElementById("schedule").innerHTML = slot;
  } else {
    document.getElementById("schedule").innerHTML = slot;
  }
  
}

document.write(selectbox);
document.write("<div id=\"schedule\" style=\"z-index: 99999; position: absolute; font-family: verdana; font-size: 11px; \"></div>");
