// JavaScript Document

function lastover(row) { lastover = row; }

function clear()
{
	document.getElementById('r1').bgColor = '';
	document.getElementById('r2').bgColor = '';
	document.getElementById('r3').bgColor = '';
	document.getElementById('r4').bgColor = '';
	document.getElementById('r5').bgColor = '';
	document.getElementById('r6').bgColor = '';
	document.getElementById('r7').bgColor = '';
	document.getElementById('r8').bgColor = '';
	document.getElementById('r9').bgColor = '';
	document.getElementById('r10').bgColor = '';
	document.getElementById('r11').bgColor = '';
	document.getElementById('r12').bgColor = '';
	document.getElementById('r13').bgColor = '';
	document.getElementById('r14').bgColor = '';
	document.getElementById('r15').bgColor = '';
	document.getElementById('r16').bgColor = '';
	
	document.getElementById("eventtitle").innerHTML = "&nbsp;";
}

function defineEvent(element, mouseevent)
{
	var play;
	
	if(lastclick != "" && element !="")
	{
		green(element);
		
		if(lastclick == element) play = " <strong><font class='nowplaying'> Now Playing:</font></strong>";
		else play = " ";
	}
		
	switch(element)
	{
		case "r1" : element = "3 Feb 2007: Mr Paolo De Marchi ( Owner & Winemaker of Isole e Olena )" +
					"<br><font class='playedsubtitle'>Presentation of HIS fascinating and superb vintages</font>"; 
					break;
					
		case "r2" : element = "13 Mar 2007: Mr Mark Allen ( Winemaker of Louis Latour) " +
					"<br><font class='playedsubtitle'>Showcasing some of the Finest Burgundian wines</font>";
					break;
		
		case "r3" : element = "7 May 2007: Mr Evan Goldstein ( Master Sommelier, Vice President of Global Brand Education, "+
					"<br> Director of Academy of Wine ) " +
					"<font class='playedsubtitle'>Private premier tasting of Geyser Peak's Reserve range</font>";
					break;
					
		case "r4" : element = "15 Jun 2007: Oenologist Laurent Lozano ( Agronomic Engineer of Hennessy ) " +
					"<br><font class='playedsubtitle'>Hands-on session cultivating the Art of Blending for Wine Connoisseurs</font>";
					break;
					
		case "r5" : element = "25 Jun 2007: Mr George Samios ( Wine Ambassador of Foster's Wine Estate )" +
					"<br><font class='playedsubtitle'>Wine Appreciation of Classic WolfBass wines from Australia</font>";
					break;
					
		case "r6" : element = "20 Sep 2007: Mr Francesco d'Alessi ( Export Manager of Santa Margherita )" +
					"<br><font class='playedsubtitle'>Training cum introduction to Santa Margherita wines</font>";
					break;
					
		case "r7" : element = "30 Nov 2007: Constituency Business Social Gathering" +
					"<br><font class='playedsubtitle'>A business network discussion at The Wine Gallery</font>";
					break;
					
		case "r8" : element = "10 Mar 2008: Mr Henry Dawson-Damer ( Rosemount's Senior Wine Educator )" +
					"<br><font class='playedsubtitle'>Wine tasting indulging various Rosemount's limited-released wines</font>";
					break;
					
		case "r9" : element = "28 &amp; 29 Jun 2008: TWG Wine Fair 2008" +
					"<br><font class='playedsubtitle'>A 2-day grand fair with over 150 wine labels from all around the world for tasting</font>";
					break;
		
		case "r10" : element = "13 &amp; 14 Dec 2008: Festive Wine Fair 2008" +
					"<br><font class='playedsubtitle'>Sample over 100 wine labels in a cool warehouse cellar.</font>";
					break;
					
		case "r11" : element = "01 to 30 June 2009: June's Wine Journey" +
					"<br><font class='playedsubtitle'>Wine Fair that stretch for a month enabling everyone to discover wines from the old and new world.</font>";
					break;
					
		case "r12" : element = "14 October 2009: D'Areberg Tastings" +
					"<br><font class='playedsubtitle'>An evening tastings with Winemaker &amp; Brand Ambassador of D'Arenberg </font>";
					break;
					
		case "r13" : element = "25 November 2009: Lanson Champagne Tastings" +
					"<br><font class='playedsubtitle'>An intimate Champagne Tasting conducted by Export Director, Anton Hobbs</font>";
					break;
					
		case "r14" : element = "21 Nov - 12 Dec 2009: TWG Year End Wine Fair" +
					"<br><font class='playedsubtitle'>Another exciting journey to introduce and share great wines to public.</font>";
					break;
		
		case "r15" : element = "10 May 2010: Fritz Haag Tastings" +
					"<br><font class='playedsubtitle'>Savouring refined Rieslings from Mosel Region with Oliver Haag.</font>";
					break;
		
		case "r16" : element = "20 May 2010: Bordeaux Tastings" +
					"<br><font class='playedsubtitle'>Bordeaux Tastings with Hebrard Dominique + sampling some surprise wines from South Africa. </font>";
					break;
					
		case ""	  : element = ""; break;
	}
	
	if(element != "")
	{
		document.getElementById("eventtitle").innerHTML = "<font class='playedtitle'><b>"+ element + "</b></font>";
		
		if(play != undefined)
			document.getElementById("header").innerHTML = "Click on the events below to view its photo slides." + play;
	}
	else
	{
		document.getElementById("eventtitle").innerHTML = "&nbsp;";
		
		if(play != undefined)
			document.getElementById("header").innerHTML = "Click on the events below to view its photo slides." + play;
	}
}

//DO NOT EDIT FROM HERE..

function swop(RowClick, image) {
	
	clear();
	document.getElementById("large1").innerHTML = "<img src=\""+ image +".jpg\" border='3' style='border-color:#666666'/>";
	
	var winl = (screen.width - 950) / 2;
    var wint = (screen.height - 540) / 2;
    winprops = 'height=540,width=950,top='+wint+',left='+winl+'resizable=0';
	
	//if(image == "4/IMG_1796b")
	//window.open('http://www.thewinegallery.com.sg/gallery/LL_tasting/LL_tasting.html','mywindow', winprops);
	
	document.getElementById("large1").innerHTML =
	"<iframe src='"+ image +"/index.htm' width=350 height=263 scrolling='no' style='border:2px solid #6D5A4E' frameborder=0></iframe>"+
	"<div style='background:#fff url(hr.gif) repeat scroll center; height:5px'><hr style='display:none' /></div>";

	lastclick = RowClick;
	defineEvent(RowClick, "mc");
}

function green(element) {
	document.getElementById(element).bgColor = "#33CC00";
}

function highlight(element) {
	
	clear();
	document.getElementById(element).bgColor = "#CC0000";
			
	defineEvent(lastclick, 'mc');
}

function unhighlight(element) {

	document.getElementById(element).bgColor = "";
	//document.getElementById("large1").bgColor = "#FFFFFF";
	//document.getElementById("eventtitle").innerHTML = "&nbsp;";
	if(lastclick != "") {
		document.getElementById(lastclick).bgColor = "#CC0000";
		defineEvent(lastclick , 'mc');
	}
}

function Large1()
{
	clear();
	if(lastclick != "")
	{
		document.getElementById(lastclick).bgColor = "#CC0000";
		defineEvent(lastclick, 'mc');
	}
}