var sfdoLoad= document.all && document.getElementById; // IE only, and byId required below
sfHover = function() {
	if (sfdoLoad) { // unless done
		if (document.getElementById('navtop')) {
			var sfE2s = document.getElementById('navtop').getElementsByTagName('LI');
			if (sfE2s && (sfE2s.length > 0)) { // DOM is ready
				sfdoLoad= false; // mark done
				for (var i=0; i<sfE2s.length; i++) {
					sfE2s[i].onmouseover=function() {
						this.className+=" sfhover";
					}
					sfE2s[i].onmouseout=function() {
						this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
					}
				}
			}
		}
		if (document.getElementById('navleft')) {
			var sfE3s = document.getElementById('navleft').getElementsByTagName('LI');
			if (sfE3s && (sfE3s.length > 0)) { // DOM is ready
				sfdoLoad= false; // mark done
				for (var i=0; i<sfE3s.length; i++) {
					sfE3s[i].onmouseover=function() {
						this.className+=" sfhover";
					}
					sfE3s[i].onmouseout=function() {
						this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
					}
				}
			}
		}
	}
}
// fall back to body onLoad, which waits for all images to load
if (document.all) { // Load sfHover only in IE; other browsers don't need it
if (window.attachEvent) window.attachEvent("onload", sfHover);
else window.onload = sfHover; // Mac IE5 needs this
}

var popUpWin=0;
var popUpWin2=0;
function openWin(linkURL)
{
  if(popUpWin)
  {
  if (popUpWin && popUpWin.open && !popUpWin.closed) popUpWin.close();
  }
	var w = 700, h = 400; // default sizes
	var x = 100, y = 150; // default sizes
    var w1 = 100, h1 = 150;
	if (window.screen) {
	  if( typeof( window.screen.availWidth ) == 'number' ) {
	  w = window.screen.availWidth - 100;
	  h = window.screen.availHeight - 150;
	  }
	}
  popUpWin = window.open(linkURL, 'detailpage', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+w+',height='+h+',left=100,top=150,screenX=100,screenY=150');
  bringToTop = popUpWin.focus();
}
function closeWin() {
  if (popUpWin && popUpWin.open && !popUpWin.closed) popUpWin.close();
}

function openWin2(linkURL, width, height)
{
  if(popUpWin2)
  {
  if (popUpWin2 && popUpWin2.open && !popUpWin2.closed) popUpWin2.close();
  }
  w = width + 20;
  h = height + 20;
  popUpWin2 = window.open(linkURL, 'win2', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+w+',height='+h+',left=150,top=150,screenX=150,screenY=150');
  bringToTop = popUpWin2.focus();
}
function closeWin2() {
  if (popUpWin2 && popUpWin2.open && !popUpWin2.closed) popUpWin2.close();
}

