// hearmeclient.js
// for use with HearMe Voice Client 2.5
// for OEM version:  Telcopoint
// version 1.0.0.5, 26 Feb 2001

var fwclient = true;
var eventHandler;
var width = 200;
var height = 300;
var sipURL;
var params = "";
var useTunVal= "";
var code;
var type;
var page_version;
var obj = document;
function InitHearMe()
{
	if (navigator.platform.substr(0,3) == "Win")
	{
		if (navigator.appName == "Netscape")
			document.EventHandlerApplet.InitApplet();
		else
		{
		}	
	}
	else
	{
	}
}

function DisplayClient(propArray,objForm)
{
	if (objForm != null)
		obj = objForm;
	if (navigator.platform.substr(0,3) == "Win")
	{
		if (propArray != null)
		{	
			var length = propArray.length;
			while (length > 0)
			{
		
				switch (propArray[length - 1].toUpperCase())
				{
					case "FIREWALLCLIENT=TRUE":
						fwclient = true;
						break;
					case "FIREWALLCLIENT=FALSE":
						fwclient = false;
						break
					default:
						var tempArray = propArray[length - 1].split("=")
						switch (tempArray[0])
						{
							case "EventHandler":
								eventHandler = tempArray[1];
								break;
							case "Width":
								width = tempArray[1];
								break;
							case "Height":
								height = tempArray[1];
								break;
							default:
								if (tempArray[0] == "BackgroundColor")
									tempArray[1] = ParseColor(tempArray[1]);
								
								if (navigator.appName == "Microsoft Internet Explorer")
								{
									params+=("<PARAM NAME=\"" + tempArray[0] + "\" VALUE=\"" + tempArray[1] + "\">");
								}
								else if (navigator.appName == "Netscape")
								{
									var temp = new String(tempArray[1]);
									if (temp.toUpperCase() == "TRUE")
										tempArray[1] = 1;
									
									if (temp.toUpperCase() == "FALSE")
										tempArray[1] = 0;
									params+=(tempArray[0] + "=\"" + tempArray[1] + "\" ");
								}
								else
								{
								}		
						}												
				}
				length = length - 1;
			}
		}	
		if (navigator.appName == "Microsoft Internet Explorer")
		{
			if (fwclient)
			{
				classid ="CLSID:378727A2-03AA-11d5-80C9-0050DA680987";
				codebase ="http://www.telcopoint.com/distro/tpvcfe.cab#Version=2,5,0,126";
			}			
			else
			{
				classid = "CLSID:9D55C2A2-03A8-11d5-80C9-0050DA680987";
				codebase ="http://www.telcopoint.com/distro/tpvcne.cab#Version=2,5,0,126";
			}
			// Embeds OCX
			document.write("<OBJECT ID=\"NPHearMeVoice\" ");
			document.write("WIDTH=\"" + width + "\" ");
			document.write("HEIGHT=\"" + height + "\" ");	
			document.write("CLASSID=\"" + classid + "\" ");
			document.write("CODEBASE=\"" + codebase + "\"> ");
			document.write(params);
			document.write("</OBJECT>");

			// For IE if the Event flag is set to TRUE, then write Javascript function that intercepts event and calls your EventHandler function
			if (eventHandler != null)
			{
			
				document.write("<SCRIPT LANGUAGE=javascript FOR=NPHearMeVoice EVENT=\"ConferenceMessageReceived(label, message)\">");
				document.write(eventHandler + "(\"ConferenceMessageReceived\", label, message)");
				document.write("</SCRIPT>");
				
				document.write("<SCRIPT LANGUAGE=javascript FOR=NPHearMeVoice EVENT=ConnectionStatusChanged>");
				document.write(eventHandler + "(\"ConnectionStatusChanged\")");
				document.write("</SCRIPT>");
		
				document.write("<SCRIPT LANGUAGE=javascript FOR=NPHearMeVoice EVENT=\"FloorRequested(label, value)\">");
				document.write(eventHandler + "(\"FloorRequested\", label, value)");
				document.write("</SCRIPT>");
		
				document.write("<SCRIPT LANGUAGE=javascript FOR=NPHearMeVoice EVENT=\"ParticipantIsMuted(label, status)\">");
				document.write(eventHandler + "(\"ParticipantIsMuted\", label, status)");
				document.write("</SCRIPT>");
		
				document.write("<SCRIPT LANGUAGE=javascript FOR=NPHearMeVoice EVENT=ParticipantsChanged>");
				document.write(eventHandler + "(\"ParticipantsChanged\")");
				document.write("</SCRIPT>");
		
				document.write("<SCRIPT LANGUAGE=javascript FOR=NPHearMeVoice EVENT=\"ParticipantSpeakingIndication(lLabel,bIsSpeaking)\">");			
				document.write(eventHandler + "(\"ParticipantSpeakingIndication\", lLabel, bIsSpeaking)");
				document.write("</SCRIPT>");
		
				document.write("<SCRIPT LANGUAGE=javascript FOR=NPHearMeVoice EVENT=\"PositionInQueHasChanged(newposition)\">");
				document.write(eventHandler + "(\"PositionInQueHasChanged\", newposition)");
				document.write("</SCRIPT>");
		
				document.write("<SCRIPT LANGUAGE=javascript FOR=NPHearMeVoice EVENT=QueParticipantsChanged>");
				document.write(eventHandler + "(\"QueParticipantsChanged\")");
				document.write("</SCRIPT>");
		
				document.write("<SCRIPT LANGUAGE=javascript FOR=NPHearMeVoice EVENT=\"TunneledMessageIndication(szContentType,szMessageBody)\">");
				document.write(eventHandler + "(\"TunneledMessageIndication\", szContentType, szMessageBody)");
				document.write("</SCRIPT>");
			}
		
		}
		else if (navigator.appName == "Netscape")
		{
			if (fwclient)
			{
				mimeType = navigator.mimeTypes["application/x-NPHearMeVoiceTelcoFW"];
				jar_location = "http://www.telcopoint.com/distro/nptpvcfe.jar";
				pluginDirectory = "plugins/HearMe/NPHearMeVoiceTelcoFW/";
				page_version = new netscape.softupdate.VersionInfo (2,5,0,126);
				versionString = "2.5.0.126";
				code = "HearMeVoiceEventTelcoFW.class";
				type = "application/x-NPHearMeVoiceTelcoFW";
			}
			else
			{
				mimeType = navigator.mimeTypes["application/x-NPHearMeVoiceTelco"];
				jar_location = "http://www.telcopoint.com/distro/nptpvcne.jar";
				pluginDirectory = "plugins/HearMe/NPHearMeVoiceTelco/";
				page_version = new netscape.softupdate.VersionInfo (2,5,0,126);
				versionString = "2.5.0.126";
				code = "HearMeVoiceEventTelco.class";
				type = "application/x-NPHearMeVoiceTelco";

			}
			if (!mimeType)
			{
				if (confirm("The HearMe plugin is not installed.  Would you like to install the plugin now?"))
				{												
					if (navigator.javaEnabled())
					{
						trigger = netscape.softupdate.Trigger;
						if (trigger.UpdateEnabled())
						{
							if (navigator.platform == "Win32")
							{
								trigger.StartSoftwareUpdate(jar_location, trigger.DEFAULT_MODE);
								// Sets interval to check if the download of the plugin was completed and loaded
								intervalID = window.setInterval("Interval()",1000);									
							}
							else
							{
								alert("This plug-in only runs on Windows NT/98/95.");
							}
						}
						else
						{
							alert("Enable SmartUpdate before running this script.");
						}
					}
					else
					{
						alert("Enable Java before running this script.");
					}
				}				
				
			}
			else
			{
				trigger = netscape.softupdate.Trigger;
				installed_version = netscape.softupdate.Trigger.GetVersionInfo(pluginDirectory);
				if (LaterVersion(page_version, installed_version))
				{
					if (confirm("A newer version of the HearMe plugin is available. Would you like to install the plugin now?"))
					{
						if (navigator.javaEnabled())
						{
							trigger = netscape.softupdate.Trigger;
							if (trigger.UpdateEnabled())
							{
								if (navigator.platform == "Win32")
								{
									trigger.StartSoftwareUpdate(jar_location, trigger.DEFAULT_MODE);
									// Sets interval to check if the download of the plugin was completed and loaded
									intervalID = window.setInterval("Interval()",1000);									
								}
								else
								{
									alert("This plug-in only runs on Windows NT/98/95.");
								}
							}
							else
							{
								alert("Enable SmartUpdate before running this script.");
							}
						}
						else
						{
							alert("Enable Java before running this script.");
						}
					
					}
					else
					{
						PluginEmbed();
					}	
				}
				else
				{
					PluginEmbed();
				}	
			}
		}
		else
		{
		}
	}	
	else if (navigator.platform.substr(0,3) == "Mac")
	{
		if (propArray != null)
		{
			var length = propArray.length;
			while (length > 0)
			{
				var tempArray = propArray[length - 1].split("=")
				switch (tempArray[0].toUpperCase())
				{
					case "WIDTH":
						width = tempArray[1];
						break;
					case "HEIGHT":
						height = tempArray[1];
						break;
					case "SIPCALLURL":
						sipURL = tempArray[1];
						break;
					case "FIREWALLCLIENT":
						temp = tempArray[1];
						if (temp.toUpperCase() == "FALSE")
							fwclient = false;
						else
							fwclient = true;
						break;
					default:
						if (tempArray[0] == "BackgroundColor")
							tempArray[1] = ParseColor(tempArray[1]);
						params+=(tempArray[0] + "=\"" + tempArray[1] + "\" ");
				}															
			length = length - 1;
			}
		}
		document.write("<TABLE><TR><TD>");
		document.write("<EMBED	type=\"application/x-hearme-voice-client\" ");
		document.write("name=\"HearMe\" ");		
		document.write("pluginspage=\"download.html\" ");
		document.write("height = \"" + height + "\" ");
		document.write("width = \"" + width + "\" ");
		document.write(params);
		document.write("SipCallUrl = \"" + sipURL + "\" ");
		
		if (fwclient == false)
			document.write("FirewallClient = \"FALSE\" ");	
		else
			document.write("FirewallClient = \"TRUE\" ");	

		
		document.write("></EMBED>");
		document.write("<BR>");
		document.write("<CENTER><A HREF=\"download.html\">DOWNLOAD PLUG-IN</A></CENTER>")
		document.write("</TD></TR></TABLE>");		
	}
	else
	{
	}
}


