// JavaScript Document 7/24/2007
var error_occurred = 0;

var BrowserDetect = {
init: function () {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(navigator.userAgent)
|| this.searchVersion(navigator.appVersion)
|| "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function (data) {
for (var i=0;i<data.length;i++) {
var dataString = data[i].string;
var dataProp = data[i].prop;
this.versionSearchString = data[i].versionSearch || data[i].identity;
if (dataString) {
if (dataString.indexOf(data[i].subString) != -1)
return data[i].identity;
}
else if (dataProp)
return data[i].identity;
}
},
searchVersion: function (dataString) {
var index = dataString.indexOf(this.versionSearchString);
if (index == -1) return;
return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
},
dataBrowser: [
{ string: navigator.userAgent,
subString: "OmniWeb",
versionSearch: "OmniWeb/",
identity: "OmniWeb"
},
{
string: navigator.vendor,
subString: "Apple",
identity: "Safari"
},
{
prop: window.opera,
identity: "Opera"
},
{
string: navigator.vendor,
subString: "iCab",
identity: "iCab"
},
{
string: navigator.vendor,
subString: "KDE",
identity: "Konqueror"
},
{
string: navigator.userAgent,
subString: "Firefox",
identity: "Firefox"
},
{
string: navigator.vendor,
subString: "Camino",
identity: "Camino"
},
{ // for newer Netscapes (6+)
string: navigator.userAgent,
subString: "Netscape",
identity: "Netscape"
},
{
string: navigator.userAgent,
subString: "MSIE",
identity: "Explorer",
versionSearch: "MSIE"
},
{
string: navigator.userAgent,
subString: "Gecko",
identity: "Mozilla",
versionSearch: "rv"
},
{ // for older Netscapes (4-)
string: navigator.userAgent,
subString: "Mozilla",
identity: "Netscape",
versionSearch: "Mozilla"
}
],
dataOS : [
{
string: navigator.platform,
subString: "Win",
identity: "Windows"
},
{
string: navigator.platform,
subString: "Mac",
identity: "Mac"
},
{
string: navigator.platform,
subString: "Linux",
identity: "Linux"
}
]

};
BrowserDetect.init();

