Fizica
\n');
}
function interfata_DoFSCommand(command, arg) {
if(command == "openLink") {
//alert(arg)
opn(arg);
}
var args = parseStr(arg);
if (command == "register"){
//fscommand ("register",this.filmDiv+s+this);
document.all[args[0]].flashMaster=args[1];
} else if (command == "load") { //fscommand("load",div+s+film+s+x+s+y+s+width+s+height+loop);
mpx = parseInt (args[2]);
mpy = parseInt (args[3]);
mpwidth = parseInt (args[4]);
mpheight = parseInt (args[5]);
_film_curent_url=args[1];
var t =mpy * yRatio + FlashTop
with (document.all[args[0]].children[0]){
stretchToFit=true;
URL=args[1];
if (args[6]==1){
settings.setMode('loop',true);
} else {
settings.setMode('loop',false);
}
width =mpwidth * xRatio;
height =mpwidth * yRatio;
}
with (document.all[args[0]]){
style.left =mpx * xRatio + FlashLeft;
style.top = mpy * yRatio + FlashTop;
style.width = mpwidth * xRatio;
style.heigth = mpheight * yRatio;
style.visibility="visible";
}
resizeContent();
} else if (command == "play"){ //fscommand("play",this.filmDiv);
document.all[args[0]].children[0].controls.play();
} else if (command == "pause"){ //fscommand("pause",this.filmDiv);
document.all[args[0]].children[0].controls.pause();
} else if (command == "stop"){ //fscommand("stop",this.filmDiv);
document.all[args[0]].children[0].controls.stop();
} else if (command == "setCurrentMarker"){
if(document.all[args[0]].children[0].currentMedia && document.all[args[0]].children[0].currentMedia.markerCount >= args[1]) {
document.all[args[0]].children[0].controls.currentMarker = args[1]; }
document.all[args[0]].children[0].controls.pause();
} else if (command == "loop") { //fscommand ("loop",this.filmDiv+s+0);
document.all[args[0]].children[0].settings.setMode('loop',true);
} else if (command == "hide") { //fscommand ("hide",this.filmDiv);
//filmuletzDIV.style.visibility="hidden"
document.all[args[0]].children[0].close();
document.all[args[0]].style.visibility="hidden";
//document.all[args[0]].children[0].uiMode ='invisible';
} else if (command=="ascund") {ascunde();
} else if (command=="arat") {arata();
} else if (command=="initApplet"){initApplet(args[0]);
} else if(command =="appletDo"){appletDo(args[0]);
} else if (command=="show"){arat();
} else if (command=="close"){ this.close()
//closeApplicationAndParent();
};
}
function closeApplicationAndParent() {
if(!this.window.opener || this.window.opener.closed){
this.close();
return;
}
this.window.opener.close();
if(this.window.opener.closed) {
this.close();
}
}
function opn(theURL) {
if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4) isie=true
else isie=false;
if (isie) {
window.open( theURL , "_new", "fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
}
}
function parseStr(str){
var arr = str.split ("@");
return (arr)
}
function initApplet(str){
//DDU:
return;
//End DDU
appletlayer = document.all["applet"];
appletlayer.innerHTML=str;
}
function appletDo(numar){
//DDU:
return;
//End DDU
appletlayer = document.all["applet"];
if(numar==0)
{
appletlayer.style.visibility="hidden";
}
else
{
appletlayer.style.visibility="visible";
}
}
function arat() {
mpStatus--;
if (mpStatus==0 ){
if (filmuletz.playState==2 && mpStatusI==1){
filmuletz.controls.play();
mpStatusI=0;}
} else if (mpStatus>0){
return;}
filmuletzDIV.style.visibility="visible";
}
function ascunde() {
if (filmuletz.playState==3){
mpStatusI=1;
filmuletz.controls.pause();}
mpStatus++;
filmuletzDIV.style.visibility="hidden";
}
function resizeContent() {
var dx = document.body.clientWidth;
var dy = document.body.clientHeight;
if(dx/1024 > dy/768) {
FlashWidth = dy / 768 * 1024;
FlashHeigth = dy;
FlashLeft = (dx - dy / 768 * 1024) / 2;
FlashTop = 0;
} else {
FlashWidth = dx
FlashHeigth = dx / 1024 * 768;
FlashLeft = 0;
FlashTop = (dy - dx / 1024 * 768) / 2;
}
//Flash interface position and size:
flash.style.left = FlashLeft;
flash.style.top = FlashTop;
interfata.style.width = FlashWidth;
interfata.style.height = FlashHeigth
//Media Player position and size:
xRatio = FlashWidth/1024;
yRatio = FlashHeigth/768;
//java
//applet.style.left = FlashLeft;
//applet.style.top = FlashTop+40*yRatio;
var newMPx = mpx*xRatio + FlashLeft ;
var newMPy = mpy*yRatio + FlashTop;
var newMPwidth = mpwidth*xRatio;
var newMPheight = mpheight*yRatio;
filmuletzDIV.style.left = newMPx;
filmuletzDIV.style.top = newMPy;
filmuletzDIV.style.width = newMPwidth;
filmuletzDIV.style.height = newMPheight;
filmuletz.width = newMPwidth;
filmuletz.height = newMPheight;
}
//Test the required screen resolution here:
function testScreenRes() {
var screenWidth = window.screen.width;
var screenHight = window.screen.height;
if(screenWidth != 1024 || screenHight != 768)
alert('Acest material educational este conceput pentru o rezolutie a ecranului de 1024 pe 768 pixeli. \nUtilizarea lui pe orice alta rezolutie este suboptimala. \nDe aceea, va recomandam sa schimbati rezolutia ecranului la 1024 pe 768 pixeli!');
}
var enableStatusEvent = true;
function incarca_film(url_nou, left_nou, top_nou, width_nou, height_nou) {
mpx = left_nou * xRatio;
mpy = top_nou * yRatio;
mpwidth = width_nou * xRatio;
mpheight = height_nou * yRatio;
_film_curent_url = url_nou;
arata();
}
function arata() {
filmuletz.URL = _film_curent_url;
filmuletz.settings.setMode('loop',false);
//skimba('filmuletz','zIndex',4);
filmuletzDIV.style.left = mpx;
filmuletzDIV.style.top = mpy;
filmuletzDIV.style.width = mpwidth;
filmuletz.width=mpwidth;
filmuletzDIV.style.heigth = mpheight;
filmuletzDIV.style.visibility="visible";
enableStatusEvent = true;
playf();
}
function pauzaf() {
filmuletz.controls.pause();
}
function playf() {
filmuletz.controls.play();
}
function init(){
//filmuletz.DoubleClick.returnValue=false;
}