// =======================================
// Ad Selector
// =======================================

// Specify the image files
var RightSideAdPic = new Array() // don't touch this
var RightSideAdAlt = new Array() // don't touch this
var RightSideAdUrl = new Array() // addition for url functionality
var RightSideAdOnClk = new Array() // addition for OnClick functionality

// Retrieve the current page url for ads which return to the same page they were click on.
var path3 = location.pathname.lastIndexOf('/')
var thispage3 = "http://store.yahoo.com/cgi-bin/clink?yhst-4043893163530+EN5XNb+" + location.pathname.substr(path3+1) + "+thanksgiving5"
if (thispage3 == '')  {
    thispage3 = "http://store.yahoo.com/cgi-bin/clink?yhst-4043893163530+EN5XNb+index.html+thanksgiving5" 
	}
	
// For a SAME PAGE refresh follow this example
//RightSideAdPic[1] = 'http://site.diabeticdiscountdirect.com/ads/rightsideads/storewide10-195x250-2.gif'
//RightSideAdAlt[1] = 'Click here to save 10% Storewide today only!'
//RightSideAdUrl[1] = thispage3
//RightSideAdOnClk[1] = 'Save 10% Storewide Coupon Activated!\r\n\r Please click OK and wait for page to refresh.'

// To add additional ads just copy and change array sequence.

RightSideAdPic[0] = 'http://site.diabeticdiscountdirect.com/ads/rightsideads/prom760-195x120.jpg'
RightSideAdAlt[0] = 'Click here to save 10% on the new ProMed 760 Heated EMS Unit!'
RightSideAdUrl[0] = 'http://store.yahoo.com/cgi-bin/clink?yhst-4043893163530+4MZNYU+promed-prom760.html+prom760'
RightSideAdOnClk[0] = 'Save 10% on the new ProMed 760 Heated EMS Unit Coupon Activated!\r\n\r Please click OK and wait for page to refresh.'

//RightSideAdPic[1] = 'http://site.diabeticdiscountdirect.com/ads/rightsideads/multi10-195x120.jpg'
//RightSideAdAlt[1] = 'Click here to Save 10% on the New Multi-Roller Pain Relief System!'
//RightSideAdUrl[1] = 'http://store.yahoo.com/cgi-bin/clink?yhst-4043893163530+NQdUYq+epprod-mtl100.html+multi10'
//RightSideAdOnClk[1] = 'Save 10% on the New Multi-Roller Coupon Activated!\r\n\r Please click OK and wait for page to refresh.'

RightSideAdPic[1] = 'http://site.diabeticdiscountdirect.com/ads/rightsideads/easytrak10-195x120.jpg'
RightSideAdAlt[1] = 'Click here to Save 10% on the Easy Trak Blood Glucose Testing supplies'
RightSideAdUrl[1] = 'http://store.yahoo.com/cgi-bin/clink?yhst-4043893163530+Xmv4Ec+home-aide.html+easytrak10'
RightSideAdOnClk[1] = 'Save 10% on the Easy Track Tesing Supplies Coupon Activated!\r\n\r Please click OK and wait for page to refresh.'

RightSideAdPic[2] = 'http://site.diabeticdiscountdirect.com/ads/rightsideads/leadlok10-195x120.jpg'
RightSideAdAlt[2] = 'Click here to Save 10% on Lead-lok Silver Electrodes!'
RightSideAdUrl[2] = 'http://store.yahoo.com/cgi-bin/clink?yhst-4043893163530+ysBdh7+lead-lok.html+leadlok10'
RightSideAdOnClk[2] = 'Save 10% on Lead-lok Silver Electrodes Coupon Activated!\r\n\r Please click OK and wait for page to refresh.'

// =======================================
// Put Image in Place
// =======================================
var rand3 = Math.random();
var currentimg3 = Math.floor(RightSideAdPic.length * rand3);

//function RightSideAdSelector(){
//document.images.RightSideAd.src = RightSideAdPic[currentimg3];
//document.images.RightSideAd.alt = RightSideAdAlt[currentimg3];
//}

function RightSideAdLink(){
window.location = RightSideAdUrl[currentimg3];
}

function RightSideAdClick(){
if (RightSideAdOnClk[currentimg3] != ''){
alert(RightSideAdOnClk[currentimg3]);
}
}
