function callAlert(title,text)
{
if ( document.telform.age.checked == true ) document.telform.submit();
else 
var el = document.getElementById('alertbox');
document.getElementById('alerttitle').getElementsByTagName('span')[0].firstChild.nodeValue = title;
document.getElementById('alertcontent').firstChild.nodeValue = text;
document.getElementById('cover').style.display = 'block';
el.style.display = 'block';
el.style.top = (f_clientHeight() - el.offsetHeight) / 2 + 'px';
el.style.left = (f_clientWidth() - el.offsetWidth) / 2 + 'px';
document.getElementsByTagName('body')[0].style.overflow = 'auto';
document.getElementsByTagName('html')[0].style.overflow = 'auto';
return false;
}
function closeIt(val)
{
document.getElementById('alertbox').style.display = 'none';
document.getElementById('cover').style.display = 'none';
document.getElementsByTagName('body')[0].style.overflow = 'auto';
document.getElementsByTagName('html')[0].style.overflow = 'auto';
if(val == true) document.telform.submit();
}
function f_clientWidth()
{
return f_filterResults
(
window.innerWidth ? window.innerWidth : 0,
document.documentElement ? document.documentElement.clientWidth : 0,
document.body ? document.body.clientWidth : 0
);
}
function f_clientHeight()
{
return f_filterResults
(
window.innerHeight ? window.innerHeight : 0,
document.documentElement ? document.documentElement.clientHeight : 0,
document.body ? document.body.clientHeight : 0
);
}
function f_filterResults(n_win, n_docel, n_body)
{
var n_result = n_win ? n_win : 0;
if (n_docel && (!n_result || (n_result > n_docel)))
n_result = n_docel;
return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
