function WLSearch() { $Words = szKeyWords.value; $URL = "/cgi-bin/htsearch?method=and&sort=score&restrict=/&words=" + $Words; document.location = $URL; } function Link($URL) { document.location = $URL; } function Linkout($URL) { if ($URL.substring(0,7) == "http://") MM_openBrWindow($URL,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes') else document.location = $URL; } function fnDelete(szURL,nID) { var bDelete; var szMessage; if (nID > 0) { szURL = szURL + nID; //alert(szURL); szMessage = "Are you sure you want to delete?\nThis will remove all associations in the database."; bDelete = confirm(szMessage); if (bDelete) { Link(szURL); } } } function fnAlert(szMessage,szURL,nID) { var bDelete; if (nID > 0) { szURL = szURL + nID; //alert(szURL); bDelete = confirm(szMessage); if (bDelete) { Link(szURL); } } } function fnFinalizeSpecial() { var szMessage = "Are you sure you want to finalize?\nYou will not be able to make changes after."; bDelete = confirm(szMessage); if (bDelete) { SupplierSpecialsForm.frmcmd2.value="finalize"; SupplierSpecialsForm.submit(); } } function MM_findObj(n, d) { //v3.0 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'; break; case 1: oCell.innerHTML = ''; break; case 2: szHTML = ''; szHTML = '\n'; oCell.innerHTML = szHTML; break; } oCell = trNewRow.insertCell(); oCell.innerHTML = ''; } function fnDeleteSpecialsSpecialField(nID) { for (curr_row = 0; curr_row < tbExistingSpecial.rows.length; curr_row++) { oRow = tbExistingSpecial.rows[curr_row]; if (oRow.id == nID) { tbExistingSpecial.deleteRow(oRow.rowIndex); break; } } } function fnAddSpecialsShipping() { var szDate = new Date(); szDate = szDate.getTime() + Math.random(); trNewRow = tbExistingShipping.insertRow(); trNewRow.id = szDate; oCell = trNewRow.insertCell(); szHTML = ''; szHTML = SupplierSpecialsForm.szShippingType.options[SupplierSpecialsForm.szShippingType.selectedIndex].value.replace(/\|/g,''); szHTML += '\n'; oCell.innerHTML = szHTML; oCell = trNewRow.insertCell(); oCell.innerHTML = SupplierSpecialsForm.szShippingAmount.value.replace(/\|/g,''); oCell = trNewRow.insertCell(); szHTML = ''; szHTML += '\n'; szHTML += '\n'; szHTML += '\n'; szHTML += '\n'; szHTML += '
#Amount
'; szHTML += SupplierSpecialsForm.szQuantityDiscountQuantity.value.replace(/\|/g,''); szHTML += ''; szHTML += SupplierSpecialsForm.szQuantityDiscountPrice.value.replace(/\|/g,''); szHTML += '
\n'; oCell.innerHTML = szHTML; oCell = trNewRow.insertCell(); szHTML = ''; szHTML += '\n'; szHTML += '\n'; szHTML += '\n'; szHTML += '\n'; szHTML += '
$Amount
'; szHTML += SupplierSpecialsForm.szPriceDiscountAmount.value.replace(/\|/g,''); szHTML += ''; szHTML += SupplierSpecialsForm.szPriceDiscountPrice.value.replace(/\|/g,''); szHTML += '
\n'; oCell.innerHTML = szHTML; oCell = trNewRow.insertCell(); oCell.innerHTML = ''; } function fnDeleteSpecialsShipping(nID) { for (curr_row = 0; curr_row < tbExistingShipping.rows.length; curr_row++) { oRow = tbExistingShipping.rows[curr_row]; if (oRow.id == nID) { tbExistingShipping.deleteRow(oRow.rowIndex); break; } } } /* a function that opens a centered window. */ var newWin; function cWin(url,winname,w,h) { windowleft = (screen.width - w)/2; windowtop = (screen.height - h)/2; settings = '"toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,status=no,width='+w+',height='+h+ ',left='+windowleft+',top='+windowtop+'"'; closeWindow(); newWin = window.open(url,winname,settings); newWin.focus(); } function closeWindow() { if (newWin && !newWin.closed) { newWin.close();} } function fnOpenVideo(szID,szVideo) { var nHeight = 360 //Set height var nWidth = 480 //Set width var szName = "video" //Set window name var nTop=(screen.height/2)-(nHeight/2); var nLeft=(screen.width/2)-(nWidth/2); if (szVideo == undefined) { szVideo = szID; szID = 0; } //alert(szVideo.substr(szVideo.length-3,3)); if (szVideo.substr(szVideo.length-3,3) == "wmv") oNewWindow=window.open("/files/video/"+szID+"/"+szVideo, szName, "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width=" + nWidth + ",height=" + nHeight + ",left=" + nLeft + ",top=" + nTop) else oNewWindow=window.open("/player.asp?cryp=y&szVidD=" + szID + "&szVid="+szVideo, szName, "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width=" + nWidth + ",height=" + nHeight + ",left=" + nLeft + ",top=" + nTop) } function flashResize(ele, height, width) { var uploader = document.getElementById(ele); if(height != 0) uploader.style.height = height+"px"; if(width != 0) uploader.style.width = width+"px"; } function canResizeFlash() { var ua = navigator.userAgent.toLowerCase(); var opera = ua.indexOf("opera"); if( document.getElementById ) { if(opera == -1) return true; else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true; } return false; } function fnGetDate() { Stamp = new Date(); var rgDay = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); var rgMonth = new Array("Jan.","Feb.","Mar.","Apr.","May","June","Jul.","Aug.","Sept.","Oct.","Nov.","Dec."); document.write(rgDay[Stamp.getDay()]+", "+rgMonth[Stamp.getMonth()] +" "+Stamp.getDate() + ' '); //+ " "+Stamp.getFullYear() + ' '); } function fnGetTime() { var Hours; var Mins; var Time; Hours = Stamp.getHours(); if (Hours >= 12) { Time = " P.M."; } else { Time = " A.M."; } if (Hours > 12) { Hours -= 12; } if (Hours == 0) { Hours = 12; } Mins = Stamp.getMinutes(); if (Mins < 10) { Mins = "0" + Mins; } document.write(Hours + ":" + Mins + Time); } function fnFontSize(nPageID,nFontSize) { var szURL = "index.asp?p=" + nPageID + "&userfontsize=" + nFontSize; Link(szURL); } function fnSetNavHeight() { var oFooter = document.getElementById("UniversalFooterBar"); if (typeof(oFooter) == "undefined") oFooter = document.getElementById("FooterBarTemplate"); if (oFooter == null) return; rgCoords = findPos(oFooter); nTop = rgCoords[1]; //alert (nTop); var sidebarDom = document.getElementById("LeftNav"); if (sidebarDom == null) return; rgCoords = findPos(sidebarDom); nTopNav = rgCoords[1]; sidebarDom.style.height = nTop - nTopNav; var oPageContent = document.getElementById("PageContent"); if (oPageContent == null) return; rgCoords = findPos(oPageContent); nTopNav = rgCoords[1]; oPageContent.style.height = sidebarDom.style.height; //fnGetHeaderPosition(); } function findPos(obj) { var curleft = curtop = 0; if (obj == null) return [0,0]; if (obj.offsetParent) { do { curleft += obj.offsetLeft; curtop += obj.offsetTop; } while (obj = obj.offsetParent); } return [curleft,curtop]; } function fnShowInfoBox(nBoxNumber) { if (nBoxNumber == nInfoBoxCurrent) return; var strDIV = "InfoBox" + nBoxNumber; oDiv = document.getElementById(strDIV); strDIV = "InfoBox" + nInfoBoxCurrent; oDiv2 = document.getElementById(strDIV); oDiv.className = "InfoBox1"; oDiv2.className = "InfoBox1Hidden"; oDiv.className = "InfoBox1"; oDiv2.className = "InfoBox1Hidden"; strDIV = "InfoBoxButton" + nBoxNumber; oDiv = document.getElementById(strDIV); strDIV = "InfoBoxButton" + nInfoBoxCurrent; oDiv2 = document.getElementById(strDIV); oDiv2.className = "InfoBoxButton"; oDiv.className = "InfoBoxButtonCurrent"; nInfoBoxCurrent = nBoxNumber; } function fnSponsorLink(szID) { var oHidden = document.getElementById(szID); var szValue = "http://www.bcvacationguide.com/index.asp?cmd=sponsorclick&s=" + oHidden.value; if (oHidden.value != "" && oHidden.value != "undefined" && oHidden.value != "0") Linkout(szValue); } function fnShowHeaderSearchForm() { var oShowSearchPlacer = document.getElementById("HeaderShowSearchPlacer"); var oShowSearch = document.getElementById("HeaderShowSearch"); var oSearch = document.getElementById("HeaderSearchForm"); if (oSearch != null && oShowSearch != null && oShowSearchPlacer != null) { if (oShowSearchPlacer.value == "1") { oShowSearch.style.backgroundImage="url(/images/icons/eup.png)"; oShowSearchPlacer.value = "0"; oSearch.style.visibility = "visible"; oSearch.style.display = "block"; } else { oShowSearch.style.backgroundImage="url(/images/icons/edown.png)" oShowSearchPlacer.value = "1"; oSearch.style.visibility = "hidden"; oSearch.style.display = "none"; } } } var nInfoBoxCurrent = 1; e = canResizeFlash();