v3 = 0; op = 0; ie4  = 0; ie5 = 0; nn4 = 0; nn6 = 0; isMac = 0; aol = 0;
var proto = self.location.protocol;
var domain = self.location.host;
var license = '/'+self.location.hostname+'.dat';

if(document.images){
    if(navigator.userAgent.indexOf("Opera") != -1){
        op = 1;
    } else {
        if(navigator.userAgent.indexOf("AOL") != -1){
            aol = 1;
        } else {
            ie4 = (document.all && !document.getElementById);
            nn4 = (document.layers);
            ie5 = (document.all && document.getElementById);
            nn6 = (document.addEventListener);
        }
    }
} else {
    v3 = 1;	
}

if(navigator.userAgent.indexOf("Mac") != -1){
    isMac = 1;
}

if (ie4 || ie5) {
  document.write('<OBJECT ID="ActiveWyncs"');
  document.write('CLASSID="CLSID:819EDD4C-7EB6-4D97-B831-D68B57E7D3ED"');
  document.write('CODEBASE="'+proto+'//'+domain+'/Wyncs.cab#VERSION=3,5,0,0"');
  document.write('STANDBY="Please Wait while the Wyncs application finishes downloading..."');
  document.write('WIDTH=600 HEIGHT=80');
  document.write('>');
  document.write('<p><font style="color: red; font-weight: bold;">');
  document.write('Wyncs - Web Sync plug-in failed to install.<br>');
  document.write('Syncable links will not function properly!<br>');
  document.write('To attempt to reinstall the Wyncs plug-in follow these steps...<br>');
  document.write('Reload this page,<br>wait for the "Security Warning" dialog,<br>');
  document.write('and click "Yes" to install the plug-in.</font></p>');
  document.write('<PARAM NAME="licenseeURL" VALUE="'+proto+'//'+domain+license+'">');
  document.write('<PARAM NAME="AutoSync" VALUE="False">');
  document.write('</OBJECT>');
}
if (nn6) {
  mimetype = navigator.mimeTypes["application/x-wyncs-plugin"];
  if (!mimetype) {
    var install = proto+'//'+domain+'/Wyncs.xpi';
    InstallTrigger.install({'Wyncs' : install});
  }
  document.write('<EMBED type="application/x-wyncs-plugin" name="ActiveWyncs" width="0" height="0" ');
  document.write('licenseeURL="'+proto+'//'+domain+license+'" ');
  document.write('autoSync="False">');
  document.write('</EMBED>');
}
if (nn4) {
  mimetype = navigator.mimeTypes["application/x-wyncs-plugin"];
  if (!mimetype) {
    var trigger = netscape.softupdate.Trigger;
    var install = proto+'//'+domain+'/Wyncs.jar';
    trigger.StartSoftwareUpdate(install, trigger.DEFAULT_MODE);
  }
  document.write('<EMBED type="application/x-wyncs-plugin" name="ActiveWyncs" width="0" height="0" ');
  document.write('licenseeURL="'+proto+'//'+domain+license+'" ');
  document.write('autoSync="False">');
  document.write('</EMBED>');
}

function Wync(dumper) {
  document.ActiveWyncs.Wync(proto+'//'+domain+dumper);
}

