﻿function Len(strInput) {
	return strInput.length;
}

function NextBusgoTo(Kav,V) {


	var kAV = Kav;
	var eshkol = '51';


	if (V == 0) 
	{
		if (kAV.indexOf('A') > -1) {

			kAV = kAV.substring(0, 4);
		}
		else {
			kAV = kAV.substring(0, 3);
		}
	}


	var url = 'http://213.8.94.157/nateev/?com=ntt&eshkol=51&shortRtNum=' + kAV;
	window.open(url, "_blank", "toolbar=yes, location=no,titlebar=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes");//.focus;

	return false;
} 



         function printTable(DivTable) 
{

    // var PrintTopBanner11 = document.getElementById("Level")style.display ='none';
    // PrintTopBanner11.style.display ='none';
    //var PrintTopBanner = document.getElementById("TopBanner");
	//var printContent = document.getElementById("LinesK");
	var printContent = document.getElementById(DivTable);
    var windowUrl = 'about:blank';

  
    var num;
    num = "Print.aspx";
    var uniqueName = new Date();

    var windowName = 'Print' + uniqueName.getTime();
    var printWindow = window.open(windowUrl, windowName, 'left=0,top=0,width=700,height=700');
  
    // var sScript="<script type='text/javascript' language='javascript'> document.getElementById('Level').style.display = 'none';</script>"

    var css;
    css = "<link type='text/css' href='css/MPStyle.css' rel='stylesheet' />";
    var PTop;
    PTop = "<div id='Header'><img src='images/TopBannerP.jpg' alt=''/> </div>";
      
    printWindow.document.write(css);
    printWindow.document.write(PTop);
    printWindow.document.write("<div style=\"text-align: center; width: 630px;\" id=\"MT\">");
    printWindow.document.write("<table width='700px'><tr><td align='center'>" + printContent.innerHTML + "</td></tr></table></div>" );
    printWindow.document.close(); printWindow.focus(); printWindow.print();printWindow.close(); 
    //PrintTopBanner11.style.display='inline';
 } 
 
 
 function print(DivTable) 
{

    var printContent = document.getElementById(DivTable);
    var windowUrl = 'about:blank';
 
    var num;
    num = "Print.aspx";
    var uniqueName = new Date();

    var windowName = 'Print' + uniqueName.getTime();
    var printWindow = window.open(windowUrl, windowName, 'left=600000,top=600000,width=0,height=0');
  
    var css;
    css = "<link type='text/css' href='css/MPStyle.css' rel='stylesheet' />";
    var PTop;
    PTop = "<div id='Div1'><img src='images/TopBannerP.jpg' alt=''/> </div>";
      
    printWindow.document.write(css);
    printWindow.document.write(PTop);
    printWindow.document.write("<div style='text-align: center; width: 630px;' id='MT'>");
    printWindow.document.write("<table width='700px'><tr><td align='center'>" + printContent.innerHTML + "</td></tr></table></div>" );
    printWindow.document.close(); printWindow.focus(); printWindow.print();printWindow.close(); 
    } 
