function Rollover(imageId, graySrc, src, minWidth, minHeight, maxWidth, maxHeight){
	var img,x,y;
	function init(){
		this.img = img = document.getElementById(imageId);
		img.src = graySrc;
		img.isComplete=false;
		img.style.position="static";
		img.parentNode.style.position="relative";
		img.style.width = minWidth + "px";
		img.style.height = minHeight + "px";
		img.onmouseover = over;
		preLoad(src);
	}

	function over(){
		OutAnim=null;
		img.onmouseover=null;
		img.onmouseout=out;
		img.src=src;
		img.isOut = false;
		getParentDiv(img).style.zIndex=100;
		img.style.position="absolute";

		img.style.zIndex=101;
		var x = img.offsetLeft-15;//-maxWidth/2;
		var y = img.offsetTop-15;//-maxHeight/2;
		var OverAnim = new Animation();
		OverAnim.resize(img, maxWidth, maxHeight, 4, function(){
			img.isComplete = true;
			OverAnim=null;
			if(img.isOut) out();
		});
		new Animation().move(img, x, y, 2);
		img.style.zIndex=99;
	}

	this.over = over;

	function out(){
		if(!img.isComplete){
			img.isOut=true;
			return;
		}
		img.isOut=false;
		if(typeof OverAnim!="undefined") OverAnim.onComplete() ;
		getParentDiv(img).style.zIndex=1;
		img.onmouseout=null;
		img.isOut = true;
		OutAnim=new Animation()
		OutAnim.resize(img, minWidth, minHeight, 4, function(){
			img.onmouseover = over;
			img.src=graySrc;
			img.isComplete=false;
		});
		var x = img.offsetLeft+15;//-maxWidth/2;
		var y = img.offsetTop+15;//-maxHeight/2;
		new Animation().move(img, x, y, 2, function(){
			img.isOut=false;
			//OutAnim=null;
		});
	}
	this.out = out;

	function attachEvent(o,h,e){
		if(o.attachEvent) o.attachEvent("on"+h,e);
		else if(o.addEventListener) o.addEventListener(h,e,false);
	}

	function detachEvent(o,h,e){
		if(o.detachEvent) o.detachEvent("on"+h,e);
		else if(o.removeEventListener) o.removeEventListener(h,e,false);
	}

	function preLoad(s){
		var i = new Image();
		i.src=s;
	}

	function getParentDiv(img){
		return img.parentNode;
	}

	init();
}


function Animation() {

	this.resize = function(element, width, height, step, callback, fixW, fixH) {
		this.onProcess.__element = element;
		this.onProcess.__width = width;
		this.onProcess.__height = height;
		this.onProcess.__step = step;
		this.onProcess.__fixW = fixW?fixW:0;
		this.onProcess.__fixH = fixH?fixH:0;
		this.onProcess.__callback = callback;
		this.onProcess.__duration = 1;

		var currentW = element.offsetWidth;
		var currentH = element.offsetHeight;

		this.onProcess.__operationW = (currentW < width) ? "+" : "-";
		this.onProcess.__operationH = (currentH < height) ? "+" : "-";

		var stepDuration = 1;//Math.round(this.onProcess.__duration / this.onProcess.__step);
		return new Thread(this.onProcess, this.onComplete, stepDuration);
	};

	this.move = function(element, x, y, step, callback) {
		this.onProcess.__element = element;
		this.onProcess.__x = x;
		this.onProcess.__y = y;
		this.onProcess.__step = step;
		this.onProcess.__callback = callback;
		this.onProcess.__duration = 1;

		var currentX = element.offsetLeft;
		var currentY = element.offsetTop;

		this.onProcess.__operationX = (currentX < x) ? "+" : "-";
		this.onProcess.__operationY = (currentY < y) ? "+" : "-";

		var stepDuration = 1;//Math.round(this.onProcess.__duration / this.onProcess.__step);
		return new Thread(this.onProcess, this.onComplete, stepDuration);
	};

	this.onProcess = function() {
		this.target.__completeW = true;
		this.target.__completeH = true;
		this.target.__completeX = true;
		this.target.__completeY = true;

		var operationW = this.target.__operationW;
		var operationH = this.target.__operationH;
		var operationX = this.target.__operationX;
		var operationY = this.target.__operationY;

		var element = this.target.__element;
		var width   = this.target.__width;
		var height  = this.target.__height;
		var x   = this.target.__x;
		var y  = this.target.__y;
		var step    = this.target.__step;
		var fixW     = this.target.__fixW;
		var fixH     = this.target.__fixH;
		var currentW = element.offsetWidth - fixW;
		var currentH = element.offsetHeight - fixH;
		var currentX = element.offsetLeft;
 		var currentY = element.offsetTop;

		if(width) {
			this.target.__completeW = false;
			if(operationW == "+"){
                 var W = (currentW + step <= width)?parseInt(currentW + step):parseInt(width);
                if(currentW < width) element.style.width =  W + "px";
				else this.target.__completeW = true;
			}else if(operationW == "-"){
                var W = (currentW - step >= width)?parseInt(currentW - step):parseInt(width);
                if(currentW > width) element.style.width = W + "px";
				else this.target.__completeW = true;
			}
		}

		if(height) {
			this.target.__completeH = false;
			if(operationH == "+"){
                var H = (currentH + step <= height)?parseInt(currentH + step):parseInt(height);
                if(currentH < height) element.style.height = H + "px";
				else this.target.__completeH = true;
			}else if(operationH == "-"){
                var H = (currentH - step >= height)?parseInt(currentH - step):parseInt(height);
				if(currentH > height) element.style.height = H + "px";
				else this.target.__completeH = true;
			}
		}

		if(x){
			this.target.__completeX = false;
			if(operationX == "+"){
				if(currentX < x) element.style.left = parseInt(currentX + step) + "px";
				else this.target.__completeX = true;
			}else if(operationX == "-"){
				if(currentX > x) element.style.left = parseInt(currentX - step) + "px";
				else this.target.__completeX = true;
			}
		}

		if(y){
			this.target.__completeY = false;
			if(operationY == "+"){
				if(currentY < y) element.style.top = parseInt(currentY + step) + "px";
				else this.target.__completeY = true;
			}else if(operationY == "-"){
				if(currentY > y) element.style.top = parseInt(currentY - step) + "px";
				else this.target.__completeY = true;
			}
		}

		return (this.target.__completeW && this.target.__completeH && this.target.__completeX && this.target.__completeY);
	};

	this.onComplete = function(){
		if(this.target.__callback && this.target.__element) {
			this.target.__callback(this.target.__element);
		}
	};
};
/**
 * @param target Function
 * @param callback Function
 * @param duration int
 */
