﻿function ConfirmDelete()
    {
        var conf;
        conf = confirm("Are you sure you want to delete ?")
        if (conf == true)
            {
            return true;
            }
        else
            {
            return false;
            }
    }
    function ConfirmSave()
    {
        var conf;
        conf = confirm("If You have mode chages to the data below then you need to save it else the change will not be saved To continous click Ok else click Cancel and the save you changes.")
        if (conf == true)
            {
            return true;
            }
        else
            {
            return false;
            }
    }
function ConfirmQuery(tit)
    {
        var conf;
        conf = confirm(tit)
        if (conf == true)
            {
            return true;
            }
        else
            {
            return false;
            }
    }


function Grdmouseover(row, sty)
    {
    if (sty == 1)
		{
		row.style.color='#F6F6F6';
		}
	else if (sty == 2 )
		{
		row.style.backgroundColor='#F6F6F6';
		}
  //  row.style.fontWeight='normal';               
    }

function Grdmouseout(row, sty)
    {
    if (sty == 1)
		{
		row.style.color='Black';
		}
	else if (sty == 2)
		{
		row.style.backgroundColor='#FDFDFD';
		}
     }
 
    function CheckUnchecked(txtAB,txtPD,ChkSold)
    {
       var cbxS = document.getElementById(ChkSold);
       var Txt1 = document.getElementById(txtAB);
       var Txt2 = document.getElementById(txtPD);
     
       var retVal = "false";
       if (Txt1.value != ""  || Txt2.value != "")            
           {
				retVal = "true";
			}
			else
			{
				retVal = "false";
			}
			
			
        return retVal;
         
    } 
    function TextChek(txtAB,txtPD,ChkSold)
    {
        var cbxS = document.getElementById(ChkSold);
       var Txt1 = document.getElementById(txtAB);
       var Txt2 = document.getElementById(txtPD);
        var itemChecked = CheckUnchecked(txtPD, txtAB,ChkSold);
       if(itemChecked == "true")
       {
           cbxS.checked = true;
       }
       else 
       {
           cbxS.checked = false;
          
       }
    }
 function changeCheckState( checked )
    {
        var frm = document.forms[0];

        for (i=0; i<frm.length; i++) 
        {
            if (frm.elements[i].id.indexOf('ChkDelete') != -1)
            {
                frm.elements[i].checked = checked;
            }
        }
    }
    
   
