// JavaScript Document

<!--

function hit()
  {
  var xmlHttp;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
       
        return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
       
        }
      }


    xmlHttp.open("GET","http://www.bdnews24.com/hitc.php",true);
   xmlHttp.send(null);
  }




function replaceAll( str, from, to ) {
    var idx = str.indexOf( from );


    while ( idx > -1 ) {
        str = str.replace( from, to ); 
        idx = str.indexOf( from );
    }

    return str;
}

function expandAll(){
	
	var d,caption;
	for(var ob=0; ob<document.data.counter.value; ob++){
		d=replaceAll(document.data.dt[ob].value,"[singleQuote]","'");
		caption=replaceAll(document.data.imgcap[ob].value,"[singleQuote]","'");
		document.getElementById('dn'+ob).innerHTML="";
		if(document.data.imgname[ob].value!=""){
			if(caption) cap="<TR><TD><table width=280  border='0' cellspacing='3' cellpadding='0' class='dotborder' align='center'><tr><td>"+caption+"</td></tr></table></TD></TR>"; else cap="";
			document.getElementById('dn'+ob).innerHTML="<TABLE cellSpacing=2 cellPadding=0  align=left border=0><TBODY><TR><TD align='center'><IMG alt='Loading Photo' hspace=0 src='nimage/"+document.data.imgname[ob].value+"' style='padding-right:5px;' width='120' border=0 bordercolor=#E3DFC8></TD></TR>"+cap+"</TBODY></TABLE>";  
			
		}
		
		document.getElementById('dn'+ob).innerHTML="<p></p>"+document.getElementById('dn'+ob).innerHTML + d;
		
		/*
		document.getElementById('tdh1'+ob).style.background="#706F5A";
		document.getElementById('tdh2'+ob).style.background="#706F5A";
		document.getElementById('tdh3'+ob).style.background="#706F5A";
		*/
		document.getElementById('tdh1'+ob).style.background="#706F5A";
		document.getElementById('tdh2'+ob).style.background="#706F5A";
		document.getElementById('tdh3'+ob).style.background="#706F5A";
		//document.getElementById('sp'+ob).style.color="#ffffff";
		document.getElementById('sp'+ob).style.color="#ffffff";

		document.getElementById('sp'+ob).style.color="#ffffff";
		document.getElementById('ndate'+ob).style.color="#ffffff";
		document.getElementById('print'+ob).style.color="#ffffff";
		document.getElementById('dot'+ob).style.color="#ffffff";
		if(document.getElementById('dot1'+ob))
			document.getElementById('dot1'+ob).style.color="#ffffff";
		document.getElementById('ecl'+ob).style.color="#ffffff";

		//document.getElementById('tdhu'+ob).style.background='#EFEEE9';

		document.getElementById('tdn1'+ob).style.background="#EFEEE9";
		document.getElementById('tdn2'+ob).style.background="#EFEEE9";
		document.getElementById('tdn3'+ob).style.background="#EFEEE9";
		document.getElementById('ecl'+ob).innerHTML= "Condense";
		//document.getElementById('mimg'+ob).style.visibility="hidden";
		
		document.data.hecsta[ob].value="Expand"
		//hit();
	}
}

function collapsAll(){
	
	var m;
	for(var ob=0; ob<document.data.counter.value; ob++){
		
		m=replaceAll(document.data.nm[ob].value,"[singleQuote]","'");
		m=m.substring(0,150)+" ...";
		document.getElementById('dn'+ob).innerHTML=="";
		document.getElementById('dn'+ob).innerHTML= m;
		
		document.getElementById('tdh1'+ob).style.background="#ffffff";
		document.getElementById('tdh2'+ob).style.background="#ffffff";
		document.getElementById('tdh3'+ob).style.background="#ffffff";

		//document.getElementById('tdhu'+ob).style.background='#ffffff';
		document.getElementById('sp'+ob).style.color="#275572";
		
		document.getElementById('ndate'+ob).style.color="#275572";
		document.getElementById('print'+ob).style.color="#275572";
		document.getElementById('dot'+ob).style.color="#275572";
		if(document.getElementById('dot1'+ob))
			document.getElementById('dot1'+ob).style.color="#275572";
		document.getElementById('ecl'+ob).style.color="#275572";
		
		document.getElementById('tdn1'+ob).style.background="#ffffff";
		document.getElementById('tdn2'+ob).style.background="#ffffff";
		document.getElementById('tdn3'+ob).style.background="#ffffff";
		
		
		document.getElementById('ecl'+ob).innerHTML= "Expand";
		//document.getElementById('mimg'+ob).style.visibility="visible";
		
		document.data.hecsta[ob].value="Condense"
		//hit();
	}
}

