//parameters
menuWidth = 100;
var sSiteUrl = "http://www.spacegroup.us/"
if (screen.height>601){
menuFromTop = 5;
}else{
menuFromTop = 5;
}
textClass = 'SecBar';
color = '#E9E9EB';
llleft=0;
var BarID
function putLeft(iid){
switch (iid)
{
case 'case1':
llleft=144
lltop=500
BarID='bar1'
break
case 'case2':
llleft=144
lltop=385
BarID='bar2'
break
}
}
// creating layers - top, line, bottom, data, menu
// change table in accordance to needs
function top(iid,ileft,Lnum,BarID)
{
var dix;
if(document.all)
{
dix='<div dir=rtl id="'+iid+'" name="'+iid+'" onmouseout=init_hide("'+iid+'"); style="filter: alpha(Opacity=95);position:absolute;border: 0px solid black;z-index:110;background-color:#E9E9EB'
dix+='top:'+ileft+';left:226;width:'+menuWidth+';height:'+(Lnum*25+5)+';visibility:hidden;clip:rect(0,'+menuWidth+',0,0);z-index:120;">'
}
dix+='<table width="'+menuWidth+'"'
dix+=' border="0" cellspacing="0" cellpadding="0" style="cursor:hand">'
dix+=' <tr><td height="25"></td></tr>'
dix+='<tr><td><img src="'+sSiteUrl+'images/pixel.gif" width="10" height="3" border="0" alt=""></td></tr>'
//dix+='<Td bgcolor="'+color+'" rowspan="'+Lnum+'" width="4"><img src="pix.gif" width="4" height="2" border="0" alt=""></td></tr>'
document.write(dix);
}
function line(Llink,Ltxt)
{
document.write('<tr><td align="left" height="28" class="SecBar" style="cursor:hand"><a href="'+Llink+'" class="SecBar" style="cursor:hand;padding-top:6px;padding-left:7px;padding-right:7px;">'+Ltxt+'</a></td></tr>');
document.write('<tr><td bgcolor="#969493" height="1"><img src="'+sSiteUrl+'images/pixel.gif" width="1" height="1" border="0" alt=""></td></tr>');
}
function bottom()
{
if (document.all) {
document.write('<tr><td bgcolor="#2C683B" height="1"><img src="'+sSiteUrl+'images/pixel.gif" width="1" height="1" border="0" alt=""></td></tr>');
document.write('</table></div>')
};
}
// initiating menu
function menu(Mid,ileft) {
top(Mid,ileft,((arguments.length-2)/2)+5);
for (i=0;i<(arguments.length-2);i+=2) {
line(arguments[i+3],arguments[i+2]);
}
bottom();
}
// creating actions -
var upp = new Array;
var up = new Array;
var down = new Array;
var last = 0;
var zIdx = 1;
var z;
function init_show(Lid){
//llleft=jjj;
if (navigator.appVersion.indexOf("MSIE 5.5")==-1 && navigator.appVersion.indexOf("MSIE 6")==-1 )
{
return false;
}
putLeft(Lid) //GUY PUTING THE LEFT POSITION OF EVERY MENU
if(last != 0 )
{
if (last != Lid )
{
init_hide(last);
}
}
if (document.all)
{
last = Lid;
lay = eval(Lid);
down[Lid]=0;
lay.style.Zindex = ++zIdx;
lay.style.visibility = "visible";
//alert(lay.style.left)
//alert(llleft);
//alert(xMousePos)
//lay.style.left=screen.width-llleft;
//alert(((document.body.clientWidth-690)/2))
//alert(document.body.clientWidth);
//alert(parseInt((document.body.clientWidth*250)/1004));
//lay.style.left=document.body.clientWidth-parseInt((document.body.clientWidth*250)/1004);
//alert(document.body.clientWidth)
if(document.body.clientWidth<760){
lay.style.left=(760-((760-690)/2)-lltop)
}else{
lay.style.left=document.body.clientWidth-((document.body.clientWidth-690)/2)-lltop
}
//lay.style.left=xMousePos;
lay.style.top=llleft
show(Lid);
}
}
function show(Lid) {
if (document.all) {
lay = eval(Lid);
if (down[Lid] <= parseInt(lay.style.height)) {
eval('lay.style.clip = "rect(0px '+menuWidth+'px '+down[Lid]+'px 0px)"');
down[Lid]+=10;
z=setTimeout('show("'+Lid+'")',30);
}
else {
clearTimeout(z);
}
}
}
function init_hide(Lid) {
if (document.all)
{
lay1 = eval(Lid);
if(!lay1.contains(event.toElement))
{
clearTimeout(z);
hide(Lid);
}
}
}
function hide(Lid) {
if (document.all) {
var y;
lay1 = eval(Lid);
upp[Lid] = lay1.style.clip.split(" ");
up[Lid] = parseInt(upp[Lid][2]);
if (up[Lid] > 0) {
up[Lid] = up[Lid]-10;
eval('lay1.style.clip = "rect(0px '+menuWidth+'px '+ up[Lid] +'px 0px)"');
y=setTimeout('hide("'+Lid+'")',30);
}
else {
clearTimeout(y);
}
}
}
