
// ********************************************************************
// Flash Detection

// ***************************************************************
// 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);
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"); }
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);

//b[a++] = new bf("SHRM Incentive Comp Seminar","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b177_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b177_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2Fseminar%2FPages%2Fincentive.aspx");
//b[a++] = new bf("SHRM Business Education",    "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b178_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b178_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2Fseminar%2FPages%2Fbusiness.aspx");
//b[a++] = new bf("SHRM Essentials",            "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b179_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b179_shrm.gif&URL=http%3A%2F%2Fwww2.shrm.org%2Fessentials%2F");
//b[a++] = new bf("SHRM Annual Conference",     "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b180_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b180_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2Fconferences%2Fannual2009");
//b[a++] = new bf("SHRM Business Education",    "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b181_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b181_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2Fseminar%2FPages%2Fbusiness.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT30");
//b[a++] = new bf("SHRM Membership",            "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b182_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b182_shrm.gif&URL=http%3A%2F%2Fwww.shrmsolutions.org%2F");
//b[a++] = new bf("SHRM Membership Plan",       "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b183_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b183_shrm.gif&URL=http%3A%2F%2Fwww.shrmsolutions.org%2F%3Futm_source%3Dhrguide%26utm_medium%3Dbanner%26utm_content%3Dhrcurve");

// %2F - /
// %3A - :
// %3F - ?
// %3D - =
// %26 - &
//b[a++] = new bf("SHRM Membership Plan",    "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b183_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b183_shrm.gif&URL=http%3A%2F%2Fwww.shrmsolutions.org%2F%3Futm_source%3Dhrguide%26utm_medium%3Dbanner%26utm_content%3Dhrcurve");
//b[a++] = new bf("SHRM Learning System",    "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b184_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b184_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2Feducationalproducts%2Flearning%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT44");
//b[a++] = new bf("SHRM Learning System",    "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b187_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b187_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2Feducationalproducts%2Flearning%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT57");
//b[a++] = new bf("SHRM Business Education", "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b186_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b186_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FEducation%2Fseminar%2FPages%2Fbusiness.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT49");
//b[a++] = new bf("SHRM Strategy Conference","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b185_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b185_shrm.gif&URL=http%3A%2F%2Fwww.shrm.org%2FConferences%2FStrategyConference%2FPages%2Fdefault.aspx%3Futm_source%3Dweb%26utm_medium%3Dbutton%26utm_campaign%3DMKT64");
//b[a++] = new bf("Join in September",       "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b188_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b188_shrm.gif&URL=https%3A%2F%2Fecom.shrm.org%2FTimssSolutionSite2004_TPRO%2Fdefault.aspx%3Ftabid%3D124%26PRODUCT_DISCOUNT_ID%3D0338T");
//b[a++] = new bf("Ahead of the Curve?",     "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b189_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b189_shrm.gif&URL=http%3A%2F%2Fwww.shrmsolutions.org%2F%3Futm_source%3Dhrguide%26utm_medium%3Dhbanner%26utm_content%3Dhrcurve");
b[a++] = new bf("Ahead of the Curve?",     "http://www.hr-guide.com/cgi-local/bx.cgi?banner=b190_shrm.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b190_shrm.gif&URL=http%3A%2F%2Fwww.shrmsolutions.org%2F%3Futm_source%3Dhrguide%26utm_medium%3Dhbanner%26utm_content%3Dhrcurve");


//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")
//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("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("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 && Math.random()<.4) {  // 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)
//  b[a++] = new bf("e-Speaking.com","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b005_esp.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b005_esp.gif&URL=http%3A%2F%2Fwww.e-speaking.com%2Fdownload.htm","","http://www.hr-guide.com/images/b005_esp.swf",true)
//  b[a++] = new bf("Executive Decisions International","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b001_edi.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b001_edi.gif&URL=http%3A%2F%2Fwww.exdecs.com%2Findividual_survey.aspx","","http://www.hr-guide.com/images/b001_edi.swf",true)
//  b[a++] = new bf("Executive Decisions International","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b001_edi.gif","http://www.hr-guide.com/cgi-local/bx.cgi?banner=b001_edi.gif&URL=http%3A%2F%2Fwww.exdecs.com%2Findividual_survey.aspx","","http://www.hr-guide.com/images/b001_edi.swf",true)
//  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%2FCreateEOQuestAbout.htm","","http://www.hr-guide.com/images/b004_survey.swf",true)
//  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%2FCreateEOQuestAbout.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.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>')
     document.write('</a><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
// }
//}
}

