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 SelectLanguage( sFile, sPage, oDropDown )
{
	var nSelected;
	var sValue;
	nSelected = oDropDown.selectedIndex;
	if (nSelected > -1 )
	{
		sValue = oDropDown.options[nSelected].value;
		if (sValue.length>0)
		{
  			eval("parent.location='http://www.dashboard.com/" + sFile + ".aspx?page=" + sPage + "&lang=" + sValue + "'");
		}
	}
}
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);
}

function LoadSupportApp()
{
	var nTop = (screen.height-600)/2;
	var nLeft = (screen.width-975)/2;
	var PickUrl = "http://www.dipolar.com/support.aspx";
	var oWindow = window.open(PickUrl,"SupportWin","width=975,height=600,top=" + nTop + ",left=" + nLeft + ",toolbars=no,scrollbars=yes,status=yes,resizable=yes");
	if (oWindow != null)
	{
		oWindow.focus();
	}							
}

function DisableCreditCard(oPanel)
{
	var control = document.getElementById(oPanel);
	control.disabled = true;
	control.style.display == 'none';
	
}

function EnableCreditCard(oPanel)
{
	document.getElementById(oPanel).disabled = false;
}
