	
function toggleTr111(TrId)
{
        var myTr=document.getElementById("tr_"+TrId);
        (myTr.style.display == 'none')? myTr.style.display = 'block': myTr.style.display = 'none';
}

//function toggleTr(TrId)
//{
//        var myTr=document.getElementById("tr_"+TrId);
//        (myTr.style.display == 'none')? myTr.style.display = 'block': myTr.style.display = 'none';
//}

function toggleTr(TrId)
{
        var myTr=document.getElementById("tr_"+TrId);
      //  (myTr.style.display == 'none')? myTr.style.display = 'block': myTr.style.display = 'none';
		if (myTr.style.display == 'none'){ myTr.style.display = 'block';
		url="sup_count.php?id="+TrId;
		xmlhttpGet(url);
		} else {myTr.style.display = 'none';}
}


function xmlhttpGet(strURL, objName) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {	// end of processing
     		
		// if you want do something with what you get from the url:
       		// self.xmlHttpReq.responseText

		
        }
    }
    self.xmlHttpReq.send(strURL);




}



function makeRequest(url) {

document.write('hkhkjhkjhkjhkjhkh',url);
       if (window.XMLHttpRequest) { // Mozilla, Safari,...
        http_request = new XMLHttpRequest();

       } else if (window.ActiveXObject) { // IE

           http_request = new ActiveXObject("Microsoft.XMLHTTP");

      }

      
     // http_request.onreadystatechange = HandleStates;

     http_request.open('GET', url, true);
      
     http_request.send(null);

   
}








function OpenWindow(sFileName,wwidth,wheight,winname,sScrollbars,iTop) {
        // open window
                var topvalue = 0;

                if(sScrollbars=="" || sScrollbars=="yes" || sScrollbars=="1" || arguments.length<5)
                        sScrollbars="yes";
                else
                        sScrollbars = "no";
                if(winname == "")
                        winname = "defaultwindowname";

                 ww = screen.width;
         hh = screen.height;
         if(wwidth > ww) {xx=0;} else {xx=Math.round((ww-wwidth)/2)-5;};
         if(wheight > hh) {yy=0;} else {yy=Math.round((hh-wheight)/2);};
                 if(iTop == "" || arguments.length < 6)
                        topvalue = yy;
                 else
                        topvalue = iTop;
         options ='location=yes, toolbar=yes,resizable=yes, status=no, left='+xx+', top='+topvalue+', menubar=yes, height='+wheight+', width='+wwidth+', scrollbars = '+sScrollbars+'';
         file =sFileName;
         window.open(file,winname,options);
        }


function OpenWindownotool(sFileName,wwidth,wheight,winname,sScrollbars,iTop) {
        // open window
                var topvalue = 0;

                if(sScrollbars=="" || sScrollbars=="yes" || sScrollbars=="1" || arguments.length<5)
                        sScrollbars="yes";
                else
                        sScrollbars = "no";
                if(winname == "")
                        winname = "defaultwindowname";

                 ww = screen.width;
         hh = screen.height;
         if(wwidth > ww) {xx=0;} else {xx=Math.round((ww-wwidth)/2)-5;};
         if(wheight > hh) {yy=0;} else {yy=Math.round((hh-wheight)/2);};
                 if(iTop == "" || arguments.length < 6)
                        topvalue = yy;
                 else
                        topvalue = iTop;
         options ='location=no, toolbar=no,resizable=yes, status=no, left='+xx+', top='+topvalue+', menubar=no, height='+wheight+', width='+wwidth+', scrollbars = '+sScrollbars+'';
         file =sFileName;
         window.open(file,winname,options);
        }



function OpenWin(sFileName,w,h,scrollbar,wname) {
  // open window
  ww = screen.width;
  hh = screen.height;
  wwidth = w;
  wheight = h;
  if(wwidth > ww) {xx=0;} else {xx=Math.round((ww-wwidth)/2)-5;};
  if(wheight > hh) {yy=0;} else {yy=Math.round((hh-wheight)/2);};
  options ='location=no, toolbar=no, status=no, left='+xx+', top='+yy+', menubar=no, height='+wheight+', width='+wwidth+', scrollbars = '+scrollbar;
  file =sFileName;
  window.open(file,wname,options);	
}

function reload_page(w,h)
{
	alert(w,h);
	document.location.reload(); 
}
