﻿<!--
var select_submits=1;

function Select_all(n)
{
	var form1;
	form1 = document.getElementById("form"+n);

	for(i=1;i<=3;i++)
	{
		if(i!=n){
			clear_class_id(i);
			document.getElementById("form"+i).elements["select_all"+i].checked = 0;
		}
	}
	if (!form1.elements["class_id"+n+"[]"])
	{
		alert("没有可选的记录！");
		form1.elements["select_all"+n].checked = false;
		return false;
	}
	
	if (form1.elements["select_all"+n].checked) 
	{
		if (form1.elements["class_id"+n+"[]"].length)
			for(var i=0;i<form1.elements["class_id"+n+"[]"].length;i++)
			{
				if(form1.elements["class_id"+n+"[]"][i].disabled==0)
					form1.elements["class_id"+n+"[]"][i].checked = true;
			}
		else
			form1.elements["class_id"+n+"[]"].checked = true;
	}
	else
	{
		if (form1.elements["class_id"+n+"[]"].length)
			for(var i=0;i<form1.elements["class_id"+n+"[]"].length;i++)
				form1.elements["class_id"+n+"[]"][i].checked = false;
		else
			form1.elements["class_id"+n+"[]"].checked = false;
	}
	select_submits = n;
	document.form.n.value = n;
	document.form.print_botton.disabled = 1;
	document.form.print_botton.value=' Please Submit ';
}

function Checks()
{
	n = document.form.n.value;

	var form1;
	form1 = document.getElementById("form"+n);

	__class.innerHTML="<input name='class_ids"+n+"' type='hidden'>";
	if(form1.elements["class_id"+n+"[]"])
	{
		if(form1.elements["class_id"+n+"[]"].length)
		{
			ii=0;
		    var tmp_ids = new Array();
		    for (i=0;i<form1.elements["class_id"+n+"[]"].length;i++)
	        {
				if (form1.elements["class_id"+n+"[]"][i].checked)
		        {
					tmp_ids[ii++]=form1.elements["class_id"+n+"[]"][i].value;
		        }
		    }
            //alert(tmp_ids.toString());
		    document.form.elements["class_ids"+n].value=tmp_ids.toString();
	    }
		else
		{
			//alert(form1.class_id[].value);
			if (form1.elements["class_id"+n+"[]"].checked)
				document.form.elements["class_ids"+n].value=form1.elements["class_id"+n+"[]"].value;
		}
	}
	type = document.form.elements["class_ids"+n].value;
	if(type==''){
		alert('please choice price type');
		return false;
	}
	//alert(document.form.elements["class_ids"+n].value);
	//alert(n);
	//document.form.target = "inner_price";
	if(n==1){
	document.form.action = "iframe_display.php?type="+type;
	}
	if(n==2){
	document.form.action = "iframe_display2.php?type="+type;
	}
	if(n==3){
	document.form.action = "iframe_display3.php?type="+type;
	}
	//alert(document.frames['inner_price'].src);
}

function select_prises1()
{
	clear_class_id(2);
	clear_class_id(3);
	select_submits=1;
	document.form.n.value=1;
	//document.form.print_botton.disabled=1;
	//document.form.print_botton.value=' Please Submit ';
	
}
function select_prises2()
{
	clear_class_id(1);
	clear_class_id(3);
	select_submits=2;
	document.form.n.value=2;
	//document.form.print_botton.disabled=1;
	//document.form.print_botton.value=' Please Submit ';
	
}
function select_prises3()
{
	clear_class_id(1);
	clear_class_id(2);
	select_submits=3;
	document.form.n.value=3;
	//document.form.print_botton.disabled=1;
	//document.form.print_botton.value=' Please Submit ';
	
}
function clear_class_id(n)
{
	var form1;
	form1 = document.getElementById("form"+n);

	if(form1.elements["class_id"+n+"[]"])
	{
		if(form1.elements["class_id"+n+"[]"].length)
		{
			for(i=0;i<form1.elements["class_id"+n+"[]"].length;i++)
			{
				if(form1.elements["class_id"+n+"[]"][i].checked==true)
					form1.elements["class_id"+n+"[]"][i].checked=false;
			}
		}else{
			if(form1.elements["class_id"+n+"[]"].checked==true)
				form1.elements["class_id"+n+"[]"].checked=false;
		}
	}
}

function doPrint(){
var str="<html>";
var article;
var css;

var strFontSize='【<A href="javascript:doZoom(16)">大</A> <A href="javascript:doZoom(14)">中</A> <A href="javascript:doZoom(12)">小</A>】'
var strdoPrint="doPrint()";
var strTmp;

	css="<style>"
	+"body{font-family:宋体}"
	+"td,.f12{font-size:12px}"
	+".f24 {font-size:24px;}"
	+".f14 {font-size:14px;}"
	+".f16 {font-size:16px;}"
	+".title14 {font-size:14px;line-height:130%}"
	+".l17 {line-height:170%;}"
	+".mtitle{FONT-SIZE: 24px;COLOR: #05006c}"
	+"</style>"
	+"<style media='print'>"
	+".noprint { DISPLAY: none }"
	+"</style>";

	str +=	css;
	str +=	'<meta http-equiv="content-type" content="text/html; charset=gb2312">';
	str +=	'<title>'+document.title+'</title><NOSCRIPT><IFRAME SRC="*.html"></IFRAME></NOSCRIPT>';
	str +=	"<body oncontextmenu='return false' onselectstart='return false' bgcolor=#ffffff topmargin=5 leftmargin=5 marginheight=5 marginwidth=5 onLoad='window.print()'>";
	str +=	"<center><table width=720 border=0 cellspacing=0 cellpadding=0><tr><td height=34><img src='http://global.metalsinfo.com/images/index06_06.gif' width='292' height='62'></td><td><table width='100%' border='0'>"
            +"  <tr> "
            +"    <td><B>www.metalsinfo.com</B></td>"
            +"  </tr>"
            +"  <tr> "
            +"    <td>Tel: 86(757)-85578606 &nbsp;&nbsp;&nbsp;&nbsp;Fax:86(757)85595120<br>"
            +"      Add: No.2, Guihe Rd.,Dali, Nanhai District, Foshan City,<br>"
			+"            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Guangdong Province, 528231, P.R.China<br>"
            +"      Website: http://global.metalsinfo.com</td>"
            +"  </tr>"
            +"</table>"
			+"</td><td align=right valign=bottom><div class=noprint><a href='javascript:history.back()'>Back</a>　<a href='javascript:window.print()'>Print</a></div></td></tr></table>";
	str +=	"<table width=660 border=0 cellpadding=0 cellspacing=10 ><tr><td>";
	
	article=document.getElementById('article').innerHTML;

		strTmp=article
	str +=strTmp
	//str += window.location.href
	str +=	"</td></tr></table></center>";
	str +=	"</body></html>";
	document.write(str);
	document.close();

}
function show_graph(type,id){
	//alert('行情走势图表很快就会完善');
	date=document.form.query_date.value;
	window.open("show_graph.php?id="+id+"&date="+date,"","height=650,width=778,top=100,left=100,status=no,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=yes");
}
function show_graph2(type,id){
	date=document.form.query_date.value;
	window.open("show_graph2.php?id="+id+"&date="+date,"","height=650,width=778,top=100,left=100,status=no,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=yes");
}
function show_graphb(id){
	window.open("show_graphs.php?id="+id,"","height=350,width=760,top=100,left=100,status=no,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=yes");
}
-->