var curImg = 0;

function popupImg(imgName, cap) {
	curImg = imgName;
	img = imgName+"_800.jpg";
	window.open ("/includes/imgPreview.php?img="+img+"&cap="+cap, 'wPopup', 'scrollbars=0,toolbars=0,location=0,statusbar=0,width=800,height=650');
}

function popupSwf(url, w, h) {
	window.open (url, 'wPopup', 'scrollbars=1,resizable=1,toolbars=0,location=0,statusbar=0,width='+w+',height='+h+'');
}

function popupSImg(pid, imgId) {
	window.open ("/includes/imgSPreview.php?pid="+pid+"&img="+imgId, 'wPopup', 'scrollbars=0,toolbars=0,location=0,statusbar=0,width=800,height=614');
}

function showImg(imgName, caption) {
	//alert ("imgName: " + imgName);
	var mc = getFlashMovieObject('mov415');
	
	mc.SetVariable("isLoaded", 0);
	mc.SetVariable("imgID", imgName);
	mc.SetVariable("caption", caption);
	mc.GotoFrame(15);
	mc.Play();
}

function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}