// Internal function used to convert the passed in value into the correct format for the BackgroundColor property
function ParseColor(color)
{
	char0 = color.charAt(0)
	char1 = color.charAt(1)
	char2 = color.charAt(2)
	char3 = color.charAt(3)
	char4 = color.charAt(4)
	char5 = color.charAt(5)
	char6 = color.charAt(6)
	color = char5 + char6 + char3 + char2 + char1 + char2;
	color = parseInt(color,16);
	return color;
}

// Internal function to embed the Plugin
function PluginEmbed()
{
	document.write("<EMBED ");
	document.write("NAME=\"NPHearMeVoice\" ID=\"NPHearMeVoice\" ");
	document.write("TYPE=\"" + type + "\" ");
	document.write("Height = \"" + height + "\" ");
	document.write("Width = \"" + width + "\" ");
	document.write(params);
	document.write("></EMBED>");
	document.write("<APPLET name=\"EventHandlerApplet\" ID=\"EventHandlerApplet\" MAYSCRIPT CODE=\"" + code + "\" WIDTH=1 HEIGHT=1 VIEWASTEXT></APPLET>");

	/*document.write("<SCRIPT>");
	document.write("window.onload =\"InitApplet();\" ");
	document.write("</SCRIPT>")*/

	// For Netscape if the Event flag is set to TRUE, then write Javascript function that intercepts event and calls your EventHandler function
	eventHandler = "Events";
	if (eventHandler != null)
	{
		document.write("<SCRIPT>");
		document.write("function ConferenceMessageReceived(label, message)")
		document.write("{");
		document.write(eventHandler + "(\"ConferenceMessageReceived\", label, message)");
		document.write("}");

		document.write("function ConnectionStatusChanged()")
		document.write("{");
		document.write(eventHandler + "(\"ConnectionStatusChanged\")");
		document.write("}");
		
		document.write("function FloorRequested(label, value)")
		document.write("{");
		document.write(eventHandler + "(\"FloorRequested\", label, value)");
		document.write("}");

		document.write("function ParticipantIsMuted(label, status)")
		document.write("{");
		document.write(eventHandler + "(\"ParticipantIsMuted\", label, status)");
		document.write("}");

		document.write("function ParticipantsChanged()")
		document.write("{");
		document.write(eventHandler + "(\"ParticipantsChanged\")");
		document.write("}");

		document.write("function ParticipantSpeakingIndication(lLabel, bIsSpeaking)")
		document.write("{");
		document.write(eventHandler + "(\"ParticipantSpeakingIndication\", lLabel, bIsSpeaking)");
		document.write("}");

		document.write("function PositionInQueHasChanged(newposition)")
		document.write("{");
		document.write(eventHandler + "(\"PositionInQueHasChanged\", newposition)");
		document.write("}");

		document.write("function QueParticipantsChanged()")
		document.write("{");
		document.write(eventHandler + "(\"QueParticipantsChanged\")");
		document.write("}");

		document.write("function TunneledMessageIndication(szContentType, szMessageBody)")
		document.write("{");
		document.write(eventHandler + "(\"TunneledMessageIndication\", szContentType, szMessageBody)");
		document.write("}");
		document.write("</SCRIPT>");
	}

}

