// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function setLyr(obj,lyr)
{
	var coors = findPos(obj);
	if (lyr == 'testP') coors[1] -= 50;
	var x = document.getElementById(lyr);
	x.style.top = (coors[1]+20) + 'px';
	x.style.left = (coors[0]+20) + 'px';
	Effect.BlindDown(lyr, {duration: .5}); 
}


function findPos(obj)
{
	var curleft = curtop = 0;
	var objNew = document.getElementById(obj)
	if (objNew.offsetParent) {
		curleft = objNew.offsetLeft
		curtop = objNew.offsetTop
		while (objNew = objNew.offsetParent) {
			curleft += objNew.offsetLeft
			curtop += objNew.offsetTop
		}
	}
	return [curleft,curtop];
}