$(document).ready(function() { $('a[rel*=facebox]').facebox() }); function getAgents(vendor) { var Silversea = [ "Linda, Teresa or Harriet", "Teresa, Harriet or Diane", "Harriet, Diane or Patrick", "Diane, Patrick or Vicki C", "Patrick, Vicki C or Linda", "Vicki C, Linda or Harriet" ]; 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 openWin2(url, name) { if(screen.width >= 800) { popupWin = window.open(url, name, "width=650,height=650,left=0,right=0,toolbar=no,scrollbars=yes,resizable=yes"); } else { popupWin = window.open(url, name, "width=5650,height=650,left=0,right=0,toolbar=no,scrollbars=yes,resizable=yes"); } }