movingObj=new Array();
movingTimer=null;
function moveObjectBottomTo(obj,y) {
	exists=false;
	if (movingObj.length>0) {
		for(i=movingObj.length-1;i>=0;i--) {
			if (movingObj[i][0]==obj) {
				movingObj.splice(i,1);
				break;
			}
		}
	}
	movingObj.push(new Array(obj,y));
	if (movingTimer==null) setTimeout("moveObject()",2);
}
function moveObject() {
	if (movingObj.length>0) {
		//pasteRawHTML(" has objects",document.body);
		for(i=movingObj.length-1;i>=0;i--) {
			oy=1*movingObj[i][0].style.top.replace("px","");
			//oy=getTop(movingObj[i][0])+movingObj[i][0].offsetHeight;
			dy=(movingObj[i][1]-oy)/4;
			if (dy>=-1 && dy<=1) {
				movingObj[i][0].style.top=movingObj[i][1]+"px";
				movingObj.splice(i,1);
			}else{
				if (dy<-4) dy=-4;
				ny=Math.round(oy+dy);
				//alert(ny);
				b=ny+"px";
			//pasteRawHTML(" ["+b+"]",document.body);
				movingObj[i][0].style.top=b;
			}
		}
	}	
	if (movingObj.length>0) {
		setTimeout("moveObject()",2);
	}else{
		movingTimer=null;
	}
}
function showList(src,e,srcObj,y) {
	//alert(srcObj.style.bottom.replace("px",""));
	moveObjectBottomTo(srcObj,y);
}
function hideList(src,e,srcObj,y) {
	if (isMouseEvent(src,e)) {
		moveObjectBottomTo(srcObj,y);
	}
}
function isMouseEvent(src,e) {
	closeit=false;
	if (window.event) {
		e=window.event;
		if (!src.contains(e.toElement)) {
			closeit=true;
		}
	}else{
		if (!isChild(src,e.relatedTarget)) {
			closeit=true;
		}
	}
	return closeit;
}
function showTab(id) {
	blocks=new Array("productdescription","productspecs");
	for(i=0;i<blocks.length;i++) {
		if (blocks[i]==id) {
			document.getElementById(blocks[i]).style.display="block";
			document.getElementById(blocks[i]+"tab").className="tabon";
		}else{
			document.getElementById(blocks[i]).style.display="none";
			document.getElementById(blocks[i]+"tab").className="taboff";
		}
	}
}
function openPage(url) {
	window.open( url, "_blank");
}
function isChild(parentObj,childObj) {
	reply=false;
	if (childObj!=document.body && childObj!=null) {
		if (childObj==parentObj) {
			reply=true;
		}else{
			if (childObj.parentNode==parentObj) {
				reply=true;
			}else{
				if (childObj.parentNode!=document.body) {
					reply=isChild(parentObj,childObj.parentNode);
				}
			}
		}
	}
	return reply;	
}