document.write("<APPLET CODEBASE=https://www.ssl-global7.com/globalhost/groopz2/");
document.write(" CODE=com.diginet.groopz.suite.ec.applet.GroopzApplet.class ");
document.write(" WIDTH=1 ");
document.write(" HEIGHT=1 ");
document.write(" MAYSCRIPT ");
document.write(" ARCHIVE=GroopzApplet.jar ");
document.write(" name=GroopzApplet> ");
gid = getCookie("GroopzUID");
if(gid == null) {
	gid = Math.random();
	var dat = new Date();
	dat.setTime(dat.getTime() + 365*24*60*60*1000); 
	var expString = "; expires=" + dat.toGMTString();
	document.cookie = "GroopzUID" + "=" + escape(gid) + expString; 
}

//document.write(" <param name = UserName value = 'MyUser'>");


document.write(" <param name = Groups value = 'globalhost'>");

document.write(" <param name = GroopzUID value = "+gid+">");
// The name of the server to connect to.  This must be the same machine
// that the applet is served from.  For http tunneling, this should be
// the full URL to the HttpTunnelingServlet
document.write(" <param name = server value = globalhost.com>");	
// The name of the site to connect to.  In the absence of this
// paramter, the default is 1000
document.write(" <param name = site value = 1000>");
// The protocol to use by default (tcp, http, udp)
document.write(" <param name = network value = tcp>");
//http tunneling is off by default
document.write(" <param name = allowhttp value = no>");
// The title of the page shown in Groopz Operator.  This value is set to the 
// title of the web page it came from.
document.write(" <param name = title value = '"+document.title+"'>");
// The referrer 
document.write(" <param name = referrer value = '"+document.referrer+"'>");
// The URL (relative to the Codebase above) of the image to use as the
// skin of the applet's Chat Dialog
document.write(" <param name = skin_img value = chatwindow.jpg>");
// The URL (relative to the Codebase above) of the image to use as the
// face of the applet when operators are available for calls
document.write(" <param name = active_img value = spacer.gif>");
// The URL (relative to the Codebase above) of the image to use as the
// face of the applet when no operators are available.
document.write(" <param name = away_img value = spacer.gif>");
// The URL (relative to the Codebase above) of the image to use as the
// face of the applet when the user clicks and requests help
document.write(" <param name = paging_img value = spacer.gif>");
// The URL (relative to the Codebase above) of the image to use as the
// send button in the "up" state (not pressed) (this button is on the Chat Dialog)
document.write(" <param name = sendup_img value = send-up.gif>");
// The URL (relative to the Codebase above) of the image to use as the
// send button in the "down" state (pressed) (this button is on the Chat Dialog)
document.write(" <param name = senddown_img value = send-down.gif>");
// The URL (relative to the Codebase above) of the image to use as the
// close button in the "up" state (not pressed) (this button is on the Chat Dialog)
document.write(" <param name = closeup_img value = close-up.gif>");

// The URL (relative to the Codebase above) of the image to use as the
// close button in the "down" state (pressed) (this button is on the Chat Dialog)
document.write(" <param name = closedown_img value = close-down.gif>");
// The location where the Operator's name should appear.
// This position is the top left corner of the name specified in pixels relative to the top left corner of the Chat Window
// The x and y coordinates are separated by a comma, so the point (100, 95) would be written as value = 100,95
document.write(" <param name = name_pos value = 91,31>");
// The location where the Send button should appear.
// This position is the top left corner specified in pixels relative to the top left corner of the Chat Window
// The x and y coordinates are separated by a comma, so the point (100, 95) would be written as value = 100,95
document.write(" <param name = send_pos value = 308,253>");
// The location where the Close button should appear.
// This position is the top left corner specified in pixels relative to the top left corner of the Chat Window
// The x and y coordinates are separated by a comma, so the point (100, 95) would be written as value = 100,95
document.write(" <param name = close_pos value = 308,285>");
// The location where the message input area should appear.
// This position is the top left corner specified in pixels relative to the top left corner of the Chat Window
// followed by the width and height of the input area.
// The values are separated by a comma, so to put the area at the point (10, 15) with a width and height of  200 X 100
// the value should be written as value = 10,15,200,100
document.write(" <param name = input_pos value = 8,253,293,61>");
// The location where the chat messages should appear.
// This position is the top left corner specified in pixels relative to the top left corner of the Chat Window
// followed by the width and height of the input area.
// The values are separated by a comma, so to put the area at the point (10, 15) with a width and height of  200 X 100
// the value should be written as value = 10,15,200,100
document.write(" <param name = chat_pos value = 8,60,381,185>");
document.write(" </APPLET>");
document.write(" <!-- End Applet Code -->");
function getCookie(name) {
	var result = null; 
	var myCookie = " " + document.cookie + ";";
	var searchName = " " + name + "=";
	var startOfCookie = myCookie.indexOf(searchName); 
	var endOfCookie; 
	if (startOfCookie != -1) {
		startOfCookie += searchName.length; 
		endOfCookie = myCookie.indexOf(";", startOfCookie); 
		result = unescape(myCookie.substring(startOfCookie, endOfCookie)); 
	}
	return result; 
}
