rnd.today=new Date();
rnd.seed=rnd.today.getTime();
function rnd() {
 rnd.seed = (rnd.seed*9301+49297) % 233280;
 return rnd.seed/(233280.0);
};
function rand(number) {
 return Math.floor(rnd()*number);
};
rnd();

h=rand(12) + 1; // randomly generate a number from 1 to 4 using the 'rand' function above.

switch (h) {
case 1 : 
  im="images/Embassy.jpg"; 
  g2="https://secure.hilton.com/en/es/res/choose_dates.jhtml;jsessionid=H2IWRCICEXPYACSGBJC32EQ?hotel=OKCESES&corporateCode=0002746248"; 
  break; 
case 2 : 
  im="images/Legend_2011.jpg"; 
  g2="http://www.soonerlegends.com"; 
  break; 
case 3 : 
  im="images/Legend_2011a.jpg"; 
  g2="http://www.soonerlegends.com"; 
  break; 
case 4 : 
  im="images/Embassy.jpg"; 
  g2="https://secure.hilton.com/en/es/res/choose_dates.jhtml;jsessionid=H2IWRCICEXPYACSGBJC32EQ?hotel=OKCESES&corporateCode=0002746248"; 
  break; 
case 5 : 
  im="images/Chicken_Express_Banner.gif"; 
  g2="http://www.chickenexpress.us/"; 
  break; 
case 6 : 
  im="images/metropins_486x100_01.jpg"; 
  g2="http://www.metropins.com"; 
  break; 
 case 7 : 
  im="images/Chicken_Express_Banner.gif"; 
  g2="http://www.chickenexpress.us/"; 
  break; 
  case 8 : 
  im="images/Embassy.jpg"; 
  g2="https://secure.hilton.com/en/es/res/choose_dates.jhtml;jsessionid=H2IWRCICEXPYACSGBJC32EQ?hotel=OKCESES&corporateCode=0002746248"; 
  break; 
case 9 : 
  im="images/springhill.jpg"; 
  g2="http://www.marriott.com/hotels/travel/lawsh-springhill-suites-lawton/"; 
  break; 
case 10 : 
  im="images/Fairfield.jpg"; 
  g2="http://www.marriott.com/hotels/travel/lawfi-fairfield-inn-and-suites-lawton/?corporateCode=S30&toDate=10/3/11&fromDate=6/3/11&app=resvlink"; 
  break; 
  case 11 : 
  im="images/Clarion.jpg"; 
  g2="http://www.clarionoftulsa.com/"; 
  break; 
default : 
  im="images/Fairfield_Inn_Norman.gif"; 
  g2="http://www.fairfieldinnnormanokhotel.com/"; 
}

// To add another banner, simply add the code below just above the line that says "default :"
// Then change the line "h=rand(4);" to "h=rand(5);" - that is, increment the maximum generated number
//
// case 4 : 
//  im="images/newbanner.jpg"; 
//  g2="http://www.newurl.com"; 
//  break; 


document.write('<BR><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH=770 BORDER=0><TR><TD ALIGN=CENTER WIDTH=770> ');
document.write(' <A HREF="'+g2+'" TARGET=_new STYLE="border-bottom:0;"><IMG SRC="'+im+'" WIDTH=486 HEIGHT=100 BORDER=0></A><BR><BR></A> ');
document.write('</TD></TR></TABLE> ');
