
function at_display(x)
{var win=window.open();for(var i in x)win.document.write(i+' = '+x[i]+'<br>');}
var at_timeout=50;function at_show_aux(parent,child)
{var p=document.getElementById(parent);var c=document.getElementById(child);p.className="active";if(c.offsetWidth<=0)
{c.style.position="absolute";c.style.visibility="visible";c.style.display="block";}
var direction=undefined;if(p.parentNode&&p.parentNode["at_position"]=="x")
direction=p.parentNode["at_direction"];var top=(c["at_position"]=="y")?p.offsetHeight:0;var left1=(c["at_position"]=="x")?p.offsetWidth:0;var left2=(c["at_position"]=="x")?-c.offsetWidth:0;var left3=(c["at_position"]=="x")?p.offsetWidth:0;for(;p;p=p.offsetParent)
{if(p.style.position!='absolute')
{left1+=p.offsetLeft;left2+=p.offsetLeft;top+=p.offsetTop;}
left3+=p.offsetLeft;}
if(direction)
{left=(direction=='right')?left1:left2;c['at_direction']=direction;}
else
{left=(left3+c.offsetWidth<document.body.offsetWidth)?left1:left2;c['at_direction']=(left3+c.offsetWidth<document.body.offsetWidth)?'right':'left';}
c.style.position="absolute";c.style.visibility="visible";c.style.display="block";c.style.top=top+'px';c.style.left=left+'px';}
function at_hide_aux(parent,child)
{document.getElementById(parent).className="parent";document.getElementById(child).style.visibility="hidden";document.getElementById(child).style.display="block";}
function at_show(e)
{var p=document.getElementById(this["at_parent"]);var c=document.getElementById(this["at_child"]);at_show_aux(p.id,c.id);clearTimeout(c["at_timeout"]);}
function at_hide()
{var c=document.getElementById(this["at_child"]);c["at_timeout"]=setTimeout("at_hide_aux('"+this["at_parent"]+"', '"+this["at_child"]+"')",at_timeout);}
function at_attach(parent,child,position)
{p=document.getElementById(parent);c=document.getElementById(child);p["at_child"]=c.id;c["at_child"]=c.id;p["at_parent"]=p.id;c["at_parent"]=p.id;c["at_position"]=position;p.onmouseover=at_show;p.onmouseout=at_hide;c.onmouseover=at_show;c.onmouseout=at_hide;}
function InStr(strSearch,charSearchFor)
{for(i=0;i<strSearch.length;i++)
{if(charSearchFor==Mid(strSearch,i,1))
{return i;}}
return-1;}
function dhtmlmenu_build_aux(parent,child,position)
{document.getElementById(parent).className="parent";document.write('<div class="vert_menu" id="'+parent+'_child">');var n=0;for(var i in child)
{if(i=='-')
{document.getElementById(parent).href=child[i];continue;}
if(typeof child[i]=="object")
{document.write('<a class="parent" id="'+parent+'_'+n+'">'+i+'</a>');dhtmlmenu_build_aux(parent+'_'+n,child[i],"x");}
else{if(child[i].substring(0,5)=="event"){moreEvents=true;the_rest=child[i];var all_events="";while(moreEvents){var firstpoint=the_rest.indexOf(':');var secondpoint=the_rest.indexOf(':',firstpoint+1);var thirdpoint=the_rest.indexOf(':',secondpoint+1);the_event=the_rest.substring(firstpoint+1,secondpoint);the_function=the_rest.substring(secondpoint+1,thirdpoint);all_events=all_events+' '+the_event+'="'+the_function+'" ';var the_rest=the_rest.substring(thirdpoint+1)
if(the_rest.substring(0,5)!="event")moreEvents=false;}
ref_point=the_rest.indexOf(':');the_ref=the_rest.substring(ref_point+1);the_thing='<a id="'+parent+'_'+n+'" href="'+the_ref+'" '+all_events+'>'+i+'</a>';document.write(the_thing);}
else document.write('<a id="'+parent+'_'+n+'" href="'+child[i]+'">'+i+'</a>');}
n++;}
document.write('</div>');at_attach(parent,parent+"_child",position);}
function dhtmlmenu_build(menu)
{for(var i in menu)dhtmlmenu_build_aux(i,menu[i],"y");}
function escapeHtml(s){if(!s)return s;var div=document.createElement('div');var text=document.createTextNode(s);div.appendChild(text);return div.innerHTML;}
function unescapeHtml(s){if(!s)return s;var div=document.createElement('div');div.innerHTML=s.replace(/<\/?[^>]+>/gi,'');return div.childNodes[0]?div.childNodes[0].nodeValue:'';}
function onReturn(ev,actionEnter,actionEsc){if(!ev)ev=window.event;if(ev&&ev.keyCode){if(actionEnter&&ev.keyCode==13)actionEnter(ev.srcElement?ev.srcElement:ev.currentTarget);if(actionEsc&&ev.keyCode==27)actionEsc(ev.srcElement?ev.srcElement:ev.currentTarget);}}
function createCookie(name,value,days){var expires="";if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString();}
document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name){createCookie(name,"",-1);}
function getAbsoluteTop(e){return e?e.offsetTop+getAbsoluteTop(e.offsetParent):0;}
function getAbsoluteLeft(e){return e?e.offsetLeft+getAbsoluteLeft(e.offsetParent):0;}
function getMousePos(evnt){if(document.all)evnt=event;this.evnt=evnt;var g=(document.all)?event.srcElement:evnt.currentTarget;this.g=g;if(document.all)this.x=evnt.offsetX;else this.x=evnt.layerX-1;if(document.all)this.y=evnt.offsetY;else this.y=evnt.layerY-1;}
function getAbsMousePos(e){if(!e)e=window.event;if(e.pageX||e.pageY){this.x=e.pageX;this.y=e.pageY;}
else if(e.clientX||e.clientY){this.x=e.clientX+document.body.scrollLeft
+document.documentElement.scrollLeft;this.y=e.clientY+document.body.scrollTop
+document.documentElement.scrollTop;}}
function ietruebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}
function windowWidth(){var w=0;if(typeof window.innerWidth=='number'){w=window.innerWidth;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){w=document.documentElement.clientWidth;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){w=document.body.clientWidth;}
return w;}
function windowHeight(){var h=0;if(typeof window.innerWidth=='number'){h=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){h=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){h=document.body.clientHeight;}
return h;}
function formatTxtPos(ra,de){if(typeof ra=="object"){de=ra.de;ra=ra.ra;}
return formatTxtRA(ra)+" "+formatTxtDE(de);}
function formatTxtRA(ra){if(ra<0){ra+=24;}else if(ra>=24){ra-=24;}
var hh=Math.floor(ra).toFixed(0);if(hh.length==1){hh="0"+hh;}
var mm=Math.floor(((ra-Math.floor(ra))*60)).toFixed(0);if(mm.length==1){mm="0"+mm;}
var ss=((ra*60-Math.floor(ra*60))*60).toFixed(2);if(ss.length==4){ss="0"+ss;}
return hh+" "+mm+" "+ss+"";}
function formatTxtDE(de){var deg=Math.floor(Math.abs(de)).toFixed(0);if(deg.length==1){deg="0"+deg;}
if(de<0){deg="-"+deg;}else{deg="+"+deg;}
var mm=Math.floor(Math.abs((Math.abs(de)-Math.floor(Math.abs(de)))*60)).toFixed(0);if(mm.length==1){mm="0"+mm;}
var ss=((Math.abs(de)*60-Math.floor(Math.abs(de*60)))*60).toFixed(1);if(ss.length==3){ss="0"+ss;}
return deg+" "+mm+" "+ss+"";}
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload)oldonload();func();}}}
var $;if(!$){$=function(s){return document.getElementById(s)};}
var dateFormat=function(){var token=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloZ]|"[^"]*"|'[^']*'/g,timezone=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,timezoneClip=/[^-+\dA-Z]/g,pad=function(value,length){value=String(value);length=parseInt(length)||2;while(value.length<length)
value="0"+value;return value;};return function(date,mask){if(arguments.length==1&&(typeof date=="string"||date instanceof String)&&!/\d/.test(date)){mask=date;date=undefined;}
date=date?new Date(date):new Date();if(isNaN(date))
throw"invalid date";var dF=dateFormat;mask=String(dF.masks[mask]||mask||dF.masks["default"]);var d=date.getDate(),D=date.getDay(),m=date.getMonth(),y=date.getFullYear(),H=date.getHours(),M=date.getMinutes(),s=date.getSeconds(),L=date.getMilliseconds(),o=date.getTimezoneOffset(),flags={d:d,dd:pad(d),ddd:dF.i18n.dayNames[D],dddd:dF.i18n.dayNames[D+7],m:m+1,mm:pad(m+1),mmm:dF.i18n.monthNames[m],mmmm:dF.i18n.monthNames[m+12],yy:String(y).slice(2),yyyy:y,h:H%12||12,hh:pad(H%12||12),H:H,HH:pad(H),M:M,MM:pad(M),s:s,ss:pad(s),l:pad(L,3),L:pad(L>99?Math.round(L/10):L),t:H<12?"a":"p",tt:H<12?"am":"pm",T:H<12?"A":"P",TT:H<12?"AM":"PM",Z:(String(date).match(timezone)||[""]).pop().replace(timezoneClip,""),o:(o>0?"-":"+")+pad(Math.floor(Math.abs(o)/60)*100+Math.abs(o)%60,4)};return mask.replace(token,function($0){return($0 in flags)?flags[$0]:$0.slice(1,$0.length-1);});};}();dateFormat.masks={"default":"ddd mmm d yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoFullDateTime:"yyyy-mm-dd'T'HH:MM:ss.lo"};dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thr","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};Date.prototype.format=function(mask){return dateFormat(this,mask);};
var enabletabpersistence=0;var tabcontentIDs=new Object()
function expandcontent(linkobj){var ulid=linkobj.parentNode.parentNode.id
var ullist=document.getElementById(ulid).getElementsByTagName("li")
for(var i=0;i<ullist.length;i++){ullist[i].className=""
if(typeof tabcontentIDs[ulid][i]!="undefined")
document.getElementById(tabcontentIDs[ulid][i]).style.display="none"}
linkobj.parentNode.className="selected"
document.getElementById(linkobj.getAttribute("rel")).style.display="block"
saveselectedtabcontentid(ulid,linkobj.getAttribute("rel"))
var new_url=linkobj.getAttribute("new_url");var iframe_name=linkobj.getAttribute("iframe_name");if(new_url!="nothing")reload_iframe(new_url,iframe_name);}
function expandtab(tabcontentid,tabnumber){var thetab=document.getElementById(tabcontentid).getElementsByTagName("a")[tabnumber]
if(thetab.getAttribute("rel"))
expandcontent(thetab)}
function savetabcontentids(ulid,relattribute){if(typeof tabcontentIDs[ulid]=="undefined")
tabcontentIDs[ulid]=new Array()
tabcontentIDs[ulid][tabcontentIDs[ulid].length]=relattribute}
function saveselectedtabcontentid(ulid,selectedtabid){if(enabletabpersistence==1)
setCookie(ulid,selectedtabid)}
function getullistlinkbyId(ulid,tabcontentid){var ullist=document.getElementById(ulid).getElementsByTagName("li")
for(var i=0;i<ullist.length;i++){if(ullist[i].getElementsByTagName("a")[0].getAttribute("rel")==tabcontentid){return ullist[i].getElementsByTagName("a")[0]
break}}}
function initializetabcontent(){for(var i=0;i<arguments.length;i++){if(enabletabpersistence==0&&getCookie(arguments[i])!="")
setCookie(arguments[i],"")
var clickedontab=getCookie(arguments[i])
var ulobj=document.getElementById(arguments[i])
var ulist=ulobj.getElementsByTagName("li")
for(var x=0;x<ulist.length;x++){var ulistlink=ulist[x].getElementsByTagName("a")[0]
if(ulistlink.getAttribute("rel")){savetabcontentids(arguments[i],ulistlink.getAttribute("rel"))
ulistlink.onclick=function(){expandcontent(this)
return false}
if(ulist[x].className=="selected"&&clickedontab=="")
expandcontent(ulistlink)}}
if(clickedontab!=""){var culistlink=getullistlinkbyId(arguments[i],clickedontab)
if(typeof culistlink!="undefined")
expandcontent(culistlink)
else
expandcontent(ulist[0].getElementsByTagName("a")[0])}}}
function getCookie(Name){var re=new RegExp(Name+"=[^;]+","i");if(document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return""}
function setCookie(name,value){document.cookie=name+"="+value}
var menu4=new Array()
menu4[0]='<a href="adopt_services.jsp"  ONMOUSEOVER="service_label8();"  ONMOUSEOUT="hideddrivetip();"><font color=white>Inhabit a Star</font></a>'
menu4[1]='<a href="add_new_media.jsp"  ONMOUSEOVER="service_label15();"  ONMOUSEOUT="hideddrivetip();"><font color=white><nobr>Add New Media to the Sky</nobr></font></a>'
menu4[2]='<a href="adopt_services.jsp?iii=gift"  ONMOUSEOVER="gift_label();"  ONMOUSEOUT="hideddrivetip();"><font color=white>A Star is the Best Gift!</font></a>'
var menu1=new Array();menu1[0]='<a href="javascript:img_source=\'DSS2\';updateImages();"  ONMOUSEOVER="dss2_label();"  ONMOUSEOUT="hideddrivetip();"><b><font color=white>DSS2 All Sky Survey</font></b></a>';menu1[1]='<a href="javascript:img_source=\'SDSS\';updateImages();"  ONMOUSEOVER="sdss_label();"  ONMOUSEOUT="hideddrivetip();"><b><font color=white>SDSS-III Sloan Digital Sky Survey</font></b></a>';menu1[2]='<a href="javascript:img_source=\'IRAS\';updateImages();"  ONMOUSEOVER="iras_label();"  ONMOUSEOUT="hideddrivetip();"><font color=white>Infrared Sky Survey (IRAS)</font></a>';menu1[3]='<a href="javascript:img_source=\'HALPHA\';updateImages();"  ONMOUSEOVER="halpha_label();"  ONMOUSEOUT="hideddrivetip();"><font color=white>H-Alpha Sky Survey</font></a>';menu1[4]='<a href="javascript:img_source=\'RASS\';updateImages();"  ONMOUSEOVER="rass_label();"  ONMOUSEOUT="hideddrivetip();"><font color=white>X-Ray Sky Survey (RASS3)</font></a>';menu1[5]='<a href="javascript:img_source=\'GALEX\';updateImages();"  ONMOUSEOVER="galex_label();"  ONMOUSEOUT="hideddrivetip();"><font color=white>Ultraviolet Sky Survey (GALEX)</font></a>';menu1[6]='<a href="javascript:img_source=\'IMG_all\';updateImages();"  ONMOUSEOVER="photosurvey_label();"  ONMOUSEOUT="hideddrivetip();"><font color=white>Astro Photo Survey</font></a>';menu1[7]='<a href="javascript:img_source=\'\';updateImages();"><b><font color=white>SKY-MAP</font><font color=red face=Arial>.ORG</font></b></a>';menu1[8]='<a href="javascript:img_source=\'SDSS7\';updateImages();"  ONMOUSEOVER="sdss_label();"  ONMOUSEOUT="hideddrivetip();"><b><font color=white>SDSS-II (Data Release 7)</font></b></a>';menu1[9]='<a><font color=white size=-1 style=\'font-size:7pt;font-weight:normal;\'>More surveys are coming...</font></a>';function getWhite(){return'#FFFFFF'}
function getGray(){return'#B0B0B0'}
function getUnderline(){return'underline'}
function getNone(){return'none'}
function get200px(){return'200px'}
var menuS=new Array();menuS[0]='<a href="javascript:img_source=\'DSS2\';updateImages();" style="color:#B0B0B0;text-decoration:none;" ONMOUSEOVER="this.style.color=getWhite();this.style.textDecoration=getUnderline();dss2_label();"  ONMOUSEOUT="this.style.color=getGray();this.style.textDecoration=getNone();hideddrivetip();">Open Sponsor&#8217;s Website</a>';menuS[1]='<a href="javascript:img_source=\'DSS2\';updateImages();" style="color:#B0B0B0;text-decoration:none;" ONMOUSEOVER="this.style.color=getWhite();this.style.textDecoration=getUnderline();dropdownmenu1(this, event, top_sponsors, get200px());"  ONMOUSEOUT="this.style.color=getGray();this.style.textDecoration=getNone();hideddrivetip();">20 Latest Top Sponsors</a>';menuS[2]='<a href="javascript:img_source=\'IRAS\';updateImages();" style="color:#B0B0B0;text-decoration:none;" ONMOUSEOVER="this.style.color=getWhite();this.style.textDecoration=getUnderline();iras_label();"  ONMOUSEOUT="this.style.color=getGray();this.style.textDecoration=getNone();hideddrivetip();">The Sky of All Top Sponsors</a>';menuS[3]='<a href="javascript:img_source=\'HALPHA\';updateImages();" style="color:#B0B0B0;text-decoration:none;" ONMOUSEOVER="this.style.color=getWhite();this.style.textDecoration=getUnderline();halpha_label();"  ONMOUSEOUT="this.style.color=getGray();this.style.textDecoration=getNone();hideddrivetip();">How to Become a Top Sponsor?</a>';menuS[4]='<a href="javascript:img_source=\'RASS\';updateImages();" style="color:#B0B0B0;text-decoration:none;" ONMOUSEOVER="this.style.color=getWhite();this.style.textDecoration=getUnderline();rass_label();"  ONMOUSEOUT="this.style.color=getGray();this.style.textDecoration=getNone();hideddrivetip();">Why to Sponsor SKY-MAP?</a>';menuS[5]='<a href="javascript:img_source=\'IMG_all\';updateImages();" style="color:#B0B0B0;text-decoration:none;" ONMOUSEOVER="this.style.color=getWhite();this.style.textDecoration=getUnderline();photosurvey_label();"  ONMOUSEOUT="this.style.color=getGray();this.style.textDecoration=getNone();hideddrivetip();">> Shoot Your Star!</a>';var menu2=new Array()
menu2[0]='<a href="http://cnn.com">CNN</a>'
menu2[1]='<a href="http://msnbc.com">MSNBC</a>'
menu2[2]='<a href="http://news.bbc.co.uk">BBC News</a>'
var menu3=new Array()
menu3[0]='<a href="http://news.com">News.com</a>'
menu3[1]='<a href="http://wired.com">Wired</a>'
menu3[2]='<a href="http://news.bbc.co.uk/2/hi/technology/default.stm">BBC Technology</a>'
var menuwidth='165px'
var menubgcolor='black'
var menubgcolor1='#404040'
var disappeardelay=250
var hidemenu_onclick="yes"
var ie4=document.all
var ns6=document.getElementById&&!document.all
if(ie4||ns6){document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
document.write('<div id="dropmenudiv1" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor1+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')}
function getposOffset(what,offsettype){var totaloffset=(offsettype=="left")?what.offsetLeft:what.offsetTop;var parentEl=what.offsetParent;while(parentEl!=null){totaloffset=(offsettype=="left")?totaloffset+parentEl.offsetLeft:totaloffset+parentEl.offsetTop;parentEl=parentEl.offsetParent;}
return totaloffset;}
function showhide(obj,e,visible,hidden,menuwidth){if(ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if(menuwidth!=""){dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth}
if(e.type=="click"&&obj.visibility==hidden||e.type=="mouseover")
obj.visibility=visible
else if(e.type=="click")
obj.visibility=hidden}
function iecompattest(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}
function clearbrowseredge(obj,whichedge){var edgeoffset=0
if(whichedge=="rightedge"){var windowedge=ie4&&!window.opera?iecompattest().scrollLeft+iecompattest().clientWidth-15:window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if(windowedge-dropmenuobj.x<dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth}
else{var topedge=ie4&&!window.opera?iecompattest().scrollTop:window.pageYOffset
var windowedge=ie4&&!window.opera?iecompattest().scrollTop+iecompattest().clientHeight-15:window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if(windowedge-dropmenuobj.y<dropmenuobj.contentmeasure){edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge}}
return edgeoffset}
function populatemenu(what){if(ie4||ns6)
dropmenuobj.innerHTML=what.join("")}
function dropdownmenu(obj,e,menucontents,menuwidth){if(window.event)event.cancelBubble=true
else if(e.stopPropagation)e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById?document.getElementById("dropmenudiv"):dropmenudiv
populatemenu(menucontents)
if(ie4||ns6){showhide(dropmenuobj.style,e,"visible","hidden",menuwidth)
dropmenuobj.x=getposOffset(obj,"left")
dropmenuobj.y=getposOffset(obj,"top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj,"rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj,"bottomedge")+obj.offsetHeight+"px"}
return clickreturnvalue()}
function dropdownmenu1(obj,e,menucontents,menuwidth){if(window.event)event.cancelBubble=true
else if(e.stopPropagation)e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById?document.getElementById("dropmenudiv1"):dropmenudiv1
populatemenu(menucontents)
if(ie4||ns6){showhide(dropmenuobj.style,e,"visible","hidden",menuwidth)
dropmenuobj.x=getposOffset(obj,"left")
dropmenuobj.y=getposOffset(obj,"top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj,"rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj,"bottomedge")+obj.offsetHeight+"px"}
return clickreturnvalue()}
function clickreturnvalue(){if(ie4||ns6)return false
else return true}
function contains_ns6(a,b){while(b.parentNode)
if((b=b.parentNode)==a)
return true;return false;}
function dynamichide(e){if(ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if(ns6&&e.currentTarget!=e.relatedTarget&&!contains_ns6(e.currentTarget,e.relatedTarget))
delayhidemenu()}
function hidemenu(e){if(typeof dropmenuobj!="undefined"){if(ie4||ns6)
dropmenuobj.style.visibility="hidden"}}
function delayhidemenu(){if(ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)}
function clearhidemenu(){if(typeof delayhide!="undefined")
clearTimeout(delayhide)}
if(hidemenu_onclick=="yes")
document.onclick=hidemenu
function slider(a_init,a_tpl){this.f_setValue=f_sliderSetValue;this.f_getPos=f_sliderGetPos;if(!window.A_SLIDERS)
window.A_SLIDERS=[];this.n_id=window.A_SLIDERS.length;window.A_SLIDERS[this.n_id]=this;var s_key;if(a_tpl)
for(s_key in a_tpl)
this[s_key]=a_tpl[s_key];for(s_key in a_init)
this[s_key]=a_init[s_key];this.n_pix2value=this.n_pathLength/(this.n_maxValue-this.n_minValue);if(this.n_value==null)
this.n_value=this.n_minValue;document.write('<div style="width:'+this.n_controlWidth+'px;height:'+this.n_controlHeight+'px;border:0; background-image:url('+this.s_imgControl+')" id="sl'+this.n_id+'base" name="sl'+this.n_id+'base" onmousedown="return f_controlMouseDown(event);">'+'<img src="'+this.s_imgSlider+'" width="'+this.n_sliderWidth+'" height="'+this.n_sliderHeight+'" border="0" style="position:absolute;left:'+this.n_pathLeft+'px;top:'+this.n_pathTop+'px;z-index:'+this.n_zIndex+';cursor:pointer;visibility:hidden;" name="sl'+this.n_id+'slider" id="sl'+this.n_id+'slider" onmousedown="return f_sliderMouseDown('+this.n_id+')"/></div>');this.e_base=document.getElementById('sl'+this.n_id+'base');this.e_slider=document.getElementById('sl'+this.n_id+'slider');if(document.onmousemove!=f_sliderMouseMove){window.f_savedMouseMove=document.onmousemove;document.onmousemove=f_sliderMouseMove;}
if(document.onmouseup!=f_sliderMouseUp){window.f_savedMouseUp=document.onmouseup;document.onmouseup=f_sliderMouseUp;}
var e_input=this.s_form==null?document.getElementById(this.s_name):document.forms[this.s_form]?document.forms[this.s_form].elements[this.s_name]:null;this.f_setValue(e_input&&e_input.value!=''?e_input.value:null,1);this.e_slider.style.visibility='visible';}
function f_controlMouseDown(e_event){if(window.n_activeSliderId!=null)return;if(!e_event&&window.event)e_event=window.event;var p=new f_imgMousePos(e_event);var sl=window.A_SLIDERS[0];var i_pos=(p.y-sl.n_pathTop)/sl.n_pix2value;i_pos=sl.n_maxValue-i_pos;if(i_pos>cur_value&&cur_value<sl.n_maxValue){cur_value=cur_value+1;sl.f_setValue(cur_value,1);reloadAll(cur_value);return;}
if(i_pos<cur_value-1&&cur_value>sl.n_minValue){cur_value=cur_value-1;sl.f_setValue(cur_value,1);reloadAll(cur_value);return;}}
function f_imgMousePos(evnt){var ns6=(document.getElementById&&!document.all)?1:0;if(document.all)evnt=event;this.evnt=evnt;var g=(document.all)?em=event.srcElement:evnt.currentTarget;this.g=g;if(ns6==1)this.x=evnt.layerX;else this.x=evnt.offsetX;if(ns6==1)this.y=evnt.layerY;else this.y=evnt.offsetY;}
function f_sliderSetValue(n_value,b_noInputCheck){if(n_value==null)
n_value=this.n_value==null?this.n_minValue:this.n_value;if(isNaN(n_value))
return false;if(this.n_step)
n_value=Math.round((n_value-this.n_minValue)/this.n_step)*this.n_step+this.n_minValue;if(n_value%1)
n_value=Math.round(n_value*1e5)/1e5;if(n_value<this.n_minValue)
n_value=this.n_minValue;if(n_value>this.n_maxValue)
n_value=this.n_maxValue;this.n_value=n_value;if(this.b_vertical)
this.e_slider.style.top=(this.n_pathTop+this.n_pathLength-Math.round((n_value-this.n_minValue)*this.n_pix2value))+'px';else
this.e_slider.style.left=(this.n_pathLeft+Math.round((n_value-this.n_minValue)*this.n_pix2value))+'px';cur_value=n_value;var e_input;if(this.s_form==null){e_input=document.getElementById(this.s_name);if(!e_input)
return b_noInputCheck?null:null;}
else{var e_form=document.forms[this.s_form];if(!e_form)
return b_noInputCheck?false:null;e_input=e_form.elements[this.s_name];if(!e_input)
return b_noInputCheck?false:null;}
e_input.value=n_value;return true;}
function f_sliderGetPos(b_vertical,b_base){var n_pos=0,s_coord=(b_vertical?'Top':'Left');var o_elem=o_elem2=b_base?this.e_base:this.e_slider;while(o_elem){n_pos+=o_elem["offset"+s_coord];o_elem=o_elem.offsetParent;}
o_elem=o_elem2;var n_offset;while(o_elem.tagName!="BODY"){n_offset=o_elem["scroll"+s_coord];if(n_offset)
n_pos-=o_elem["scroll"+s_coord];o_elem=o_elem.parentNode;}
return n_pos;}
function f_sliderMouseDown(n_id){window.n_activeSliderId=n_id;return false;}
function f_sliderMouseUp(e_event,b_watching){if(window.n_activeSliderId!=null){var o_slider=window.A_SLIDERS[window.n_activeSliderId];o_slider.f_setValue(o_slider.n_minValue+(o_slider.b_vertical?(o_slider.n_pathLength-o_slider.e_slider.offsetTop+o_slider.n_pathTop):(o_slider.e_slider.offsetLeft-o_slider.n_pathLeft))/o_slider.n_pix2value);if(b_watching)return;window.n_activeSliderId=null;reloadAll(cur_value);}
if(window.f_savedMouseUp)
window.f_savedMouseUp(e_event);}
function f_sliderMouseMove(e_event){if(!e_event&&window.event)e_event=window.event;var n_mouseX=e_event.clientX+f_scrollLeft();var n_mouseY=e_event.clientY+f_scrollTop();if(window.n_activeSliderId!=null){var o_slider=window.A_SLIDERS[window.n_activeSliderId];if(o_slider.b_vertical){var n_sliderTop=n_mouseY-o_slider.n_sliderHeight/2-o_slider.f_getPos(1,1)-3;if(n_sliderTop<o_slider.n_pathTop)n_sliderTop=o_slider.n_pathTop;var n_pxMax=o_slider.n_pathTop+o_slider.n_pathLength;if(n_sliderTop>n_pxMax)n_sliderTop=n_pxMax;o_slider.e_slider.style.top=Math.round(n_sliderTop)+'px';}else{var n_sliderLeft=n_mouseX-o_slider.n_sliderWidth/2-o_slider.f_getPos(0,1)-3;if(n_sliderLeft<o_slider.n_pathLeft)
n_sliderLeft=o_slider.n_pathLeft;var n_pxMax=o_slider.n_pathLeft+o_slider.n_pathLength;if(n_sliderLeft>n_pxMax)
n_sliderLeft=n_pxMax;o_slider.e_slider.style.left=n_sliderLeft+'px';}
if(o_slider.b_watch)
f_sliderMouseUp(e_event,1);return false;}
if(window.f_savedMouseMove)
return window.f_savedMouseMove(e_event);}
function f_scrollLeft(){return f_filterResults(window.pageXOffset?window.pageXOffset:0,document.documentElement?document.documentElement.scrollLeft:0,document.body?document.body.scrollLeft:0);}
function f_scrollTop(){return f_filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0);}
function f_filterResults(n_win,n_docel,n_body){var n_result=n_win?n_win:0;if(n_docel&&(!n_result||(n_result>n_docel)))
n_result=n_docel;return n_body&&(!n_result||(n_result>n_body))?n_body:n_result;}
function rightPanel(parent,width){this.parent=parent;this.left=0;this.top=0;this.maxWidth=width?width:250;this.minWidth=this.width;this.imgURL="http://sky-map.org/img/";this.width=0;this.height=0;this.bottom=0;this.right=0;this.toShow=false;this.d_main=document.createElement("DIV");this.d_main.id="RightPanel_div";var s=this.style=this.d_main.style;s.visibility='hidden';s.border="0px";s.margin="0px";s.padding="0px";s.position="absolute";s.overflow="hidden";this.parent.appendChild(this.d_main);this.spaceBetweenItems=5;this.setRight=function(r){this.right=r;};this.setBottom=function(r){this.bottom=r;};this.onresize=function(){if(!this.toShow){this.d_main.style.visibility='hidden';return;}
var h=this.bottom-this.top;this.updatePosX();var exp=new Array();var pos_y=0,i,item,a;var nc=this.d_main&&this.d_main.childNodes?this.d_main.childNodes.length:0;for(i=0;i<nc;i++){item=this.d_main.childNodes.item(i).ownerItem;if(item&&item.visible()){item.onresize();if(item.isExpanded){exp.push(item);}else{item.setY(pos_y);item.resetHeight();pos_y+=item.getHeight()+this.spaceBetweenItems;}}}
if(exp.length>0){this.updateWidth(this.maxWidth);var rm=h-pos_y-2;var hItem=Math.round((rm-this.spaceBetweenItems*(exp.length-1))/exp.length);var rm2=rm,n2=0;for(i=0;i<exp.length;i++){item=exp[i];item.setY(pos_y);item.resetHeight();if(item.getHeight()>hItem)n2++;else rm2-=item.getHeight()+this.spaceBetweenItems;}
hItem=Math.round((rm2-this.spaceBetweenItems*(n2-1))/n2);var itemToApplyRem=-1;var t_rm=rm;for(i=0;i<exp.length;i++){item=exp[i];a=item.getHeight();if(a>hItem){itemToApplyRem=i;a=hItem;}
t_rm-=a+(i+1<exp.length?this.spaceBetweenItems:0);}
for(i=0;i<exp.length;i++){item=exp[i];item.setY(pos_y);item.resetHeight();a=item.getHeight();if(a>hItem)a=hItem+(i==itemToApplyRem?t_rm:0);pos_y+=a;rm-=a;item.setHeight(a);if(i+1<exp.length){pos_y+=this.spaceBetweenItems;rm-=this.spaceBetweenItems;}}}else if(pos_y!=0){this.updateWidth(Math.min(this.maxWidth,Math.max(this.minWidth,this.getMinHeaderWidth())));}
if(pos_y==0){this.d_main.style.visibility='hidden';}else{this.d_main.style.visibility='visible';this.height=Math.min(h,pos_y+2);}
this.draw();};this.updateWidth=function(w){this.width=w;this.left=this.right-this.width;var nc=this.d_main&&this.d_main.childNodes?this.d_main.childNodes.length:0;for(var i=0;i<nc;i++){var item=this.d_main.childNodes.item(i).ownerItem;if(item)item.updateWidth(w);}};this.getMinHeaderWidth=function(){var minWidth=0;var nc=this.d_main&&this.d_main.childNodes?this.d_main.childNodes.length:0;for(var i=0;i<nc;i++){var item=this.d_main.childNodes.item(i).ownerItem;if(item&&item.visible()){var t=item.getMinHeaderWidth();if(minWidth<t)minWidth=t;}}
return minWidth;};this.addItem=function(title,options){var t=new rightPanelItem(this,title,options);this.d_main.appendChild(t.d_main);return t;};this.removeItem=function(item){this.d_main.removeChild(item.d_main);this.onresize();};this.show=function(b){this.toShow=b;this.onresize();};this.updatePosX=function(){var left=this.right-this.width;this.left=left;this.draw();};this.draw=function(){this.d_main.style.left=this.left+"px";this.d_main.style.top=this.top+"px";this.d_main.style.width=this.width+"px";this.d_main.style.height=this.height+"px";var nc=this.d_main&&this.d_main.childNodes?this.d_main.childNodes.length:0;for(var i=0;i<nc;i++)this.d_main.childNodes.item(i).ownerItem.draw();};}
function rightPanelItem(parentObj,title,options){this.parentObj=parentObj;this.title=title;if(options)this.options=options;else this.options={canCollapse:true,canClose:false};if(typeof this.options.canCollapse=='undefined')this.options.canCollapse=true;if(typeof this.options.canClose=='undefined')this.options.canClose=false;this.isExpanded=!this.options.canCollapse||this.options.expanded==true;this.left=0;this.top=0;this.width=parentObj.width;this.height=0;this.d_main=document.createElement("SPAN");this.d_main.ownerItem=this;var s=this.style=this.d_main.style;s.visibility='hidden';s.border="1px solid gray";s.position="absolute";s.left="0px";this.d_bg=document.createElement("DIV");this.d_bg.id="panelItem_d_bg";s=this.d_bg.style;s.position="absolute";s.left="0px";s.top="0px";s.width="100%";s.height="100%";s.margin="0px";s.backgroundColor='black';s.opacity=0.5;s.filter='alpha (opacity=50)';this.d_main.appendChild(this.d_bg);this.d_header=document.createElement("TABLE");this.d_header.id="panelItem_d_header";this.d_header.parentItem=this;this.d_header.cellSpacing=0;this.d_header.cellPadding=0;this.d_header.border=0;s=this.d_header.style;s.position="absolute";s.left="0px";s.top="0px";s.width="100%";s.height="18px";s.overflow="hidden";s.backgroundColor="#404040";s.color="white";s.fontSize="8pt";s.border="0px";this.d_headerRow=this.d_header.insertRow(-1);this.d_main.appendChild(this.d_header);if(this.options.canCollapse){this.btn_collapse=new Image;this.btn_collapse.parentItem=this;s=this.btn_collapse.style;s.border=0;s.width='15px';s.height='15px';s.cursor='pointer';this.btn_collapse.onclick=function(){this.title=='Collapse'?this.parentItem.collapse():this.parentItem.expand();}
this.btn_collapse.srcCollapse=this.parentObj.imgURL+'collapse.gif';this.btn_collapse.srcExpand=this.parentObj.imgURL+'expand.gif';this.btn_collapse.GALLERYIMG='no';this.btn_collapse.title='Collapse';var td=this.d_headerRow.insertCell(-1);td.style.width='15px';td.style.padding="1px";td.appendChild(this.btn_collapse);}
this.d_title=document.createElement("SPAN");this.d_title.id="panelItem_d_title";this.d_title.parentItem=this;s=this.d_title.style;s.overflow="hidden";s.color="white";s.fontSize="8pt";s.whiteSpace='nowrap';this.d_title.innerHTML='&nbsp;'+this.title;if(this.options.canCollapse){s.cursor='pointer';this.d_title.onclick=function(){this.title=='Collapse'?this.parentItem.collapse():this.parentItem.expand();}}
var td1=this.d_headerRow.insertCell(-1);td1.style.paddingLeft="1px";td1.appendChild(this.d_title);if(this.options.canClose){this.btn_close=new Image;this.btn_close.parentItem=this;s=this.btn_close.style;s.border=0;s.width='15px';s.height='15px';s.cursor='pointer';this.btn_close.onclick=function(){this.parentItem.close();}
this.btn_close.src=this.parentObj.imgURL+'icon_close.gif';this.btn_close.GALLERYIMG='no';this.btn_close.title='Close';var td2=this.d_headerRow.insertCell(-1);td2.style.width='16px';td2.style.textAlign='right';td2.appendChild(this.btn_close);}
this.d_body=document.createElement("SPAN");this.d_body.id="panelItem_d_body";this.d_body.parentItem=this;s=this.d_body.style;s.position="absolute";s.left="0px";s.top="18px";s.width="100%";s.overflowX="hidden";s.overflowY="auto";s.color="white";s.fontSize="8pt";this.d_main.appendChild(this.d_body);this.show=function(b){if(b!=this.visible()){this.d_main.style.visibility=b?'':'hidden';this.parentObj.onresize();}};this.visible=function(){return this.d_main.style.visibility!='hidden';};this.setY=function(y){this.top=y;};this.setHeight=function(h){this.d_body.style.height=(h-this.d_body.offsetTop)+'px';this.onresize();};this.getHeight=function(){return this.d_header.offsetHeight+(this.isExpanded?this.d_body.offsetHeight:0);};this.resetHeight=function(){this.d_body.style.height=null;};this.onresize=function(){var w=this.parentObj.width;var h=this.getHeight()+(document.all?2:0);if(w>0)this.width=w;if(h>0)this.height=h;if(this.btn_collapse){this.btn_collapse.src=this.isExpanded?this.btn_collapse.srcCollapse:this.btn_collapse.srcExpand;this.btn_collapse.title=this.isExpanded?'Collapse':'Expand';this.d_title.title=this.isExpanded?'Collapse':'Expand';this.d_body.style.visibility=this.isExpanded?'':'hidden';}};this.getLeft=function(){return getAbsoluteLeft(this.d_main);};this.getTop=function(){return getAbsoluteTop(this.d_main);};this.updateWidth=function(w){this.width=w;};this.getMinHeaderWidth=function(){var t=this.d_title.style.width;this.d_title.style.width='';this.d_title.innerHTML=this.d_title.innerHTML;var r=this.d_title.offsetWidth+(this.btn_close?this.btn_close.offsetWidth:0)+(this.btn_collapse?this.btn_collapse.offsetWidth:0)+6;this.d_title.style.width=t;return r;};this.collapse=function(){this.isExpanded=false;this.updateTitle();this.parentObj.onresize();if(this.onCollapse)this.onCollapse();};this.expand=function(){this.isExpanded=true;this.updateTitle();this.parentObj.onresize();if(this.onExpand)this.onExpand();};this.close=function(){if(this.onClose)this.onClose();this.parentObj.removeItem(this);};this.updateTitle=function(){if(this.isExpanded)
this.setTitle(this.titleExpanded?this.titleExpanded:this.title);else
this.setTitle(this.titleCollapsed?this.titleCollapsed:this.title);};this.setTitle=function(t){this.d_title.style.fontWeight=this.isExpanded?"bold":"normal";this.d_title.innerHTML=this.title=t;};this.setBody=function(t){var scrollTop=this.d_body.scrollTop;this.d_body.innerHTML=t;if(scrollTop>0)this.d_body.scrollTop=scrollTop;if(this.isExpanded)this.parentObj.onresize();};this.draw=function(){this.d_main.style.left=this.left+"px";this.d_main.style.top=this.top+"px";this.d_main.style.width=(this.width-(document.all?0:2))+"px";this.d_main.style.height=this.height+"px";};this.reset=function(){if(this.parentObj)this.parentObj.removeItem(this);};this.onresize();}