function open_content_img(s_showcase,s_desc)
{
	window.open('show_image.aspx?showcase=' + escape(s_showcase)+'&desc=' + escape(s_desc),'','scrollbars=no,resizable=yes,width=640,height=450');
}
var g_i_NextPre;
var g_s_gallery;
var arrPage;
arrPage = Array();
var g_i_TotalImages;
var g_i_PreSelPageIndex;

                
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; 
  
  if((p=n.indexOf("?"))>0&&parent.frames.length)
   {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function GalleryBig(gallery,ImageName,index) 
{
  //alert("gallery " + gallery + "\n ImageName " + ImageName + "\n index " + index);
  if (g_i_PreSelPageIndex > -1) 
    {
      var divflashObjPreSel = MM_findObj("Ucflashheader1_UcGalleryPaging1_" + g_i_PreSelPageIndex);
      divflashObjPreSel.className = "pageoff";
     }
  
  g_i_PreSelPageIndex = index;
                
  var divflashObj = MM_findObj("Ucflashheader1_UcGalleryPaging1_" + index);
  divflashObj.className = "pageon";
  
                
  g_i_NextPre = index;
  var divGalleryObj = MM_findObj("divGalleryBig");
  var imgGalleryBigImage = MM_findObj("imgGalleryBigImage");
  
  imgGalleryBigImage.src = "gallery/" + gallery + "/Big/" + ImageName;
  divGalleryObj.style.display = "";
  divGalleryObj.style.visibility = "visible";
    
}

function GalleryHidePageNav(gallery,ImageName) 
{
  var divGalleryObj = MM_findObj("divGalleryBig");
  var imgGalleryBigImage = MM_findObj("imgGalleryBigImage");
  
  imgGalleryBigImage.src = "gallery/" + gallery + "/Big/" + ImageName;
  
  Ucflashheader1_UcGalleryPaging1_tblMain.style.display = "none";
  Ucflashheader1_UcGalleryPaging1_tblMain.visibility = "hidden";
  
  divGalleryObj.style.display = "";
  divGalleryObj.style.visibility = "visible";
  
}

function hideDiv(gallery,ImageName) 
{
  var divGalleryObj = MM_findObj("divGalleryBig");
  divGalleryObj.style.display = "none";
  divGalleryObj.style.visibility = "hidden";
  
}

function GalleryBigMoveNext() 
{
  
  
  if (g_i_NextPre == g_i_TotalImages - 1)
  {
    g_i_NextPre = parseInt(g_i_NextPre);
    g_i_NextPre = 0;
  }
  else
  {
    g_i_NextPre = parseInt(g_i_NextPre);
    g_i_NextPre += 1;
  }

  var imgGalleryBigImage = MM_findObj("imgGalleryBigImage");
  imgGalleryBigImage.src = "gallery/" + g_s_gallery + "/Big/" + arrPage[0][g_i_NextPre];
  
  if (g_i_PreSelPageIndex > -1) 
    {
      var divflashObjPreSel = MM_findObj("Ucflashheader1_UcGalleryPaging1_" + g_i_PreSelPageIndex);
      divflashObjPreSel.className = "pageoff";
     }
  
  g_i_PreSelPageIndex = g_i_NextPre;
                
  var divflashObj = MM_findObj("Ucflashheader1_UcGalleryPaging1_" + g_i_NextPre);
  divflashObj.className = "pageon";
}

function GalleryBigMovePrevious() 
{
  if (g_i_NextPre == 0)
   {
    g_i_NextPre = g_i_TotalImages - 1;
   } 
  else
  {
     g_i_NextPre = parseInt(g_i_NextPre);
     g_i_NextPre -= 1;
  }
    
  var imgGalleryBigImage = MM_findObj("imgGalleryBigImage");
  imgGalleryBigImage.src = "gallery/" + g_s_gallery + "/Big/" + arrPage[0][g_i_NextPre];
  
  if (g_i_PreSelPageIndex > -1) 
    {
      var divflashObjPreSel = MM_findObj("Ucflashheader1_UcGalleryPaging1_" + g_i_PreSelPageIndex);
      divflashObjPreSel.className = "pageoff";
     }
  
  g_i_PreSelPageIndex = g_i_NextPre;
                
  var divflashObj = MM_findObj("Ucflashheader1_UcGalleryPaging1_" + g_i_NextPre);
  divflashObj.className = "pageon";
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
MM_preloadImages('images/ButtonMainOn.gif','images/ButtonMainOff.gif');