﻿var currentlyOpenToolTip = null;

function ShowAdditionalInfo(targetId, eventObj) {
	var target = document.getElementById(targetId);
	if(!target) {
		return false;
	}
	
	if (currentlyOpenToolTip) {		
		HideAdditionalInfo(target.id);
		if(currentlyOpenToolTip == target) {
			currentlyOpenToolTip = null;
			return;
		}		
	}
	//target.style.position = "absolute";
	target.style.zindex = "5000000000000 !important";
	target.style.display = "block";	
	currentlyOpenToolTip = target;
}

function HideAdditionalInfo(targetId) {
	var target = document.getElementById(targetId);
	if(target) {		
		target.style.display = "none";
		target.style.zindex = "1";
		target.parentNode.style.zindex = "1";		
	}
}

function OpenPartsHistory(href) {
	window.open(href, "PartSalesHistory", "height=450,width=575,location=no,menubar=no,resizable,scrollbars,toolbar=no");
	return false;
}

function ChangedText() {
	alert(this);
}

function CalTest(dateControl) {
	var dt = document.getElementById(dateControl);
	if(dt) {
		alert(dt.value);
	}
}