// JavaScript Document
$(document).ready(function(){
						   $("#div3 a").click(function(){
								var i=$("#div3 a").index(this);
								if(i==0){
									gofusionchart(1,"IPPV","IPPVchart");
									}
									if(i==1){
									gofusionchart(2,"IPPV","IPPVchart");
									}
									if(i==2){
									gofusionchart(3,"IPPV","IPPVchart");
									}
									if(i==3){
									gofusionchart(12,"IPPV","IPPVchart");
									}
													   });
						        $("#div2 a").click(function(){
								var i=$("#div2 a").index(this);
								if(i==0){
									gofusionchart(1,"outlink","outlinkchart");
									}
									if(i==1){
									gofusionchart(2,"outlink","outlinkchart");
									}
									if(i==2){
									gofusionchart(3,"outlink","outlinkchart");
									}
									if(i==3){
									gofusionchart(12,"outlink","outlinkchart");
									}
													   });
						      $("#div1 a").click(function(){
								var i=$("#div1 a").index(this);
								if(i==0){
									gofusionchart(1,"shoulu","shouluchart");
									}
									if(i==1){
									gofusionchart(2,"shoulu","shouluchart");
									}
									if(i==2){
									gofusionchart(3,"shoulu","shouluchart");
									}
									if(i==3){
									gofusionchart(12,"shoulu","shouluchart");
									}
													   });
					gofusionchart(1,"IPPV","IPPVchart");
					gofusionchart(1,"shoulu","shouluchart");
					gofusionchart(1,"outlink","outlinkchart");
		function gofusionchart(n,m,idiv){
		$.post("../class/class_getdata.php",{n:n,m:m},function(data){
		var myChart = new FusionCharts("../FusionCharts/MSLine.swf", idiv, "800", "280");
		myChart.setDataXML(data);       
		 myChart.render(idiv);
															});
							   
							   }
							   });