FFN.banners.data.config.MS={Y:31557600000,W:604800000,D:86400000,H:3600000,M:60000,S:1000};(function(Obj){Obj.masterSet={config:Obj.data.config,browserObjCheck:function(){this.config.ie7=(document.all&&window.XMLHttpRequest&&!window.opera)?true:false;this.config.ie6=(document.all&&!window.XMLHttpRequest)?true:false;this.config.opera=(window.opera!==undefined)?true:false;this.config.ieHasDoctype=true;var ckdoctype='';if(this.config.ie7&&(window.document.childNodes[0].text!==undefined)){ckdoctype=window.document.childNodes[0].text.replace(/\n/g,'');}
if(this.config.ie6||(this.config.ie7&&((window.document.childNodes[0].text===undefined)||(ckdoctype.search(/DOCTYPE\s+HTML\s+PUBLIC.+\.dtd/i)==-1)))){this.config.ieHasDoctype=false;}},delay:function(sec){sec=sec||0;sec*=this.config.MS.S;var argElmID=this.config.bannerIdContainer;this.timer=setTimeout(function(){Obj.masterSet.move(argElmID)},sec);},move:function(elmID,direction){if(!document.getElementById){return;}
var x;var divPath=document.getElementById(elmID);var currPos=parseInt(divPath.style.top,10);var holderDisplay=document.getElementById(this.config.bannerIdHolder);holderDisplay.style.display='';if(direction==='down'){x=divPath.offsetHeight;if(currPos<=x){currPos+=((currPos+5)>x)?((x-currPos)+1):5;divPath.style.top=currPos+'px';this.timer=setTimeout(function(){Obj.masterSet.move(elmID,'down')},this.config.scrollSpeed);}else{clearTimeout(this.timer);this.timer=null;holderDisplay.style.display='none';if(this.config.replay>0){Obj.masterSet.delay(this.config.replay);}}}else{x=0;if(currPos>x){currPos-=(currPos<5)?currPos:5;divPath.style.top=currPos+'px';this.timer=setTimeout(function(){Obj.masterSet.move(elmID)},this.config.scrollSpeed);}else{clearTimeout(this.timer);this.timer=null;}}},imgCache:function(imgObj){var img;for(img in imgObj){document[img]=new Image();document[img].src=imgObj[img];}},imgAct:function(imageId,objName){if(document.images){document[imageId].src=document[objName].src;}},getElementTopLeftFixed:function(elmObj){var pos=Obj.masterSet.getElementTopLeft(elmObj);var scrollPos=Obj.masterSet.getScrollTopLeft();var top=pos.top;var left=pos.left;if(this.config.ieHasDoctype){top+=scrollPos.top;left+=scrollPos.left;}
return{top:top,left:left};},getElementTopLeft:function(elmObj){var elmTop=elmObj.offsetTop;var elmLeft=elmObj.offsetLeft;elmObj=elmObj.offsetParent;while(elmObj){elmTop+=elmObj.offsetTop;elmLeft+=elmObj.offsetLeft;elmObj=elmObj.offsetParent;}
return{top:elmTop,left:elmLeft};},getScrollTopLeft:function(){var de=document.documentElement;var scrollLeft=self.pageXOffset||(de&&de.scrollLeft)||document.body.scrollLeft;var scrollTop=self.pageYOffset||(de&&de.scrollTop)||document.body.scrollTop;return{top:scrollTop,left:scrollLeft};},setElementPosition:function(id,t,l,offsetTop,offsetLeft){offsetTop=offsetTop||0;offsetLeft=offsetLeft||0;var elmObj=document.getElementById(id);elmObj.style.top=(t+offsetTop)+'px';elmObj.style.left=(l+offsetLeft)+'px';},setCookie:function(name,value,expires,path,domain,secure){var expStr='';var type='H';if(expires){var expDte=new Date();var expMS=expDte.valueOf()+(this.config.MS[type]*expires);expDte.setTime(expMS);expStr='; expires='+expDte.toGMTString();}
pathStr=((path===undefined)?'':('; path='+path));domainStr=((domain===undefined)?'':('; domain='+domain));secureStr=((secure===undefined)?'':('; secure'));document.cookie=name+'='+escape(value)+expStr+pathStr+domainStr+secureStr;},getCookie:function(name){var output=null;var cks=' '+document.cookie+';';var matchCk=' '+name+'=';var startPos=cks.indexOf(matchCk);var endPos;if(startPos!=-1){startPos+=matchCk.length;endPos=cks.indexOf(';',startPos);output=unescape(cks.substring(startPos,endPos));}
return output;},init:function(fn){fn.call();}};Obj.masterSet.init(Obj.passInitFN);})(FFN.banners);