var win = null;
var s;
var t;
var l;
var header;
var imgSource;
  
function enlargeImg( header, imgSource, type ) {
  
  win = window.open( "", "", "toolbar=no, status=no, menubar=no, resizable=no, scrollbars=yes, top=50, left=50, width=700, height=550", true );

  if( type == 'gif' ) type = "gif";
  else type = "jpg";
  
  win.document.write( "<html>" +
					    "<head>" + 
						  "<title>ELY's GLASS</title>" + 
						  "<link href='styleSheet.css' rel='stylesheet' type='text/css'>" +
						"</head>" +
					    "<body style='background-color:#FFFFFF;'>" +
						  "<table style='border-width:0px; width:100%; height:100%;' cellspacing='0' cellpadding='0' class='txtE' id='linkC'>" +
                            "<tr>" +
							   "<td style='text-align:center; padding-top:5px; vertical-align:top;'>" + 
							     "<span style='font-weight:bold;'>" + header + "</span>" + 
								 "<br />" + "<img src='products/" + imgSource + "." + type + "' style='border:1px solid #000000; margin-top:10px; margin-bottom:10px;' />" + 
							   "</td>" +
                            "</tr>" +
							"<tr>" +
							   "<td style='text-align:center; vertical-align:bottom; height:20px; padding:5px; background-color:#EFEFEF; border-top:1px solid #000000;'>" +
							     "<a href='javascript:window.close();'>: close window</a></div>" +
							   "</td>" +
							"</tr>" +
                          "</table>" +
						"</body>" +
					  "</html>" );
  win.document.close();
  win = null;
}

function popUpPage( page ) {  
  var pg = page + ".asp"

  var leftValue = 10;  
  var topValue  = 10;
  if( page == "patterned_glass" ) {
    leftValue = 0;
	topValue  = 0;
  }
  
  window.open( pg, "popUpPage", "toolbar=no, status=no, menubar=no, resizable=no, scrollbars=yes, top=" + topValue + ", left=" + leftValue + ", width=700, height=580", true ); 
}

function show( button ) {
	document.getElementById( "homeBtRO" ).style.display = "none";
	document.getElementById( "aboutBtRO" ).style.display = "none";
	document.getElementById( "productBtRO" ).style.display = "none";
	document.getElementById( "propManBtRO" ).style.display = "none";
	document.getElementById( "tradesBtRO" ).style.display = "none";
	document.getElementById( "showroomsBtRO" ).style.display = "none";
	document.getElementById( "factoryBtRO" ).style.display = "none";
	document.getElementById( "contactBtRO" ).style.display = "none";
	document.getElementById( "hardwareBtRO" ).style.display = "none";
	
	document.getElementById( "homeBt" ).style.display = "block";
	document.getElementById( "aboutBt" ).style.display = "block";
	document.getElementById( "productBt" ).style.display = "block";
	document.getElementById( "propManBt" ).style.display = "block";
	document.getElementById( "tradesBt" ).style.display = "block";
	document.getElementById( "showroomsBt" ).style.display = "block";
	document.getElementById( "factoryBt" ).style.display = "block";
	document.getElementById( "contactBt" ).style.display = "block";
	document.getElementById( "hardwareBt" ).style.display = "block";
	
	document.getElementById( button ).style.display = "none";
	document.getElementById( button + "RO" ).style.display = "block";
  }
  function hide( button ) {
  	document.getElementById( "homeBtRO" ).style.display = "none";
	document.getElementById( "aboutBtRO" ).style.display = "none";
	document.getElementById( "productBtRO" ).style.display = "none";
	document.getElementById( "propManBtRO" ).style.display = "none";
	document.getElementById( "tradesBtRO" ).style.display = "none";
	document.getElementById( "showroomsBtRO" ).style.display = "none";
	document.getElementById( "factoryBtRO" ).style.display = "none";
	document.getElementById( "contactBtRO" ).style.display = "none";
	document.getElementById( "hardwareBtRO" ).style.display = "none";
	
	document.getElementById( "homeBt" ).style.display = "block";
	document.getElementById( "aboutBt" ).style.display = "block";
	document.getElementById( "productBt" ).style.display = "block";
	document.getElementById( "propManBt" ).style.display = "block";
	document.getElementById( "tradesBt" ).style.display = "block";
	document.getElementById( "showroomsBt" ).style.display = "block";
	document.getElementById( "factoryBt" ).style.display = "block";
	document.getElementById( "contactBt" ).style.display = "block";
	document.getElementById( "hardwareBt" ).style.display = "block";
	
	document.getElementById( button + "RO" ).style.display = "none";
	document.getElementById( button ).style.display = "block";	
  }