﻿function Set_Crum(str_Crum,str_id)
{
     document.getElementById(str_id).innerHTML=str_Crum;
    document.getElementById("ctl00_HiddenField1").value = str_Crum;
     //alert(document.getElementById("ctl00_HiddenField1").value);
    //return document.getElementById("ctl00_HiddenField1").value;
    return true;
}


function fun_visible(td_str,table_str)
{
if((Right(td_str, 1))==1)
{
    document.getElementById("left_img").src="images/link-org-bg11.gif";
}
else
{
    document.getElementById("left_img").src="images/link-org-bg111.gif";
}

if((Right(td_str, 1))==5)
{
    document.getElementById("right_img").src="images/link-org-bg4.gif";
}
else
{
    document.getElementById("right_img").src="images/link-org-bg3.gif";
}
 for(i=1;i<=5;i++)
 {
    
    if(i==Right(td_str, 1))
    {
        document.getElementById("Table_"+i).style.display="block";
        if(String(document.getElementById("td_"+i).className).charAt(String(document.getElementById("td_"+i).className).length-1)!="1")
        {
            document.getElementById("td_"+i).className=document.getElementById("td_"+i).className;
        }
        else
        {
            document.getElementById("td_"+i).className=String(document.getElementById("td_"+i).className).substring(0,String(document.getElementById("td_"+i).className).length-1)
        }
        
    }
    else
    {
        document.getElementById("Table_"+i).style.display="none";
        if(String(document.getElementById("td_"+i).className).charAt(String(document.getElementById("td_"+i).className).length-1)!="1")
        {
            document.getElementById("td_"+i).className=document.getElementById("td_"+i).className+"1";
        }
        else
        {
            document.getElementById("td_"+i).className=document.getElementById("td_"+i).className;
        }
    }
    
 }
    
    
}

function Right(str, n)
{
      if (n <= 0)
          return "";
      else if (n > String(str).length)
          return str;
      else
   {
          var iLen = String(str).length;
          return String(str).substring(iLen, iLen - n);
      }
}

function show_template_inquiry(name)    
{
   if(document.getElementById("window").style.display == 'block')
   {
        document.getElementById("ctl00_content_Main_lbl_div_template_id").innerHTML=name;         
        alertId();
        alertId();         
   }
   else
   {
        document.getElementById("ctl00_content_Main_lbl_div_template_id").innerHTML=name;
        alertId();
   }
   
}
function fun_hide()
{
    document.getElementById("div_Flash").style.visibility="hidden";
}

function fun_show()
{
    document.getElementById("div_Flash").style.visibility="visible";
}