Участник


Зарегистрирован: Dec 2003
Место проживания: Москва
Публикаций: 108
Статус:  |
RaZEr
дык это не доверия нету это по правилам нельзя насколько я понял... там адрес сайта написан был.... если хочешь могу тебе его в приват выслать.... мне не жалко....
код скрипта:
PHP:
function CreateMenu(n,x,y,w,str,url,parent)
{
var s,lt;
if (ns4)
{
lt="LAYER";
}
else
{
lt="DIV";
}
if (ns4)
{
if (parent==null || parent=="")
{
s='<'+lt+ ' id=menu'+n+' left='+x+' top='+y+' width='+w+' visibility=hide onmouseover="showMenus('menu'+n+'','on','')" onmouseout="killMenus('menu'+n+'')">';
}
else
{
s='<'+lt+' id=menu'+n+' left='+x+' top='+y+' width='+w+' visibility=hide onmouseover="showMenus('menu'+n+','+parent+'','on','')" onmouseout="killMenus('menu'+n+','+parent+'')">';
}
}
else
{
s='<'+lt+' id=menu'+n+' style="VISIBILITY: hidden; Z-INDEX: '+n+'; POSITION: absolute; LEFT: '+x+'px; TOP: '+y+'px; WIDTH: '+w+'px;">';
}
s+='<table border=1 bordercolor="1B4D1B" cellspacing=0 cellpadding=1 >';
var mitems = str.split('|');
var urls = url.split('|');
for (i=0;i<mitems.length;i++)
{
turl=String(urls[i]);
mtype=String(urls[i]).substring(0,4);
if (parent==null || parent=="")
{
s+='<tr bgcolor="#1F581F" height=20><td onmouseover="this.style. backgroundColor='#112F11';showMenus('menu'+n+' ','on','')" onmouseout="this.style. backgroundColor='#1F581F';killMenus('menu'+n+' ')"><a href="'+turl+'" class="KlanMenu"><div style="width:100%"><img src="images/gan.gif" width=12 height=12> '+mitems[i]+' </div></a>';
}
else
{
s+='<tr><td onmouseover="this.style. backgroundColor='#000000';showMenus(''+parent+' ,menu'+n+'','on','')" onmouseout="this.style. backgroundColor='#000000';killMenus(''+parent+' ,menu'+n+'')"><a href="'+turl+'" class="KlanMenu"><div style="width:100%"> <img src="" width=6 height=6> '+mitems[i]+' </div></a>';
}
if(i!=mitems.length-1)
{
s+='</td></tr>';
}
else
{
s+='</td></tr>';
}
}
s+='</table>';
s+='</'+lt+'>\n';
document.write(s);
LMoveTo('menu'+n,x,y);
}
function Align(v,a)
{
if (v < a)
{
return a;
}
else
{
return v;
}
}
function AreaWidth()
{
if(oper || ns4)
{
return(window.innerWidth);
}
else if(ie4)
{
return(document.body.clientWidth);
}
}
function AreaHeight()
{
if(ns4 || oper)
{
return(window.innerHeight);
}
else if(ie4)
{
return(document.body.clientHeight);
}
}
function LMoveTo(ly,X,Y)
{
if(ie4)
{
document.all[ly].style.pixelLeft=X;
document.all[ly].style.pixelTop=Y;
}
else if(oper)
{
var el = document.getElementById(ly);
el.style.pixelLeft=X;
el.style.pixelTop=Y;
}
else if(ns5)
{
var el = document.getElementById(ly);
el.style.left=X;
el.style.top=Y;
}
else if(ns4)
{
document.layers[ly].left=X;
document.layers[ly].top=Y;
}
}
function LShow(ly)
{
if (ie4)
{
document.all[ly].style.visibility='visible';
}
else if(ns4)
{
document.layers[ly].visibility='show';
}
else if(oper || ns5)
{
document.getElementById(ly).style.visibility='visible';
}
}
function LGetVis(ly)
{
if(((ie4 || oper) && document.all[ly].style.visibility=='visible')||(ns4 && document.layers[ly].visibility=='show'))
{
return(1);
}
else
{
return(0);
}
}
function LHide(ly)
{
if(ie4)
{
document.all[ly].style.visibility='hidden';
}
else if(ns4)
{
document.layers[ly].visibility='hide';
}
else if(oper|| ns5)
{
document.getElementById(ly).style.visibility='hidden';
}
}
function LToggle(ly)
{
if(ie4)
{
if(document.all[ly].style.visibility == 'hidden')
{
document.all[ly].style.visibility = 'visible';
}
else
{d
ocument.all[ly].style.visibility = 'hidden';
}
}
else if(ns4)
{
if(document.layers[ly].visibility == 'hide')
{
document.layers[ly].visibility = 'show';
}
else
{
document.layers[ly].visibility = 'hide';
}
}
else if(oper|| ns5)
{
if(document.getElementById(ly).style.visibility == 'hidden')
{
document.getElementById(ly).style.visibility = 'visible';
}
else
{
document.getElementById(ly).style.visibility = 'hidden';
}
;}
}
var layertimer;
var lastmenues;
var active = 0;
function killMenus(strWen, strStatus)
{
layertimer = setTimeout("showMenus('"+strWen+"', 'off')", 300);
return false;
}
function killMenusNS(strWen)
{
if (ns4)
{
killMenus(strWen);
}
}
function showMenus(strWen, strStatus, strCoord)
{
if(strStatus == "on")
{
if(layertimer)
{
clearTimeout(layertimer)
}
}
var tempWen = strWen.split(",");
var strOut="";
if(DOCloaded)
{
clearTimeout(active);
if(lastmenues)
{
tempLastmenues = lastmenues.split(",");
for (i=0;i<tempLastmenues.length;i++)
{
LHide(tempLastmenues[i]);
}
lastmenues = null;
}
if(strStatus=="on")
{
if(strCoord!=null && strCoord!="")
{
tempCoord = strCoord.split("|")
}
tempActualLayers=strWen.split(",")
for (i=0; i < tempWen.length; i++)
{
if(strCoord!=null && strCoord!="")
{
T = tempCoord[i].split(",")
if (T[0]!="" && T[1]!="")
{
LMoveTo(tempActualLayers[i], T[0], T[1]);
}
}
LShow(tempActualLayers[i])
}
lastmenues = strWen;
}
}
else
{
active = setTimeout("showMenus('" + strWen + "','" + strStatus + "','" + strCoord + "')",2000);
}
return false;
}
и вот собстенно код расположения менющек, где 2 чило (из скобок) расположение менюшки от края левого, а 3 число - от верха:
PHP:
CreateMenu(2,80,175,210,"История","#.html","","");
CreateMenu(3,230,175,230,"Ð_ейтинг","#.html","");
CreateMenu(4,440,175,210,"Форум","#.html","");
CreateMenu(5,680,175,210,"пр","#.html","");
var DOCloaded = true;
вот...
Сообщить модератору об этом сообщении | Предупреждение | IP: определен
|