
// ***************************************************************
// Detect Flash
hasRightVersion = false
var agt=navigator.userAgent.toLowerCase();
var ie  = (agt.indexOf("msie") != -1);
var ns  = (navigator.appName.indexOf("Netscape") != -1);
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
var mac = (agt.indexOf("mac")!=-1);
var pluginlist='';
if (ie && win) { 
  pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") + detectIE("SWCtl.SWCtl.1","Shockwave Director") + detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") + detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") + detectIE("QuickTimeCheckObject.QuickTimeCheck.1","QuickTime") + detectIE("MediaPlayer.MediaPlayer.1","Windows Media Player") + detectIE("PDF.PdfCtrl.5","Acrobat Reader"); 
  var maxVersion = 5;     // highest version we can actually detect
  var actualVersion = 0;
  // system globals
  var flash2Installed = false;  // boolean. true if flash 2 is installed
  var flash3Installed = false;  // boolean. true if flash 3 is installed
  var flash4Installed = false;  // boolean. true if flash 4 is installed
  var flash5Installed = false;  // boolean. true if flash 5 is installed
  document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
  document.write('on error resume next \n');
  document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
  document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
  document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
  document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n'); 
  document.write('</SCR' + 'IPT\> \n'); // break up end tag so it doesn't end our script
  // loop through all versions we're checking, and set actualVersion to highest detected version
  for (var i = 2; i <= maxVersion; i++) { 
   if (eval("flash" + i + "Installed") == true) actualVersion = i;
  }
  pluginlist += 'Flash ';
}
if (ns || !win) {
  nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();
  pluginlist = detectNS("image/svg-xml","SVG Viewer") + detectNS("application/x-director","Shockwave Director") + detectNS("application/x-shockwave-flash","Shockwave Flash") + detectNS("audio/x-pn-realaudio-plugin","RealPlayer") + detectNS("video/quicktime","QuickTime") + detectNS("application/x-mplayer2","Windows Media Player") + detectNS("application/pdf","Acrobat Reader");
}
function detectIE(ClassID,name) { result=true;
  //result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCRIPT>\n'); if (result) return name+','; else return ''; 
}
function detectNS(ClassID,name) { n = ""; if (nse.indexOf(ClassID) != -1) if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+","; return n; }

function detectFlash(){ 
  pluginlist += navigator.javaEnabled() ? "Java," : "";
  if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);

  //SAMPLE USAGE- detect "Flash"
  if(pluginlist.indexOf("Flash")!=-1) hasRightVersion = true
}
detectFlash(); // call our detector now that it's safely loaded. 




function isDefined2(variable) {
  return (!(!( variable||false )))
}
function isDefined(variable) {
  return eval('(typeof('+variable+') != "undefined");');
}


function bf(name,image,url,showimage2,image2,ShowFlash) { this.name=name; this.image=image; this.url=url; this.showhrgimage=showimage2; this.hrgimage=image2; this.showflash=ShowFlash }
b = new Array(); var a,c;a=0;c=(-1);

