this.focus(); function getElementPosition(elemID) { var offsetTrail = document.getElementById(elemID); var offsetLeft = 0; var offsetTop = 0; while (offsetTrail) { offsetLeft += offsetTrail.offsetLeft; offsetTop += offsetTrail.offsetTop; offsetTrail = offsetTrail.offsetParent; } if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") { offsetLeft += document.body.leftMargin; offsetTop += document.body.topMargin; } return {left:offsetLeft, top:offsetTop}; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&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 0) { //// alert('here'); // fillSelect('catID3', arrValues, document.forms[formName].elements(selectName), formName); // } // // if (selectName.indexOf('3') > 0) { //// alert('here'); // fillSelect('catID4', arrValues, document.forms[formName].elements(selectName), formName); // } } else { s.parentElement.style.display = 'none'; } } function _fillSelect(selectName, arrValues, indexEl, formName) { if (formName == "") formName = "catEditFrm" d = document.forms[formName]; s = d.elements(selectName); // alert(indexEl); if (indexEl.options && indexEl.options.length) { var index = indexEl.options[indexEl.selectedIndex].value; // alert(selectName + " - " + index) s.options.length = 0; var k = 0; for (var i in arrValues[index]) { s.options[k++] = new Option(arrValues[index][i], i); } if (index == 0 || !k) { s.parentElement.style.display = 'none'; } else s.parentElement.style.display = 'inline'; if (selectName.indexOf('2') > 0) { fillSelect('catID3', arrValues, document.forms[formName].elements(selectName), formName); } } else s.parentElement.style.display = 'none'; } function popUp(urlToOpen) { // alert(urlToOpen); var x = (screen.width-400)/2; y = (screen.height-400)/2; OpenWin = this.open(urlToOpen, "CtrlWindow", "width=407,height=407, toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); } function displayShopsInCounty(SelElem){ var countyID = SelElem.options[SelElem.selectedIndex].value; for (var i in arrCounties) { document.getElementById('countyID_'+arrCounties[i]).style.display = 'none'; } document.getElementById('countyID_'+countyID).style.display = 'inline'; } function hideRefines(){ // alert('hidding..'); if(document.getElementById('RefineSection')) document.getElementById('RefineSection').style.visibility = 'hidden'; } function showRefines(){ // alert('showing..'); if(document.getElementById('RefineSection')) document.getElementById('RefineSection').style.visibility = 'visible'; } function showCategoryPicture(pathPhotoSubCategory, basePathPhoto){ if(pathPhotoSubCategory) imgSubCategory = ''; else imgSubCategory = ''; // alert(imgSubCategory); document.getElementById('categoryImageReceiver').innerHTML = imgSubCategory; } function showHideNewsletter(elem){ // alert('loginInsideFrm'); if( elem.value == 1) document.getElementById('newsletterDetailedInfo').style.display = 'inline'; else document.getElementById('newsletterDetailedInfo').style.display = 'none'; } function EstimateRentalCost(){ var enteredDays = 0; carID = 0; breakEstimate = 0; carID = document.getElementById('carSelector').options[document.getElementById('carSelector').selectedIndex].value; enteredDays = document.estimateRentalCostFrm.noOfDays.value; var thePat = /^(\d+)*$/; var gotIt = thePat.exec(enteredDays); if(gotIt && enteredDays!= ''){ var price = 0; for(var i = arrCarPrices[carID].length; i >= 0 ; i--) { if(i >= enteredDays && arrCarPrices[carID][i]) price = parseInt(arrCarPrices[carID][i],10); } document.estimateRentalCostFrm.rentprice.value = (price * parseInt(enteredDays,10)).toFixed(2); } else{ enteredDays = enteredDays.replace(/(\D+)*$/, ''); if(enteredDays== '') enteredDays = 0; } document.estimateRentalCostFrm.noOfDays.value = parseInt(enteredDays,10); } var OpenWin; function imgPopup(file, pwidth, pheight, title) { var content = ''; var x = (screen.width-pwidth)/2; y = (screen.height-pheight)/2; //y = 10; width = (pwidth > 1024) ? 1024 : pwidth + 50; height = (pheight > 768) ? 768 : pheight + 50; content += '' + title + ''; content += ''; content += '
'; if(OpenWin) OpenWin.close(); if(pwidth > 1024 || pheight > 768) OpenWin = this.open('', "CtrlWindow", "width=" + width + ",height=" + height + " toolbar=no, menubar=no, location=no, scrollbars=yes, statusbar=no, resizable=yes, screenX="+x+", screenY="+y+", left="+x+", top="+y); else OpenWin = this.open('', "CtrlWindow", "width=" + width + ",height=" + height + " toolbar=no, menubar=no, location=no, scrollbars=no, statusbar=no, resizable=yes, screenX="+x+", screenY="+y+", left="+x+", top="+y); OpenWin.document.write(content); OpenWin.focus(); }