function Thread(target, callback, duration){

	/**
	 * @access private
	 */
	this.complete = false;

	/**
	 * @access private
	 */
	this.target = target;

	/**
	 * @access private
	 */
	this.callback = callback;

	/**
	 * @access private
	 */
	this.duration = duration || 500;

	/**
	 * @access private
	 */
	this.target.thread = this;

	/**
	 * Destroys this thread, without any cleanup.
	 * @access public
	 * @type void
	 */
	this.destroy = function(){
		if(target.thread.timer) clearTimeout(target.thread.timer);
		target.thread.removeThread(target.thread);
		target.thread.constructor.current = null;
	};

	/**
	 * @access private
	 */
	this.run = function(){
		target.thread.constructor.current = target.thread;
		target.thread.complete = target.thread.target();
		if(target.thread.complete) {
			target.thread.destroy();
			if(target.thread.callback) target.thread.callback();
		}else{
			target.thread.timer = setTimeout(target.thread.run, target.thread.duration);
		}
	};

	/**
	 * @access private
	 */
	this.addThread = function(thread){
		//alert(this.constructor);
		if(!this.constructor.threads) this.constructor.threads={length:0};
		this.constructor.threads[this.constructor.threads.length] = thread;
		this.constructor.threads.length++;
	};

	/**
	 * @access private
	 */
	this.removeThread = function(thread){
		//alert(this.constructor);
		for(var i=0; i<this.constructor.threads.length;i++){
			//alert(this.constructor.threads[i]);
			if(this.constructor.threads[i]==thread){
				this.constructor.threads[i]=null;
				this.constructor.threads.length--;
				return true;
			}
		}
		return false;
	};

	/**
	 * @access private
	 */
	this.currentThread = function(){
		return this.constructor.currentThread();
	};

	/**
	 * @access private
	 */
	this.activeCount = function(){
		return this.constructor.activeCount();
	};

	this.addThread(this);
	this.run();
};

/**
 * Returns a reference to the currently executing thread object.
 * @access public
 * @static
 * @type Thread
 * @return the currently executing thread.
 */
Thread.currentThread = function() {
	return (Thread.current) ? Thread.current : null;
};

/**
 * Returns the number of active threads in the current thread's thread group.
 * @access public
 * @static
 * @type int
 * @return the number of active threads in the current thread's thread group.
 */
Thread.activeCount = function(){
	return (Thread.threads) ? Thread.threads.length : 0;
};




	function showCustomer(count, a1, a2, a3, a4 ,a5 ,a6){
		   var clean=0;
		   var  arrList = new Array();
           var  arrIDList = new Array(a1,a2,a3, a4 ,a5 ,a6);
               for(var i=0; i<count; i++) {
                arrList[i] = new Array();
                arrList[i][0] = document.getElementById(arrIDList[i]);
		        arrList[i][1] = document.getElementById(arrIDList[i]+"UL");
		        arrList[i][2] = document.getElementById(arrIDList[i]+"BR");
               if(arrList[i][0].checked){
			      arrList[i][1].style.display="block";
				  clean++;
				  if (clean==2 || clean==4) {
                      arrList[i][2].style.display="block";
                      arrList[i][2].style.clear="both";
                  }else {  arrList[i][2].style.display="none";}

               }else{
                       arrList[i][1].style.display="none";
                       arrList[i][2].style.display="none";
                  }

               }

        }



