var domain = 'http://www.kaola.cn';
var strAgent = navigator.userAgent.toLowerCase();
var bIE = (strAgent.indexOf("msie") != -1);
var bXP = (strAgent.indexOf("nt 5.1") != -1);

// JavaScript Document
function resizeMyPic(obj,h){
	
	if(obj.height >h){
		obj.style.height = h;
		obj.style.width= parseInt((h*obj.width)/obj.height);
		//alert(obj.style.height);
	}
}

function ResizeImage(obj){
		if(obj.width >600){
		obj.style.width = 600;
		obj.style.height= parseInt((600*obj.height)/obj.width);
		//alert(obj.style.height);
	}
	
}

function picResize(o){
	//var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}

function ResizeFrame(strFrameId)
{
	var objFrame = window.frames[strFrameId];
	var body = objFrame.document.body;
	var frame = null;
	
	if(bIE)
		frame = document.getElementById(strFrameId);
	else
		frame = document.getElementsByName(strFrameId)[0];
	
	frame.style.height = body.scrollHeight + (body.offsetHeight - body.clientHeight);
	frame.style.width = body.scrollWidth + (body.offsetWidth - body.clientWidth);
	//alert('ffffffffffffff');
	if (top != self)
	{
		try
		{
			parent.ResizeFrame(self.name);
		}
		catch (e)
		{
				
		}
	}
}


	
function doPrint2(c,t){
	var win=window.open('','_blank','width=680,height=500,fullscreen=0,channelmode=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1');
	win.document.write('<html><head><title>'+document.getElementById(t).innerHTML+'</title>');
	win.document.write('<style type="text/css">input,select,textarea{font-size:12px}a:link {font-size: 12px;color: #3d3d3d;text-decoration: none;}a:hover {font-size: 12px;color: #FF6600;text-decoration: underline;}a:active {font-size: 12px;color: #FF6600;text-decoration: none;}a:visited {font-size: 12px;color: #993399;text-decoration: none;}.mainfont {font-size: 12px;color: #3d3d3d;}.purplefont {font-size: 12px;color: #993399;}.content {font-size: 14px;color: #212121;}#artTitle {font-size: 20px;font-weight: bold;color: #000066;}#artText {font-size: 14px;text-indent: 0em;line-height: 1.5;}</style>');
	win.document.write('<meta http-equiv="content-type" content="text/html; charset=gb2312"></head>');
	win.document.write('<body bgcolor=#ffffff topmargin=5 leftmargin=5 marginheight=5 marginwidth=5 onLoad="window.print()">');
	win.document.write('<table width=626 border=0 cellspacing=0 cellpadding=0 align="center"><tr><td align="center">');
	win.document.write(document.getElementById(c).innerHTML);
	win.document.write('</td></tr></table>');
	win.document.write('</body></html>');
	win.document.close();
	//win.close();
}


