function getAgents(vendor) { var Silversea = [ "Harriet, Vicki C or Alice", "Vicki C, Alice or Patrick", "Alice, Patrick or Sandra", "Patrick, Sandra, Julie", "Sandra, Julie or Harriet", "Julie, Harriet or Vicki C", "Harriet, Vicki C or Alice" ]; var rand = Math.round(Math.random()*(Silversea.length-1)); document.write(Silversea[rand]); }//end getAgents window.onload = function() { if (!document.getElementsByTagName) { return false; } // create an array of objects of each link in the document var popuplinks = document.getElementsByTagName("a"); // loop through each of these links (anchor tags) for (var i=0; i < popuplinks.length; i++) { // if the link has a class of "popup"... if (popuplinks[i].getAttribute("class") == "pop800") { // add an onclick event on the fly to pass the href attribute // of the link to our second function, openPopUp popuplinks[i].onclick = function() { pop800(this.getAttribute("href")); return false; } } else if (popuplinks[i].getAttribute("class") == "pop700") { // add an onclick event on the fly to pass the href attribute // of the link to our second function, openPopUp popuplinks[i].onclick = function() { pop700(this.getAttribute("href")); return false; } } else if (popuplinks[i].getAttribute("class") == "pop600") { // add an onclick event on the fly to pass the href attribute // of the link to our second function, openPopUp popuplinks[i].onclick = function() { pop600(this.getAttribute("href")); return false; } } else if (popuplinks[i].getAttribute("class") == "pop500") { // add an onclick event on the fly to pass the href attribute // of the link to our second function, openPopUp popuplinks[i].onclick = function() { pop500(this.getAttribute("href")); return false; } } } } function pop800(linkURL) { window.open(linkURL,'popup','width=820,height=750,left=0,right=0,toolbar=no,scrollbars=yes,location=0,resizable=no') } function pop700(linkURL) { window.open(linkURL,'popup','width=700,height=700,left=0,right=0,toolbar=no,scrollbars=yes,location=0,resizable=no') } function pop600(linkURL) { window.open(linkURL,'popup','width=600,height=500,left=0,right=0,toolbar=no,scrollbars=yes,location=0,resizable=no') } function pop500(linkURL) { window.open(linkURL,'popup','width=500,height=500,left=0,right=0,toolbar=no,scrollbars=no,location=0,resizable=no') }