home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 February
/
Chip_2003-02_cd1.bin
/
tema
/
mweil
/
poz.js
< prev
next >
Wrap
Text File
|
2002-12-18
|
4KB
|
137 lines
function lpos(vrstva,left,top)
{
if(document.all)
if(document.all[vrstva]){
document.all[vrstva].style.top=top;
document.all[vrstva].style.left=left;
}else{alert("Cannot find layer> "+vrstva);
}
else if(document.layers[vrstva]){
document.layers[vrstva].top=top;
document.layers[vrstva].left=left;
}
else{
alert("Either cannot find layer>"+ vrstva + ", \nor your browser does not support \nlayer positioning. Sorry.");
}
}
function lposr(vrstva,left,top) // relativne od posledniho lpos
{
if(document.all)
if(document.all[vrstva]){
document.all[vrstva].style.posTop+=top;
document.all[vrstva].style.posLeft+=left;
}else{alert("Cannot find layer> "+vrstva);
}
else if(document.layers[vrstva]){
document.layers[vrstva].top+=top;
document.layers[vrstva].left+=left;
}
else{
alert("Either cannot find layer >"+ vrstva + "<, \nor your browser does not support \nlayer positioning. Sorry.");
}
}
function lshow(vrstva)
{
if(document.all)
if(document.all[vrstva]){
document.all[vrstva].style.visibility="visible";
}else{alert("Cannot find no layer >"+vrstva+"< to show.");
}
else if(document.layers[vrstva]){
document.layers[vrstva].visibility="show";
}
else{
alert("Either cannot find layer >"+ vrstva + "< to show, \nor your browser does not support \nlayer positioning. Sorry.");
}
}
function lhide(vrstva)
{
if(document.all)
if(document.all[vrstva]){
document.all[vrstva].style.visibility="hidden";
}else{alert("Cannot find no layer >"+vrstva+"< to hide.");
}
else if(document.layers[vrstva]){
document.layers[vrstva].visibility="hide";
}
else{
alert("Either cannot find layer >"+ vrstva + "< to hide, \nor your browser does not support \nlayer positioning. Sorry.");
}
}
function lposz(vrstva,zetko)
{
if(document.all)
if(document.all[vrstva]){
document.all[vrstva].style.zIndex=zetko;
}else{alert("Cannot find no layer >"+vrstva+"< to z-positioning.");
}
else if(document.layers[vrstva]){
document.layers[vrstva].zIndex=zetko;
}
else{
alert("Either cannot find layer >"+ vrstva + "< to z-positioning, \nor your browser does not support \nlayer positioning. Sorry.");
}
}
function lclip(vrstva,x1,y1,x2,y2)
{
if(x1>x2) x1=x2;
if(y1>y2) y1=y2;
if(document.all)
if(document.all[vrstva]){
document.all[vrstva].style.clip= "rect("+ y1 +" " + x2 + " " + y2 + " " + x1 + ")";
}else{alert("Cannot find no layer >"+vrstva+"< to clip.");
}
else if(document.layers[vrstva]){
document.layers[vrstva].clip.left=x1;
document.layers[vrstva].clip.top=y1;
document.layers[vrstva].clip.right=x2;
document.layers[vrstva].clip.bottom=y2;
}
else{
alert("Either cannot find layer >"+ vrstva + "< to clip, \nor your browser does not support \nlayer positioning. Sorry.");
}
}
function getlx(vrstva)
{
var a;
if(document.all)
if(document.all[vrstva]){
a=document.all[vrstva].style.offsetLeft;
}else{alert("Cannot find layer> "+vrstva);
}
else if(document.layers[vrstva]){
a=document.layers[vrstva].pageX; //vzhledem ke strance
}
else{
alert("Either cannot find layer>"+ vrstva + ", \nor your browser does not support \nlayer positioning. Sorry.");
a=0;
}
return a;
}
function getly(vrstva)
{
var a;
if(document.all)
if(document.all[vrstva]){
a=document.all[vrstva].offsetTop;
}else{alert("Cannot find layer> "+vrstva);
}
else if(document.layers[vrstva]){
a=document.layers[vrstva].pageY;//vzhledem ke strance
}
else{
alert("Either cannot find layer>"+ vrstva + ", \nor your browser does not support \nlayer positioning. Sorry.");
a=0;
}
return a;
}