// ***************************************************************
// 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 ShowFlash(MyFlash,MyExtras,MyWidth,MyHeight) {
  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
}
// ***************************************************************


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);

//if(Math.random()<.9) b[a++] = new bf("HR Florida 2008 Conference & Expo","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b006_itm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b006_itm.gif&URL=http%3A%2F%2Fwww.hrflorida.org%2Fdisplayconvention.cfm")
//b[a++] = new bf("CompareHRIS.com","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b206_comparehris.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b206_comparehris.gif&URL=http%3A%2F%2Fwww.comparehris.com%2F")
if(Math.random()<.2) b[a++] = new bf("CompareHRIS.com","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b206_comparehris.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b206_comparehris.gif&URL=http%3A%2F%2Fwww.comparehris.com%2F")


// NOV
//b[a++] = new bf("Family Work/Life Conference","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b243_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b243_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2Fconferences%2Fworklife%2FPages%2Fdefault.aspx%3Futm_campaign%3DConf_FWI%26utm_medium%3Dwebad%26utm_source%3Donline");
// DEC
//b[a++] = new bf("Enable the Disabled",        "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b244_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b244_shrm.gif&URL=http%3A%2F%2Fforms.shrm.org%2Fforms%2Fyour-guide-ada-reasonable-accommodation-requests%3Fedit[submitted][promo_code]%3DM1211HRGUIDE_ADA%26utm_campaign%3DMembership_Acq_1211%26utm_medium%3DWebAd1201_ADA%26utm_source%3DHRGuide.com");
//b[a++] = new bf("Motivating Managers",        "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b245_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b245_shrm.gif&URL=http%3A%2F%2Fforms.shrm.org%2Fforms%2Fmotivating-managers-review-performance%3Fedit[submitted][promo_code]%3DM1211HRGUIDE_REVIEW%26utm_campaign%3DMembership_Acq_1211%26utm_medium%3DWebAd1201_Review%26utm_source%3DHRGuide.com");
// Dec
//b[a++] = new bf("Personnel Record Must Knows",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b246_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b246_shrm.gif&URL=http%3A%2F%2Fforms.shrm.org%2Fforms%2Fmanaging-personnel-records-practical-legal-and-security-issues%3Fedit[submitted][promo_code]%3DM1211HRGUIDE_Record%26utm_campaign%3DMembership_Acq_1211%26utm_medium%3DWebAd1213_Record%26utm_source%3DHRGuide.com");
// JAN
//b[a++] = new bf("HR Magazine",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg&URL=http%3A%2F%2Fsapphire.shrm.org%2Fhrmagazine%2F%3Futm_source%3DHR%2BGuide%26utm_medium%3DDisplay%2BAd%26utm_campaign%3DHRM_CHA_SUB");
//b[a++] = new bf("Law and Legal Conference",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b249_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b249_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FConferences%2FEmploymentLawLegislativeConference%2FPages%2FRegistration.aspx%3Futm_campaign%3DConf_Leg_2012%26utm_medium%3Dwebad_GMMB_Guide%26utm_source%3DHRGuide");
//b[a++] = new bf("SHRM Seminars",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b248_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b248_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2FSEMINAR%2FPages%2Fdefault.aspx%3Futm_campaign%3DSpringSeminars_Jan2012%26utm_medium%3Dwebad%26utm_source%3DHRGuide");

