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; } } } function fnFilterMembers(oSelect,nPageID) { var nID = oSelect.options[oSelect.selectedIndex].value; var szName = ""; if (nID > 0) szName = oSelect.options[oSelect.selectedIndex].text; var szURL = "/index.asp?p=" + nPageID + "&nFI=" + nID + "&sFN=" + szName; Link(szURL); } /* 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=no,resizable=no,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?szVid=" + 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) } function setdate(){ thisForm = document.hotelSearchCriteriaForm; if ( thisForm != null ) { var now = new Date(); var checkinDate = new Date(now.getTime() + (14 * 24*60*60*1000)); var checkoutDate = new Date(now.getTime() + (16 * 24*60*60*1000)); thisForm.arrivalMonth.options[checkinDate.getMonth()].selected = true; thisForm.departureMonth.options[checkoutDate.getMonth()].selected = true; thisForm.arrivalDay.options[checkinDate.getDate()-1].selected = true; thisForm.departureDay.options[checkoutDate.getDate()-1].selected = true; } } function isBrowserSupp() { version = parseFloat( navigator.appVersion ); if ( ( version >= 2.0 ) && ( version < 2.1 ) && ( navigator.appName.indexOf( "Netscape" ) != -1 ) ) { return false; } else { return true; } return true; } function isLeapYear(yrStr) { var leapYear=false; var year = parseInt(yrStr, 10); if (year%4 == 0) { leapYear=true; if (year%100 == 0) { leapYear=false; if (year%400 == 0) { leapYear=true; } } } return leapYear; } function getDaysInMonth(mthIdx, YrStr) { var maxDays=31 if (mthIdx==1) { if (isLeapYear(YrStr)) { maxDays=29; } else { maxDays=28; } } if (mthIdx==3 || mthIdx==5 || mthIdx==8 || mthIdx==10) { maxDays=30; } return maxDays; } function adjustDate(mthIdx, Dt) { var value=0; var today = new Date() var theYear = parseInt(today.getYear(),10) if (mthIdx < today.getMonth()) { theYear = (parseInt(today.getYear(), 10) + 1) } if(theYear<100){ theYear = "19" + theYear } else { if((theYear-100) < 10) { theYear = "0" + (theYear-100) } else{ theYear = (theYear-100)+"" } theYear = "20" + theYear } var numDays=getDaysInMonth(mthIdx, theYear); if (mthIdx==1) { if (Dt.options.selectedIndex + 1 < numDays) { return 0; } else { Dt.options.selectedIndex=numDays - 1; if (numDays==29) { return 99; } else { return 1; } } } if (Dt.options.selectedIndex + 1 < numDays) { value=0; } else { if (Dt.options.selectedIndex + 1 > numDays) { Dt.options.selectedIndex ; value=3; } else { value=2; } } return value; } function dateChange(inM,inD,outM,outD) { if (!isBrowserSupp()) { return; } var res = adjustDate(inM.options.selectedIndex, inD); if (res != 0) { outD.options.selectedIndex=0; if (outM.options.selectedIndex==11){ outM.options.selectedIndex=0 } else { outM.options.selectedIndex=inM.options.selectedIndex + 1; } } else { outM.options.selectedIndex = inM.options.selectedIndex; outD.options.selectedIndex = inD.options.selectedIndex+2; } return ; } function dmddChange(outM,outD) { if (!isBrowserSupp()) { return; } adjustDate(outM.options.selectedIndex,outD); return; } function fnIHSCityChange(oID,nID,nAID) { szCity = oID.options[oID.selectedIndex].value; szURL = "/index.asp?p="+nID+"&IHSCity="+szCity+"&pfs="+nAID; document.location = szURL; }