

function addToFavorites()
{ 
if (window.sidebar) {alert("Sorry! Your browser doesn't support this function.\nPress Ctrl+D to add site to bookmark list."); return;}
if (window.external) { window.external.AddFavorite(document.location.href + "?WT.cg_n=bookmarkreturn",document.title); return;}
else  { alert("Sorry! Your browser doesn't support this function.\nPress Ctrl+D to add site to bookmark list."); } };


function popup(url, width, height, scrollable) {
	if(scrollable){scbars = 1;}	
	else{scbars = 0;} var nomargin;
	if(scrollable == 2){ nomargin = true; scbars = 0; }
    if(url == "ecap"){ url="http://www.secure-res.com/emgr/csemail.asp?ID="+width; width=400; height = 455;}
    if(url == "srlogo"){ width = 445; height = 455; url="http://www.hotelwebsitedesign.com/secureres/srpopup/"}
    if(url == "stf") {
		if(height==1){height=80;} if(!height){height=0;} url="http://www.secure-res.com/emgr/stf/sendpage.asp?id="+width+"&pg="+escape(location.href); width = 560; height += 490;   }
  var wopt = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+ scbars +",resizable=0,width="+width+",height="+height+",top="+(screen.height/2-height/2)+",left="+(screen.width/2 - width/2);
  if(nomargin){ newwin=window.open("","",wopt);	newwin.document.write("<html><head><style>body{margin:0}</style></head><body><img src='"+ url +"'></body></html>");  }
  else { newwin=window.open(url,"popup",wopt); }			
  newwin.focus(); };


function generate_address( un, hn, sty, lnk, subline) 
{ var stycl = ""; var atsign = "&#64;"; var subject = "";
  var addr = un + atsign + hn;
  if(sty){stycl = " class=" + sty } if(subline){subject = "?Subject=" + subline } 
  if(!lnk){ var lnk = addr; } 
  document.write( "<" + "a " + stycl + " href='" + "mail" + "to:" + addr + subject +"'>" + lnk + "</a>");	};

var wmonths = ["January","Febuary","March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; 

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>'); } };
  
  
//div toggler
function dtoggle(menuItem)
{
	currentdiv.style.display = "none";
	currentdiv.className = "classoff";
	var divtoggles = menuItem.parentNode.parentNode.getElementsByTagName('a');
	for (var i=0; i < divtoggles.length; i++)
		divtoggles[i].className = "classoff";
	menuItem.className = "classon";
	document.getElementById(menuItem.rel).style.display = "block";
	currentdiv = document.getElementById(menuItem.rel);
};
  
function preselectDiv(toggleMenuID,qsVar)
{	
	//Get query string values
	var qs  = document.location.search.substring(1)
	var qsArray = qs.split("&")
	var qsMap = {};
	
	for (i= 0 ; i < qsArray.length; i++)
	{
		var param = qsArray[i];
		var key = param.substring(0, param.indexOf("="));
		var value = unescape(param.substring(param.indexOf("=")+1, param.length));
		qsMap[key] = value;	
	}
	
	// Check to see div exists
	if (qsMap[qsVar])
	{
		//Change DIV based on value of div querystring
		var divtoggles = document.getElementById(toggleMenuID).getElementsByTagName('a');
		for (var i=0; i < divtoggles.length; i++)
		{
			if(divtoggles[i].rel == qsMap[qsVar])
				dtoggle(divtoggles[i]);
		}
	}	
};



//flash popup stuff -------------------------------------------------------------------------------------------------------*/

function flout()
{ 
alert('yo!');
document.getElementById('idxfl').style.display='none'

}

function showOverFlow () {
document.documentElement.style.overflow='auto'
document.documentElement.style.overflowX='hidden';//ie only
document.body.style.overflow='visible'
}

function hideOverFlow () {
/*javascript:scroll(0,0);
if (window.XMLHttpRequest) 
document.documentElement.style.overflow='hidden';
else 
document.body.style.overflow='hidden';*/
}




function addEvent(elm, evType, fn, useCapture)
{
	if (elm.addEventListener) {
		elm.addEventListener(evType, fn, useCapture);
		return true;	}
	else if (elm.attachEvent) {
		var r = elm.attachEvent('on' + evType, fn);
		return r;	}
	else {	elm['on' + evType] = fn;	}
}
function runit()
{
  imgLoader = new Image();// preload image
  imgLoader.src = tb_pathToImage;
            tb_show('','pops/indexe882e882.htm?KeepThis=true&amp;TB_iframe=true&amp;height=219&amp;width=771','');
}








