var sm_sel = -1;
var sm_stats = 0;
var sm_m = new Array();
var sm_pfx = "m";
var sm_url = "../images/";
var menu_height = 23;
var add_width = 5;
var cell_class = "menucell";
var table_class = "menutable";
var sm_col = "#879D30";
var sm_colh = "#ffffff";
var Tout = 100;
var sm_t; 
var sm_p = -1; 
var sm_c = new Array(-1,-1); 
var ns4 = false;

function sm_init()
{
	for (var mnum=0; mnum<sm_m.length;mnum++)
	{
		sm_m[mnum][0][2] = new Image(); 
		sm_m[mnum][0][2].src = sm_url+sm_m[mnum][0][0]+"0.gif";
		sm_m[mnum][0][3] = new Image(); 
		sm_m[mnum][0][3].src = sm_url+sm_m[mnum][0][0]+"1.gif";
		var str = '<div id="smmenu'+mnum+'" style="visibility:hidden; position:absolute; cursor:hand;">';
		str += '<table class=' +table_class+ ' border="0" cellpadding="4" cellspacing="0" onmouseout="sm_out();">';
		for (var i=0; i<sm_m[mnum].length-1; i++)
			str += '<tr id="smrow'+mnum+'-'+i+'" onmouseover="sm_in('+mnum+', '+i+');" onclick="sm_click('+mnum+','+i+')"><td class=' +cell_class+ ' width=' + ((sm_m[mnum][0][2].width)+add_width-12) + '>'+sm_m[mnum][i+1][0]+'</td></tr>';
		str += '</table></div>';
		document.write( str );
	}

	if (!sm_stats)
	{
		sm_m[0][0][2].src = sm_url+sm_m[0][0][0]+"2.gif";
		sm_m[0][0][3].src = sm_url+sm_m[0][0][0]+"2.gif";
	}
}
function sm_in(n, m)
{
	if (m) sm_out();
	else
	{
		sm_clear();
		for (var i=0;i<sm_m.length;i++)
		{
			var d = document.getElementById("smmenu"+i);
			var l = sm_loc(document.getElementById(sm_pfx+i));
			d.style.left = l[0]; d.style.top = l[1]+menu_height;
		}
	}
	document.getElementById(sm_pfx+n).src = sm_m[n][0][3].src;
	document.getElementById("smmenu"+n).style.visibility = "";
	sm_c[0]=n;
	if (m>=0)
	{
		sm_c[1]=m;
		document.getElementById( "smrow"+sm_c[0]+"-"+sm_c[1] ).style.background = sm_colh;
	}
}
function sm_out()
{
	if (sm_c[0]>=0 && sm_c[1]>=0)
	{
		document.getElementById( "smrow"+sm_c[0]+"-"+sm_c[1] ).style.background = sm_col;
		sm_c[1]=-1;
	}
	if (sm_c[0]>=0) sm_p=sm_c[0]; sm_c[0]=-1;
	clearTimeout(sm_t);
	sm_t = setTimeout("sm_clear()", Tout);
}
function sm_click(n, sub)
{
	if (sub>=0) document.location = sm_m[n][sub+1][1];
	else if (sm_m[n][0][1]!="") document.location = sm_m[n][0][1];
	else return;
	sm_out();
}
function sm_clear()
{
	if (sm_c[0]==-1 && sm_p>=0)
	{
		document.getElementById(sm_pfx+sm_p).src = sm_m[sm_p][0][2].src;
		document.getElementById("smmenu"+sm_p).style.visibility = "hidden";
	}
}
function sm_loc(img) {
	if (ns4) return new Array(img.x, img.y);
	var x = img.offsetLeft; var y = img.offsetTop; var el = img.offsetParent;
	while (el != null) {
		x += el.offsetLeft; y += el.offsetTop; el = el.offsetParent;
	}
	return new Array(x, y);
}

sm_m[0] = new Array();
sm_m[0][0] = new Array("m2_hom", "../index.html");
sm_m[1] = new Array();
sm_m[1][0] = new Array("m2_abo", "../about/index.html");
sm_m[2] = new Array();
sm_m[2][0] = new Array("m2_pro", "../products/index.php");
sm_m[2][1] = new Array("Anthurium", "../products/index.php?type=thumbs&page=1&gallery=anthurium");
sm_m[2][2] = new Array("Heliconia", "../products/index.php?type=thumbs&page=1&gallery=heliconia");
sm_m[2][3] = new Array("Ginger", "../products/index.php?type=thumbs&page=1&gallery=ginger");
sm_m[2][4] = new Array("Musa", "../products/index.php?type=thumbs&page=1&gallery=musa");
sm_m[2][5] = new Array("Orchid", "../products/index.php?type=thumbs&page=1&gallery=orchid");
sm_m[2][6] = new Array("Zingiberaceae", "../products/index.php?type=thumbs&page=1&gallery=zingiberaceae");
sm_m[2][7] = new Array("Calathea", "../products/index.php?type=thumbs&page=1&gallery=calathea");
sm_m[2][8] = new Array("Ananas", "../products/index.php?type=thumbs&page=1&gallery=ananas");
sm_m[2][9] = new Array("others (local)", "../products/index.php?type=thumbs&page=1&gallery=others");
sm_m[2][10] = new Array("Roses", "../products/index.php?type=thumbs&page=1&gallery=roses");
sm_m[2][11] = new Array("Lilium", "../products/index.php?type=thumbs&page=1&gallery=lilium");
sm_m[2][12] = new Array("Carnation", "../products/index.php?type=thumbs&page=1&gallery=carnation");
sm_m[2][13] = new Array("Gladiolus", "../products/index.php?type=thumbs&page=1&gallery=gladiolus");
sm_m[2][14] = new Array("Crisantemum", "../products/index.php?type=thumbs&page=1&gallery=crisantemum");
sm_m[3] = new Array();
sm_m[3][0] = new Array("m2_alb", "../album/index.php");
sm_m[3][1] = new Array("Banquet", "../album/index.php?type=thumbs&page=1&gallery=banquet");
sm_m[3][2] = new Array("Flowers", "../album/index.php?type=thumbs&page=1&gallery=flower");
sm_m[3][3] = new Array("Tables", "../album/index.php?type=thumbs&page=1&gallery=table");
sm_m[3][4] = new Array("Marriage", "../album/index.php?type=thumbs&page=1&gallery=marriage");
sm_m[3][5] = new Array("Funeral", "../album/index.php?type=thumbs&page=1&gallery=funeral");
sm_m[3][6] = new Array("Offices and Hotels", "../album/index.php?type=thumbs&page=1&gallery=offices");
sm_m[3][7] = new Array("Exotica's Gardens", "../album/index.php?type=thumbs&page=1&gallery=gardens");
sm_m[4] = new Array();
sm_m[4][0] = new Array("m2_con", "../contact/index.html");

sm_sel = 0;
sm_stats = 1;
sm_init();

function scroll() {
 if (scroller.direction=='down')
  scroller.direction='up';
 else if (scroller.direction=='up')
  scroller.direction='down'; }