function over(who,lang){document.getElementById(who).src="/Static/images/ansaldosts/"+lang+"/mdx_"+who+"_on.gif";}
function out(who,lang){document.getElementById(who).src="/Static/images/ansaldosts/"+lang+"/mdx_"+who+".gif";}
function flash(uri,w,h){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+w+'" height="'+h+'"><param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+uri+'"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">');
document.write('<embed src="'+uri+'" quality="high" bgcolor="#ffffff" width="'+w+'" height="'+h+'" name="fla" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
document.write('</object>');
}
function changeImgMG(what,who,how,img,alt){
var qualePaginazione='document.getElementById(\''+img+'\')';
for (j=0;j<eval(qualePaginazione).childNodes.length;j++){eval(qualePaginazione).childNodes[j].firstChild.className='pagMGOff';}
var qualeTesto='document.getElementById(\''+who+'\')';
eval(qualeTesto).className='pagMGOn';;
changeImg(what,who,how,img,alt);
}

function changeImg(what,who,how,img,alt){
var qualeLivello='document.getElementById(\'liv'+who+'\')';
var qualeImmagine='document.getElementById(\''+what+'\')';
if(eval(qualeLivello)){
for (i=0;i<(livelliScarica.length);i++){
var qualeLivelloNascondere='document.getElementById(\'liv'+livelliScarica[i]+'\')';
eval(qualeLivelloNascondere).style.display='none';
eval(qualeLivelloNascondere).style.visibility='hidden';
}
eval(qualeLivello).style.display='block';
eval(qualeLivello).style.visibility='visible';
}
eval(qualeImmagine).src=how;
eval(qualeImmagine).alt=alt;
}

function apriChiudi(div){
visibilita=document.getElementById(div).style.visibility;
if(visibilita=="hidden"){visibilita="visible"}
else if(visibilita=="visible"){visibilita="hidden"}
var z=(visibilita=="hidden")?false:true;
var color=(z)?"#F2F2F2":"#FFFFFF";
var vis=(z)?"visible":"hidden";
var disp=(z)?"":"none";
var img=(z)?"/Static/images/freccia_mappa_chiudi.gif":"/Static/images/freccia_mappa_apri.gif";
var img2=(z)?"/Static/images/freccia_mappa.gif":"/Static/images/freccia_mappa_apribile.gif";
document.getElementById('freccia_'+div).src=img;
document.getElementById('freccia2_'+div).src=img2;
document.getElementById('td_'+div).style.background=color;
document.getElementById('td2_'+div).style.background=color;
lay=eval(document.getElementById(div).style);
lay.visibility=vis;
lay.display=disp;
}
function Outline(td,IO){
var tr=td.parentNode;
if(tr.cells){
if (IO=="I"){
for (i=0;i<(tr.cells.length);i++){
if(tr.cells[i].tagName!="TH"){
tr.cells[i].style.borderTop="1px solid #006280";
tr.cells[i].style.borderBottom="1px solid #006280";
tr.cells[i].style.backgroundColor="#EAF1F3";
}}}
else{
for (i=0;i<(tr.cells.length);i++){
if(tr.cells[i].tagName!="TH"){
tr.cells[i].style.borderTop="1px solid #D4D4D4";
tr.cells[i].style.borderBottom="1px solid #EFEFEF";
tr.cells[i].style.backgroundColor="#EFEFEF";
if(tr.cells[i].style){
(tr.className=="p") ? tr.cells[i].style.borderBottom="1px solid #F7F7F7" : tr.cells[i].style.borderBottom="1px solid #EFEFEF";
}
if(tr.cells[i].style){
(tr.className=="p") ? tr.cells[i].style.backgroundColor="#F7F7F7" : tr.cells[i].style.backgroundColor="#EFEFEF";
}else{
tr.cells[i].style.backgroundColor="#EFEFEF"
}}}}}}

function openPhoto(file,position){openPhotoFinal(file,position,dominio)}
function openPhotoFinal(file,position,dominio){
var url='/AnsaldoSTS/applications/photogallery/popupPhoto.jsp?file='+file+'&posizione='+position+'&dominio='+dominio;
window.open(url,'PHOTOGALLERY','width=563,height=438,location=0,menubar=0,personalbar=0,resizable=yes,toolbar=0,status=0,scrollbars=no');void(0);
}

function openPopupPage(url){window.open(url,'Popup','width=800,height=450,location=0,menubar=0,personalbar=0,resizable=0,toolbar=0,status=0,scrollbars=yes');void(0);}

function Input(obj,how){
if(how==1){obj.style.background="#FFFFFF";obj.style.borderColor="#BF0033"}
else if(how==0){obj.style.background="#EFEFEF";obj.style.borderColor="#878787"}
}

function mostraVideo(width,height,path,title,status){
var statusbar=false;

var statusbarff=0;
if(status){statusbar=true;statusbarff=1;}

var path2=path.substring(0,path.indexOf('.'));
if(width=='')width=320;
if(height=='')height=240;
var extencion=path.substring(path.indexOf('.')+1,path.length);
if(extencion=='rm'){
if(status){height-=36}
video="<OBJECT ID=\"RVOCX\" CLASSID=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" WIDTH=\""+width+"\" HEIGHT=\""+height+"\"><PARAM name=\"src\" value=\""+path+"\"/><PARAM name=\"autostart\" value=\"true\"/><PARAM name=\"controls\" value=\"imagewindow\"/><PARAM name=\"console\" value=\"video\"/><PARAM name=\"loop\" value=\"true\"/><EMBED TYPE=\"audio/x-pn-realaudio-plugin\" SRC=\""+path+"\" WIDTH=\""+width+"\" HEIGHT=\""+height+"\" AUTOSTART=\"true\" CONTROLS=\"imagewindow\" CONSOLE=\"video\" LOOP=\"true\"/><div class=\"hiddenTitle\">"+title+"</div></OBJECT>";if(status){video+="<OBJECT ID=RVOCX CLASSID=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" WIDTH="+width+" HEIGHT=36><PARAM name=\"src\" value=\""+path+"\"/><PARAM NAME=\"CONTROLS\" VALUE=\"ControlPanel\"><PARAM NAME=\"CONSOLE\" VALUE=\"one\"><EMBED SRC=\""+path+"\" WIDTH="+width+" HEIGHT=36 NOJAVA=true CONTROLS=ControlPanel CONSOLE=one>" + 
 "</OBJECT>"}
} else if(extencion=='mov'){
video="<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" codebase=\"http:\/\/www.apple.com/qtactivex/qtplugin.cab\" height=\""+height+"\" width=\""+width+"\"><param name=\"src\" value=\""+path+"\"/><param name=\"controller\" value=\""+status+"\"><param name=\"autoplay\" value=\"true\"/><param name=\"loop\" value=\"true\"/><param name=\"type\" value=\"video/quicktime\" height=\""+height+"\" width=\""+width+"\"/><embed src=\""+path+"\" height=\""+height+"\" width=\""+width+"\" autoplay=\"true\" loop=\"true\" type=\"video/quicktime\" pluginspage=\"http:\/\/www.apple.com/quicktime/download/\" controller=\""+status+"\"/><div class=\"hiddenTitle\">"+title+"</div></object>"
}else if(extencion=='flv'){
var playerUrl='/Static/emb/player/';
video="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http:\/\/download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#v...\" width=\""+width+"\" height=\""+height+"\" id=\"FLVPlayer\"><param name=\"movie\" value=\""+playerUrl+"FLVPlayer_Progressive.swf\" /><param name=\"salign\" value=\"lt\" /><param name=\"quality\" value=\"high\" /><param name=\"scale\" value=\"noscale\" /><param name=\"FlashVars\" value=\"&skinName="+playerUrl+"clearSkin_3&streamName="+path2+"&autoPlay=true&autoRewind=true\"/><embed src=\""+playerUrl+"FLVPlayer_Progressive.swf\" flashvars=\"&skinName="+playerUrl+"clearSkin_3&streamName="+path2+"&autoPlay=true&autoRewind=true\" quality=\"high\" scale=\"noscale\" width=\""+width+"\" height=\""+height+"\" name=\"FLVPlayer\" salign=\"LT\" type=\"application/x-shockwave-flash\" pluginspage=\"http:\/\/www.macromedia.com/go/getflashplayer\" /><div class=\"hiddenTitle\">"+title+"</div></object>";
} else if (extencion=='swf'){
video='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'"><param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+path+'"><param name="quality" value="high"><param name="bgcolor" value="#ffffff"><embed src="'+path+'" quality="high" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="fla" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><div class=\"hiddenTitle\">'+title+'</div></embed></object>';
} else {
video="<object id=\"MediaPlayer1\" width=\""+width+"\" height=\""+height+"\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" codebase=\"http:\/\/activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715\" type=\"application/x-oleobject\" standby=\"Loading\"><param name=\"AutoStart\" value=\"true\"/><param name=\"FileName\" value=\""+path+"\"/><param name=\"ShowControls\" value=\""+statusbar+"\"/><param name=\"ShowStatusBar\" value=\""+statusbar+"\"/><param name=\"loop\" value=\"true\"/><embed type=\"application/x-mplayer2\" pluginspage=\"http:\/\/www.microsoft.com/Windows/MediaPlayer/\" src=\""+path+"\" name=\"MediaPlayer1\" width=\""+width+"\" height=\""+height+"\" autostart=\"1\" loop=\"1\" showcontrols=\""+statusbarff+"\" showstatusbar=\""+statusbarff+"\" showdisplay=\"0\"/><div class=\"hiddenTitle\">"+title+"</div></object>"
}
document.write(video);
}
