// jax write by eidoan@gmail.com
function Ajax()
{
  try {
    return new ActiveXObject("Microsoft.XMLHTTP");
  } catch(e) {
    try {
      return new ActiveXObject("Msxml2.XMLHTTP");
    } catch(ex) {
      try {
        return new XMLHttpRequest();
      } catch(exc) {
        return false;
      }
    }
  }
}

function show_tab(urls)
{ 
	var jax = new Ajax();
	var hienthi=document.getElementById('show_tab');
	hienthi.innerHTML="<img src=images/indicator_blue.gif>";
    jax.onreadystatechange = function(){
    	if(jax.readyState == 4){
			if (jax.status==200){				
					var html=jax.responseText;
					hienthi.innerHTML=html;									
			}
   		 }
    }
    jax.open("GET",urls,true);
    jax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    jax.send(null);  
}

writeDrag.offX = "c";
writeDrag.offY = "c";

function wrapContent(e, img, w, h, txt, wd, offx, offy) {
  var imgStr, cntnt, win, str;
  imgStr = '<img alt="Click v&agrave;o &#273;&acirc;y &#273;&#7875; t&#7855;t h&igrave;nh" onClick="document.getElementById(\'dragDiv\').style.visibility =\'hidden\';" style="cursor:pointer; padding:2px; border:solid 1px #999999" src="' + img + '"' + (w? ' width="' + w + '"': "") + (h? ' height="' + h + '"': "") + '>';
  
	cntnt = '<div class="img" style="background:#fff url(images/indicator_blue.gif) no-repeat center center">' + imgStr + '</div>';
	if (txt) cntnt += '<div>' + txt + '</div>';  
	if (!wd) wd = w; 
	writeDrag.set(e, cntnt, wd, offx, offy);
 
  return false;
}

function openNewWinDow(strWinUrl,idwin,w,h){

            strWinName = window.open(strWinUrl,idwin,'width='+w+', height='+h+', top=0, left=0, toolbar=yes, location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes, resizable=yes');

}
