function KeyDownHandler(btn)
{
	if (event.keyCode==13)
	{
		event.returnValue = false;
		event.cancel = true;
		document.getElementById(btn).click();
	}
}
function TabOn(tab)
{
	tab.style.background = "#CCCCFF";
	tab.style.cursor = "hand";
	return true;
}
function TabOff(tab,alt)
{
	if (alt==1)
	{
		tab.style.background = "#D0C883";
	}
	else
	{
		tab.style.background = "beige";
	}
	tab.style.cursor = "pointer";
	return true;
}				
function Lo(row,showhand)
{
	row.style.background = "#CCCCFF";
	if(showhand)
	{
		row.style.cursor = "hand";
	}
	return true;
}
function Lo1(row)
{
	row.style.background = "#CCCCFF";
	return true;
}
function Lf(row,alt)
{
	if (alt==1)
	{
		row.style.background = "beige";
	}
	else
	{
		row.style.background = "#ebebcf";
	}
	row.style.cursor = "pointer";
	return true;
}	
function Po(item)
{
	item.style.cursor = "hand";
	return true;
}
function Pf(item)
{
	item.style.cursor = "pointer";
	return true;
}	
function PointerOn(sItem)
{
	document.getElementById(sItem).style.cursor = "hand";
	return true;
}
function PointerOff(sItem)
{
	document.getElementById(sItem).style.cursor = "pointer";
	return true;
}	
function TabHOn( sId )
{
	var oObject;
	oObject = document.getElementById( sId + 'left' );
	if (oObject!=null)
	{
		oObject.src = 'images/tabstrip/tab_hover_left.gif';
	}
	setCellBGimage( sId + 'bg','images/tabstrip/tab_hover_bg.gif' );
	oObject = document.getElementById( sId + 'right' );
	if (oObject!=null)
	{
		oObject.src = 'images/tabstrip/tab_hover_right.gif';
	}
}
function TabHOff( sId )
{
	var oObject;
	oObject = document.getElementById( sId + 'left' );
	if (oObject!=null)
	{
		oObject.src = 'images/tabstrip/tab_unsel_left.gif';
	}
	setCellBGimage(sId + 'bg','images/tabstrip/tab_unsel_bg.gif' );
	oObject = document.getElementById( sId + 'right' );
	if (oObject!=null)
	{
		oObject.src = 'images/tabstrip/tab_unsel_right.gif';
	}
}
function setCellBGimage(id,sImgSrc) 
{
	var c = document.getElementById ? document.getElementById(id) :
		document.all ? document.all[id] : 
		document.layers ? document[id+'Outer'].document[id+'Inner'] : null;
	if (document.layers) 
	{ 
		c.background.src = sImgSrc; 
	} 
	else
	{ 
		c.style.backgroundImage = 'url('+sImgSrc+')'; 
	} 
}
function loadreportmonitor()
{
	var nTop;
	var nLeft;
	var nHeight;
	var nWidth;
	var nMaxWidth;
	var nMaxHeight;
	var oWindow;
	nTop = 10;
	nMaxHeight = screen.height;
	if (nMaxHeight>768)
	{
		nMaxHeight = 768;
	}
	nHeight = nMaxHeight - 125;
	nMaxWidth = screen.width;
	if (nMaxWidth>1024)
	{
		nMaxWidth = 1024;
	}
	nWidth = nMaxWidth - 15;
	nLeft = (screen.width/2)-nWidth;;
	oWindow = window.open("reportmonitor.aspx","ReportMonitor","width=" + nWidth + ",height=" + nHeight + ",top=" + nTop + ",left=" + nLeft + ",toolbars=no,scrollbars=yes,status=yes,resizable=yes");
	if (oWindow != null)
	{
		oWindow.focus();
	}
}
function choosecolor(sForm)
{
	var CalUrl = "choosecolor.aspx?formname=excelirate." + sForm;
	var oWindow = window.open(CalUrl,"ColorWin","width=430,height=285,resizeable=no");
	if (oWindow != null)
	{
		oWindow.focus();
	}
}
function OpenWalkthroughWindow( sPage, sWindowName)
{
	var winl = (screen.width - 790) / 2;
	var wint = (screen.height - 550) / 2;

	if ( winl < 0 ){ winl = 1}
	if ( wint < 0 ){ wint = 1}

	winprops = 'height=550,width=790,top='+wint+',left='+winl+',toolbar=no,scrollbars=no,menubar=no'
	sTutPage = 'http://www.professionalquest.com/content/walkthroughs/' + sPage
	OpenWindow=window.open( sTutPage, sWindowName, winprops);
}
function dpjumpmenu( oDropDown )
{
	var nSelected;
	var sValue;
	nSelected = oDropDown.selectedIndex;
	if (nSelected > -1 )
	{
		sValue = oDropDown.options[nSelected].value;
		if (sValue.length>0)
		{
  			eval("parent.location='"+sValue+"'");
		}
	}
}
function OpenFeatureTourWindow()
{
	var winl = (screen.width - 600) / 2;
	var wint = (screen.height - 525) / 2;

	if ( winl < 0 ){ winl = 1}
	if ( wint < 0 ){ wint = 1}

	winprops = 'height=525,width=600,top='+wint+',left='+winl+',toolbar=no,scrollbars=no,menubar=no'

	OpenWindow=window.open("http://www.professionalquest.com/featuretour.asp" ,"FeatureWindow", winprops);

}
function OpenSupportWindow()
{
	var winl = (screen.width - 443) / 2; /*683*/
	var wint = (screen.height - 335) / 2; /*303*/

	if ( winl < 0 ){ winl = 1}
	if ( wint < 0 ){ wint = 1}

	winprops = 'height=330,width=640,top='+wint+',left='+winl+',toolbar=no,scrollbars=no,menubar=no' /*300,435*/

	OpenWindow=window.open("http://www.gotoassist.com/sb/dipolarpty" ,"SupportWindow", winprops);
}
