 
	function cms_isNumeric(theNo)
	{
		var ValidChars = "0123456789.,";
		var IsNumber=true;
		var Char;

		for (i = 0; i < theNo.length && IsNumber == true; i++) 
		{ 
			Char = theNo.charAt(i); 
			if (ValidChars.indexOf(Char) == -1) 
			{
				IsNumber = false;
			}
		}
		return IsNumber;
	}
 
    function cms_isValidEmail(email)
	{
		return (email.indexOf(".") > 2) && (email.indexOf("@") > 0);
	}
    
	/* getObject on document */
    function cms_dom_getById(sID, oCtl)
    {           
        if (oCtl == null)
            oCtl = document;
        if (oCtl.getElementById) 
            return oCtl.getElementById(sID);
        else
            return oCtl.all(sID);
    }
    
    function cms_dom_getVal(sID,oCtrl)
    {		
        return cms_dom_getById(sID).value.toString();
    }
    
    function cms_dom_setVal(sID,sValue,oCtl)
    {		
		var oform = cms_dom_getById(oCtl);
		oform[sID.toString()].value = sValue.toString();        
    }
    
    function cms_dom_doPostBack(oCtrl,sEvent)
    {		
		/* set value */
		cms_dom_setVal('__EVENTARGUMENT',sEvent,oCtrl);
		cms_dom_getById(oCtrl).submit();			      
    }
    
	function cms_dom_doLocation(sLoc)
	{		
		document.location.href = sLoc.toString();		
	}
	
	function cms_dom_doWindow(sLoc)
	{		
		window.open(sLoc.toString());		
	}
	
    function cms_dom_setFocus(sID)
    {
        cms_dom_getById(sID).focus();
    }
    
    function cms_dom_browserObject()
    {
        this.InternetExplorer = 'ie';
        this.Netscape = 'ns';
        this.Mozilla = 'mo';
        this.Opera = 'op';
        this.Safari = 'safari';
        this.Konqueror = 'kq';
        this.MacIE = 'macie';
                
        var sType;
        var agt=navigator.userAgent.toLowerCase();

        if (agt.indexOf('konqueror') != -1) 
            sType = this.Konqueror;
        else if (agt.indexOf('opera') != -1) 
            sType = this.Opera;
        else if (agt.indexOf('netscape') != -1) 
            sType = this.Netscape;
        else if (agt.indexOf('msie') != -1)
        {
            if (agt.indexOf('mac') != -1)
                sType = this.MacIE;
            else
                sType = this.InternetExplorer;
        }
        else if (agt.indexOf('safari') != -1)
            sType = 'safari';
        
        if (sType == null)
            sType = this.Mozilla;  
        
        this.type = sType;
        //cms._type = sType;
        this.version = parseFloat(navigator.appVersion);
        
        var sAgent = navigator.userAgent.toLowerCase();
        if (this.type == this.InternetExplorer)
        {
            var temp=navigator.appVersion.split("MSIE");
            this.version=parseFloat(temp[1]);
        }
        if (this.type == this.Netscape)
        {
            var temp=sAgent.split("netscape");
            this.version=parseFloat(temp[1].split("/")[1]);	
        }
       
        alert("sType: " + sType);
        //alert("agt: " + agt);
    }
    
  