Cheery
.:МордератоР:. | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Код: // preload loading image var img=new Image() img.src='/images/loading_image.gif' var old_over function image_preview(url, obj) {var defv=1 if(typeof url=='object') {obj=url;url=defv} if(typeof url=='number'&&obj&&obj.src) if(obj.src.lastIndexOf('/')!=-1) url=obj.src.substr(0,obj.src.lastIndexOf('/')+1)+obj.src.substr(obj.src.lastIndexOf('/')+1+url) var bropacity=(document.all&&!window.opera&&!document.createTextRange)?"filter: alpha(opacity=80);"!window.opera?"-moz-opacity: 0.8;":"opacity: 0.8;") var div=document.createElement('div') div.style.cssText=bropacity+'width:'+get_ww()+'px;height:'+get_wh()+'px;position:absolute;top:0px;left:0px;background-color:#222222;z-index:100' div.id='hide_bg' document.body.appendChild(div) div=document.createElement('div') div.style.cssText='width:'+get_ww()+'px;height:'+get_wh()+'px;position:absolute;top:0px;left:0px;cursor:pointer;z-index:101' div.innerHTML='<table width="100%" height="100%"><tr><td valign="middle" align="center" style="background: transparent url(/images/loading_image.gif) no-repeat center center"><img src="'+url+'" style="visibility:hidden" onload="this.style.visibility=\'visible\'"></td></tr></table>' div.id='preview_pic' div.onclick=hide_preview div.title='Click to close' document.body.appendChild(div) old_over=document.body.style.overflow document.body.style.overflow='hidden' } function hide_preview() { var test=document.getElementById('preview_pic') if(test)document.body.removeChild(test) test=document.getElementById('hide_bg') if(test)document.body.removeChild(test) document.body.style.overflow=old_over==''?'auto':old_over } function get_ww() {var frameWidth=800 if (self.innerWidth) frameWidth = self.innerWidth else if (document.documentElement && document.documentElement.clientWidth) frameWidth = document.documentElement.clientWidth else if (document.body) frameWidth = document.body.clientWidth return frameWidth } function get_wh() {var frameHeight=640 if (self.innerHeight) frameHeight = self.innerHeight else if (document.documentElement && document.documentElement.clientHeight) frameHeight = document.documentElement.clientHeight else if (document.body) frameHeight = document.body.clientHeight return frameHeight } |
| Всего записей: 52737 | Зарегистр. 04-04-2002 | Отправлено: 20:36 01-12-2007 | Исправлено: Cheery, 20:41 01-12-2007 |
|