function popUp(URL,width,height) {
day = new Date();
id = day.getTime();
var winLeft = (screen.width - width) / 2;
var winUp = (screen.height - height) / 2;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+width+',height='+height+',left='+winLeft+',top='+winUp);");
}
function contact_by_mail(user, domain, suffix, content)
{
if (!content)
{
document.write('' + user + '@' + domain + '.' + suffix + '');
} else
{
document.write('' + content + '');
}
return true;
}
function getWindowHeight()
{
var windowHeight=0;
if (typeof(window.innerHeight)=='number')
{
windowHeight=window.innerHeight;
} else
{
if (document.documentElement&&document.documentElement.clientHeight)
{
windowHeight=document.documentElement.clientHeight;
} else
{
if (document.body&&document.body.clientHeight)
{
windowHeight=document.body.clientHeight;
}
}
}
return windowHeight;
}
var browserType;
if (document.layers) {browserType = "nn4"}
if (document.all) {browserType = "ie"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}
function hide_div(div_name)
{
if (browserType == "gecko" )
document.poppedLayer = eval('document.getElementById(\''+div_name+'\')');
else if (browserType == "ie")
document.poppedLayer = eval('document.all[\''+div_name+'\']');
else
document.poppedLayer = eval('document.layers[\''+div_name+'\']');
document.poppedLayer.style.visibility = "hidden";
}
function show_div(div_name) {
if (browserType == "gecko" )
document.poppedLayer = eval('document.getElementById(\''+div_name+'\')');
else if (browserType == "ie")
document.poppedLayer = eval('document.all[\''+div_name+'\']');
else
document.poppedLayer = eval('document.layers[\''+div_name+'\']');
document.poppedLayer.style.visibility = "visible";
}
function show_hide_tab_blok()
{
if (getWindowHeight() >= 665)
{
// show blok
show_div('tabs_blok');
} else
{
// hide blok
hide_div('tabs_blok');
}
}
function update_div_content(div_name, image_url, title_txt)
{
if (browserType == "gecko" )
{
document.poppedLayer = eval('document.getElementById(\''+div_name+'\')');
} else if (browserType == "ie")
{
document.poppedLayer = eval('document.all[\''+div_name+'\']');
} else
{
document.poppedLayer = eval('document.layers[\''+div_name+'\']');
}
if (document.poppedLayer.className == 'active') {
document.poppedLayer.className = '';
document.poppedLayer.style.backgroundImage = 'url(' + image_url + ')';
} else {
document.poppedLayer.className = 'active';
document.poppedLayer.style.backgroundImage = 'url(' + image_url + ')';
}
}
function saveScrollPos(module)
{
var scroll_top = document.getElementById('scrollbar_content').scrollTop;
var new_url = module + "&scroll_top=" + scroll_top;
module.href = new_url;
return false;
}
function saveScrollPosForm(module)
{
var scroll_top = document.getElementById('scrollbar_content').scrollTop;
var hid = document.createElement("input");
hid.setAttribute("type", "hidden");
hid.setAttribute("name", "scroll_top");
hid.setAttribute("value", scroll_top);
module.appendChild(hid);
return false;
}
function setScrollPos(position)
{
var scroll_div = document.getElementById('scrollbar_content');
scroll_div.scrollTop = position;
return false;
}
function open_popup(id) {
if (document.getElementById(id)) {
document.getElementById(id).style.display = 'block';
}
}
function close_popup(id) {
if (document.getElementById(id)) {
document.getElementById(id).style.display = 'none';
}
}