// %2F - /
// %3A - :
// %3F - ?
// %3D - =
// %26 - &
//b[a++] = new bf("SHRM Education Series",    "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b194_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b194_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEDUCATION%2FSEMINAR%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT98");
//b[a++] = new bf("SHRM eLearning",           "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b195_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b195_shrm.gif&URL=http%3A%2F%2Fwww.elearning.shrm.org%2F%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT99");
//b[a++] = new bf("SHRM Membership",          "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b196_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b196_shrm.gif&URL=http%3A%2F%2Fsapphire.shrm.org%2FInterviewingPresentation%2FInterviewing.aspx%3Fpromocode%3D1329");
//b[a++] = new bf("Staffing Management",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b197_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b197_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FConferences%2FStaffingManagementConferenceExpo%2FPages%2Fdefault.aspx%3Futm_source%3D %26utm_medium%3D %26utm_campaign%3D119");
//b[a++] = new bf("Learning System",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b198_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b198_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2Feducationalproducts%2Flearning%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT121");
//b[a++] = new bf("AC Network Conference",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b199_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b199_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2Fconferences%2Fannual%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT115");
b[a++] = new bf("Staffing Management Conference",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b197_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b197_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FConferences%2FStaffingManagementConferenceExpo%2FPages%2Fdefault.aspx%3Futm_source%3D %26utm_medium%3D %26utm_campaign%3DMKT127");
b[a++] = new bf("Staffing Management Conference",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b197_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b197_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FConferences%2FStaffingManagementConferenceExpo%2FPages%2Fdefault.aspx%3Futm_source%3D %26utm_medium%3D %26utm_campaign%3DMKT127");
b[a++] = new bf("Staffing Management Conference",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b197_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b197_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FConferences%2FStaffingManagementConferenceExpo%2FPages%2Fdefault.aspx%3Futm_source%3D %26utm_medium%3D %26utm_campaign%3DMKT127");
b[a++] = new bf("Staffing Management Conference",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b197_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b197_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FConferences%2FStaffingManagementConferenceExpo%2FPages%2Fdefault.aspx%3Futm_source%3D %26utm_medium%3D %26utm_campaign%3DMKT127");
b[a++] = new bf("SHRM Seminars",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b200_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b200_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEDUCATION%2FSEMINAR%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT132");
b[a++] = new bf("SHRM Seminars",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b200_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b200_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEDUCATION%2FSEMINAR%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT132");
b[a++] = new bf("SHRM Seminars",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b200_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b200_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEDUCATION%2FSEMINAR%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT132");
b[a++] = new bf("SHRM Seminars",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b200_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b200_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEDUCATION%2FSEMINAR%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT132");
//b[a++] = new bf("Documenting Discipline",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b201_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b201_shrm.gif&URL=http%3A%2F%2Fsapphire.shrm.org%2FInterviewingPresentation%2FDisciplinaryIssues.aspx%3Fpromocode%3D0131");
b[a++] = new bf("Conflict Resolution",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b202_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b202_shrm.gif&URL=http%3A%2F%2Fsapphire.shrm.org%2FInterviewingPresentation%2FConflictResolution.aspx%3Fpromocode%3D0132");
b[a++] = new bf("Conflict Resolution",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b202_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b202_shrm.gif&URL=http%3A%2F%2Fsapphire.shrm.org%2FInterviewingPresentation%2FConflictResolution.aspx%3Fpromocode%3D0132");
b[a++] = new bf("Conflict Resolution",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b202_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b202_shrm.gif&URL=http%3A%2F%2Fsapphire.shrm.org%2FInterviewingPresentation%2FConflictResolution.aspx%3Fpromocode%3D0132");



//b[a++] = new bf("HR-Survey.com","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b000_survey.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b000_survey.gif&URL=http%3A%2F%2Fwww.hr-survey.com%2FCreateEOQuestAbout.htm")
//b[a++] = new bf("HR-Survey.com","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b000_survey.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b000_survey.gif&URL=http%3A%2F%2Fwww.hr-survey.com%2FCreateEOQuestAbout.htm")


var ShowSHRMBanner=1;
if(isDefined('SHRMButton')) { 
  if(SHRMButton == 1) {
    ShowSHRMBanner=0;
  } 
}  // Do the opposite

if(ShowSHRMBanner==1) {
//  b[a++] = new bf("SHRM Essentials", "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b155_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b155_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2Fessentials")
//  b[a++] = new bf("SHRM",        "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b151_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b151_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2Fconferences%2Fdiversity")
}

//b[a++] = new bf("HR-Survey.com","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b000_survey.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b000_survey.gif&URL=http%3A%2F%2Fwww.hr-survey.com%2FCreateEOQuestAbout.htm")
//b[a++] = new bf("e-Speaking.com","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b007_esp.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b007_esp.gif&URL=http%3A%2F%2Fwww.e-speaking.com%2F")


if( hasRightVersion == true) {  // Only allow a flash ad to be included if the user has capable browser
// Weeks 1 & 3
//  b[a++] = new bf("SHRM",         "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b192_shrm.gif",  "http%3A%2F%2Fwww.shrm.org%2Fmultimedia%2Fvideo%2Fpromo%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT87","","http://www.hr-guide.com/images/b192_shrm.swf",true)
//  b[a++] = new bf("SHRM",         "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b192_shrm.gif",  "http%3A%2F%2Fwww.shrm.org%2Fmultimedia%2Fvideo%2Fpromo%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT87","","http://www.hr-guide.com/images/b192_shrm.swf",true)
//  b[a++] = new bf("SHRM",         "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b192_shrm.gif",  "http%3A%2F%2Fwww.shrm.org%2Fmultimedia%2Fvideo%2Fpromo%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT87","","http://www.hr-guide.com/images/b192_shrm.swf",true)
//  b[a++] = new bf("SHRM",         "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b192_shrm.gif",  "http%3A%2F%2Fwww.shrm.org%2Fmultimedia%2Fvideo%2Fpromo%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT87","","http://www.hr-guide.com/images/b192_shrm.swf",true)

// Weeks 2 & 4
//  b[a++] = new bf("SHRM",         "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b193_shrm.gif",  "http%3A%2F%2Fwww.shrm.org%2Fmultimedia%2Fvideo%2Fpromo%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT91","","http://www.hr-guide.com/images/b193_shrm.swf",true)
//  b[a++] = new bf("SHRM",         "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b193_shrm.gif",  "http%3A%2F%2Fwww.shrm.org%2Fmultimedia%2Fvideo%2Fpromo%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT91","","http://www.hr-guide.com/images/b193_shrm.swf",true)
//  b[a++] = new bf("SHRM",         "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b193_shrm.gif",  "http%3A%2F%2Fwww.shrm.org%2Fmultimedia%2Fvideo%2Fpromo%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT91","","http://www.hr-guide.com/images/b193_shrm.swf",true)
//  b[a++] = new bf("SHRM",         "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b193_shrm.gif",  "http%3A%2F%2Fwww.shrm.org%2Fmultimedia%2Fvideo%2Fpromo%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT91","","http://www.hr-guide.com/images/b193_shrm.swf",true)
}

function PickRandom() { var i = (c>=0)?c:Math.round((b.length * Math.random())-.5);
 document.writeln('<CENTER><TABLE BORDER=4 CELLPADDING=0 CELLSPACING=0><TR><TD><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD>')
 document.write('<a href="' + b[i].url + '">')
 if(b[i].showflash==true) {
   if(c==-1) {   // Set C to -1 so that don't read twice.  Browsers won't cache.  
     ShowFlash(b[i].hrgimage,'?clickTag='+b[i].url,640,75)
     document.write('<img src="' + b[i].image + '" border=0 alt="'+b[i].name+'"><br clear=left></a>')
     //document.write('<center>from: <a href="'+b[i].url+'">'+b[i].name+'</a></center>')
   }
 } else {
   document.write('<img src="' + b[i].image + '" border=0 alt="'+b[i].name+'">')
   if(b[i].showhrgimage==true) {
     document.write('<img src="' + b[i].hrgimage + '" border=0 alt="'+b[i].name+'">')
//     document.write('<br><CENTER>'+b[i].name+'</CENTER>')
   }
 }
 document.writeln('</a></TD></TR></TABLE>')
 document.writeln('</TD></TR></TABLE></CENTER>')
 c=i
}


function ShowFlash(MyFlash,MyExtras,MyWidth,MyHeight) {
//if (!useRedirect) {  // if dynamic embedding is turned on
// if(hasRightVersion) { // if we've detected an acceptable version
  var oeTags = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
  + 'WIDTH="'+MyWidth+'" HEIGHT="'+MyHeight+'"'
  + 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
  + '<PARAM NAME="MOVIE" VALUE="'+MyFlash+MyExtras+'">'
  + '<PARAM NAME="PLAY" VALUE="true">'
  + '<PARAM NAME="LOOP" VALUE="true">'
  + '<PARAM NAME="QUALITY" VALUE="high">'
  + '<PARAM NAME="MENU" VALUE="false">'
  + '<EMBED SRC="'+MyFlash+MyExtras+'"'
  + 'WIDTH="'+MyWidth+'" HEIGHT="'+MyHeight+'"'
  + 'PLAY="true"'
  + 'LOOP="true"'
  + 'QUALITY="high"'
  + 'MENU="false"'
  + 'TYPE="application/x-shockwave-flash"'
  + 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
  + '</EMBED>'
  + '</OBJECT>';
  document.write(oeTags);  // embed the flash movie
// } else { // flash is too old or we can't detect the plugin
//  var alternateContent = '' + '<BR>';
//  document.write(alternateContent); // insert non-flash content
// }
//}
}

