function FindElement(sId) {
	var o = null;
	if (document.getElementById)
		o = document.getElementById(sId);
	if (!o && document.all)
		o = document.all[sId];
	if (!o && document.layers)
		o = document.layers[sId];
	return o;
}
function AvaaHakemusParametreilla(s, sPara) {
	var iWidth  = 800;
	var iHeight = 750;
	if(screen.height) {
		if(screen.height <= 600)
			iHeight = 550;
		else if(screen.height <= 768)
			iHeight = 650;
	}
	window.open("http://ws.tampuuri.fi/lahdentalot/asuntohakemus/hakemus/hakulomake/hakulomake.aspx" + sPara,"Hakemus","width=" + iWidth + ",height=" + iHeight + ",menubar=0,scrollbars=1,resizable=1");
	return false;
}
function AvaaHakemus(s) {
	return AvaaHakemusParametreilla(s, "");
}
function avaaHuoneistotieto(o) {
    var newWin=window.open('/usercontrols/huoneistontiedot.aspx'+o,'Huoneisto','width=800, height=700, toolbar=0, location=0, scrollbars=1, resizable=1, status=0, menubar=0'); 
    if(!newWin.closed) {
        newWin.focus();
    }
} 
