/* Any usage of this JavaScript code or interface parts IS NOT allowed without owner's (Sergii Iavorskyi) agreement, since it is his intelectual property Please use contact form on site if you have any questions or offers. */ //--------------------------- .common/fixes.js -------------------------- try{ document.execCommand("BackgroundImageCache", false, true); }catch(err){} //--------------------------- .common/Extensions.class.js -------------------------- var Extensions={ isIE: navigator.appVersion.match(/MSIE/i), supportPNG24: !navigator.appVersion.match(/MSIE [65]/), setOpacity:function(opacity){ if(opacity<0){ opacity=0; } if(opacity>100){ opacity=100 } this.style.opacity = opacity/100; try{ this.style.filter = 'alpha(opacity=' + opacity + ')'; }catch(err){} this._opacity=opacity; }, getOpacity:function(){ if(typeof(this._opacity)=='undefined'){ return 100; } return this._opacity; }, getPos:function(obj){ var x=obj.offsetLeft; var y=obj.offsetTop; for(i=obj; i=i.offsetParent; x+=parseInt(i.offsetLeft),y+=parseInt(i.offsetTop)); return {x:x, y:y} }, getEventPos:function(e){ if (!e) var e = window.event; if (e.pageX){ posx = e.pageX; posy = e.pageY; }else if (e.clientY){ posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } return {x:posx, y:posy} }, createElement:function(elementName,addStyle,cssClassName){ var elm=document.createElement(elementName); if(typeof(addStyle)!='undefined'){ for(var property in addStyle){ elm.style[property]=addStyle[property]; } } if(typeof(cssClassName)!='undefined') elm.className=cssClassName; return elm; }, //---------------------css--------------------- addCssClass:function(element,className){ var patt=new RegExp(className,'i'); if(!patt.test(String(element.className))) element.className=element.className+' '+className; }, removeCssClass:function(element,className){ var patt=new RegExp('\s*'+className,'i'); if(patt.test(String(element.className))) element.className=String(element.className).replace(patt,''); }, //----------------scroll window--------------- scrollToTop:function(winObj){ var win=(typeof(winObj)=='undefined')?top:winObj; //Util.printObj(win); try{ win.scroll(0,0); }catch(err){} } } //--------------------------- .common/Util.js -------------------------- var Util={ posX:10, posY:10, showBlind:function(status){ if(!this.blind){ this.blind=((document.getElementsByTagName('body'))[0]).appendChild(document.createElement('div')); with(this.blind.style){ backgroundColor='transparent'; width='50px'; height='80px'; position='absolute'; top=0; left=0; zIndex='1000' } } }, //create debug layer (this.trace) debugLayer:null, trace:function(str){ if(!traceIsOn) return false; if(!this.debugLayer){ this.debugLayer=((document.getElementsByTagName('body'))[0]).appendChild(document.createElement('div')); this.debugLayer.innerHTML='clear
'; with(this.debugLayer.style){ position='absolute'; padding='10px'; color='#090'; backgroundColor='#fff'; top=this.posY+'px'; left=this.posX+'px'; zIndex='1000' } } this.debugLayer.innerHTML=this.debugLayer.innerHTML+'
'+str; }, ctrace:function(str){ this.clearDebug(); this.trace(str); }, printObj:function(obj){ this.trace('---------object----------'); for(var i in obj){ if(typeof(obj[i])=='function'){ this.trace(i+'=function(){...}') }else{ this.trace(i+'='+obj[i]) } } this.trace('--------end object-------'); }, clearDebug:function(){ this.debugLayer.innerHTML='clear
'; }, setPos:function(posX,posY){ this.posX=posX; this.posY=posY; if(this.debugLayer){ this.debugLayer.style.left=posX+'px'; this.debugLayer.style.top=posY+'px'; } } } //--------------------------- init-my-info.js -------------------------- window.onload=function(){ }