/*
   The McGraw-Hill Companies 
   JavaScript SWF/DCR Player.
   All Rights Reserved.
   
*/

if(typeof sdplayer == "undefined"){ var sdplayer=new Object();}

sdplayer=function(_type,_file,_id,_version,_bgcolor){
this.parameters = new Object();
this.variables = new Object();
this.attributes=new Array();
if(_type){this.setAttribute("type",_type);}else{this.setAttribute("type","swf");}
if(_file){this.setAttribute("file",_file);}
if(_id){this.setAttribute("id",_id);}
if(_version){this.setAttribute("version", new sdverinfo.set(_version.toString().split(".")));}
if(_bgcolor){this.setAttribute("bgcolor",_bgcolor);}
this.setAttribute("quality","high");
this.setAttribute("width",640);
this.setAttribute("height",480);

//
/**/
};
sdplayer.prototype={setAttribute:function(_key,_val){this.attributes[_key]=_val;}
,getAttribute:function(_key){return this.attributes[_key];}
,addParam:function(_key,_val){this.parameters[_key]=_val;}
,getParams:function(){return this.parameters;}
,addVariable:function(_key,_val){this.variables[_key]=_val;}
,getVariable:function(_key){return this.variables[_key];}
,getVariables:function(){return this.variables;}
,getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;
}
,getPlayString:function(){
var ret="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("type") == "dcr"){
ret="<embed type=\"application/x-director\" src=\""+this.getAttribute("file")+"\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwavedirector\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
}else{ret="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("file")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";}
ret+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var tmpParams=this.getParams();
for(var key in tmpParams){ret+=key+"=\""+tmpParams[key]+"\" ";}
var tmpVars=this.getVariablePairs().join("&");
if(tmpVars.length>0){ret+="flashvars=\""+tmpVars+"\"";}
ret+="/>";
}else{
if(this.getAttribute("type") == "dcr"){
ret="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:166b1bca-3f9c-11cf-8075-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,0,0,0\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
}else{ret="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";}
ret+="<param name=\"movie\" value=\""+this.getAttribute("file")+"\" />";
ret+="<param name=\"src\" value=\""+this.getAttribute("file")+"\" />";
var tmpParams=this.getParams();
for(var key in tmpParams){ret+="<param name=\""+key+"\" value=\""+tmpParams[key]+"\" />";}
var tmpVars=this.getVariablePairs().join("&");
if(tmpVars.length>0){ret+="<param name=\"flashvars\" value=\""+tmpVars+"\" />";}
ret+="</object>";}
return ret;}
,display:function(_displayID){var dObj=document.getElementById(_displayID);if(!dObj){return false;}dObj.innerHTML=this.getPlayString();return true;}
}

if(typeof sdverinfo == "undefined"){ var sdverinfo=new Object();}
sdverinfo.findVersion=function(){
 var ret = new sdverinfo.set([0,0,0]);
 if(navigator.plugins && navigator.mimeTypes.length){
   var tmpNav = navigator.plugins["Shockwave Flash"];
   if(tmpNav){if(tmpNav.description){
     var verArr = tmpNav.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".");
     ret = new sdverinfo.set(verArr);
     verArr = null;
 }}}
 else{ // Detect IE
   try{var axObj=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(err){try{
     var axObj=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
     ret=new sdverinfo.set([6,0,22]);
     axObj.AllowScriptAccess="always";
    }catch(err){if(ret.major==6){return ret;}}try{axObj=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
    catch(err){}}
    if(axObj != null){
        var verArr=axObj.GetVariable("$version").split(" ")[1].split(",");
        ret=new sdverinfo.set(verArr);
        verArr=null;
      }
 }
 return ret;
}
sdverinfo.set=function(_vArr){
  this.major=(_vArr[0] == null)?0:parseInt(_vArr[0]);
  this.minor=(_vArr[1] == null)?0:parseInt(_vArr[1]);
  this.revision=(_vArr[2] == null)?0:parseInt(_vArr[2]);
  
}


 util={
getRequestParameter:function(_requestStr){
var queryStr=document.location.search||document.location.hash;
if(queryStr){
var queryArr=queryStr.substring(1).split("&");
for(var i=0;i<queryArr.length;i++){
if(queryArr[i].substring(0,queryArr[i].indexOf("="))==_requestStr){
return queryArr[i].substring((queryArr[i].indexOf("=")+1));}}}
return "";}};

// Dispose of resources
 disposeDCRSWF=function(){
var objArr=document.getElementsByTagName("OBJECT");
for(var i=0;i<objArr.length;i++){
objArr[i].style.display="none";
for(var j in objArr[i]){if(typeof objArr[i][j]=="function"){objArr[i][j]=null;}}}};
if(typeof window.onunload=="function"){
  var oldunload=window.onunload;
  window.onunload=function(){disposeDCRSWF();oldunload();};
}else{ window.onunload=disposeDCRSWF;}
if(Array.prototype.push==null){Array.prototype.push=function(_len){ this[this.length]=_len; return this.length; };}


var getQueryParamValue=util.getRequestParameter();
var mhcdsObject=sdplayer;