﻿// JScript File
////////////////////////////////GENERAL FUNCTIONS FOR MANUPULATING JAVASCRIPTS///////////////////////

//Returns object
function findObjectById(objname)
{
   var obj = document.getElementById(objname);
   if(!CheckIsNULL(obj))
        return obj;
   else
        return null;     
}

//Checks if a object is null
function CheckIsNULL(obj)
{
    if(obj==null)
        return true;
    else
        return false;    
}

function closeDiv(objname)
{
    document.getElementById(objname).style.visibility = "hidden";    
    document.getElementById(objname).style.display = "none";
}

function makeVisible(obj)
{   
    obj.style.visibility = "visible";
    obj.style.display = '';
}

function makeHidden(obj)
{   
    obj.style.visibility = "hidden";
    obj.style.display = "none";
}

function makeVisible_ParamName(divname)
{
    var objdiv = findObjectById(divname);
    if(!CheckIsNULL(objdiv))
    {
        objdiv.style.visibility = "visible";
        objdiv.style.display = '';
    }
}
////////////////////////////////GENERAL FUNCTION AREA ENDS///////////////////////////////////////////
