﻿
//---------  for laptop_rentals_details.aspx -----------//
function hideZoom() {

    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById('divZoom').style.visibility = 'hidden';
    }
    else {
        if (document.layers) { // Netscape 4
            document.divZoom.visibility = 'hidden';
        }
        else { // IE 4
            document.all.divZoom.style.visibility = 'hidden';
        }
    }
}

function showZoom() {
    //alert(document.getElementById('ctl00_ContentPlaceHolder1_hidIsLarge').value);
    if (document.getElementById) { // DOM3 = IE5, NS6
        if (document.getElementById('ctl00_ContentPlaceHolder1_hidIsLarge').value == 'true') {
            document.getElementById('divZoom').style.visibility = 'visible';
        }
    }
    else {
        if (document.layers) { // Netscape 4
            document.divZoom.visibility = 'visible';
        }
        else { // IE 4
            document.all.divZoom.style.visibility = 'visible';
        }
    }
}


//---------  for MasterPage.master -----------//
function clickSubmit(foEvent, foTextBox, foBtnSubmit) {
    if (foEvent.which || foEvent.keyCode) {
        if ((foEvent.which == 13) || (foEvent.keyCode == 13)) {
            try {
                foBtnSubmit.click();
            }
            catch (e) {
                foBtnSubmit.onclick();
            }
            return false;
        }
    }
    else {
        return true;
    }
}
function clickEnter(foEvent) {
    if (foEvent.which || foEvent.keyCode) {
        if ((foEvent.which == 13) || (foEvent.keyCode == 13)) {
            try {
            }
            catch (e) {
            }
            return false;
        }
    }
    else {
        return true;
    }
}


//---------  for controls/rightpart.ascx -----------//
function closeModalPopup3() {
    if ($find('ctl00_rightpart1_ModelPopUp3') != null) {
        $find('ctl00_rightpart1_ModelPopUp3').hide();
        return false;
    }
    else if ($find('ctl00_ContentPlaceHolder1_rightpart1_ModelPopUp3') != null) {
        $find('ctl00_ContentPlaceHolder1_rightpart1_ModelPopUp3').hide();
        return false;
    }
}

function closeModalPopup4() {
    if ($find('ctl00_rightpart1_ModelPopUp4') != null) {
        $find('ctl00_rightpart1_ModelPopUp4').hide(); return false;
    }
    else if ($find('ctl00_ContentPlaceHolder1_rightpart1_ModelPopUp4') != null) {
        $find('ctl00_ContentPlaceHolder1_rightpart1_ModelPopUp4').hide(); return false;
    }
}

//---------  for controls/leftpart.ascx -----------//
function isClicked(fsURL) {
    window.location = fsURL;
}
