Данный скрипт надо кинуть в те страницы на каких страницах Вы хотите после </head> Code <style> <br> /* hint menu */ <br> .hint <br> { <br> background:url('http://sinners.pp.ua/img/1.1.gif'); <br> line-height:10px; <br> color:#1E90FF; <br> font-family:verdana,arial,helvetica; <br> font-size:8pt; <br> width:auto; <br> border-top:1px solid #1E90FF; <br> border-right:1px solid #1E90FF; <br> border-bottom:1px solid #1E90FF; <br> border-left:1px solid #1E90FF; <br> margin:1px; <br> padding:8px; <br> position:absolute; <br> visibility:hidden; <br> } <br> /* ---------------- */ <br> </style> <br><br> <script> <br> // Автор Скрипта: Danil Aka Fenik$ <br> //Hint Start <br> // CLASS : MW_System_Load <br> // Init <br> function MW_System_Load(){ <br> this.wib = screen.width; <br> this.heb = screen.height; <br> this.documes = (document.getElementById || document.createElement || document.getElementsByTagName) ? true : false; <br> this.objects = window.addEventListener || window.attachEvent ? window : document.addEventListener ? document : null; <br> this.types = 'load'; <br> } <br> MW_System_Load.prototype.addsevent = function(func){ <br> if(this.objects.addEventListener){ <br> this.objects.addEventListener(this.types,func,false); <br> return true; <br> } else if (this.objects.attachEvent){ <br> this.objects.attachEvent("on" + this.types,func); <br> } else { <br> return false; <br> } <br> } <br> MW_System_Load.prototype.browser = function(){ <br> this.ver = navigator.appVersion; <br> this.agent = navigator.userAgent.toLowerCase(); <br> this.dom = document.getElementById ? 1:0; <br> this.all = document.all ? 1:0; <br> this.ie5 = (this.ver.indexOf("MSIE 5")>-1 && this.dom) ? 1:0; <br> this.ie6 = (this.ver.indexOf("MSIE 6")>-1 && this.dom) ? 1:0; <br> this.ie4 = (document.all && !this.dom) ? 1:0; <br> this.ie = this.ie4 || this.ie5 || this.ie6; <br> this.opera = this.agent.indexOf("opera")>-1; <br> this.gecko = (this.agent.indexOf("gecko")!=-1) ? 1:0; <br> this.bw = (this.ie || this.opera || this.gecko); <br> return this; <br> } <br> MW_System_Load.prototype.findobj = function(obj){ <br> this.parent = window.document; <br> if(this.parent[obj]){ return this.parent[obj]; } <br> if(this.parent.all && this.parent.all[obj]){ return this.parent.all[obj]; } <br> if(this.parent.layers && this.parent.layers[obj]){ return this.parent.layers[obj]; } <br> if(this.parent.getElementById && this.parent.getElementById(obj)){ return this.parent.getElementById(obj); } <br> return null; <br> } <br> var MW = new MW_System_Load(); <br> function MW_System_Hint(){} <br> MW_System_Hint.prototype.show = function(obj,str){ <br> var hint = MW.findobj('hint'); <br> if(!obj){ return; } <br> if(!MW.documes){ return; } <br> if(!hint){ return; } <br> hint.className = 'hint'; <br> hint.style.left = 15; <br> hint.style.top = 50; <br><br> obj.onmouseout = function(advance){ <br> hint.style.width = ''; <br> hint.style.visibility = 'hidden'; <br> if(hint.firstChild) hint.removeChild(hint.firstChild); <br> hint.appendChild(document.createTextNode(str)); <br> }; <br> obj.onmousemove = function(advance){ <br> //str = str.replace(/</g,"<"); <br> //str = str.replace(/>/g,">"); <br> hint.style.width = ''; <br> hint.innerHTML = str; <br> vc = document.getElementsByTagName((document.compatMode && document.compatMode=="CSS1Compat") ? "HTML":"BODY")[0]; <br> x = window.event ? event.clientX + vc.scrollLeft : advance.pageX; <br> y = window.event ? event.clientY + vc.scrollTop : advance.pageY; <br> vcwidth = vc.clientWidth ? vc.clientWidth + vc.scrollLeft : window.innerWidth + window.pageXOffset; <br> vcheight = vc.innerHeight ? window.innerHeight + window.pageYOffset : vc.clientHeight + vc.scrollTop; <br> if(hint.offsetWidth>500){ hint.style.width = '200'; } <br> if((x + hint.offsetWidth + 15) > vcwidth){ <br> hint.style.left = x - hint.offsetWidth - 4; <br> } else { <br> hint.style.left = x + 15; <br> } <br> if((y + hint.offsetHeight + 19) > vcheight){ <br> hint.style.top = y - hint.offsetHeight; <br> } else { <br> hint.style.top = y + 25; <br> } <br> //if(typeof(hint.style.MozOpacity)!="undefined"){ <br> hint.style.opacity = '.91'; <br> hint.style.filter = "alpha(opacity:91)"; <br> //} <br> hint.style.visibility = 'visible'; <br> }; <br> } <br> MW_System_Hint.prototype.initialize = function(){ <br> var hint = document.createElement("DIV"); <br> hint.setAttribute('id','hint'); <br> document.getElementsByTagName('body')[0].appendChild(hint); <br> hint.style.visibility = 'hidden'; <br> var hintmarker = ['a','img','img','input','span','div','textarea']; <br> var textmarker = ['title','alt','title','title','title','title','title']; <br> var lenmarker = hintmarker.length; <br> for(var i=0; i<lenmarker; i++) { <br> atr = document.getElementsByTagName(hintmarker[i]); <br> for(var j=0; j<atr.length; j++) <br> if(viewhint=atr[j].getAttribute(textmarker[i])){ <br> atr[j].removeAttribute(textmarker[i]); <br> HINT.show(atr[j],viewhint); <br> } <br> } <br> } <br> var HINT = new MW_System_Hint(); <br> if(MW.objects){ MW.addsevent(HINT.initialize); } <br> //Hint End <br> </script><br>
|