function inJS(filename)
	local fname=BROWSERPATH.."lua\\"..filename
	local f = assert(io.open(fname,"r"))
	local js = f:read("*all")
	f:close()
	km.InjectJS(js,true)
end

function dominspect(hwnd)
       local fname=BROWSERPATH.."lua\\dominspector.js"
       local f = assert(io.open(fname,"r"))
       local js = f:read("*all")
       f:close()
       km.InjectJS(js,true)
end

function split_page_h(hwnd)
	local js=[[javascript:
		url=window.location.href; 
		title=document.title;
		document.write('<html><head><title>'+title+'</title></head><frameset rows="70%,30%"><frame src="'+url
		               +'"><frame src="'+url+'"></frameset></html>');]]
	km.InjectJS(js,true)
end

function split_page_v(hwnd)
	local js=[[javascript:
		url=window.location.href; 
		title=document.title;
		document.write('<html><head><title>'+title+'</title></head><frameset cols="85%,15%"><frame src="'+url
		               +'"><frame src="'+url+'"></frameset></html>');]]
	km.InjectJS(js,true)
end