﻿function SelectCarData() {
    window.open("SelectCarForm.aspx?C1=Form1.TbPlates&C2=Form1.HfCarID", "SelectData", "top=200,left=200,width=500,height=450,resizable=no,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}

function ShowNo() {
    document.getElementById("doing").style.display = "none";
    document.getElementById("divLogin").style.display = "none";
}

function $(id) {
    return (document.getElementById) ? document.getElementById(id) : document.all[id];
}

function showFloat() {
    var range = getRange();
    $('doing').style.width = range.width + "px";
    $('doing').style.height = range.height + "px";
    $('doing').style.display = "block";
    document.getElementById("divLogin").style.display = "block";
}

function getRange() {
    var top = document.body.scrollTop;
    var left = document.body.scrollLeft;
    var height = document.body.clientHeight;
    var width = document.body.clientWidth;

    if (top == 0 && left == 0 && height == 0 && width == 0) {
        top = document.documentElement.scrollTop;
        left = document.documentElement.scrollLeft;
        height = document.documentElement.clientHeight;
        width = document.documentElement.clientWidth;
    }
    return { top: top, left: left, height: height, width: width };
}

function ShowNo2() {
    document.getElementById("doing1").style.display = "none";
    document.getElementById("divLogin1").style.display = "none";
}

function showFloat2() {
    var range = getRange();
    $('doing1').style.width = range.width + "px";
    $('doing1').style.height = range.height + "px";
    $('doing1').style.display = "block";
    document.getElementById("divLogin1").style.display = "";
}

function ShowNo3() {
    document.getElementById("doing2").style.display = "none";
    document.getElementById("divLogin2").style.display = "none";
}

function showFloat3() {
    var range = getRange();
    $('doing2').style.width = range.width + "px";
    $('doing2').style.height = range.height + "px";
    $('doing2').style.display = "block";
    document.getElementById("divLogin2").style.display = "";
}

function goBack() {
    location.href = document.referrer
}
