﻿function Window_onload()
{	
	SetNumeric();
}
function Form_onsubmit()
{
    if (! CheckLimit("Gazebo"))
        return false;
    var kfw = parseInt(document.getElementById("txtKingPostFaceWidth").value);
    var rw = parseInt(document.getElementById("txtRafterThick").value);
    if (kfw < rw)
    {
        return (confirm("King-Post face width is less than rafter thickness\n\As rafters but into King-Post, it's face width should be at least = to rafter thickness\n\r\n\rRe-set King-Post face width to "+ rw +" mm and continue?"));
    }
    return true;
}
function GoBracket()
{
    var qs = document.getElementById("ddSides").value;
    qs += "&fw="+ document.getElementById("txtKingPostFaceWidth").value;
    qs += "&ha="+ document.getElementById("lblHipRafterAngle").innerHTML;
    var w = window.open("GazeboBracket.aspx?s="+ qs,null,"height=800,width=900,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,menubar=yes,location=yes");
    w.focus();
}
function ShowType(t)
{
    document.getElementById("imgType").src = "images/Gazebo" + t +".gif";
    document.getElementById("divGazeboType").style.display = "block";
    document.getElementById("divGazeboType").style.left = (screen.width / 2) +"px";
}
function HideType()
{
    document.getElementById("divGazeboType").style.display = "none";
}