function bwcheck(){ 
	this.ver=navigator.appVersion;
	this.agent=navigator.userAgent;
	this.dom=document.getElementById?1:0;
	this.opera5=this.agent.indexOf("Opera 5")>-1;
	this.opera6=this.agent.indexOf("Opera 6")>-1;
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6;
	this.mac=this.agent.indexOf("Mac")>-1;
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera6);
	return this;
}
bw=new bwcheck();
if((navigator.userAgent.indexOf("MSIE") != -1) && (navigator.userAgent.indexOf("Windows") != -1) && navigator.userAgent.indexOf("Windows 3.1") == -1){
	document.writeln('<script language="VBScript">');
	document.writeln('Private i,x');
	document.writeln('On Error Resume Next');
	document.writeln('detect_vb = False');
	document.writeln('For i=7 To 1 Step -1');
	document.writeln('Set x=CreateObject("ShockwaveFlash.ShockwaveFlash."&i)');
	document.writeln('detect_vb = IsObject(x)');
	document.writeln('If detect_vb Then');
	document.writeln('detect_vb_version = i');
	document.writeln('Exit For');
	document.writeln('End If');
	document.writeln('Next');
	document.writeln('<'+'/script>');
	document.writeln('<SCRIPT LANGUAGE=VBScript\> \n');
	document.writeln('on error resume next \n');
	document.writeln('Sub diamant_FSCommand(ByVal command, ByVal args)\n');
	document.writeln('  call diamant_DoFSCommand(command, args)\n');
	document.writeln('end sub\n');
	document.writeln('<'+'/SCRIPT\> \n');
}
function chkPlugin(){
	detect_vb = false;
	if(bw.ie && bw.agent.indexOf("Windows") != -1){ detect_vb=true; return(detect_vb);}
	else{
		var detected = false;
		var enabled = false;		
		if(navigator.mimeTypes["application/x-shockwave-flash"]){
			detected = true;
			if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
				enabled = true;
		}}	
		return(detected && enabled);		
}}
function writeFlash(id,src,W,H,bg,trans,vers,flashvars){
	var tst=false;
	if(chkPlugin()) tst=true;
	var str="";
	if(!vers) vers = 6;
	if(tst){
		str+="<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+vers+",0,0,0' ";
		str+="WIDTH='"+W+"' HEIGHT='"+H+"' id='"+id+"' ALIGN=''>";
		str+="<PARAM NAME=movie VALUE='"+src+"'> ";
		str+="<PARAM NAME=quality VALUE=high> ";
		str+="<PARAM NAME=scale VALUE=exactfit> ";
		if(trans) str+="<PARAM NAME=wmode VALUE=transparent>";
		str+="<PARAM NAME=FlashVars VALUE="+flashvars+">";
		str+="<PARAM NAME=bgcolor VALUE='"+bg+"'> ";
		str+="<EMBED ";
		str+="src='"+src+"' "; 
		str+="quality=high ";
		str+="scale=exactfit ";
		str+="bgcolor='"+bg+"' ";  
		str+="WIDTH='"+W+"' ";
		str+="HEIGHT='"+H+"' ";
		str+="NAME='"+id+"' ";
		str+="ALIGN='' ";
		str+="FlashVars="+flashvars+" ";
		str+="swLiveConnect='true'";
		str+="TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'>";
		str+="</EMBED>";
		str+="</OBJECT>";
	}else{
		if(alt) str="<a href='/'><img src='"+this.alt+"' width='"+this.W+"' height='"+this.H+"' border='0' /></a>";
		else str=noFlash();
	}
	document.write(str);
}
function noFlash(){
	return("<a href='http://www.macromedia.com/shockwave/download/triggerpages_mmcom/flash.html' target='_blank'><img src='images/getflash.gif' border='0' /></a>")
}
