// Hook for Internet Explorer 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub flashSite_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call flashSite_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}

// Handle all the the FSCommand messages in a Flash movie
function carcasa_DoFSCommand(command, args) {
	
	if(command == "pageOpened") {
		if (offSec){
		    img = new Image();
		    img.src=offSec+args+";?r="+refOJD+"&random="+Math.floor(Math.random()*100000);
		}
		imgPCom = new Image();
		imgPCom.src=offSecPCom+args+"&random="+Math.floor(Math.random()*100000);
	
	} else if (command == "ping") {
		objFlash = myGetElementByID("carcasa");
		objFlash.SetVariable("main.ping", "fscommand");
	}else{
		my_carcasa_DoFSCommand(command, args);
	}
}

function pageOpened(args){
	
	if (offSec){
	    img = new Image();
	    img.src=offSec+args+";?r="+refOJD+"&random="+Math.floor(Math.random()*100000);
	}

	imgPCom = new Image();
	imgPCom.src=offSecPCom+args+"&random="+Math.floor(Math.random()*100000);
}

function checkBrowser(){ 
	this.ver=navigator.appVersion 
	this.dom=document.getElementById?1:0 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0; 
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
	this.ie4=(document.all && !this.dom)?1:0; 
	this.ns5=(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.ns5) ;
	return this;
} 
var bw = checkBrowser();

function myGetElementByID(movieName){
	if (window.document[movieName]){
		return window.document[movieName];
	}
	if (navigator.appName.indexOf("Microsoft Internet")==-1){
		if (document.embeds && document.embeds[movieName])
		return document.embeds[movieName]; 
	} else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)

	{
		return document.getElementById(movieName);
	}

}
