/*
//This script is available to use for any purpose as long as these lines of comment existed.
//This script is created by Axile on his free time at home and will work with IE6, FF1.5, and 
//probably with Netscape 8, Opera 8.5
*/
function createSubMenu(sid){
	var tblsub, padding, submenu;
	
	padding = "12";
	
	switch(sid)
	{
		case "productmenu":{
			submenu = "productsubmenu";
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='0' style='position:absolute;width:160px;visibility:hidden;' class='tbldyn'>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell' onmouseover=\"DynShowMenu('" + submenu + "')\" onmouseout=\"DynHideMenu('" + submenu + "')\">";
			tblsub = tblsub + "<a href='#'>";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "Rollite<sup>TM</sup> RollScreen";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "</a><img src='images/arrow.gif' border='0'>";
			tblsub = tblsub + createSubMenu(submenu);
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell'>";
			tblsub = tblsub + "<a href='rollite_silverscreen.html'>";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "Rollite<sup>TM</sup> SilverScreen";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			submenu2 = "productsubmenu2";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell' onmouseover=\"DynShowMenu('" + submenu2 + "')\" onmouseout=\"DynHideMenu('" + submenu2 + "')\">";
			tblsub = tblsub + "<a href='#'>";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "Rollite<sup>TM</sup> Verosol";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "</a><img src='images/arrow.gif' border='0'>";
			tblsub = tblsub + createSubMenu(submenu2);
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			submenu3 = "productsubmenu3";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell' onmouseover=\"DynShowMenu('" + submenu3 + "')\" onmouseout=\"DynHideMenu('" + submenu3 + "')\">";
			tblsub = tblsub + "<a href='#'>";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "Rollite<sup>TM</sup> Insect Net";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "</a><img src='images/arrow.gif' border='0'>";
			tblsub = tblsub + createSubMenu(submenu3);
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "</table>";
			break;
		}
		case "productsubmenu":{
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='0' style='position:absolute;width:160px;visibility:hidden;top:0px' class='tbldyn'>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell'>";
			tblsub = tblsub + "<a href='rollite_rollscreen.html'>";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "Rollite<sup>TM</sup> RollScreen";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell'>";
			tblsub = tblsub + "<a href='rollite_sunscreen.html'>";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "3 Drive Systems";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "</table>";
			break;
		}
		case "productsubmenu2":{
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='0' style='position:absolute;width:160px;visibility:hidden;top:40px' class='tbldyn'>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell'>";
			tblsub = tblsub + "<a href='rollite_verosol_pleated.html'>";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "Pleated";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell'>";
			tblsub = tblsub + "<a href='rollite_verosol_timber.html'>";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "Timber";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "</table>";
			break;
		}
		case "productsubmenu3":{
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='0' style='position:absolute;width:160px;visibility:hidden;top:60px' class='tbldyn'>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell'>";
			tblsub = tblsub + "<a href='rollite_insect_net_doors.html'>";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "Doors";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell'>";
			tblsub = tblsub + "<a href='rollite_insect_net_windows.html'>";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "Windows";
			tblsub = tblsub + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tblsub = tblsub + "</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "</table>";
			break;
		}
	}
	//alert(tblsub);
	return tblsub;
}

function fixMenu(show){
	var tbl, submenu, mainmenu;
	var padding;
	padding = "0";
	switch(show)
	{
		case "MainMenu":{
			mainmenu = "tblnav";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' style='width:30px; height:21px'>";
			tbl = tbl + "<a href='index.aspx' onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image1','','images/home_mover.jpg',1)\">";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "<img src='images/home_mout.jpg' border='0' name='Image1' id='Image1'>";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "MainMenu2":{
			mainmenu = "tblnav2";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' style='width:30px; height:21px'>";
			tbl = tbl + "<a href='rollite_aboutus.html' onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image2','','images/aboutus_mover.jpg',1)\">";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "<img src='images/aboutus_mout.jpg' border='0' name='Image2' id='Image2'>";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "MainMenu3":{
			submenu = "productmenu";
			mainmenu = "tblnav3";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' style='width:30px; height:21px' onmouseover=\"DynShowMenu('" + submenu + "')\" onmouseout=\"DynHideMenu('" + submenu + "')\">";
			tbl = tbl + "<a href='#' onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image3','','images/product_mover.jpg',1)\">";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "<img src='images/product_mout.jpg' border='0' name='Image3' id='Image3'>";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "</a>";
			tbl = tbl + "<br>"; //This line will make the submenu appear below the main one
			tbl = tbl + createSubMenu(submenu);
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "MainMenu4":{
			mainmenu = "tblnav4";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' style='width:30px; height:21px'>";
			tbl = tbl + "<a href='rollite_portfolio.html' onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image4','','images/profile_mover.jpg',1)\">";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "<img src='images/profile_mout.jpg' border='0' name='Image4' id='Image4'>";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "MainMenu5":{
			mainmenu = "tblnav5";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' style='width:30px; height:21px'>";
			tbl = tbl + "<a href='rollite_info.html' onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image5','','images/contactus_mover.jpg',1)\">";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "<img src='images/contactus_mout.jpg' border='0' name='Image5' id='Image5'>";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "MainMenu6":{
			mainmenu = "tblnav6";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' style='width:30px; height:21px'>";
			tbl = tbl + "<a href='contact_rollite.aspx' onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image6','','images/enquiry_mover.jpg',1)\">";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "<img src='images/enquiry_mout.jpg' border='0' name='Image6' id='Image6'>";
			tbl = tbl + "<img src='images/minitransparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
	}
	dt.write(tbl);
	//alert(tbl);
}
function writefooter(imode){
	if(imode=="0"){
		dt.write("<div align='center' class='footer'>Website content is Copyright &copy; Rollite<br>Website designed & developed by <a href='http://www.elveslab.com' target='_blank'>Elveslab</a></div>");
	}else{
		dt.write("<div align='center' class='footer'>Administrative Login<br>Website content is Copyright &copy; Rollite<br>Website designed & developed by <a href='http://www.elveslab.com' target='_blank'>Elveslab</a></div>");
	}
}

function highlightme(cell){
	var alphabetcells = "A;B;C;D;E;G;H;I;J;K;L;M;N;P;R;S;T;U".split(";");
	activecell = "td" + cell;
	//alert(alphabetcells.length);
	for(i=0; i<alphabetcells.length; i++){
		inactivecell = "td" + alphabetcells[i];
		//alert(inactivecell);
		document.getElementById(inactivecell).className = "inactivecell";
	}
	document.getElementById(activecell).className = "activecell";
	document.getElementById(activecell).focus();
}
