/**
 * OverGT for GamerCards & SACS scripts by Soshen <nipponart.org>
 *
 * @version 1.0
 * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
 * @author (c) Original js script by Rich McGirr http://rmcgirr83.org
 * @created 2010
 */
 
 var cancelImage = false, loadingImage = './safegt/loading.gif', ol_text = '';
function overlibImage(imagePath)
{
  bgImage=new Image();
  bgImage.src=imagePath;
  
  if(!bgImage.complete)
  {
    overlib(BACKGROUND,loadingImage,FGCOLOR,'',WIDTH,16,HEIGHT,16,VAUTO,HAUTO,OFFSETX,30);
    cancelImage=false;
    bgImage.onload=function()
    {   
      if(!cancelImage)
      {
        var substringpos=bgImage.src.length-imagePath.length;
        if(bgImage.src.substring(substringpos)==imagePath)
        {
          overlib(BACKGROUND,imagePath,FGCOLOR,'',WIDTH,bgImage.width,HEIGHT,bgImage.height,VAUTO,HAUTO,OFFSETX,30);
        }
      }
    }
  }
  else
  {
    overlib(BACKGROUND,imagePath,FGCOLOR,'',WIDTH,bgImage.width,HEIGHT,bgImage.height,VAUTO,HAUTO,OFFSETX,30);
  }
}

function overlibMouseout()
{
  cancelImage=true;
  return nd();
}
