function ListingPopUp(LID, LType) { // 1 = Map // 2 = Email // 3 = WWW // 4 = Featured Page var WindowURL= ''; if (LType == 1) { // Map Link var PopUpTitle = "View Map to Business"; PWidth=500; PHeight=500; WindowURL = "/show_map.html?ListingID=" + LID; } if (LType == 2) { // Email Link var PopUpTitle = "Send Business an Inquiry"; PWidth=400; PHeight=550; WindowURL = "/show_email.html?ListingID=" + LID; } if (LType == 3) { // Website Link // THIS NO LONGER SHOWS AS A POPUP PWidth=0; PHeight=0; // WindowURL = "/show_www.html?ListingID=" + LID; } if (LType == 4) { // Featured Page Link // THIS NO LONGER SHOWS AS A POPUP PWidth=0; PHeight=0; //WindowURL = "/show_fp.html?ListingID=" + LID; } if (LType == 5) { // Send Listing To Friend var PopUpTitle = "Send Listing To Friend"; PWidth=400; PHeight=400; WindowURL = "/show_send_friend.html?ListingID=" + LID; } if (LType == 6) { // Add Listing To Trip var PopUpTitle = "Add Listing To Trip"; PWidth=250; PHeight=150; WindowURL = "/show_add_to_trip.html?ListingID=" + LID; } if (WindowURL != '') { var HTMLCode=''; var ty_ie=0; var winW = 630, winH = 460; if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW = window.innerWidth-16; winH = window.innerHeight-16; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth-16; winH = document.body.offsetHeight-16; } } startX=Math.round((winW/2)-(PWidth/2)); startY=Math.round((winH/2)-(PHeight/2)); if (PWidth != 0) { HTMLCode += '
'; HTMLCode += ''; } HTMLCode += ''; var Obj = document.getElementById("ListingPopUpWindow"); document.getElementById("ListingPopUpWindow").className = "ShowPopup"; document.getElementById("ListingPopUpWindow").style.width = PWidth+ 'px'; document.getElementById("ListingPopUpWindow").style.height = PHeight+ 'px'; WriteInnerHTML("ListingPopUpWindow", HTMLCode); LType=''; LID=''; staticbar(startX, startY); } } function ClassifiedEmailPopUp(LID) { var PopUpTitle = "Send a Classified Ad Inquiry"; var PWidth=400; var PHeight=300; var WindowURL = "/show_classified_email.html?ListingID=" + LID; if (WindowURL != '') { var HTMLCode=''; var ty_ie=0; var winW = 630, winH = 220; if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW = window.innerWidth-16; winH = window.innerHeight-16; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth-16; winH = document.body.offsetHeight-16; } } startX=Math.round((winW/2)-(PWidth/2)); startY=Math.round((winH/2)-(PHeight/2)); if (PWidth != 0) { HTMLCode += ''; HTMLCode += ''; } HTMLCode += ''; var Obj = document.getElementById("ListingPopUpWindow"); document.getElementById("ListingPopUpWindow").className = "ShowPopup"; document.getElementById("ListingPopUpWindow").style.width = PWidth+ 'px'; document.getElementById("ListingPopUpWindow").style.height = PHeight+ 'px'; WriteInnerHTML("ListingPopUpWindow", HTMLCode); LType=''; LID=''; staticbar(startX, startY); } } var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session var startY = 5; //set y offset of bar in pixels var verticalpos="frombottom"; //enter "fromtop" or "frombottom" var DivName = "ListingPopUpWindow"; function ListingPopUpClose() { WriteInnerHTML("ListingPopUpWindow", ''); document.getElementById("ListingPopUpWindow").className = "HidePopup"; document.getElementById("ListingPopUpWindow").style.width = '0px'; document.getElementById("ListingPopUpWindow").style.height = '0px'; } function WriteInnerHTML(p_DivID,p_htmlstr) { if (document.getElementById) { document.getElementById(p_DivID).innerHTML= p_htmlstr; } else { with (document.layers[p_DivID].document) { open(); write(p_htmlstr); close(); } } } function PopupCallback (NewURL, NewType) { // Stat Recorded - Redirect Browser if (NewType == 1) { // FEATURED PAGE window.location = "http://www.verobeach.com" + NewURL; } else if (NewType == 2) { window.open(NewURL); } } function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function get_cookie(Name) { var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { offset += search.length end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function closebar(){ if (persistclose) document.cookie="remainclosed=1" document.getElementById(DivName).style.visibility="hidden" } function staticbar(startX, startY){ barheight=document.getElementById(DivName).offsetHeight var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera; var d = document; function ml(id){ var el=d.getElementById(id); if (!persistclose || persistclose && get_cookie("remainclosed")=="") el.style.visibility="visible" if(d.layers)el.style=el; el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";}; el.x = startX; if (verticalpos=="fromtop") el.y = startY; else{ el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight; el.y -= startY; } return el; } window.stayTopLeft=function(){ if (verticalpos=="fromtop"){ var pY = ns ? pageYOffset : iecompattest().scrollTop; ftlObj.y += (pY + startY - ftlObj.y)/8; } else{ var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight; ftlObj.y += (pY - startY - ftlObj.y)/8; } ftlObj.sP(ftlObj.x, ftlObj.y); setTimeout("stayTopLeft()", 10); } ftlObj = ml(DivName); stayTopLeft(); }