﻿// JScript File

function ShowModalWindow()
{ 
//    var modal = $find('ctl08_MPERequestQuote'); 
//    modal.show(); 
    
}

function HideModalPopupWindow(obj)
{
    var index=obj.lastIndexOf("_");
    var controlId=obj.substring(0,index+1);
    
    var modal = $find(obj);
    document.getElementById(controlId + "dpdServiceModalType").value='0';   
    document.getElementById(controlId + "txtQuoteModalName").value = '';
    document.getElementById(controlId + "txtQuoteModalEmail").value = '';
    document.getElementById(controlId + "txtQuoteModalPhone").value = '';
    document.getElementById(controlId + "txtQuoteModalAddress").value = '';    
    document.getElementById(controlId + "txtQuoteModalCompany").value = '';
    document.getElementById(controlId + "txtQuoteModalSiteName").value = '';
    document.getElementById(controlId + "txtQuoteModalRequirement").value = '';
    document.getElementById(controlId + "txtQuoteModelCapche").value = '';        
    
    modal.hide();
}

function ShowHideOtherField()
{
    if (document.getElementById("dpdJobApplied").options[document.getElementById("dpdJobApplied").selectedIndex].text == "Other")
    {
        document.getElementById("tdPositionControl").style.display = "";
        document.getElementById("txtJobApplied").value = "";
    }    
    else
    {
        document.getElementById("tdPositionControl").style.display = "none";
        document.getElementById("txtJobApplied").value = "Other";
    }
}

function ShowHideFunctionalAreaField()
{
    if (document.getElementById("dpdFunctionalArea").options[document.getElementById("dpdFunctionalArea").selectedIndex].text == "Other")
    {
        document.getElementById("trSpaceFunctionalArea").style.display = "";
        document.getElementById("trFunctionalArea").style.display = "";
        document.getElementById("txtFunctionalArea").value = "";
    }    
    else
    {
        document.getElementById("trSpaceFunctionalArea").style.display = "none";
        document.getElementById("trFunctionalArea").style.display = "none";
        document.getElementById("txtFunctionalArea").value = "Other";
    }
}

function fnClickUpdate(sender, e)
  {
     __doPostBack(sender,e);
  }


