/*
http://nornix.sourceforge.net/
Build date: 2007-07-27 16:01:39+00:00
*/
var Nornix={};Nornix.addEvent=function(_1,_2,fn,_4){};Nornix.removeEvent=function(_5,_6,fn,_8){};if(document.addEventListener){Nornix.addEvent=function(_9,_a,fn,_c){_9.addEventListener(_a,fn,_c);};Nornix.removeEvent=function(_d,_e,fn,_10){_d.removeEventListener(_e,fn,_10);};}else{if(document.attachEvent){Nornix.addEvent=function(obj,_12,fn){obj["e"+_12+fn]=fn;obj[_12+fn]=function(){var e=window.event;e.target=window.event.srcElement;obj["e"+_12+fn](e);};obj.attachEvent("on"+_12,obj[_12+fn]);};Nornix.removeEvent=function(obj,_16,fn){obj.detachEvent("on"+_16,obj[_16+fn]);obj[_16+fn]=null;obj["e"+_16+fn]=null;};}else{Nornix.addEvent=Function;Nornix.removeEvent=Function;}}Nornix.cancelEvent=function(e,c){e.returnValue=false;if(e.preventDefault){e.preventDefault();}if(c){e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}}};Nornix.delayedInit=function(id,_1b,_1c){var el;if(_1c===undefined){_1c=10;}var _1e=window.setInterval(function(){if(el=document.getElementById(id)){window.clearInterval(_1e);_1b(el);}},_1c);};Nornix.createCookie=function(_1f,_20,_21){var _22;if(_21){var _23=new Date();_23.setTime(_23.getTime()+(_21*24*60*60*1000));_22="; expires="+_23.toGMTString();}else{_22="";}document.cookie=_1f+"="+_20+_22+"; path=/";};Nornix.readCookie=function(_24){var _25=_24+"=";var ca=document.cookie.split(";"),i=0,c;while(c=ca[i++]){c=Nornix.trim(c);if(c.indexOf(_25)===0){return c.substring(_25.length,c.length);}}return "";};Nornix.eraseCookie=function(_29){createCookie(_29,"",-1);};Nornix.getTextContent=function(_2a){if(typeof _2a.textContent!="undefined"){return _2a.textContent;}else{return _2a.innerText;}};Nornix.trim=function(s){return s.replace(/^\s*|\s*$/g,"");};Nornix.swapClasses=function(el,_2d,_2e){if(!el){return;}if(el.className.length===0){el.className=_2e?_2e:"";return;}var arr=el.className.split(" "),i=0,t;while(t=arr[i++]){if(t===_2d){if(_2e){arr[i-1]=_2e;el.className=arr.join(" ");return;}else{delete arr[i-1];el.className=arr.join(" ");return;}}else{if(t===_2e){el.className=arr.join(" ");return;}}}if(_2e){arr[arr.length]=_2e;}el.className=arr.join(" ");};Nornix.addClass=function(el,_33){return Nornix.swapClasses(el,null,_33);};Nornix.removeClass=function(el,_35){return Nornix.swapClasses;}();Nornix.containsClass=function(el,s){if(!el||!el.className){return false;}var arr=el.className.split(" "),i=0,t;while(t=arr[i++]){if(t===s){return true;}}return false;};Nornix.isIe=document.all&&window.opera===undefined;Nornix.eqNodeName=function(el,_3c){if(el&&el.nodeName&&el.nodeName.toLowerCase()===_3c){return true;}return false;};Nornix.findChildOfType=function(_3d,_3e,_3f,_40){var e;if(!_40){var i=0;while(e=_3d.childNodes[i++]){if(Nornix.eqNodeName(e,_3e)){return _3f(e);}}}else{var i=_3d.childNodes.length-1;while(e=_3d.childNodes[i--]){if(Nornix.eqNodeName(e,_3e)){return _3f(e);}}}};Nornix.imagePreload=function(_43,_44){var i=0,img;if(!_44){_44="";}while(img=_43[i++]){(new Image()).src=_44+img;}};Nornix.live2copy=function(_47){var _48=[],i=0,el;while(el=_47[i++]){_48[_48.length]=el;}return _48;};Nornix.getPos=function(obj){var pos={x:obj.offsetLeft||0,y:obj.offsetTop||0};while(obj=obj.offsetParent){pos.x+=obj.offsetLeft||0;pos.y+=obj.offsetTop||0;}return pos;};Nornix.getElementStyle=function(el,_4e){if(window.getComputedStyle){return function(el,_50){return window.getComputedStyle(el,"").getPropertyValue(_50);};}return function(el,_52){return el.currentStyle?el.currentStyle[Nornix.cssProp2JsProp(_52)]:null;};}();Nornix.cssProp2JsProp=function(p){var arr=p.split("-");if(arr.length>1){var sum=arr[0],i=1,_57;while(_57=arr[i++]){sum+=_57.charAt(0).toUpperCase()+_57.substr(1);}return sum;}return p;};Nornix.getBackgroundColor=function(el){var c=Nornix.getElementStyle(el,"background-color");if(c===undefined||c===""||c==="transparent"){return null;}return Nornix.convert2Rgb(c);};Nornix.getTextColor=function(el){var c=Nornix.getElementStyle(el,"color");if(c===undefined||c===""||c==="transparent"){return null;}return Nornix.convert2Rgb(c);};Nornix.convert2Rgb=function(c){var rgb=c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);if(rgb){return {r:parseInt(rgb[1]),g:parseInt(rgb[2]),b:parseInt(rgb[3])};}return Nornix.makeRgbColor(c);};Nornix.printRgbColor=function(rgb){return "rgb("+Math.round(rgb.r)+","+Math.round(rgb.g)+","+Math.round(rgb.b)+")";};Nornix.makeRgbColor=function(c){if(c.charAt(0)==="#"){if(c.length===4){c="#"+c.charAt(1)+c.charAt(1)+c.charAt(2)+c.charAt(2)+c.charAt(3)+c.charAt(3);}if(c.length===7){return {r:parseInt(c.substr(1,2),16),g:parseInt(c.substr(3,2),16),b:parseInt(c.substr(5,2),16)};}}};Nornix.fader=function(el,_61,fps,_63,_64){if(!fps){fps=30;}if(!_63){_63=200;}if(!_64){_64=1500;}if(!_61){_61="fader";}var _65=Nornix.getBackgroundColor(el);var _66={r:_65.r,g:_65.g,b:_65.b};var _67=Nornix.getTextColor(el);var _68={r:_67.r,g:_67.g,b:_67.b};var div=document.createElement("div");Nornix.addClass(div,_61);document.documentElement.appendChild(div);var _6a=Nornix.getBackgroundColor(div);var _6b=Nornix.getTextColor(div);document.documentElement.removeChild(div);div=null;var _6c=el.style.backgroundColor;var _6d=el.style.color;Nornix.fade(el,[{"property":"background-color","toColor":_6a,"fromColor":_66},{"property":"color","toColor":_6b,"fromColor":_68}],fps,_63,function(){Nornix.fade(el,[{"property":"background-color","toColor":_65,"fromColor":_6a,"oldStyle":_6c},{"property":"color","toColor":_67,"fromColor":_6b,"oldStyle":_6d}],fps,_64);});};Nornix.fade=function(el,_6f,fps,_71,_72){if(!fps){fps=30;}if(!_71){_71=3000;}var _73=Math.round(fps*_71/1000);var _74=Math.round(_71/_73);var _75=0;var _76,i=0;while(_76=_6f[i++]){if(!_76.property){_76.property="background-color";}_76.jsProperty=Nornix.cssProp2JsProp(_76.property);_76.step={r:(_76.toColor.r-_76.fromColor.r)/_73,g:(_76.toColor.g-_76.fromColor.g)/_73,b:(_76.toColor.b-_76.fromColor.b)/_73};}var _78=window.setInterval(function(){if(++_75!==_73){i=0;while(_76=_6f[i++]){el.style[_76.jsProperty]=Nornix.printRgbColor(_76.fromColor);_76.fromColor.r+=_76.step.r;_76.fromColor.g+=_76.step.g;_76.fromColor.b+=_76.step.b;}}else{window.clearInterval(_78);if(_72){_72();}else{i=0;while(_76=_6f[i++]){el.style[_76.jsProperty]=_76.oldStyle;}}}},_74);};
