		function Film(title,info,subtitle,blurb,alink,pic) {
		  this.title = title;
		  this.info = info;
		  this.subtitle = subtitle;
		  this.blurb = blurb;
		  this.alink = alink;
		  this.pic = pic;
		}

		function gotoFilm(i) {


		  currentFilmIdx=i;
  		  var film = films[i];
		  document.getElementById("title").innerHTML = 	"<a href='"+film.alink+"'>"+film.title+"</a>";	
		  document.getElementById("info").innerHTML = film.info;
		  document.getElementById("sub").innerHTML = film.subtitle;		
		  document.getElementById("blurb").innerHTML = film.blurb;
		  document.getElementById("link").innerHTML = "<a href='"+film.alink+"'>Read More</a>";
		  document.getElementById("pic").src = "images/"+film.pic;
		if (i<films.length-1){
				$('a#btn_prev').show();
				if (i>0){
					$('a#btn_next').show();
				}else{
					$('a#btn_prev').hide();	
				}
			}else{
				 $('a#btn_next').hide();
			}		

		}		
		
    var currentFilmIdx=0;	
	var films = new Array();
	films[0] = new Film('At the End of Daybreak', 'Yuhang Ho/2009/94 mins','Cantonese with English subtitles','Malaysia, now. The 23-year-old Tuck Chai is dating Ying, a schoolgirl who isn\'t yet 16. They probably met in an internet chatroom. Their parents know nothing about the illicit relationship … until Ying\'s mother and father find birth-control pills in her room. That\'s when their worlds start to shatter.','f_daybreak.html','pic_daybreak2.jpg');
	films[1] = new Film('City Under Siege', 'Benny Chan/2010/90 mins','Cantonese with English subtitles','in 2015, Hong Kong, entire city alert drawing made police at the scene of the crime... The escort van falls turns, on the jewelry good wall to appear is in charge mystically; The strange criminal case occurs one after another, the suspect uses the weapon, is unexpectedly "unarmed"…','f_siege.html','pic_city3.jpg');
	films[2] = new Film('Dream Home','Edmond Pang/2010/95 mins','Cantonese with English subtitles','When she was a child, Cheng Lai Sheung (Josie Ho) could see Hong Kong\'s famed Victoria Habour from her apartment. Bus as time passed, the old buildings in front of her home were demolished to make way for a huge residential project - \'No.1 Victoria Bay\' - that now blocks her view. Increasingly disappointed and upset, she vowed to one day save up enough money for her family to move into \'No.1 Victoria Bay\' with a magnificant sea view.','f_dream.html','pic_dream1.jpg');
	films[3] = new Film('Echoes of the Rainbow','Alex Law/2010/117 mins','Cantonese with English subtitles','The film uses the sad but longing 1960s old Hong Kong as its backdrop. The story follows the travels of a small family - the father (Simon Yam), a shoemaker who makes new shoes everyday but yet always wears a pair of broken shoes, the optimistic and protective mother (Sandra Ng); the oldest son (Aarif Lee) - smart, athletic and optimistic about the future and love and the younger son (Chung Siu To) who is curious, can recite his alphabet backwards, and has the ability to make his parents laugh.','f_rainbow.html','pic_rainbow.jpg');
	films[4] = new Film('Love in a Puff','Edmond Pang/2010/104 mins','Mandarin with English subtitles','Since 2007, the Hong Kong Health Authority has implemented an anti-smoking law that bans smoking in all indoor areas. This pushes office smokers to take their cigarette breaks in the street. Smokers from neighboring buildings gradually bond and form a new community known as "Hot Pot Pack," as they would gather around a trash bin with an ashtray, sharing small talks with raunchy jokes like they are at a hot pot dinner.','f_puff.html','pic_puff2.jpg');
	films[5] = new Film('Rebellion','Herman Yau/2009/100 mins','Mandarin with English subtitles','The tension in a triad society heightens when the mob boss was found murdered. His top and most trusted man, Bao, decides to manage a new organisation and at the same time suppresses other triads who had previously been enjoying peace under the reign of the murdered boss. However, for a group of policemen, the fun is just beginning. For them, it is time to shake the triads down to its very foundations.','f_rebellion.html','pic_rebellion.jpg');
	films[6] = new Film('The Gallants','Derek Kwok &amp; Clement Cheng/2010/98 mins','Mandarin with English subtitles','"Law\'s Tea House" is out-of-date. Shopkeeper Dragon and chef Tiger are already late fifties old men who have waited for their paralyzed kung-fu master Law Sun to wake up for 30 years.','f_gallants.html','pic_gallants.jpg');
	films[7] = new Film('Vengeance','Johnnie To/2009/108 mins','Mandarin with English subtitles','A French chef swears revenge after a violent attack on his daughter\'s family in Hong Kong, during which her husband and her two children are murdered. To help him find the killers, he hires three local hit-men working for the mafia.','f_vengeance.html','pic_vengeance.jpg');


		function btn_prev() {
			currentFilmIdx--;
		  gotoFilm(currentFilmIdx);
		}

		function btn_next() {
			currentFilmIdx++;
			//alert(currentFilmIdx+" "+films.length-1);

		  gotoFilm(currentFilmIdx);		  
		}


