
/* Dropdown Functions */
var obj;
var timeout;
var srcTop = -56;
var destTop = 54;
var ip = 0.0;

function drop(sObj, sDir) {
	obj = sObj;
	window.clearInterval(timeout);
	timeout = window.setInterval(sDir, 20);
}

function down() {
	if(ip < 100) {
		ip+=4;
	} else {
		ip = 100;
		window.clearInterval(timeout);
	}
	obj.style.top = easeInOutCubic(ip, srcTop, destTop, 100) + "px";
}

function up() {
	if(ip > 0) {
		ip-=4;
	} else {
		ip = 0;
		window.clearInterval(timeout);
	}
	obj.style.top = easeInOutCubic(ip, srcTop, destTop, 100) + "px";
}

function easeInOutCubic (t, b, c, d) {
	if ((t/=d/2) < 1) return c/2*t*t*t + b;
	return c/2*((t-=2)*t*t + 2) + b;
}


/*
function correctPNG() {
	for(var i=0; i<document.images.length; i++){
		var img = document.images[i]
		var imgName = img.src.toUpperCase()
		if (imgName.substring(imgName.length-3, imgName.length) == "PNG"){
			var imgID = (img.id) ? "id='" + img.id + "' " : ""
			var imgClass = (img.className) ? "class='" + img.className + "' " : ""
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
			var imgStyle = "display:inline-block;" + img.style.cssText 
			if (img.align == "left") imgStyle = "float:left;" + imgStyle
			if (img.align == "right") imgStyle = "float:right;" + imgStyle
			if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
			var strNewHTML = "<span " + imgID + imgClass + imgTitle
			+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
			+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
			+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
			img.outerHTML = strNewHTML
			i = i-1
		}
	}
}
if(navigator.appName.indexOf("Microsoft") != -1)
	window.attachEvent("onload", correctPNG);
/* End Dropdown Functions */




function p341_clearFields() {
	alert("clear");
}

function p33_moveToolTip(e) {
	obj = document.getElementById("tooltip");
	if(e != undefined) {
		 mX = e.clientX;
		 mY = e.clientY;
	} else {
		mX = window.event.clientX;
		mY = window.event.clientY;
	}
	obj.style.left =  mX + 15 + "px";
	obj.style.top =  mY + + 15 + "px";
}
function p33_hover(sText, sObj) {
	document.getElementById("tooltip").innerHTML = sText;
	document.onmousemove = p33_moveToolTip;
	sObj.style.backgroundColor = "#FFFFFF";
	sObj.style.backgroundImage = "none";
}
function p33_stophover(sObj, sBG) {
	(sObj.className == "col0")?
		col="#CDE2E8":
		col="#E8F3F6";
	sObj.style.backgroundColor=col;
	if(sBG)
		sObj.style.backgroundImage = "url('images/33_finance_lastrow.gif')";

	document.onmousemove = function(){};
	document.getElementById("tooltip").style.left = "-1000px";
	document.getElementById("tooltip").style.top = "-1000px";
}