function VDetectIE()
{
document.writeln('<SCRIPT LANGUAGE=VBScript\>');
document.writeln('Installed = false');
document.writeln('On error resume next');
document.writeln('Flag = (IsObject(CreateObject("VirtoolsWebPlayerDll.VirtoolsWebPlayer.1")))');
document.writeln('if (err<>0) then Flag = false');
document.writeln('</SCRIPT>');
return Flag;
}

// fonction qui détecte si le Virtools Web Plugin est installé sur Netscape
function VDetectPlug() {
	vplug = null;
	for(i=0;i<navigator.plugins.length;i++){
		myplug = navigator.plugins[i];
		for(j=0;j<myplug.length;j++){
		  if(myplug[j].type=='application/x-virtools' || myplug[j].type=='application/x-nemo'){
			vplug = myplug;
		  }
		}
	}
	if(vplug==null){
		return false;
	}
	return true;
}
//fin fonction détection plugin NS


function writeErrorPluginPC(){
	document.write('<table border="0" cellpadding="0" cellspacing="0" width="400">');
	document.write('<tr>');
	document.write('<td class="MessageError" align="center">The Virtools plug-in is being installed.<br>');
	document.write('Once installation is complete,<br>');
	document.write('close the Virtools window.<br>');
	document.write('<br><a href="javascript:history.go(0);">Next, click here</a><br>');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
	var popup = window.open("http://player.virtools.com","none","height=300,width=550,status=yes,resizable=yes,location=yes,scrollbars=yes");
}

function writeErrorPluginMAC(){
	document.write('<table border="0" cellpadding="0" cellspacing="0" width="400">');
	document.write('<tr>');
	document.write('<td class="MessageError" align="center">Download the Virtools plug-in then install it on your machine.<br>');
	document.write('Once installation is complete,<br>');
	document.write('close the Virtools window.<br>');
	document.write('<br>Quit your browser then restart it.<br>');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
	var popup = window.open("http://player.virtools.com","none","height=300,width=550,status=yes,resizable=yes,location=yes,scrollbars=yes");
}

function writeErrorColor(){
	document.write('<table border="0" cellpadding="0" cellspacing="0" width="400">');
	document.write('<tr>');
	document.write('<td class="MessageError" align="center">To view this event,<br>we suggest to change your display settings to 16 or 32-bits colour :<br>');
	document.write('<br>1. Access desktop<br>');
	document.write('<br>Right-click on your mouse and select &laquo;Properties&raquo;.<br>');
	document.write('<br>Click on the &laquo;Parameters&raquo; tab.<br>');
	document.write('In the &laquo;Colours&raquo; drop down menu,<br>');
	document.write('select &laquo;Colours (16bits)&raquo; or &laquo;Colours (32bits)&raquo;.<br>');
	document.write('<br><a href="javascript:history.go(0);">Next, click here</a><br>');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
}

function writeErrorPlatform(){
	document.write('<table border="0" cellpadding="0" cellspacing="0" width="400">');
	document.write('<tr>');
	document.write('<td class="MessageError" align="center">The Virtools\' plugin<br> is not yet available on your platform.</b><br><br><a href="javascript:window.close()">Back</a><br>');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
}