// Internal varibale
var intervalID;

// Internal function used to check if the download of the plugin was completed
function Interval()
{		
	installed_version = netscape.softupdate.Trigger.GetVersionInfo(pluginDirectory);
	if (installed_version == versionString)
	{	var embedIntervalID = intervalID;
		var url = window.location.href;
		window.clearInterval(embedIntervalID);
		window.location.href=url;		
	}									
}

// Internal function to check the installed version of the client against this page's specified version of the client

function LaterVersion(page_version, installed_version)
{
	var pvs = new String(page_version);
	var ivs = new String(installed_version);
	var pv = pvs.split('.');
	var iv = ivs.split('.');

	// reformat version string with leading zeros in subfields
	for (var i=0; i<pv.length; i++)
	{
		while (pv[i].length < 3)
		{
			pv[i] = "0" + pv[i];
		}
	}

	pvs = pv.join(',');

	// reformat version string with leading zeros in subfields
	for (var i=0; i<iv.length; i++)
	{
		while (iv[i].length < 3)
		{
			iv[i] = "0" + iv[i];
		}
	}

	ivs = iv.join(',');
	return(pvs > ivs);
}

function ConvertToBoolean ( value )
{
	if (value.toLowerCase() == "true") return true;
	else if (value.toLowerCase() == "false") return false;
	else return false;
}
//
if(navigator.appName == "Netscape")
	var browserType = true;
