﻿	var theDomain = document.domain;
	if ( document.domain.indexOf(".") > 0)
	{
		while ( document.domain.split(".").length > 2)
		{
			document.domain = document.domain.substr(document.domain.indexOf(".")+1);
			var theDomain = document.domain;
		}
	}
	
	function getTabById(oTabCntrl,strTabId){
		for(var i=0;i<oTabCntrl._tabs.length;i++){
		
			if(oTabCntrl._tabs[i].get_id().indexOf(strTabId)>0){
				return i;
			}
		}
	}
	
	function onOnlyNumbers(bDontAllowDec)
	{
		var key=window.event.keyCode;
		if (((key >= 48) && (key <= 57)) || (key == 43) || (!bDontAllowDec && (key == 46)))
			window.event.returnValue=true;
		else
			window.event.returnValue=false;
	}