function addemail (email){
	var domain = 'lineartechnologies.ca';
	var make_email = email + '@' + domain;
	document.write('<a href="mailto:' + make_email + '">' + make_email + '</a>');
}
function confirmation() {
	var answer = confirm("Are you sure you want to Delete this product?")
	if (answer){
		return true;
	}
	else{
		return false;
	}
}
function openwin(file,win_name){
	var win_loc = 'width=600,height=500';
	childWindow = window.open(file,win_name,win_loc);
	if (childWindow.opener == null)childWindow.opener = self;
}

var posx = 0;
var posy = 0;
function gotoAnchor(anchor){
	window.location.href = anchor;
}
function handlerMD(e){
	if (!e) var e = window.event;
	if (e.pageX || e.pageY)
	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY)
	{
		posx = e.clientX + document.body.scrollLeft;
		posy = e.clientY + document.body.scrollTop;
	}
}

function adddetail(file,win_name){
	var win_loc = 'width=970,height=800,resizable=yes,scrollbars=yes';
	childWindow = window.open(file,win_name,win_loc);
	if (childWindow.opener == null)childWindow.opener = self;
}

function opencalendar(file){
	var win_loc = 'resizable=no,top=' + posy + ',left=' + posx + ',width=260,height=265';
	childWindow = window.open(file,'calendar',win_loc);
	if (childWindow.opener == null)childWindow.opener = self;
}

document.onmousedown = handlerMD;

