//Genuine code by Corneliu Lucian 'Kor' RUSU corneliulucian[at]gmail[dot]com
AttachEvent(window,'load',function(){attachQuotation()},false);

var Qstep=[];
var Qdelay=[];

function attachQuotation(){
var obj=document.getElementById('quotation_sag');
obj.where='right';
obj.backfrom='left';
obj.len=422;
obj.left=-246;
traceRoute(obj.len);
obj.onclick=initQuotation;
document.getElementById('quotation_left').onclick=initQ;
}
function initQ(){
var obj=document.getElementById('quotation_sag');
obj.className='quotation_sag_'+obj.backfrom;
q=obj.where=='right'?1:-1;
moveQuotation(obj,obj.where,0,q);
}

function initQuotation(){
this.className='quotation_sag_'+this.backfrom;
q=this.where=='right'?1:-1;
moveQuotation(this,this.where,0,q);
}

function moveQuotation(obj,where,s,q){
obj.onclick=function(){null}
document.getElementById('quotation_left').onclick=function(){null}
var par=obj.parentNode;
var step;
	if(step=Qstep[s]*q){
	obj.left+=step;
	obj.len-=step;
	par.style.left=obj.left+'px';
	par.style.clip=isIE?'rect(0 457px 168px '+obj.len+'px)':'rect(0,457px,168px,'+obj.len+'px)';
	s++;
	setTimeout(function(){moveQuotation(obj,where,s,q)},70);
	}
	else{
	obj.where=obj.where=='right'?'left':'right';
	obj.backfrom=obj.backfrom=='left'?'right':'left';
	obj.onclick=initQuotation;
	document.getElementById('quotation_left').onclick=initQ;
	}
}

function traceRoute(w){
	
while(w>4){
w=w-parseInt(w/2,10);
Qstep[Qstep.length]=w;
}

}
