function reg_header(){
  document.write('<img src="/styles/ahavajd_header.png" alt="Ahava Jewelry Design" />');
  document.write('<table border="0" cellpadding="0" cellspacing="2">');
  document.write('<tr>');
  document.write('<td width="105" height="30" class="navtable" valign="middle" onmouseover="this.style.backgroundImage=\'url(/styles/buttonhover.png)\';" onmouseout="this.style.backgroundImage=\'url(/styles/button.png)\';" onClick="document.location.href=\'/index.php\';" style="cursor:pointer;cursor:hand"><center><a href="/index.php" class="navlinks">Home</a></center></td>');
  document.write('<td width="105" height="30" class="navtable" valign="middle" onmouseover="this.style.backgroundImage=\'url(/styles/buttonhover.png)\';" onmouseout="this.style.backgroundImage=\'url(/styles/button.png)\';" onClick="document.location.href=\'/products.php\';" style="cursor:pointer;cursor:hand"><center><a href="/products.php" class="navlinks">Products</a></center></td>');
  document.write('<td width="105" height="30" class="navtable" valign="middle" onmouseover="this.style.backgroundImage=\'url(/styles/buttonhover.png)\';" onmouseout="this.style.backgroundImage=\'url(/styles/button.png)\';" onClick="document.location.href=\'/about.php\';" style="cursor:pointer;cursor:hand"><center><a href="/about.php" class="navlinks">About</a></center></td>');
  document.write('<td width="105" height="30" class="navtable" valign="middle" onmouseover="this.style.backgroundImage=\'url(/styles/buttonhover.png)\';" onmouseout="this.style.backgroundImage=\'url(/styles/button.png)\';" onClick="document.location.href=\'/contact.php\';" style="cursor:pointer;cursor:hand"><center><a href="/contact.php" class="navlinks">Contact</a></center></td>');
  document.write('</tr>');
  document.write('</table>');
}
function iesix_header(){
  document.write('<img src="/styles/headerspacer.png" alt="Ahava Jewelry Design" style="background-image: none; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="ahavajd_header.png", sizingMethod="crop");" />');
  document.write('<table border="0" cellpadding="0" cellspacing="2">');
  document.write('<tr>');
  document.write('<td width="105" height="30" class="ienavtable" valign="middle"><center><a href="/index.php" class="navlinks">Home</a></center></td>');
  document.write('<td width="105" height="30" class="ienavtable" valign="middle"><center><a href="/products.php" class="navlinks">Products</a></center></td>');
  document.write('<td width="105" height="30" class="ienavtable" valign="middle"><center><a href="/about.php" class="navlinks">About</a></center></td>');
  document.write('<td width="105" height="30" class="ienavtable" valign="middle"><center><a href="/contact.php" class="navlinks">Contact</a></center></td>');
  document.write('</tr>');
  document.write('</table>');
}
function display_header(){
  var browsername=navigator.appName;
  var browserversion=navigator.appVersion;
  if(browsername=="Microsoft Internet Explorer"){
    var MSIEOffset=browserversion.indexOf("MSIE ");
    var version=parseFloat(browserversion.substring(MSIEOffset + 5, browserversion.indexOf(";", MSIEOffset)));
    if(version > 6){
      reg_header();
    }
    else{
      iesix_header();
    }
  }
  else{
    reg_header();
  }
}

function switch_product_img(divName, totalImgs) {
	for (var i=1; i<=totalImgs; i++) {
		var showDivName = 'photo_' + i;
		var showObj = document.getElementById(showDivName);
		if (showDivName == divName)
			showObj.style.display = 'block';
		else
			showObj.style.display = 'none';
	}
}