/* PluginDetect v0.1.4 by Eric Gerds */ 
var PluginDetect={minIEver:5.5,getNum:function(A){if(!A){return null}var m=/[\d][\d\.\_,-]*/.exec(A);return m?m[0].replace(/[\.\_-]/g,","):null},hasMimeType:function(_3){var s,t,z,M=_3.constructor==String?[_3]:_3;for(z=0;z<M.length;z++){s=navigator.mimeTypes[M[z]];if(s&&s.enabledPlugin){t=s.enabledPlugin;if(t.name&&t.description){return s}}}return null},findNavPlugin:function(N,_6){var i,re=new RegExp(N.constructor==String?N:N.join(".*"),"i");var _8=new RegExp(_6===false?".":"\\d","i");var _9=navigator.plugins;for(i=0;i<_9.length;i++){if((re.test(_9[i].description)&&_8.test(_9[i].description))||(re.test(_9[i].name)&&_8.test(_9[i].name))){return _9[i]}}return null},getAXO:function(_a){var _b,e;try{_b=new ActiveXObject(_a);return _b}catch(e){}return null},num:function(A){return (typeof A!="string"?false:(/\d/).test(A))},compareNums:function(_d,_e){if(!this.num(_d)||!this.num(_e)){return 0}var m1=_d.split(","),m2=_e.split(","),x,p=parseInt;for(x=0;x<m1.length;x++){if(p(m1[x],10)>p(m2[x],10)){return 1}if(p(m1[x],10)<p(m2[x],10)){return -1}}return 0},formatNum:function(num){if(!this.num(num)){return null}var n=num.replace(/[\.\_]/g,","),i;n=n.split(",").concat(["0","0","0","0"]);return n.slice(0,4).join(",")},initScript:function(){var $=this,IE;$.isIE=(/*@cc_on!@*/false);$.IEver=-1;if($.isIE){var IE=(/msie\s*\d\.{0,1}\d*/i).exec(navigator.userAgent),progid,x;if(IE){$.IEver=parseFloat((/\d.{0,1}\d*/i).exec(IE[0]),10)}progid=["ShockwaveFlash.ShockwaveFlash","Msxml2.XMLHTTP","Microsoft.XMLDOM","Msxml2.DOMDocument","TDCCtl.TDCCtl","Shell.UIHelper","Scripting.Dictionary"];$.ActiveXEnabled=false;for(x=0;x<progid.length;x++){if($.getAXO(progid[x])){$.ActiveXEnabled=true;break}}};if($.ActiveXEnabled&&$.IEver>=$.minIEver){$.head=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.setAttribute("type","text/vbscript");var Y=["<!"+"--","function PluginDetect1(c)","on error resume next","PluginDetect1=false","dim head, r","set head=PluginDetect.head","set r=head.firstChild","r.setAttribute \"classid\", c","if TypeName(r)=\"HTMLObjectElement\" then","if not TypeName(r.getAttribute(\"object\")) = \"Nothing\" then","PluginDetect1=true","if r.getAttribute(\"readyState\")<4 then","r.clearAttributes()","head.removeChild(r)","end if","else r.clearAttributes()","head.removeChild(r)","end if","end if","r=\"Nothing\"","end function","--"+">"];T.setAttribute("text",Y.join("\n"));if($.head.firstChild){$.head.insertBefore(T,$.head.firstChild)}else{$.head.appendChild(T)}$.vbscript=false;var e;try{if(PluginDetect1("<object></object>","")===false){$.vbscript=true}}catch(e){}}},init:function(_17){var $=this,IE,p;_17=_17.toLowerCase().replace(/\s/g,"");p=$.plugin=$[_17];if(!p){return -3}if(typeof p.minversion=="undefined"){p.minversion={}}if(typeof p.version=="undefined"){p.version=null}if(typeof p.installed=="undefined"){p.installed=null}$.garbage=false;if($.isIE&&!$.ActiveXEnabled){return -2}return 1},isMinVersion:function(_19,_1a){var $=PluginDetect,i=$.init(_19);if(i<0){return i}if(!$.num(_1a)){return -3}var p=$.plugin,m=p.minversion;_1a=$.formatNum(_1a);if(typeof m["a"+_1a]=="undefined"){if(p.installed==null&&p.getCodeBaseVersion&&$.IEver>=p.minIEver){var tmp,x;for(x in m){tmp=$.compareNums(_1a,x.substring(1,x.length));if(m[x]==1&&tmp<=0){return 1}if(m[x]==-1&&tmp>=0){return -1}}m["a"+_1a]=$.isActiveXObject(_1a)?1:-1}else{if(p.installed==null){p.getVersion()}if(p.installed==-1){m["a"+_1a]=-1}else{if(p.version==null){m["a"+_1a]=0}else{m["a"+_1a]=($.compareNums(p.version,_1a)>=0?1:-1)}}}}$.cleanup();return m["a"+_1a];return -3},getVersion:function(_1e){var $=PluginDetect,i=$.init(_1e);if(i<0){return null}var p=$.plugin;if(p.installed==null){p.getVersion()}$.cleanup();return p.version;return null},cleanup:function(){var $=this;if($.garbage&&typeof window.CollectGarbage!="undefined"){window.CollectGarbage()}},isActiveXObject:function(_22){var $=this,result,s="<object width=\"1\" height=\"1\" "+"style=\"display:none\" "+$.plugin.getCodeBaseVersion(_22)+">"+($.plugin.HTML?$.plugin.HTML:"")+"</object>";$.head.insertBefore(document.createElement("object"),$.head.firstChild);$.head.firstChild.outerHTML=s;result=$.vbscript?PluginDetect1($.plugin.classID):$.detect($.plugin.classID);return result},detect:function(_24){var $=this,result=false;$.head.firstChild.setAttribute("classid",_24);result=$.head.firstChild.getAttribute("object")?true:false;if(!result||$.head.firstChild.getAttribute("readyState")<4){$.head.firstChild.clearAttributes();$.head.removeChild($.head.firstChild);$.garbage=true}return result},search:function(){var _26=[0,0,0,0];var $=this,x,y,A=$.plugin.digits,t=function(x,y){var _2a=(x==0?y:_26[0])+","+(x==1?y:_26[1])+","+(x==2?y:_26[2])+","+(x==3?y:_26[3]);return $.isActiveXObject(_2a)};var _2b,upper,tmp;var _2c=false;for(x=0;x<A.length;x++){upper=A[x]*2;_26[x]=0;for(y=0;y<20;y++){if(upper==1&&x>0&&_2c){break}if(upper-_26[x]>1){tmp=Math.round((upper+_26[x])/2);if(t(x,tmp)){_26[x]=tmp;_2c=true}else{upper=tmp}}else{if(upper-_26[x]==1){upper--;if(!_2c&&t(x,upper)){_2c=true}break}else{if(!_2c&&t(x,upper)){_2c=true}break}}}if(!_2c){return null}}return _26[0]+","+_26[1]+","+_26[2]+","+_26[3]},dummy1:0};PluginDetect.initScript();PluginDetect.java={mimeType:"application/x-java-applet",classID:"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93",JavaVersions:["1.7.0.15","1.6.0.15","1.5.0.12","1.4.2.13","1.3.1.18"],searchJava:function(M){if(!M){return null}var G,e,x3,x4;var AXO=ActiveXObject;var T=M.split("."),J="JavaPlugin."+T[0]+T[1],v=T[0]+"."+T[1]+".";for(x3=T[2];x3>=0;x3--){for(x4=T[3];x4>=0;x4--){G=x4<10?"0"+x4:x4;try{new AXO(J+x3+"_"+G);return v+x3+"_"+G}catch(e){}}if(J+x3=="JavaPlugin.131"){return null}try{new AXO(J+x3);return v+x3}catch(e){}}return null},minIEver:5.5,HTML:"<param name=\"code\" value=\"A.class\" />",getCodeBaseVersion:function(v){var r=this.getDigits(v),$=PluginDetect;if($.compareNums(v,"1,4,1,02")<0){v=r[0]+","+r[1]+","+r[2]+","+r[3]}else{if($.compareNums(v,"1,5,0,02")<0){v=r[0]+","+r[1]+","+r[2]+","+r[3]+"0"}else{v=Math.round((parseFloat(r[0]+"."+r[1],10)-1.5)*10+5)+","+r[2]+","+r[3]+"0"+",0"}}return "codebase=\"#version="+v+"\""},digits:[1,9,32,32],getDigits:function(n){/([\d]+)[,_\.]([\d]+)[,_\.]([\d]+)[,_\.]([\d]+)/.test(n);return [RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$4]},queryJava:function(){var e,j=window.java;try{if(j&&j.lang&&j.lang.System){return (j.lang.System.getProperty("java.version")+" ")}}catch(e){}return null},getVersion:function(){var _38=null,$=PluginDetect;if(!$.isIE){var p1,p,mt;p=$.findNavPlugin(["Java","Plug-in"]);mt=$.hasMimeType(this.mimeType);this.installed=(mt||p)&&navigator.javaEnabled()?0:-1;if(p){p1=$.getNum(p.description)}if(p1&&mt&&navigator.javaEnabled()){_38=p1}if(!_38&&(this.installed||!/firefox/i.test(navigator.userAgent))){p=this.queryJava();if(p){_38=p}}if(_38){this.installed=1}}else{var x,tmp=null;if($.IEver>=this.minIEver){_38=$.search();this.installed=_38?1:-1}else{for(x=0;x<this.JavaVersions.length;x++){tmp=this.searchJava(this.JavaVersions[x]);if(tmp){_38=tmp;break}}this.installed=_38?1:($.getAXO("JavaPlugin")?0:-1)}}this.version=$.formatNum($.getNum(_38))}};PluginDetect.flash={mimeType:["application/x-shockwave-flash","application/futuresplash"],progID:"ShockwaveFlash.ShockwaveFlash",classID:"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000",getVersion:function(){var _3d=function(A){if(!A){return null}var m=/[\d][\d\,\.\s]*[rRdD]{0,1}[\d\,]*/.exec(A);return m?m[0].replace(/[rRdD\.]/g,",").replace(/\s/g,""):null};var p,$=PluginDetect,e,i,version=AXO=majV=null;if(!$.isIE){p=$.findNavPlugin("Flash");if(p&&p.description&&$.hasMimeType(this.mimeType)){version=_3d(p.description)}}else{for(i=15;i>2;i--){AXO=$.getAXO(this.progID+"."+i);if(AXO){majV=i.toString();break}}if(majV=="6"){try{AXO.AllowScriptAccess="always"}catch(e){return "6,0,21,0"}}try{version=_3d(AXO.GetVariable("$version"))}catch(e){}if(!version&&majV){version=majV}}this.installed=version?1:-1;this.version=$.formatNum(version)}};

