function winfix(){
	var w  = screen.availWidth;
	var h = screen.availHeight
	self.moveTo(0, 0);
	self.resizeTo(w, h);
}
window.onload=winfix; 
function init()
{
	document.onkeydown=kbevent;
	/*register onmousewheel*/ 
	if(document.addEventListener){ 
    	document.addEventListener('DOMMouseScroll',scrollFunc,false); 
	}//W3C 
	window.onmousewheel=document.onmousewheel=scrollFunc;//IE/Opera/Chrome  
} 
function getQueryStringRegExp(name) 
{ 
    var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)( \\s|&|$)", "i");   
    if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " ")); return ""; 
}
function act() {
	//alert(0);
	document.body.focus();
	window.focus();
}  
function kbevent(e)
{  
	var e = window.event || e;
	var o = new Object();
	o.keyCode = e.keyCode;
	o.altKey = e.altKey;
	o.ctrlKey = e.ctrlKey;
	o.shiftKey = e.shiftKey;
	try
	{ 
		if (e.keyCode)
			e.keyCode = 0;
		else
			e.which = 0;
		e.returnValue = false;
	}
	catch(Exception)
	{
		if(e.preventDefault){
			e.preventDefault();
			e.stopPropagation();
		}else{
			e.returnValue= false;
			e.cancelBubble = true;
		}
	}
	finally
	{
	    e.returnValue = false;
	}
	document.getElementById("hq").keyboardInput(o);
}
function scrollFunc(e)
{  
	var direct=0; 
    e=e || window.event; 
      
    if(e.wheelDelta){//IE/Opera/Chrome 
        direct=e.wheelDelta; 
    }else if(e.detail){//Firefox 
        direct=e.detail; 
    } 
    document.getElementById("hq").mouse_wheel(direct);
}
    
function setFlashPlayerFocus()
{ 
	act();
}  
function popupf10info(ary){
	alert(ary[0]+' '+ary[1]);
}
function flashshow(obj){
	//obj.stockcode sh600000
	//obj.stockname 
	//obj.viewtype tick,day,week,month 
	//obj.indicator volume,macd,kdj ...
	hq.flashshow(obj);
}
function flashshow2(){
	try
	{
		window.opener.show();
	}
	catch(e)
	{
	}
} 
function showJPInfo(obj)
{
	alert(obj.title);
}
function fastbuyfromflash(obj)
{
	// obj.price , stockcode = sz000001  stockname
	//alert(''+obj.stockcode);
} 
function fastsailfromflash(obj)
{
	// obj.price , stockcode = sz000001  stockname
	//alert(''+obj.stockcode);
} 
function slowbuyfromflash(obj)
{
	// obj.price , stockcode = sz000001  stockname
	//alert(''+obj.stockcode);
} 
function slowsailfromflash(obj)
{
	// obj.price , stockcode = sz000001  stockname
	//alert(''+obj.stockcode);
} 
function queryhistoryfromflash(obj)
{
	// obj.price , stockcode = sz000001  stockname
	//alert(''+obj.stockcode);
}

function read_about(){
			//var txt = document.getElementById("txtAbout").value;
			//document.getElementById("hq").read_about(txt);
	}
