﻿function winopen(url,w,h)
{
	var t=(screen.availHeight-h)/2;
	var l=(screen.availWidth-w)/2;
	var newwin=window.open(url,"","top="+t+",left="+l+",width="+w+",height="+h+",toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no");
	newwin.focus();  
}
function format_select()
{
	var t_obj=document.getElementsByTagName("select");
//	alert(t_obj.length);
	for (var i=0; i<t_obj.length; i++)
	{
		var t_width=t_obj[i].clientWidth;		//object width
		t_obj[i].style.width=t_width+"px";		//转为绝对宽度
		var t_height=t_obj[i].clientHeight;		//object height
		t_obj[i].className="ieselect";
		t_obj[i].outerHTML="<span class=\"select\" style=\"width:"+(t_width-4)+"px; height:"+(t_height-4)+"px; \">"+t_obj[i].outerHTML+"</span>";
	}
}
if (window.attachEvent)	//IE
{
//	window.attachEvent("onload",format_select);
}
