//Function show and hide content by clicking on same text
function showHideContent(idText,helpValue) 
{
  
if(document.getElementById(helpValue).value == "Close")
 { 
 document.getElementById(idText).style.display = "block"; 
 document.getElementById(helpValue).value = "Open"
 }
 else 
 { document.getElementById(idText).style.display = "none";
   document.getElementById(helpValue).value = "Close";
 } 
}

 
function show_me(URL, id, type, classname)
  {      
    if( document.getElementById('ifram_info' + type + id) ){

      if( document.getElementById("Info" + type + id).className=="TdInfo" ){
        
        var type1 =type ? type : "''"; 
        document.getElementById("TxtID"  + type + id).innerHTML='<A style="color: black; font-weight: bold;" HREF="javascript:show_me(\''+URL+'\','+ id+','+ type1+', \''+ classname+'\');">close</A>';
        
        document.getElementById("Info" + type + id).className="";
        document.getElementById("Info" + type + id).style.display = "";

      }else{

        var type1 =type ? type : "''"; 
        document.getElementById("TxtID" + type + id).innerHTML='<A style="color: black; font-weight: bold;" HREF="javascript:show_me(\''+URL+'\','+ id+','+ type1+', \''+ classname+'\');">more</A>' + '<A HREF="Yad2_info.php?SalesID='+ id + '" target="_blank"> &nbsp;<img src="../imageInsidePage/hez.gif" width="10" height="10" alt="" border="0"/></A>';
        document.getElementById("Info" + type + id).className="TdInfo";
        if( document.getElementById("tr_" + type + id) )
          document.getElementById("tr_" + type + id).id=classname;
        document.getElementById("Info" + type + id).style.display = "none";

      }

    }else if( document.getElementById("Info" + type + id).className=="TdInfo" ){  

      if( document.getElementById('Img_' + type + id) ){
        opacity=50;
        document.getElementById('Img_' + type + id).style.opacity = (opacity / 100); 
        document.getElementById('Img_' + type + id).style.MozOpacity = (opacity / 100); 
        document.getElementById('Img_' + type + id).style.KhtmlOpacity = (opacity / 100);
        document.getElementById('Img_' + type + id).style.filter = "alpha(opacity=" + opacity + ")"; 
      }

      var type1 =type ? type : "''"; 
      document.getElementById("TxtID"  + type + id).innerHTML='<A style="color: black; font-weight: bold;" HREF="javascript:show_me(\''+URL+'\','+ id+','+ type1+', \''+ classname+'\');">close</A>';
      
      str="<TABLE WIDTH=100% BORDER=0 align='left' CELLPADDING=0 CELLSPACING=0 dir=rtl BGColor='#F1F1F1'>";
      str+="<TR>";
      str+="  <TD style='border-right: solid 1px #FD9A57; background-color: #F1F1F1'><IMG SRC='../imageInsidePage/hidden-spacer.gif' WIDTH='1' HEIGHT='1' BORDER='0'></TD>";
      str+="  <TD width='731' align='center'><iframe id='ifram_info" + type + id + "' src='" + URL + "' width='100%' height='480' frameborder='0' scrolling='NO' BGColor='#F1F1F1'></iframe></TD>";        
      str+="  <TD style='border-left: solid 1px #FD9A57; background-color: #F1F1F1'><IMG SRC='../imageInsidePage/hidden-spacer.gif' WIDTH='1' HEIGHT='1' BORDER='0'></TD>";
      str+="</TR>";
      str+="<TR>";
      str+="  <td width='20' height='29'><img src='../imageInsidePage/details_image/Bottom_right_corner_details.gif' width='20' height='29' alt=''></td>";
      str+="  <td width='731'  background='../imageInsidePage/details_image/Bottom_BG_details_Bottom.gif'><img src='../imageInsidePage/details_image/Bottom_BG_details_Bottom.gif' width='13' height='29' alt=''></td>";
      str+="  <td width='19' height='29'><img src='../imageInsidePage/details_image/Bottom_left_corner_details_.gif' width='19' height='29' alt=''></td>";
      str+="</TR>";      
      str+="</TABLE>";
      document.getElementById("Info"  + type + id).innerHTML=str;
      document.getElementById("Info"  + type + id).className="";
     } 
    else
     {
      var type1 =type ? type : "''"; 
      document.getElementById("TxtID" + type + id).innerHTML='<A style="color: black; font-weight: bold;" HREF="javascript:show_me(\''+URL+'\','+ id+','+ type1+', \''+ classname+'\');">more</A>' + '<A HREF=Yad2_info.php.php?SalesID='+ id + ' target="_blank"> &nbsp;<img src="../imageInsidePage/hez.gif" width="10" height="10" alt="" border="0"/></A>';
      document.getElementById("Info" + id).innerHTML="<IMG SRC='../imageInsidePage/spacer.gif' WIDTH='1' HEIGHT='1' BORDER='0'>";
      document.getElementById("Info" + type + id).innerHTML="<IMG SRC='../imageInsidePage/spacer.gif' WIDTH='1' HEIGHT='1' BORDER='0'>";
      document.getElementById("Info" + type + id).className="TdInfo";
      if( document.getElementById("tr_" + type + id) )
        document.getElementById("tr_" + type + id).id=classname;
     }      

  }
