//////////////////////////////////////////////////////////////////////
////////////########  Javascript library of functions ########////////
//////////////////////////////////////////////////////////////////////
function openWindow(filePath,winName,toolbar,height,width) {
	if (!filePath) filePath = '';
	if (!winName) winName = 'newWin';
	if (!height) height = (window.screen.availHeight * 0.85);
	if (!width) width = (window.screen.availWidth * 0.85);		
	xPos = (window.screen.availHeight * 0.015);
	yPos = (window.screen.availWidth * 0.015);
	attribs='height='+height+','+'width='+width;
	//if ((toolbar) && (!toolbar == '')) attribs=attribs+','+toolbar;
	//if ((menubar) && (!menubar == '')) attribs=attribs+','+menubar;
	attribs=attribs+',toolbar,menubar,scrollbars';
	newWindow=window.open(filePath,winName,attribs);		
	newWindow.moveTo(xPos,yPos) 
	newWindow.focus();		
}
//////////////////////////////////////////////////////////////////////
function left(string,count) {
	return string.substr(0,count);
}
//////////////////////////////////////////////////////////////////////
function right(mystring,count)  {
	return mystring.substring(mystring.length-count,mystring.length);
}
/////////////////////////////////////////////////////////////////////
function mid(myString,start,count) {
	return myString.substr(start-1,count)
}
/////////////////////////////////////////
function len(mystring)  {
	return mystring.length;
	}
/////////////////////////////////////////