function addVal(ob){


  		//alert(ob);
			//alert(document.data.hd[ob].id);


	//var T = document.getElementById('hrow');
	
	//var s=document.getElementById('hcol');
	
	//T.removeChild(s);
	//document.getElementById('hcol').innerHTML= 'kk';
	//var dd = document.createElement('<TD id=hcol class=head>');
	
	//T.appendChild(dd);
	
	//dd.appendChild(document.createTextNode(ob.header));
	//var g = document.getElementById('gg');
	
	//var T = document.getElementById('nrow');
	

	
	//var h=replaceAll(document.data.hd[ob].value,"[singleQuote]","'");
	
	//document.getElementById('hcol').innerHTML='<b>'+h+'</b>';
	//rExp = /[singleQuote]/;
	var d=replaceAll(document.data.dt[ob].value,"[singleQuote]","'");
	var caption=replaceAll(document.data.imgcap[ob].value,"[singleQuote]","'");
	document.getElementById('dn'+ob).innerHTML="";
	//var f=ob.details.replace(rExp,"'");
	//document.getElementById('ncol').innerHTML= d;
	//if(document.hform.lcol.value!=""){
	if(document.data.hecsta[ob].value=="Condense"){
		//start();
		if(document.data.imgname[ob].value!=""){ 
			if(caption) cap="<TR><TD><table width=280  border='0' cellspacing='3' cellpadding='0' class='dotborder' align='center'><tr><td>"+caption+"</td></tr></table></TD></TR>"; else cap="";
			document.getElementById('dn'+ob).innerHTML="<TABLE cellSpacing=2 cellPadding=0  align=left border=0><TBODY><TR><TD align='center'><IMG alt='Loading Photo' hspace=0 src='nimage/"+document.data.imgname[ob].value+"' style='padding-right:5px;' width='120' border=0 bordercolor=#E3DFC8></TD></TR>"+cap+"</TBODY></TABLE>";  
			
			
		}
		
		document.getElementById('dn'+ob).innerHTML="<p></p>"+document.getElementById('dn'+ob).innerHTML + d;
	
		
		document.getElementById('tdh1'+ob).style.background="#706F5A";
		document.getElementById('tdh2'+ob).style.background="#706F5A";
		document.getElementById('tdh3'+ob).style.background="#706F5A";

		document.getElementById('sp'+ob).style.color="#ffffff";
		document.getElementById('ndate'+ob).style.color="#ffffff";
		document.getElementById('print'+ob).style.color="#ffffff";
		document.getElementById('dot'+ob).style.color="#ffffff";
		if(document.getElementById('dot1'+ob))
			document.getElementById('dot1'+ob).style.color="#ffffff";
		document.getElementById('ecl'+ob).style.color="#ffffff";
		
		
		
		
		document.getElementById('tdn1'+ob).style.background="#EFEEE9";
		document.getElementById('tdn2'+ob).style.background="#EFEEE9";
		document.getElementById('tdn3'+ob).style.background="#EFEEE9";
		document.getElementById('ecl'+ob).innerHTML= "Condense";

		//document.getElementById('mimg'+ob).style.visibility="hidden";
		
		document.data.hecsta[ob].value="Expand"
		
		
		
	}
	
	
	else {
		var m=replaceAll(document.data.nm[ob].value,"[singleQuote]","'");
		m=m.substring(0,150)+" ...";
		document.getElementById('dn'+ob).innerHTML= m;
		
		document.getElementById('tdh1'+ob).style.background="#ffffff";
		document.getElementById('tdh2'+ob).style.background="#ffffff";
		document.getElementById('tdh3'+ob).style.background="#ffffff";

		//document.getElementById('tdhu'+ob).style.background='#ffffff';
		document.getElementById('sp'+ob).style.color="#275572";
		document.getElementById('ndate'+ob).style.color="#275572";
		document.getElementById('print'+ob).style.color="#275572";
		document.getElementById('dot'+ob).style.color="#275572";
		if(document.getElementById('dot1'+ob))
			document.getElementById('dot1'+ob).style.color="#275572";
		document.getElementById('ecl'+ob).style.color="#275572";
		
		document.getElementById('tdn1'+ob).style.background="#ffffff";
		document.getElementById('tdn2'+ob).style.background="#ffffff";
		document.getElementById('tdn3'+ob).style.background="#ffffff";
		//document.getElementById('mimg'+ob).style.visibility="visible";
		document.getElementById('ecl'+ob).innerHTML= "Expand";
		
		document.data.hecsta[ob].value="Condense"
	//alert(document.hform.lcol.value);
	}
		
	
	document.hform.lcol.value=ob;

	//var s=document.getElementById('ncol');
	//alert(document.getElementById('ncol').value);
	//alert(g.rows[0].cells[0]);
	//T.removeChild(s);
	
	//var dd = document.createElement('<TD id=ncol>');
	
	//T.appendChild(dd);
	
	//dd.appendChild(document.createTextNode(write(ob.details)));
	//innerHTML
	
	//hit();
}





function openmywin(p,id) 
{ 
path=p+id;
window.open(path,'mywin','width=600,height=500,location=no,menubar=no,toolbar=no,scrollbars=yes,resizable=no'); 
}





-->