// FEB
b[a++] = new bf("Law and Legal Conference",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b249_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b249_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FConferences%2FEmploymentLawLegislativeConference%2FPages%2FRegistration.aspx%3Futm_campaign%3DConf_Leg_2012%26utm_medium%3Dwebad_GMMB_Guide%26utm_source%3DHRGuide");
b[a++] = new bf("Law and Legal Conference",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b249_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b249_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FConferences%2FEmploymentLawLegislativeConference%2FPages%2FRegistration.aspx%3Futm_campaign%3DConf_Leg_2012%26utm_medium%3Dwebad_GMMB_Guide%26utm_source%3DHRGuide");
b[a++] = new bf("FLSA Compliance Advisor",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b250_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b250_shrm.gif&URL=http%3A%2F%2Fforms.shrm.org%2Fforms%2Fflsa-tips-paying-nonexempt-employees-after-hours%3Fedit[submitted][promo_code]%3DM212HG_FLSANonexempt%26utm_campaign%3DMembership_Acq_0212%26utm_medium%3Dwebad0201_FLSANonexempt%26utm_source%3DHRGuide");
b[a++] = new bf("FLSA Compliance Advisor",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b250_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b250_shrm.gif&URL=http%3A%2F%2Fforms.shrm.org%2Fforms%2Fflsa-tips-paying-nonexempt-employees-after-hours%3Fedit[submitted][promo_code]%3DM212HG_FLSANonexempt%26utm_campaign%3DMembership_Acq_0212%26utm_medium%3Dwebad0201_FLSANonexempt%26utm_source%3DHRGuide");
b[a++] = new bf("FLSA Compliance Advisor",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b250_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b250_shrm.gif&URL=http%3A%2F%2Fforms.shrm.org%2Fforms%2Fflsa-tips-paying-nonexempt-employees-after-hours%3Fedit[submitted][promo_code]%3DM212HG_FLSANonexempt%26utm_campaign%3DMembership_Acq_0212%26utm_medium%3Dwebad0201_FLSANonexempt%26utm_source%3DHRGuide");
b[a++] = new bf("Social Media Compliance Advisor",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b251_shrm.jpg","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b251_shrm.jpg&URL=http%3A%2F%2Fforms.shrm.org%2Fforms%2Fhandling-employees-negative-comments-social-media%3Fedit[submitted][promo_code]%3DM212HG_SocialMedia%26utm_campaign%3DMembership_Acq_0212%26utm_medium%3Dwebad0201_SocialMedia%26utm_source%3DHRGuide");
b[a++] = new bf("Social Media Compliance Advisor",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b251_shrm.jpg","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b251_shrm.jpg&URL=http%3A%2F%2Fforms.shrm.org%2Fforms%2Fhandling-employees-negative-comments-social-media%3Fedit[submitted][promo_code]%3DM212HG_SocialMedia%26utm_campaign%3DMembership_Acq_0212%26utm_medium%3Dwebad0201_SocialMedia%26utm_source%3DHRGuide");
b[a++] = new bf("Social Media Compliance Advisor",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b251_shrm.jpg","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b251_shrm.jpg&URL=http%3A%2F%2Fforms.shrm.org%2Fforms%2Fhandling-employees-negative-comments-social-media%3Fedit[submitted][promo_code]%3DM212HG_SocialMedia%26utm_campaign%3DMembership_Acq_0212%26utm_medium%3Dwebad0201_SocialMedia%26utm_source%3DHRGuide");
b[a++] = new bf("Essentials All Options",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b252_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b252_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2Feducationalproducts%2Fessentials%2FPages%2Fdefault.aspx%3Futm_campaign%3DEss_All_Feb2012%26utm_medium%3Dwebad%26utm_source%3DHRGuide");
b[a++] = new bf("Essentials All Options",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b252_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b252_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2Feducationalproducts%2Fessentials%2FPages%2Fdefault.aspx%3Futm_campaign%3DEss_All_Feb2012%26utm_medium%3Dwebad%26utm_source%3DHRGuide");
b[a++] = new bf("Essentials All Options",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b252_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b252_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2Feducationalproducts%2Fessentials%2FPages%2Fdefault.aspx%3Futm_campaign%3DEss_All_Feb2012%26utm_medium%3Dwebad%26utm_source%3DHRGuide");

b[a++] = new bf("HR Magazine",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg&URL=http%3A%2F%2Fsapphire.shrm.org%2Fhrmagazine%2F%3Futm_source%3DHR%2BGuide%26utm_medium%3DDisplay%2BAd%26utm_campaign%3DHRM_CHA_SUB");
b[a++] = new bf("HR Magazine",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg&URL=http%3A%2F%2Fsapphire.shrm.org%2Fhrmagazine%2F%3Futm_source%3DHR%2BGuide%26utm_medium%3DDisplay%2BAd%26utm_campaign%3DHRM_CHA_SUB");
b[a++] = new bf("HR Magazine",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg&URL=http%3A%2F%2Fsapphire.shrm.org%2Fhrmagazine%2F%3Futm_source%3DHR%2BGuide%26utm_medium%3DDisplay%2BAd%26utm_campaign%3DHRM_CHA_SUB");
b[a++] = new bf("HR Magazine",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg&URL=http%3A%2F%2Fsapphire.shrm.org%2Fhrmagazine%2F%3Futm_source%3DHR%2BGuide%26utm_medium%3DDisplay%2BAd%26utm_campaign%3DHRM_CHA_SUB");
b[a++] = new bf("HR Magazine",      "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b247_shrm.jpg&URL=http%3A%2F%2Fsapphire.shrm.org%2Fhrmagazine%2F%3Futm_source%3DHR%2BGuide%26utm_medium%3DDisplay%2BAd%26utm_campaign%3DHRM_CHA_SUB");


//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")
if(Math.random()<.8) {
  //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")
  //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")
}

if( hasRightVersion == true ) {  // Only allow a flash ad to be included if the user has capable browser
  b[a++] = new bf("HR-Survey.com","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b004_survey.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b004_survey.gif&URL=http%3A%2F%2Fwww.hr-survey.com%2Fhomework.htm","","http://www.hr-guide.com/images/b004_survey.swf",true)
//  if(Math.random()<.8) {
//    b[a++] = new bf("HR-Survey.com","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b004_survey.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b004_survey.gif&URL=http%3A%2F%2Fwww.hr-survey.com%2Fhomework.htm","","http://www.hr-guide.com/images/b004_survey.swf",true)
//  }
}

function PickRandom() { var i = (c>=0)?c:Math.round((b.length * Math.random())-.5);
 document.write('<TABLE BORDER=2 CELLPADDING=0 CELLSPACING=0 ><TR><TD align=center>')
 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,468,60)
     document.write('<img src="' + b[i].image + '" border=0 alt="'+b[i].name+'">')
   }
 } else {
   document.write('<img src="' + b[i].image + '" border=0 alt="'+b[i].name+'" height=60>')
   if(b[i].showhrgimage==true) {
     document.write('<img src="' + b[i].hrgimage + '" border=0 alt="'+b[i].name+'">')
   }
   //if(b[i].image.indexOf('shrm')>0) { document.write('<img src="http://a.rfihub.com/ca.gif?rb=464&ca=20472323&ct=REPLACE_ME_WITH_YOUR_CACHE_BUSTING" height=0 width=0 border=0 style="display:none"/>'); }
 }
 document.write('<'+'/a><'+'/TD><'+'/TR><'+'/TABLE>')
 c=i
}

