
if( navigator.userAgent.indexOf("WebTV") == -1 )
{


//  CONFIG VARIABLES 


script_version = "x";
client_version = "1,2,1,4";

root = "http://vp.hearme.com";
rootcsq = "http://www.terra.es/personal3/plenus-espanha/";
evp_root = root + "/products/vp/embedded";
csqchat = "chat-privado/chat-privado.htm";

classid = "CLSID:73020B72-CDD6-4F80-8098-1B2ECD9CA4CA";
mimetype = "application/x-hearme-evp";

ie_url = evp_root + "/plugins/evp.cab#version=" + client_version;
ns_url = evp_root + "/plugins/evp.jar";

mic_url  = root + "/products/vp/config/";
mic_csq_url = rootcsq + "audio.htm";

if (window.document.location.hash == "#evp2")
{
        script_version = "x";
        client_version = "2,0,1,11";
        classid = "CLSID:2B89A560-D118-4215-A90E-9CAEF818088C";
        ie_url = "";
        ns_url = "";
}


//  CODE STARTS HERE 


var params = new Array( "Domain","Vendor","Application","Deployment","Channel","Username",
                        "Talklimit","Width","Height","Background","Cookie","OptionsButton","StatusArea",
                        "TalkButton","TextChatButton","TextChatWindow","UserList","VUMeter",
                        "Border","Color","LogoImg","LogoURL","HelpURL" );


//  DEFAULT VALUES 

params["Domain"] = "audiochat.hearme.com";
params["Vendor"] = "HEARME";
params["Application"] = "EVP";
params["Talklimit"] = "60000";
params["Width"] = "500";
params["Height"] = "250";
params["Border"] = "2";
params["Color"] = "gray";



//  READ PARAMETERS 


if( document.HearMeVCC )
{
    for( i=0; i<document.HearMeVCC.length; i++ )
    {
        if( document.HearMeVCC[i].value != null )
            params[document.HearMeVCC[i].name] = document.HearMeVCC[i].value;
    }
}



//  HARDCODED PARAMETERS 


params["Domain"] = "audiochat.hearme.com";
params["Vendor"] = "HEARME";
params["Application"] = "EVP";


//  HTML CODE FOR CONTROL 


document.write( "<TABLE WIDTH=", params["Width"] );

if( params["Border"] != "" )
    document.write( " BORDER=", params["Border"] );

if( params["Color"] != "" )    
    document.write( " BGCOLOR=", params["Color"] );

document.write( "><TR><TD><TABLE BORDER=0><TR>");



document.writeln("<TR><TD COLSPAN=2 ALIGN=CENTER>");

if( (navigator.appVersion.charAt(0) < 4) ||
    ((navigator.appName == "Netscape") && (navigator.appVersion.split(" ", 1) < 4.08)) )
{
        document.write("<TABLE><TD ALIGN=center BGCOLOR=white WIDTH=",params["Width"]," HEIGHT=",params["Height"],">");
        document.writeln( "<font face=arial size=-1>Para hablar con otros usuarios, ",
        "necesita tener el Netscape 4.08 o Internet Explorer 4.0 o superior",
        "</font>");
        document.write("</TD></TABLE>");

} else if( navigator.userAgent.indexOf( "Win" ) == -1 )
{
        document.write("<TABLE><TD ALIGN=center BGCOLOR=white WIDTH=",params["Width"]," HEIGHT=",params["Height"],">");
        document.writeln("<font face=arial size=-1>Para hablar con otros usuarios, ",
        "usted necesita tener un PC con Microsoft Windows instalado",
        "</font>");
        document.write("</TD></TABLE>");

} else if( navigator.userAgent.indexOf( "MSIE 3" ) == -1 )
{
    if( navigator.appName == "Netscape" )
    {


        //  NETSCAPE EMBED TAG 


        document.write( "<EMBED NAME='EVP' ");
        document.writeln( "TYPE='", mimetype , ";version=", client_version, "' " );
        document.writeln( "pluginurl='", ns_url, "' pluginspage=''" );

        for( var i=0; i<params.length; i++ )
        {
            if( params[params[i]] != null )
            {
                document.write( " ", params[i], "='", params[params[i]], "'" );
            }
        }

        document.write( " hosturl='", escape( document.URL ),"'" );
        document.writeln( "></EMBED>" );

    } else
    {

        //  MSIE OBJECT TAG 

        document.write( "<OBJECT ID='EVP' CLASSID='", classid, "' CODEBASE='", ie_url,
            "' WIDTH='", params["Width"], "' HEIGHT='", params["Height"], "'>" );

        for( i=0; i<params.length; i++ )
        {
            if( params[params[i]] != null )
            {
                document.write( "<PARAM NAME='", params[i], "' VALUE='", params[params[i]], "'></PARAM>" );
            }
        }

        document.writeln( "</OBJECT>" );
    }

  
}

document.writeln( "</TD></TR></TABLE></TD></TR></TABLE>" );
}

