﻿/* Author: N/A (client) */

function VGINavigator()
{
    this._Navigator = _GetNavigator();
    
    this.Get = function()
    {
        return(this._Navigator);
    }
    
    this.SetCursor = function(Node, Value)
    {
        if(Value == "Hand")
        {
            if(this._Navigator == "IE")        
                Node.style.cursor = "hand";
            else if(this._Navigator == "Opera")
                Node.setAttribute("style", "cursor: hand");
            else if(this._Navigator == "Netscape")
                Node.setAttribute("style", "cursor: pointer");             
            else if(this._Navigator == "Safari")
                Node.setAttribute("style", "cursor: pointer");
        }
        else if(Value == "Pointer")
        {
            if(this._Navigator == "IE")        
                Node.style.cursor = "arrow";
            else if(this._Navigator == "Opera")
                Node.setAttribute("style", "cursor: pointer");
            else if(this._Navigator == "Netscape")
                Node.setAttribute("style", "cursor: default");             
            else if(this._Navigator == "Safari")
                Node.setAttribute("style", "cursor: default");
        }
    }
    
    this.GetCssClass = function(Node)
    {
        var className = Node.getAttribute("className");
        if(className == null)
            className = Node.getAttribute("class");
        return(className);                
    }
}

function _GetNavigator()
{
    var Navigator="";//unknown
    
    var appName = navigator.appName;
       
    if(appName.search("Microsoft Internet Explorer") != -1)
       Navigator = "IE";
    else if(appName.search("Opera") != -1)
       Navigator = "Opera";
    else if(appName.search("Netscape") != -1)
       Navigator = "Netscape"
    else if(appName.search("Safari") != -1)
       Navigator = "Safari"

       
    return(Navigator);
}
/* Log: N/A (client) */