function shimImage(img){img.src = "images/spacer.gif" }

var zoomOn =true;

function getFlashMovie(movieName) {
	var fm = document.getElementsByName(movieName);
	return fm ? fm[0] : null;
}

function setImage(img, zoom, zoomTagKey) {
	var t = document.getElementById("mainImage");
	if(t != null) {
	  t.src = img;
	}
	else {
	  var m = getFlashMovie("zoomContent");
	  if(m != null) {
	    m.setImageUrls(img, zoom);
	    m.setProductKey(zoomTagKey);
	  }
	}
}

function setZoom(on) {
    alert("setZoom: " + on);
	var t = document.getElementById("mainImage");
	if(t == null) {
	  var m = getFlashMovie("zoomContent");
	  if(m != null) m.setZoom(on);
	}
}

function zoomTag(tag){
	var szoom = s_gi(s_account);
	szoom.pageName = 'productImagesPopupZoom';
	szoom.prop1 = tag;
	szoom.t();
}


function isEmailAddr(email) {
	var result = false
	var theStr = new String(email)
	var index = theStr.indexOf("@");
	if (index > 0) {
		var pindex = theStr.indexOf(".",index);
		if ((pindex > index+1) && (theStr.length > pindex+1))
			result = true;
	}
	return result;
}

//	PRINT COMMAND FOR USING ON A MAC
var da = (document.all) ? 1 : 0;
var pr = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1);

self.focus();

function printMe()
{
  printThis();
  return false;
}

function printThis()
{
  if (pr) { // NS4, IE5
    window.print();
  } else if (da && !mac) { // IE4 (Windows)
    setTimeout("vbPrintPage();", 100);    //vbPrintPage();
  } else { // other browsers
    alert("To print this page, click OK, then press Command-P.");
  }
}

function printFrame(frame)
{
  if (pr && da)
  { // IE5
    frame.focus();
    window.print();
    link.focus();
  }
  else if (pr)
  { // NS4
    frame.print();
  }
  else if (da && !mac)
  { // IE4 (Windows)
    frame.focus();
    setTimeout("vbPrintPage(); link.focus();", 100);
  }
  else
  { // other browsers
    alert("To print this page, click OK, then press Command-P.");
  }
}

if (da && !pr && !mac) with (document) {
  writeln('<'+ 'OBJECT ID="WB" WIDTH="0" HEIGHT="0" CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></'+'OBJECT'+ '>');
  writeln('<' + 'SCRIPT LANGUAGE="VBScript">');
  writeln('Sub window_onunload');
  writeln('  On Error Resume Next');
  writeln('  Set WB = nothing');
  writeln('End Sub');
  writeln('Sub vbPrintPage');
  writeln('  OLECMDID_PRINT = 6');
  writeln('  OLECMDEXECOPT_DONTPROMPTUSER = 2');
  writeln('  OLECMDEXECOPT_PROMPTUSER = 1');
  writeln('  On Error Resume Next');
  writeln('  WB.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER');
  writeln('End Sub');
  writeln('<' + '/SCRIPT>');
}
//	END PRINT COMMAND
