function preloadImage(path, id)
{
  images[id]=new Image();
  images[id].src=path; 
}



function setGalleryImage(obj)
{
  var tmp;
//  document.getElementById('gallery-image-name').innerHTML='<h2>'+images[id].name+'</h2>';
  document.getElementById('main-gallery-image').style.background=obj.style.background.replace('/thumb-s', '/thumb-m');
  //document.getElementById('main-gallery-image').style.background='#f00';

}


function showGalleryImage(path)
{
 // showImage(document.getElementById('main-gallery-image').src.replace('/thumb-m', ''), 1, 1);
}




var images=new Array();


function showDetail(url,w,h){

	wasOpen  = false;
  if ( (0<w) && (0<h) )
  {
	 win = window.open(url,'detail','left='+(screen.width/2-w/2)+', top='+(screen.height/2-h/2)+', width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}
	else
	{
    win = window.open(url);
  }
	win.focus();
  return (typeof(win)=='object')?true:false;

}    
