کد منوی متحرک کنار صفحه
<> <br>NS6 = (document.getElementById&&!document.all) <br>IE = (document.all) <br>NS = (navigator.appName=="Netscape" && <br>navigator.appVersion.charAt(0)=="4") <br>tempBar="";barBuilt=0;ssmItems=new Array(); <br>moving=setTimeout("null",1) <br>function moveOut() { <br>if ((NS6||NS)&&parseInt(ssm.left)<0 || IE && <br>ssm.pixelLeft<0) { <br>clearTimeout(moving);moving = setTimeout("moveOut()", <br>slideSpeed);slideMenu(10)} <br>else {clearTimeout(moving);moving=setTimeout("null",1)}}; <br>function moveBack() {clearTimeout(moving);moving = <br>setTimeout("moveBack1()", waitTime)} <br>function moveBack1() { <br>if ((NS6||NS) && parseInt(ssm.left)>(-menuWidth) || IE <br>&& ssm.pixelLeft>(-menuWidth)) { <br>clearTimeout(moving);moving = setTimeout("moveBack1()", <br>slideSpeed);slideMenu(-10)} <br>else {clearTimeout(moving);moving=setTimeout("null",1)}} <br>function slideMenu(num){ <br>if (IE) {ssm.pixelLeft += num;}if (NS||NS6) {ssm.left = <br>parseInt(ssm.left)+num;} <br>if (NS) {bssm.clip.right+=num;bssm2.clip.right+=num;}} <br>function makeStatic() { <br>if (NS||NS6) {winY = window.pageYOffset;} <br>if (IE) {winY = document.body.scrollTop;} <br>if (NS6||IE||NS) { <br>if (winY!=lastY&&winY>YOffset-staticYOffset) { <br>smooth = .2 * (winY - lastY - YOffset + staticYOffset);} <br>else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) { <br>smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));} <br>else {smooth=0} <br>if(smooth > 0) smooth = Math.ceil(smooth); <br>else smooth = Math.floor(smooth); <br>if (IE) bssm.pixelTop+=smooth; <br>if (NS6||NS) bssm.top=parseInt(bssm.top)+smooth <br>lastY = lastY+smooth; <br>setTimeout("makeStatic()", 1)}} <br>function buildBar() { <br>if(barText.indexOf("<IMG")>-1) {tempBar=barText} <br>else{for (b=0;b<barText.length;b++) <br>{tempBar+=barText.charAt(b)+"<BR>"}} <br>document.write("<td align="center" rowspan="100" <br>width=""+barWidth+"" bgcolor=""+barBGColor+"" <br>valign=""+barVAlign+""><p align="center"><font <br>face=""+barFontFamily+"" Size=""+barFontSize+"" <br>COLOR=""+barFontColor+""><B>"+tempBar+"</B></font></p></TD>")} <br>function initSlide() { <br>if <br>(NS6){ssm=document.getElementById("thessm").style;bssm=document.getElementById("basessm").style; <br>bssm.clip="rect(0 "+document.getElementById("thessm").offsetWidth+" <br>"+document.getElementById("thessm").offsetHeight+" <br>0)";ssm.visibility="visible";} <br>else if (IE) <br>{ssm=document.all("thessm").style;bssm=document.all("basessm").style <br>bssm.clip="rect(0 "+thessm.offsetWidth+" "+thessm.offsetHeight+" <br>0)";bssm.visibility = "visible";} <br>else if (NS) {bssm=document.layers["basessm1"]; <br>bssm2=bssm.document.layers["basessm2"];ssm=bssm2.document.layers["thessm"]; <br>bssm2.clip.left=0;ssm.visibility = "show";} <br>if (menuIsStatic=="yes") makeStatic();} <br>function buildMenu() { <br>if (IE||NS6) {document.write("<DIV ID="basessm" <br>style="visibility:hidden;Position : Absolute ;Left : "+XOffset+" ;Top : <br>"+YOffset+" ;Z-Index : 20;width:"+(menuWidth+barWidth+10)+""><DIV <br>ID="thessm" style="Position : Absolute ;Left : "+(-menuWidth)+" ;Top : <br>0 ;Z-Index : 20;" onmouseover="moveOut()" <br>onmouseout="moveBack()">")} <br>if (NS) {document.write("<LAYER name="basessm1" top=""+YOffset+"" <br>LEFT="+XOffset+" visibility="show"><ILAYER <br>name="basessm2"><LAYER visibility="hide" name="thessm" <br>bgcolor=""+menuBGColor+"" left=""+(-menuWidth)+"" <br>onmouseover="moveOut()" onmouseout="moveBack()">")} <br>if (NS6){document.write("<table border="0" cellpadding="0" <br>cellspacing="0" width=""+(menuWidth+barWidth+0)+"" <br>bgcolor=""+menuBGColor+""><TR><TD>")} <br>document.write("<table border="0" cellpadding="0" cellspacing="0" <br>width=""+(menuWidth+barWidth+0)+"" bgcolor=""+menuBGColor+"">"); <br>for(i=0;i<ssmItems.length;i++) { <br>if(!ssmItems[i][3]){ssmItems[i][3]=menuCols;ssmItems[i][5]=menuWidth-1} <br>else <br>if(ssmItems[i][3]!=menuCols)ssmItems[i][5]=Math.round(menuWidth*(ssmItems[i][3]/menuCols)-1); <br>if(ssmItems[i-1]&&ssmItems[i-1][4]!="no"){document.write("<TR>")} <br>if(!ssmItems[i][1]){ <br>document.write("<td bgcolor=""+hdrBGColor+"" HEIGHT=""+hdrHeight+"" <br>ALIGN=""+hdrAlign+"" VALIGN=""+hdrVAlign+"" WIDTH=""+ssmItems[i][5]+"" <br>COLSPAN=""+ssmItems[i][3]+""> <font face=""+hdrFontFamily+"" <br>Size=""+hdrFontSize+"" <br>COLOR=""+hdrFontColor+""><b>"+ssmItems[i][0]+"</b></font></td>")} <br>else {if(!ssmItems[i][2])ssmItems[i][2]=linkTarget; <br>document.write("<TD BGCOLOR=""+linkBGColor+"" <br>onmouseover="bgColor=\""+linkOverBGColor+"\"" <br>onmouseout="bgColor=\""+linkBGColor+"\"" WIDTH=""+ssmItems[i][5]+"" <br>COLSPAN=""+ssmItems[i][3]+""><ILAYER><LAYER <br>onmouseover="bgColor=\""+linkOverBGColor+"\"" <br>onmouseout="bgColor=\""+linkBGColor+"\"" WIDTH="100%" <br>ALIGN=""+linkAlign+""><DIV ALIGN=""+linkAlign+""><FONT <br>face=""+linkFontFamily+"" Size=""+linkFontSize+""> <A <br>HREF=""+ssmItems[i][1]+"" target=""+ssmItems[i][2]+"" <br>CLASS="new">"+ssmItems[i][0]+"</DIV></LAYER></ILAYER></TD>")} <br>if(ssmItems[i][4]!="no"&&barBuilt==0){buildBar();barBuilt=1} <br>if(ssmItems[i][4]!="no"){document.write("</TR>")}} <br>document.write("</table>") <br>if (NS6){document.write("</TD></TR></TABLE>")} <br>if (IE||NS6) {document.write("</DIV></DIV>")} <br>if (NS) {document.write("</LAYER></ILAYER></LAYER>")} <br>theleft=-menuWidth;lastY=0;setTimeout("initSlide();", 1)} <br>YOffset=1; XOffset=0; <br>staticYOffset=0; slideSpeed=20 waitTime=100; <br>menuBGColor="black"; <br>menuIsStatic="yes"; <br>menuWidth=130; menuCols=2; <br>hdrFontFamily="arial"; <br>hdrFontSize="2"; <br>hdrFontColor="white"; <br>hdrBGColor="white"; <br>hdrAlign="left"; <br>hdrVAlign="center"; <br>hdrHeight="15"; <br>linkFontFamily="arial"; <br>linkFontSize="2"; <br>linkBGColor="gray"; <br>linkOverBGColor="red"; <br>linkTarget="_top"; <br>linkAlign="left"; <br>barBGColor="black"; <br>barFontFamily="arial"; <br>barFontSize="3"; <br>barFontColor="white"; <br>barVAlign="center"; <br>barWidth=18; barText="MaHmOoD" <br>ssmItems[0]=["home", "http://khafankadeh.tk/", "_parent"] <br>ssmItems[1]=["E-mail us", "kkr129@yahoo.com/", "_parent"] <br>ssmItems[2]=["hmahmood ", "http://www.khafankadeh.7p.com", "_parent"] <br>ssmItems[3]=["Download", "http://www.hackeran.7p.com","_parent"] <br>buildMenu(); <br></>