var inmenu=false;

var inmenu=false;

var lastmenu=0;

function Menu(current) {

   if (!document.getElementById) return;

   inmenu=true;

   oldmenu=lastmenu;

   lastmenu=current;

   if (oldmenu) Erase(oldmenu);

   m=document.getElementById(current);

   box=document.getElementById(current);

 

   box.style.visibility="visible";

//   m.style.backgroundColor="#CCCCCC";

//    box.style.backgroundColor="#99CCCC";

  

}

function Erase(current) {

   if (!document.getElementById) return;

   if (inmenu && lastmenu==current) {

	  return;

   }

   m=document.getElementById(current);

   box=document.getElementById(current);

   box.style.visibility="hidden";

//   m.style.backgroundColor="#CCCCCC";

}

function Timeout(current) {

   inmenu=false;

   window.setTimeout("Erase('" + current + "');",50);

}

function Highlight(menu,item,e) {

   if (!document.getElementById) return;

   inmenu=true;

   lastmenu=menu;

   obj=document.getElementById(item);

//   obj.style.backgroundColor="#99CCCC";



}

function UnHighlight(menu,item) {

   if (!document.getElementById) return;

   Timeout(menu);

   obj=document.getElementById(item);

//   obj.style.backgroundColor="#99CCCC";

}



//function popup() {

//windowprops = "height=280,width=270,left=10,top=10,location=no,menubar=no,titlebar=no,toolbar=no,resizable=no,scrollbars=no";

//window.open("http://www.earthscope.org/current_status/legend.html","",windowprops);

//}





function popup(width,height,url) {

heightstring = "height = " + height + ","; 

widthstring = "width = " + width + ","; 

windowprops = heightstring + widthstring + "left=10,top=10,location=no,menubar=no,titlebar=no,toolbar=no,resizable=no,scrollbars=no";

window.open(url,"",windowprops);

}





function setupWindow(title,width,height,src) {
	


heightstring = "height = " + height + ","; 

widthstring = "width = " + width + ","; 

windowprops = heightstring + widthstring + "left=10,top=10,location=no,menubar=no,titlebar=no,navigator=no,top=no,locationbar=no,statusbar=no,toolbar=no,resizable=no,scrollbars=no";

displayImage=window.open("","",windowprops);

displayImage.document.write("<html><head><title>" + title + "</title>");

displayImage.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><link rel='stylesheet' href='/earthscope.css' type='text/css'>");

displayImage.document.write("</head><body style='background-color:#FFFFFF'>");

displayImage.document.write("<img style='width:" + width + "px;' id='popup' src=" + src +">");

displayImage.document.write("</body</html>");

displayImage.document.close(); 

}



function setupGalleryWindow(caption,description,size,width,height,scroll,src) {

url="http://www.earthscope.org";

heightstring = "height = " + height + ","; 

widthstring = "width = " + width + ","; 

scrollstring = "scrollbars = " + scroll + ","; 

title="Image Gallery";

windowprops = scrollstring + heightstring + widthstring + "left=10,top=10,location=no,menubar=no,titlebar=no,navigator=no,top=no,locationbar=no,statusbar=no,toolbar=no,resizable=yes";

displayImage=window.open("","",windowprops);

displayImage.document.write("<html><head><title>" + title + "</title>");

displayImage.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><link rel='stylesheet' href='/earthscope.css' type='text/css'>");

displayImage.document.write("</head><body style='background-color:#CCCCCC'>");

displayImage.document.write("<img id='popup' width='" + width + "' src=" + url + src +">");

displayImage.document.write("<table width='"+ width +"'><tr><td  id='popupimage'><b><u>Caption:</b></u> " + description + "</td></tr>");

displayImage.document.write("<tr><td id='popupimage'><b><u>Photo Credit:</b></u> " + caption + "</td></tr>");

displayImage.document.write("<tr><td id='popupimage' align='center'><b>To download full-size image ("+size+"), right-click on image and select from menu</b></td></tr></table>");

displayImage.document.write("</body</html>");

displayImage.document.close(); 

}



function RegistrationFlyer(title,width,height,src) {

url="http://www.earthscope.org";

heightstring = "height = " + height + ","; 

widthstring = "width = " + width + ","; 

scrollstring = "scrollbars = " + scroll + ","; 

windowprops = scrollstring + heightstring + widthstring + "left=10,top=10,location=no,menubar=no,titlebar=no,navigator=no,top=no,locationbar=no,statusbar=no,toolbar=no,resizable=yes,scrollbars=yes";

displayImage=window.open("","",windowprops);

displayImage.document.write("<html><head><title>" + title + "</title>");

displayImage.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><link rel='stylesheet' href='/earthscope.css' type='text/css'>");

displayImage.document.write("</head><body style='background-color:#CCCCCC'>");

displayImage.document.write("<img id='popup' width='" + width + "' src=" + url + src +">");

displayImage.document.write("</body</html>");

displayImage.document.close(); 

}



function ResizableWindow(title,width,height,src) {

url="http://www.earthscope.org";

heightstring = "height = " + height + ","; 

widthstring = "width = " + width + ","; 

windowprops = heightstring + widthstring + "left=10,top=10,location=no,menubar=no,titlebar=no,navigator=no,top=no,locationbar=no,statusbar=no,toolbar=no,resizable=yes,scrollbars=yes";

displayImage=window.open("","",windowprops);

displayImage.document.write("<html><head><title>" + title + "</title>");

displayImage.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><link rel='stylesheet' href='/earthscope.css' type='text/css'>");

displayImage.document.write("</head><body style='background-color:#FFFFFF'>");

displayImage.document.write("<img id='popup' src=" + url + src +">");

displayImage.document.write("</body</html>");

displayImage.document.close(); 

}



