// hmwAds.js - Serve Ads for HispanicMarketingWeekly.com

// This is meant for backward compatibility with old ad server script
function epsStream ( s ) {
  if (s == 'Left1') {
     eps_left1();
	 document.write("<p>\n");
	 eps_left2();
	 document.write("<p>\n");
	 eps_left3();
	 document.write("<p>\n");
	 eps_left4();
	 document.write("<p>\n");
  }
  if (s == 'Pos1') {
     eps_top1();
  }
  if (s == 'Middle1') {
     eps_middle1();
  }
  if (s == 'Middle2') {
      eps_middle2();	  
   }
  if (s == 'Right1') {
	 eps_right1();
	 document.write("<p>\n");
	 eps_right2();
	 document.write("<p>\n");
	 eps_right3();
	 document.write("<p>\n");
	 eps_right4();
	 document.write("<p>\n");
	 eps_right5();
  }
  if (s == 'Bottom1') {
     eps_bottom1();
  }

}

// Left Ad Stack Components
// Also called Left Vertical1
function eps_left1() {
  eps_general( "hmwb22e7d5", 1227 );
}

// Also called Left Vertical2
function eps_left2() {
  eps_general( "hmw90e5851", 1228 );
}

// Also called Left Vertical3
function eps_left3() {
  eps_general( "hmw6a5ef11", 1229 );
}

// Also called Left Vertical4
function eps_left4() {
  eps_general( "hmwf20a640", 1230 );
}


// Right Ad Stack Components
// Also called Vertical1
function eps_right1() {
  eps_general( "hmw6e707a7", 1286 );
}

//Also called Vertical 2
function eps_right2() {
  eps_general( "hmw6cb7342", 1287 );
}

// Also called Vertical 3
function eps_right3() {
  eps_general( "hmw725097f", 1290 );
}

// Also called Vertical 4
function eps_right4() {
  eps_general( "hmwbe1afcc", 1289 );
}

// Also called Vertical 5
function eps_right5() {
  eps_general( "hmw6c515c0", 1288 );
}


// Top Ad Component
function eps_middle1 () {
  eps_general( "hmwdeb818f", 1200 );
}
// Top Ad Component
function eps_middle2 () {
  eps_general( "hmw254f256", 1196 );
}

// Also called Leader Board
function eps_top1 () {
  eps_general( "hmw7b1665b", 1198 );
}

function eps_bottom1 () {
  eps_general("hmw1c6deee", 1197 );
}

// General Ad Fetcher
function eps_general ( hash, zone ) {
var awrz_rnd = Math.floor(Math.random()*99999999999);
var awrz_protocol =
location.protocol.indexOf('https')>-1?'https:':'http:';
if (awrz_protocol == 'http:') {
if (!document.phpAds_used) document.phpAds_used = ',';
document.write ("<" + "script language='JavaScript' type='text/javascript'src='");
document.write (awrz_protocol+"//servedby.epublishing.net/m3/adjs.php?n="+hash);
document.write ("&zoneid="+zone+"&block=1");
document.write ("&exclude=" + document.phpAds_used);
document.write ("&loc=" + escape(window.location));
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ('&r=' + awrz_rnd);
document.write ("&ct0=" + escape(document.phpAds_ct0));
document.write ("'><" + "/script>");
}
}


