help ballon js source


var oldmousemove;
var mainmousemove;
var menu=null;

function help_move(e)
{
if(document.getElementById != null)
{
myhelp=document.getElementById("help1");
imyhelp=document.getElementById("ihelp1");
}
else
{
myhelp= eval("document.help1");
imyhelp= eval("document.ihelp1");
}

if (!e) var e = window.event;
if(e.pageX != null)
{
mx=e.pageX-75;
my=e.pageY+20;
}
else
{
mx=e.x-75;
my=e.y+20;
}
if (navigator.userAgent.indexOf('MSIE') != -1)
{
mx += document.body.scrollLeft;
my += document.body.scrollTop;
}
if(mx < 0)
mx=0;

if(mx+160 >= document.body.clientWidth)
mx=document.body.clientWidth-160;

if(myhelp.style != null)
{
myhelp.style.top=my;
myhelp.style.left=mx;
imyhelp.style.top=my;
imyhelp.style.left=mx;
//myhelp.style.visibility="visible";
}
else
{
myhelp.top=my;
myhelp.left=mx;
imyhelp.top=my;
imyhelp.left=mx;
//myhelp.visibility="visible";
}
}

function show_help_box(e,msg)
{
if(document.getElementById != null)
{
myhelp=document.getElementById("help1");
imyhelp=document.getElementById("ihelp1");
}
else
{
myhelp= eval("document.help1");
imyhelp= eval("document.ihelp1");
}

if(e.pageX != null)
{
mx=e.pageX-75;
my=e.pageY+20;
}
else
{
mx=e.x-75;
my=e.y+20;
}
if (navigator.userAgent.indexOf('MSIE') != -1)
{
mx += document.body.scrollLeft;
my += document.body.scrollTop;
}
if(mx < 0)
mx=0;

if(mx+160 >= document.body.clientWidth)
mx=document.body.clientWidth-160;

if(document.width != null && document.width > 200 && (mx+200) > document.width)
mx=document.width-200;
else if(window.top.document.body != null && window.top.document.body.clientWidth > 200 && (mx+200) > window.top.document.body.clientWidth)
mx=window.top.document.body.clientWidth-200;

if(myhelp.innerHTML != null)
myhelp.innerHTML=msg;
else
{
myhelp.document.write(msg);
myhelp.document.close();
}
imyhelp.style.height = myhelp.offsetHeight;

if(myhelp.style != null)
{
myhelp.style.top=my;
myhelp.style.left=mx;
myhelp.style.visibility="visible";
imyhelp.style.top=my;
imyhelp.style.left=mx;
imyhelp.style.visibility="visible";
}
else
{
myhelp.top=my;
myhelp.left=mx;
myhelp.visibility="visible";
imyhelp.top=my;
imyhelp.left=mx;
imyhelp.visibility="visible";
}
if(document.onmousemove != help_move)
{
oldmousemove=document.onmousemove;
document.onmousemove=help_move;
}
}
function hide_help_box()
{
if(document.getElementById != null)
{
myhelp=document.getElementById("help1");
imyhelp=document.getElementById("ihelp1");
}
else
{
myhelp= eval("document.help1");
imyhelp= eval("document.ihelp1");
}

if(myhelp.style != null)
{
myhelp.style.top=0;
myhelp.style.left=0;
imyhelp.style.left=-200;
myhelp.style.visibility="hidden";
imyhelp.style.visibility="hidden";
}
else
{
myhelp.top=0;
myhelp.left=0;
imyhelp.left=-200;
myhelp.visibility="hidden";
imyhelp.visibility="hidden";
}
document.onmousemove=oldmousemove;
}

function check_inmenu(e)
{
if (!e) var e = window.event;
if(e.pageX != null)
{
mx=e.pageX;
my=e.pageY;
}
else
{
mx=e.x;
my=e.y;
}

if(mx > 180 || my < (menu.offsetTop-30) || my > (menu.offsetTop+menu.offsetHeight))
{
document.onmousemove=mainmousemove;
menu.style.visibility="hidden";
menu=null;
}
}

function expand(menu_name)
{
if(menu != null)
menu.style.visibility="hidden";
else
mainmousemove=document.onmousemove;
menu=document.getElementById(menu_name);
menu.style.visibility="visible";
document.onmousemove=check_inmenu;
}

function select_tab(tab)
{
if(tab == 1)
{
document.IMG_TAB1.src='images/stats_brick_top_on.gif';
document.IMG_TAB2.src='images/qinvent_brick_top_off.gif';
document.getElementById("TAB1").style.visibility="visible";
document.getElementById("TAB2").style.visibility="hidden";

document.cookie="tab=1";
}
else
{
document.IMG_TAB1.src='images/stats_brick_top_off.gif';
document.IMG_TAB2.src='images/qinvent_brick_top_on.gif';
document.getElementById("TAB1").style.visibility="hidden";
document.getElementById("TAB2").style.visibility="visible";

document.cookie="tab=2";
}
}

Wyszukiwarka

Podobne podstrony:
map script js source
map script js source
help?llon js source
source30
Util js
Matrix3?pp source
Thread?pp source
arm biquad ?scade ?1 ?st q31? source
arm conv ?2? source
arm mat mult q15? source
Resource 8inl source
js zegarek na www
arm fir lattice init q31? source
arm fir ?cimate ?st q15? source
Animation js
source11
arm correlate ?st q15? source

więcej podobnych podstron