function preload() { 
	var d=document; 
	if(d.images){ 
  		if(!d.imgs){ d.imgs=new Array();}
	    var j=d.imgs.length,a=preload.arguments; 
		for(i=0; i<a.length; i++){
			if (a[i].indexOf("#")!=0){ 
				d.imgs[j]=new Image; 
				d.imgs[j++].src=a[i];
			}
		}
	}
}

function undoSwap() { 
	var i,x,a=document.v; 
	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++){
		x.src=x.oSrc;
	}
}

function swap(o) { 
	if(!document.v){document.v=new Array;} 
	var i=0,a=document.v;
	alert(o.id);
	if(o.id!=null){
	}else{
		document.v.push(o); 
		o.id=""+a.length;
	}
}

function verVideoWMV(video)
{	var WMP7;
	
	if ( navigator.appName != "Netscape" ){
		 WMP7 = new ActiveXObject('WMPlayer.OCX');
	}
	
	// Windows Media Player 7
	if ( WMP7 )
	{    document.write ('<OBJECT ID=MediaPlayer ');
		 document.write (' CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6');
		 document.write (' standby="Loading Microsoft Windows Media Player components..."');
		 document.write (' TYPE="application/x-oleobject" width="320" height="309">');
		 document.write ('<PARAM NAME="url" VALUE="../videos/'+video+'">');
		 document.write ('<PARAM NAME="AutoStart" VALUE="true">');
		 document.write ('<PARAM NAME="ShowControls" VALUE="1">');
		 document.write ('<PARAM NAME="uiMode" VALUE="mini">');
		 document.write ('</OBJECT>');
	}
	
	// Windows Media Player 6.4
	else
	{    //Explorer
		 document.write ('<OBJECT ID=MediaPlayer ');
		 document.write ('CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 ');
		 document.write ('CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 ');
		 document.write ('standby="Loading Microsoft Windows Media Player components..." ');
		 document.write ('TYPE="application/x-oleobject" width="320" height="309">');
		 document.write ('<PARAM NAME="FileName" VALUE="../videos/'+video+'">');
		 document.write ('<PARAM NAME="AutoStart" VALUE="true">');
		 document.write ('<PARAM NAME="ShowControls" VALUE="1">');
	
		 //Otros
		 document.write ('    <Embed type="application/x-mplayer2"');
		 document.write ('        pluginspage="http://www.microsoft.com/windows/windowsmedia/"');
		 document.write ('        filename="../videos/'+video+'"');
		 document.write ('        src="../videos/<?=$fila[2]?>"');
		 document.write ('        Name=MediaPlayer');
		 document.write ('        ShowControls=1');
		 document.write ('        ShowDisplay=1');
		 document.write ('        ShowStatusBar=1');
		 document.write ('        width=320');
		 document.write ('        height=309>');
		 document.write ('    </embed>');
		 document.write ('</OBJECT>');
	}
}
