﻿// JavaScript Document
function openMenu(id){
	document.getElementById("childNav"+id).style.display="block";
	//document.getElementById("childNav"+id).style.display="none";
}

function closeMenu(id){
	//document.getElementById("childNav"+id).style.display="block";
	document.getElementById("childNav"+id).style.display="none";
}

function Print(id)   
{    
	if(!confirm("确定要打印吗？"))   return;  
	var str = document.getElementById(id).innerHTML;     //获取需要打印的页面元素
	str = "<link href='en/css/style_en.css' rel='stylesheet' type='text/css' /><style>"
	 + str;                                              //在输出流的头部添加必要的代码，例如引用的CSS
	var pwin=window.open("print.htm","print");    
	pwin.document.write(str);
	pwin.document.close();                   //这句很重要，没有就无法实现  
	pwin.print();    
}



var tid = null;
function blink(objId){
   var obj = eval("document.all." + objId );
   var colors=new Array();
   colors[0]="#FF0000";
   colors[1]="#000000";
   colors[2]="#FF0000";
   colors[3]="#000000";
   colors[4]="#FF0000";
   colors[5]="#000000";
   colors[6]="#FF0000";
   colors[7]="#000000";
   
   var i = parseInt((colors.length-0+1) * Math.random() + 1)
   obj.style.color = colors[i];
   tid = setTimeout("blink('"+ objId +"')",300);
}

function reset(objId){
   clearTimeout(tid);
   var obj = eval("document.all." + objId );
   obj.style.color = '#000000';
}

//blink("noticBoxBody");

