var sizex=560;
var sizey=400;
var deltax=0;
var deltay=0;


var arr1=new Array(1,1);
var arr2=new Array(1,1);
var arrname=new Array("No data","No data");
var charttype=new Array(0,1);
var currenttype=0;
var labelarr=new Array("Incoming","Outgoing");

function data_bridge()
{
while(1)
	{	
	if (typeof(bridge.Plot) == "object")
		{
		break;
		};	
        var res=confirm("Initial 3D graphins component loading \n" +
			"make take some time (450kb)\n" +
 			"wait for process be completed. Continue ?");
        if (!res)	
		   {return;}
	}

bridge.ChartType=charttype[currenttype];
bridge.width=sizex-deltax;
bridge.height=sizey-deltay;
bridge.ColumnCount = 2;
bridge.RowCount = arr1.length;
for (var row = 1;row <=arr1.length;row++)
{
bridge.Row=row;
bridge.RowLabel=arrname[row-1];
bridge.Column=1;
bridge.Data=arr1[row-1];
bridge.Column=2;
bridge.Data=arr2[row-1];


}

var fontname="Arial Cyr";
bridge.Plot.Axis(0).Labels(1).TextLayout.Orientation=3;

for (var i=0;i<4;i++)
{
bridge.Plot.Axis(i).Labels(1).VtFont.Name=fontname;
bridge.Plot.Axis(i).Labels(1).VtFont.Size=10;
bridge.Plot.Axis(i).Labels(1).VtFont.Style=1;
}
//bridge.Plot.Axis(1).Labels(1).VtFont.Name=fontname;
//bridge.Plot.Axis(1).Labels(1).VtFont.Size=10;
//bridge.Plot.Axis(1).Labels(1).VtFont.Style=1;


bridge.ShowLegend=true;


bridge.Legend.VtFont.Name=fontname;

bridge.Column=1;
bridge.ColumnLabel=labelarr[0];
bridge.Column=2;
bridge.ColumnLabel=labelarr[1];



}
function _onload()
{
//window.resizeTo(screen.width,screen.height);
//window.moveTo(0,0);
data_bridge();
//document.title=title;
};

function _onResize()
{ // not used on site
window.resizeTo(screen.width,screen.height);
window.moveTo(0,0);
}

function _3dclick()
{
if (currenttype)
	{currenttype=0;}
     else
	{currenttype=1;}
bridge.ChartType=charttype[currenttype];
}

function _legendclick()
{
if (bridge.ShowLegend)
	{
	bridge.ShowLegend=false;
	}
else
	{
	bridge.ShowLegend=true;
	}

}