else
	var browserType = false;


// Accessors for Plugin/OCX methods
function CancelFloorRequest()
{
	obj.NPHearMeVoice.CancelFloorRequest();
}

function DisplayPreferencesDlg(bShowAsWizard)
{
	obj.NPHearMeVoice.DisplayPreferencesDlg(bShowAsWizard);
}

function GetLocalGUID()
{
	return obj.NPHearMeVoice.GetLocalGUID();
}

function GetLocalLabel()
{
	return obj.NPHearMeVoice.GetLocalLabel();
}

function GetParticipants()
{
	return obj.NPHearMeVoice.GetParticipants();
}

function GetParticipantQuestion(label)
{
	return obj.NPHearMeVoice.GetParticipantQuestion(label);
}

function GetQueParticipants()
{
	return obj.NPHearMeVoice.GetQueParticipants();
}

function GrantFloor(label)
{
	obj.NPHearMeVoice.GrantFloor(label);
}

function HangUpCall()
{
	obj.NPHearMeVoice.HangUpCall();
}

function IgnoreParticipant(label, bIgnore)
{
	obj.NPHearMeVoice.IgnoreParticipant(label, bIgnore);
}

function PlaceCall(szCall)
{
	obj.NPHearMeVoice.PlaceCall(szCall);
}

function RemoveFromFloor(label)
{
	obj.NPHearMeVoice.RemoveFromFloor(label);
}

function RequestFloor(szQuestion)
{
	obj.NPHearMeVoice.RequestFloor(szQuestion);
}

function SendConferenceMessage(list, message)
{
	obj.NPHearMeVoice.SendConferenceMessage(list, message);
}

function SendDTMFString(szDTMF)
{
	obj.NPHearMeVoice.SendDTMFString(szDTMF);
}

function SetAuthorization(szRealm, szUserName, szPassword)
{
	obj.NPHearMeVoice.SetAuthorization(szRealm, szUserName, szPassword);
}

function SetParticipantMuteValue(label, bMute)
{
	obj.NPHearMeVoice.SetParticipantMuteValue(label, bMute);
}

function TunneledMessageRequest(szContentType, szMessageBody)
{
	obj.NPHearMeVoice.TunneledMessageRequest(szContentType, szMessageBody);
}


