// JavaScript Document

function addToFavorites()
{
if (window.external)
 { window.external.AddFavorite("http://www.savannahsuitehotel.com","Oglethorpe Inn & Suites"); }
else
 { alert("Sorry! Your browser doesn't support this function."); }
}


function popup(url, width, height) {
emailWin=window.open(url,"popup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height); }

function Vpopup(url) {
emailWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=445,height=455');
self.name = "mainWin"; }


function generate_address( un, hn, sty, lnk ) {
        var atsign = "&#64;";
        var addr = un + atsign + hn;
        if(!lnk)
		{ document.write( 
          "<" + "a" + " class=" + sty + " href=" + "mail" + "to:" + addr + ">" +
          addr + "</a>");      }
		else {
		document.write( 
          "<" + "a" + " class=" + sty + " href=" + "mail" + "to:" + addr + ">" +
          lnk + "</a>");  }
		}
		
var wmonths = ["Jan","Feb","Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; 

function do_opt(numopts,startnum,selnum)
{ if(!startnum && startnum != 0){startnum=1} 
  if(numopts == "mo"){ for (var xi=0; xi<wmonths.length; xi++) { document.write('<option value=' + (xi+1) + '>' + (wmonths[xi])); } }
  else { for (var xi=startnum; xi<=numopts; xi++) { sel=(selnum == xi)?" selected ":""; document.write('<option value=' + (xi) + sel + '>' + (xi) ); } }
}
function do_year()
{ var tdate = new Date();  var curyr = tdate.getFullYear();
  for (var jj=0; jj<3; jj++) { document.write('<option value=' + (curyr+jj) + '>' + (curyr+jj) + '</option>'); } }