// Determine user browser
var b = navigator.userAgent;
var ie = (b.indexOf("MSIE") > 0 && b.indexOf("Win") > 0 && b.indexOf("Windows 3.1") < 0);

var code = '"just2easy/Web.class"';

document.writeln('<object id="j2e" width="100%" height="100%"');

if (ie == true){	
	document.writeln(' classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" \
		codebase="http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=5,0,0,9"');
}
else
	document.writeln(' code=' +code+ ' archive=' +arch);

document.writeln(' \
	 type="application/x-java-applet;version=1.5" \
	 >');

document.writeln(' \
	<param name="type" value="application/x-java-applet;version=1.5"> \
	<param name="codebase" value=' +base+ '> \
	<param name="archive"  value=' +arch+ '> \
	<param name="code"     value=' +code+ '> \
	<param name="scriptable" value="false">');

function confirmUnload(){
	var c = document.j2e.changed();

	if (c=="yes")
		return 'You have made changes, and they will be lost!';

	if (c=="store")
		return 'You have opened files from the on-line store. Changes to these files cannot be uploaded once this page is closed!';
}

//register function with the event handler
window.onbeforeunload = confirmUnload;