// Accessor for getting Plugin/OCX property values
function GetProperty(propName)
{
	switch (propName)
	{
		case "AcceptIncomingCalls":	
			if(browserType)
				return obj.NPHearMeVoice.getAcceptIncomingCalls();
			else
				return obj.NPHearMeVoice.AcceptIncomingCalls;
			break;
		case "AuthPassword":
			if(browserType)
				return obj.NPHearMeVoice.getAuthPassword();
			else
				return obj.NPHearMeVoice.AuthPassword;
			break;
		case "ConnectionBandwidth":
			if(browserType)
				return obj.NPHearMeVoice.getConnectionBandwidth();
			else
				return obj.NPHearMeVoice.ConnectionBandwidth;
			break;
		case "ConnectionStatus":
			if(browserType)
				return obj.NPHearMeVoice.getConnectionStatus();
			else
				return obj.NPHearMeVoice.ConnectionStatus;
			break;	
		case "HalfDuplexMode":
			if(browserType)
				return obj.NPHearMeVoice.getHalfDuplexMode();
			else
				return obj.NPHearMeVoice.HalfDuplexMode;
			break;
		case "HandsFree":
			if(browserType)
				return obj.NPHearMeVoice.getHandsFree();
			else
				return obj.NPHearMeVoice.HandsFree;
			break;		
		case "LastErrorCode":
			if(browserType)
				return obj.NPHearMeVoice.getLastErrorCode();
			else
				return obj.NPHearMeVoice.LastErrorCode;
			break;
		case "LastErrorString":
			if(browserType)
				return obj.NPHearMeVoice.getLastErrorString();
			else
				return obj.NPHearMeVoice.LastErrorString;
			break;
		case "LocalUserName":
			if(browserType)
				return obj.NPHearMeVoice.getLocalUserName();
			else
				return obj.NPHearMeVoice.LocalUserName;
			break;
		case "MicEnergy":
			if(browserType)
				return obj.NPHearMeVoice.getMicEnergy();
			else
				return obj.NPHearMeVoice.MicEnergy;
			break;
		case "MicMute":
			if(browserType)
				return obj.NPHearMeVoice.getMicMute();
			else
				return obj.NPHearMeVoice.MicMute;
			break;
		case "MicVolume":
			if(browserType)
				return obj.NPHearMeVoice.getMicVolume();
			else
				return obj.NPHearMeVoice.MicVolume;
			break;
		case "SpeakerEnergy":
			if(browserType)
				return obj.NPHearMeVoice.getSpeakerEnergy();
			else
				return obj.NPHearMeVoice.SpeakerEnergy;
			break;
		case "SpeakerMute":
			if(browserType)
				return obj.NPHearMeVoice.getSpeakerMute();
			else
				return obj.NPHearMeVoice.SpeakerMute;
			break;
		case "SpeakerVolume":
			if(browserType)
				return obj.NPHearMeVoice.getSpeakerVolume();
			else
				return obj.NPHearMeVoice.SpeakerVolume;
			break;
		case "UseAutoGainControl":
			if(browserType)
				return obj.NPHearMeVoice.getUseAutoGainControl();
			else
				return obj.NPHearMeVoice.UseAutoGainControl;
			break;
		case "UseG723HighRate":
			if(browserType)
				return obj.NPHearMeVoice.getUseG723HighRate();
			else
				return obj.NPHearMeVoice.UseG723HighRate;
			break;
		case "UserInfo":
			if(browserType)
				return obj.NPHearMeVoice.getUserInfo();
			else
				return obj.NPHearMeVoice.UserInfo;
			break;
		case "VoiceObjectFileSize":
			if(browserType)
				return obj.NPHearMeVoice.getVoiceObjectFileSize();
			else
				return obj.NPHearMeVoice.VoiceObjectFileSize;
			break;
		case "VoiceObjectFilePointer":
			if(browserType)
				return obj.NPHearMeVoice.getVoiceObjectFilePointer();
			else
				return obj.NPHearMeVoice.VoiceObjectFilePointer;
			break;
		case "VoiceObjectStatus":
			if(browserType)
				return obj.NPHearMeVoice.getVoiceObjectStatus();
			else
				return obj.NPHearMeVoice.VoiceObjectStatus;
			break;
		default:

	}
}

