// If Shockwave not found, then return null
// Else return Shockwave version # xx.yy.zz
function getShockwaveVersion(){

// extract number xx.yy.zz from string
// This routine filters out the revision # from the version #
function getNum(A){var m = /[\d][\d\.]*/.exec(A);return m ? m[0] : null};

// Find version for Navigator
if (navigator.plugins && navigator.plugins.length > 0){
    var i,m,p;
    for(i=0;i<navigator.plugins.length;++i){
        p = navigator.plugins[i];
        if (p.name.indexOf('Director') != -1){return getNum(p.description)}
    }
    return null;
};

var obj=null,s,e;
try{ obj=new ActiveXObject("SWCtl.SWCtl")}
catch(e){};

if (obj!=null){
  s = obj.ShockwaveVersion("");
  if (typeof s == "string" && s.length>0){return getNum(s)}
};

// SW versions < 8.5 do not allow ActiveXObject("SWCtl.SWCtl")
// so we create object for each specific version
try{ new ActiveXObject("SWCtl.SWCtl.8");return "8"}
catch(e){}
try{ new ActiveXObject("SWCtl.SWCtl.7");return "7"}
catch(e){}
try{ new ActiveXObject("SWCtl.SWCtl.1");return "6"}
catch(e){}

return null; // Shockwave not installed on IE

};


//var V = "Su versión de Shockwave es = ";
//document.write(V + getShockwaveVersion())


if( (getShockwaveVersion()!=null) && (parseFloat(getShockwaveVersion())>10) )
{
	//document.write("    -> hay que redirigir")
	//window.location="index2.php"
	
		var CUSTOM_DAUGHTER_WINDOW_URL;
		var DISPLAY_MARKUP = '<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0" ID=video width=750 height=500> <param name=src value="PG.dcr" /> <param name=swRemote value="swSaveEnabled=\'false\' swVolume=\'true\' swRestart=\'false\' swPausePlay=\'false\' swFastForward=\'false\' swContextMenu=\'true\' "> <param name=swStretchStyle value=none /> <param name=bgColor VALUE=#000000 /> <param name=sw8 value="-0.2" /> <param name=sw9 value="sala_kiki.xml" /> <embed src="PG.dcr" bgColor=#000000 width=750 height=500 swRemote="swSaveEnabled=\'false\' swVolume=\'true\' swRestart=\'false\' swPausePlay=\'false\' swFastForward=\'false\' swContextMenu=\'true\'" swStretchStyle=none sw8="-0.2" sw9="sala_kiki.xml" type="application/x-director" pluginspage="http://www.macromedia.com/shockwave/download/"> </embed> </object> ';
		var PREPLAY = new PreplayObj (DISPLAY_MARKUP, CUSTOM_DAUGHTER_WINDOW_URL);
		PREPLAY.startErrorCheck();	
	
}		