if (BrowserDetect.OS == "Mac" && BrowserDetect.browser != "Safari")
{
document.write("<h4><b><img width='35' height='35' align='absmiddle' src='http://www1.georgetown.edu/admin/ideaa/images/nocheck.gif'/>Wrong Browser</b></h4><p>Only Safari can be used to complete the course on Apple computers. Close current browser and open ideaa.georgetown.edu/parccstartup using <img width='35' height='35' align='absmiddle' src='http://www1.georgetown.edu/admin/ideaa/images/safari.jpg'/>Safari Web browser</p>");
}
else if (BrowserDetect.OS != "Mac" && (BrowserDetect.browser != "Explorer" || BrowserDetect.version < 5))
{
document.write("<h4><b><img width='35' height='35' align='absmiddle' src='http://www1.georgetown.edu/admin/ideaa/images/nocheck.gif'/>Wrong Browser</b></h4> <p>Close current browser and open <b>ideaa.georgetown.edu/parccstartup</b> using either <img width='35' height='35' align='absmiddle' src='http://www1.georgetown.edu/admin/ideaa/images/ie-42-42.jpg'/>Internet Explorer 6.0 or <img width='35' height='35' align='absmiddle' src='http://www1.georgetown.edu/admin/ideaa/images/ie7.jpg'/>Internet Expolorer 7.0</p>");
}
else
{
if (PluginDetect.isMinVersion('Flash', '6,1') == 1 && navigator.javaEnabled() == 1 && (BrowserDetect.OS == "Mac" || PluginDetect.isMinVersion('Java', '1,3') == 1))
{ 
document.write("<h4><b><img width='35' height='35' align='absmiddle' src='http://www1.georgetown.edu/admin/ideaa/images/check.gif'/>Congratulations, your computer is now ready to start the training.</b></h4> <p><center><a href='https://campus.georgetown.edu' target='_blank'><strong>CLICK HERE TO LOG INTO BLACKBOARD AND START THE COURSE</strong></a></center></p>"); 
} 

else
{ 
if (PluginDetect.isMinVersion('Flash', '6,1') != 1)
{
//Flash output msg, not tested 7/26/2007 -sia5
document.write("<h4><b><img width='35' height='35' align='absmiddle' src='http://www1.georgetown.edu/admin/ideaa/images/nocheck.gif'/>Flash Player is not installed.</b></h4>  <p>Visit <a href='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&P5_Language=English' target='_blank'><b>Macromedia Flash Player download page</a></b> and follow the installation instructions.</p>");
}
if (navigator.javaEnabled() != 1 || (BrowserDetect.OS != "Mac" && PluginDetect.isMinVersion('Java', '1,3') != 1))
{
document.write("<h4><b><img width='35' height='35' align='absmiddle' src='http://www1.georgetown.edu/admin/ideaa/images/nocheck.gif'/>Java is not installed.</b></h4>  <p>Visit <a href='http://www.java.com/en/download/manual.jsp' target='_blank'><b>Java Software Manual Download</a></b> and follow the installation instructions.</p>");
}
}
}




// JavaScript Document