// Accessors for setting Plugin/OCX property values
function SetProperty(propName,v)
{
	switch (propName)
	{
		case "AcceptIncomingCalls":	
			if(browserType)
			{
				var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setAcceptIncomingCalls(bv);
			}
			else
				obj.NPHearMeVoice.AcceptIncomingCalls = v;
			break;	
		case "AuthPassword":
			if(browserType)
				obj.NPHearMeVoice.setAuthPassword(v);
			else
				obj.NPHearMeVoice.AuthPassword = v;
			break;
		case "BackgroundColor":
			if(browserType)
			{
				v = PBC( v );
				obj.NPHearMeVoice.setBackgroundColor(v);
			}
			else
			{
				v = PBC( v );
				obj.NPHearMeVoice.BackgroundColor = v;
			}
		break;
		case "ConnectionBandwidth":
			if(browserType)
			{
				v = parseInt(v);
				obj.NPHearMeVoice.setConnectionBandwidth(v);
			}
			else
				obj.NPHearMeVoice.ConnectionBandwidth = v;
			break;
		case "HandsFree":
			if(browserType)
			{
		 		var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setHandsFree(bv);
			}
			else
				obj.NPHearMeVoice.HandsFree = v;
			break;			
		case "LocalUserName":
			if(browserType)
				obj.NPHearMeVoice.setLocalUserName(v);
			else
				obj.NPHearMeVoice.LocalUserName= v;
			break;		
		case "MicMute":
			if(browserType)
			{
				var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setMicMute( bv );
			}
			else
				obj.NPHearMeVoice.MicMute = v;
			break;
		case "MicVolume":
			if(browserType)
			{
				v = parseInt(v);
				obj.NPHearMeVoice.setMicMute( v );
			}
			else
				obj.NPHearMeVoice.MicMute = v;
			break;
		case "ShowAudioControlPanel":
			if(browserType)
			{
				var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setShowAudioControlPanel( bv );
			}
			else
				obj.NPHearMeVoice.ShowAudioControlPanel = v;
			break;
		case "ShowDialPadPanel":
			if(browserType)
			{
				var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setShowDialPadPanel( bv );
			}
			else
				obj.NPHearMeVoice.ShowDialPadPanel = v;
			break;
		case "ShowDisplayPanel":
			if(browserType)
			{
				var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setShowDisplayPanel( bv );
			}
			else
				obj.NPHearMeVoice.ShowDisplayPanel = v;
			break;
		case "ShowParticipantsPanel":
			if(browserType)
			{
				var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setShowParticipantsPanel( bv );
			}
			else
				obj.NPHearMeVoice.ShowParticipantsPanel = v;
			break;
		case "ShowStatisticsPanel":
			if(browserType)
			{
				var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setShowStatisticsPanel( bv );
			}
			else
				obj.NPHearMeVoice.ShowStatisticsPanel = v;
			break;
		case "ShowVolumePanel":
			if(browserType)
			{
				var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setShowVolumePanel( bv );
			}
			else
				obj.NPHearMeVoice.ShowVolumePanel = v;
			break;
		case "SpeakerMute":
			if(browserType)
			{
				var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setSpeakerMute( bv );
			}
			else
				obj.NPHearMeVoice.SpeakerMute = v;
			break;
		case "SpeakerVolume":
			if(browserType)
			{
				v = parseInt(v);
				obj.NPHearMeVoice.setSpeakerVolume(v);
			}
			else
				obj.NPHearMeVoice.SpeakerVolume = v;
			break;
		case "UseAutoGainControl":
			if(browserType)
			{
				var bv = ConvertToBoolean(v);
				obj.NPHearMeVoice.setUseAutoGainControl( bv );
			}
			else
				obj.NPHearMeVoice.UseAutoGainControl = v;
			break;
		case "UseG732HighRate":
			if (browserType)
				obj.NPHearMeVoice.setUseG732HighRate(v);
			else
				obj.NPHearMeVoice.UseG732HighRate = v;
			break;
		case "UserInfo":
			if(browserType)
				obj.NPHearMeVoice.setUserInfo(v);
			else
				obj.NPHearMeVoice.UserInfo = v;
			break;
		case "VoiceObjectFileSize":
			if(browserType)
				obj.NPHearMeVoice.setVoiceObjectFileSize(v);
			else
				obj.NPHearMeVoice.VoiceObjectFileSize = v;
			break;
		case "VoiceObjectFilePointer":
			if(browserType)
			{
				v = parseInt(v);
				obj.NPHearMeVoice.setVoiceObjectFilePointer(v);
			}
			else
				obj.NPHearMeVoice.VoiceObjectFilePointer = v;
			break;
		case "VoiceObjectStatus":
			if(browserType)
				obj.NPHearMeVoice.setVoiceObjectStatus( v );
			else
				obj.NPHearMeVoice.VoiceObjectStatus = v;
			break;
		default:
					
	}
}
