//this page is used to set up general functions used through out the search boxes and WCT pages. 

//bookmark this site
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

//Tell a Friend

var popUpWin=0;
function tellAFriend(strURL,strLogo,strColor,strTxtColor,strTxtMColor,strTxtCColor,strSubImg,strBGColor,strInvColor,strEmailHdr,strRfrColor)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  var strsource = document.URL;
  strsource = strsource.replace(/#/,"");
  strsource = strsource.replace(/\?/g,"[que]");
  strsource = strsource.replace(/\&/g,"[amp]");
  strsource = strsource.replace(/\%/g,"[prc]");
  strsource = strsource.replace(/\=/g,"[eql]");
  var strtitle = document.title;
  strtitle = strtitle.replace(/\?/g,"[que]");
  strtitle = strtitle.replace(/\&/g,"[amp]");
  strtitle = strtitle.replace(/\%/g,"[prc]");
  strtitle = strtitle.replace(/\=/g,"[eql]");
  var yeah = "http://72.3.158.71/ver2/tellfriend.asp"
  yeah+='?source='+ strsource +'&strurl=' + strURL +'&logo=' + strLogo + '&color=' + strColor + '&txtcolor=' + strTxtColor + '&txtmcolor=' + strTxtMColor + '&txtccolor=' + strTxtCColor + '&subimg=' + strSubImg + '&bgcolor=' + strBGColor + '&invcolor=' + strInvColor + '&emailhdr=' + strEmailHdr + '&rfrcolor=' + strRfrColor + '&txttitle=' + strtitle;
  popUpWin = open(yeah, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width=380,height=595,left=50');
}

function hbcPop(key, style, country, state, city) {
if (key==""){key=document.getElementById("rs_city").value;}
if (city==""){city=document.getElementById("rs_city").value;}
var page = "http://www.hotelsbycity.com/hotels/pop_up.php?key="+key+"&style="+style+"&country="+country+"&state="+state+"&city="+city;
var windowprops = "resizable=1,scrollbars=1,menubar=1,location=1,toolbar=1,titlebar=1,width=680,height=510, top=50, left=50";
newWindow = window.open(page, '', windowprops);
newWindow.blur();
}


//ROI
var strURL = window.location.href;var strQuery = "";
if(strURL.indexOf("?")>-1)
{
var strU = strURL.split("?");
if(strU[1].indexOf("source=")>-1){var strQ = strU[1].split("&");for(x=0;x<strQ.length;x++){if(strQ[x].indexOf("source=")==0)strQuery=strQ[x];}}
imgImg = new Image(10,10);imgImg.src = "http://secure.rezserver.com/inc/roitrack.php?" + strQuery;
}

