\n'); } function interfata_DoFSCommand(command, 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],args[1],args[2],args[3]); } else if(command =="appletDo"){appletDo(args[0],args[1]) } else if (command=="show"){arat() } else if (command=="cultSrc"){cultSrc (args[0])};// fscomand ('cultSrc','ionica/legatura_ionica2.html'); if (command=="closeme") { this.close() } } function parseStr(str){ var arr = str.split ("@"); return (arr) } function cultSrc (src){ document.all.cult1.style.visibility='visible'; document.all.cult1.src=src; } function initApplet(str,id,x,y){ if (appLets[id]==null){ var oNewDiv = document.createElement("div"); oNewDiv.id=id; // { position:absolute; top:40px; left:10px; width:400px; height:300; Z-INDEX: 4; visibility:hidden;} document.all["applet"].insertBefore(oNewDiv); appLets[id] = oNewDiv; appLets[id].innerHTML=str; } appletlayer = appLets[id]; appletlayer.xC=x; appletlayer.yC=y; appletlayer.style.position="absolute"; appletlayer.style.left=x*xRatio;//FlashLeft+x*xRatio; appletlayer.style.top=y*yRatio;//FlashTop+y*yRatio; appletDo (1,id); } sha=0; appletlayer=document.all["applet"]; function appletDo(numar,id){ if (id){ appletlayer = appLets[id];// } if (!id){ if (sha==0) {return}; //appletlayer = document.all["applet"]; } if(numar==0) { document.all.cult1.style.visibility='hidden'; appletlayer.style.visibility="hidden"; if (id) {sha=0}; } else { document.all.cult1.style.visibility='visible'; appletlayer.style.visibility="visible"; if (id) {sha=1}; } //resizeContent(); } 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.xC*xRatio; applet.style.top = FlashTop+applet.yC*yRatio; /* for (var o in appLets){ appLets[o].style.left = appLets[o].xC*xRatio; appLets[o].style.top = appLets[o].yC*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; interfata.setVariable ( "_root.dircurent",document.URL); this.appLets=new Object(); applet.xC=50; applet.yC=120; this.appLets.ap1=applet; }