//----------------------------------------------------------------------------------
// Change two frames on one click script

function menuLink(page)
{
   parent.main.location = page;
   parent.parent.frames['picsframe'].location.href = "pics.php";
}

//---------------------------------------------------------------------------------
// OpenWindow script

function OpenWindow(URL, width, height)
{
  window.open(URL, "XWindow", "width=" +  width + ", height=" + height+ ", scrollbars=1");
}  

//---------------------------------------------------------------------------------
// CoverWindow script

function CoverWindow(URL)
{
  window.open(URL, "CoverWindow", "width=460, height=500, scrollbars=0");
} 

//---------------------------------------------------------------------------------
// EmailWindow script

function EmailWindow()
{
  window.open("email.htm", "EmailWindow", "width=200, height=170, scrollbars=0");
}

//---------------------------------------------------------------------------------
// GalleryWindow script

function GalleryWindow(URL, format)
{
  if(format == "vertical"){
    window.open(URL, "GalleryWindow", "width=440, height=596, scrollbars=0");
  }
  else if(format == "horizontal"){
    window.open(URL, "GalleryWindow", "width=596, height=440, scrollbars=0");
  }
  else if(format == "square"){
    window.open(URL, "GalleryWindow", "width=440, height=440, scrollbars=0");
  }
}  

//---------------------------------------------------------------------------------
// Statusbar script

var next_event = "";

function StatusBar(x)
{
  window.status = x;
  return true;
}  

function getDefaultStatus(str){
  next_event = str;
  //alert(next_event);
  window.defaultStatus = next_event;
}

  
//------------------------------------------------------------------------------------
//expanding and collapsing menu scripts...


function displayAll()  
{
  var dropList = document.getElementsByTagName('span')
  for (var i = 0; i < dropList.length; i++)  
  {
    if (dropList.length > 1)  
    {
      dropList[i].style.display = '';
    }
  }
}

function whichSpan()  
{
  if (document.layers)  
  {
    document.write('<span class="droplist">');
  } 
  else 
  {
    document.write('<span class="droplist" style="display:none">');
  }
}

function dropMenu(ids,elmnt,index)  
{
var theElement = document.getElementById(ids);
var dropList = theElement.getElementsByTagName(elmnt);

  for(var i = 0; i < dropList.length; i++)  
  {
    if (dropList[i].style.display == '')  
    {
      dropList[i].style.display = 'none';
    } 
    else if (dropList[i].style.display = 'none')  
    {
      dropList[i].style.display = '';
    }
  }
}
