function addToFavorites()
{
	if (window.external) { window.external.AddFavorite(document.location.href,document.title); }
	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>");	}

//CSS Drop Down Code for IE
startList = function() {
if (document.all&&document.getElementById) {
	navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
	node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
	node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}

// SITEMAP CODE
addEvent(window,'load',sitemapPopup,false);
/* 
	Modify the linkID and popupID to match the ID's you used in the html.
	Modify the popupX and popupY values to change where the popup is absolute positioned.
	Change the width and height of the popup in the css styles.
*/
function sitemapPopup()
{
	var linkID 	= "websiteAssistant"; 
	var popupID	= "websiteAssistantDIV";
	
	var linker = document.getElementById(linkID);
	var popup = document.getElementById(popupID);
	
	popup.parentNode.removeChild(popup);
	linker.appendChild(popup);
	
	linker.onmouseover = function()
	{
		var popup = document.getElementById("websiteAssistantDIV")
		popup.style.display = "block";
	}
	
	linker.onmouseout = function()
	{
		var popup = document.getElementById("websiteAssistantDIV")
		popup.style.display = "none";
	}
	
	popup.onmouseover = function()
	{
		this.style.display = "block";
	}
	
	popup.onmouseout = function()
	{
		this.style.display = "none";
	}
}
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;
	}
}

//map popup
function findMap(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findMap(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function popMap() { //v6.0
  var i,p,v,obj,args=popMap.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findMap(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


function thumb1(url,param) {


url1 = url.replace('popup.asp?path=','')
var i = new Image();
i.src = url1;
var x = i.width;
var y = i.height;
wait(1000);
window.status = url1 + " = " + x + " x " + y + " pixels";
emailWin=window.open(url,"win",param + ",width="+ (x) + ",height="+ (y) );
self.name = "mainWin"; }

function wait(delay){
string="pauseforalert("+delay+");";
setTimeout(string,delay);
}
function pauseforalert(delay){
}

