var povod = ' ';
function w_in() {
povod = window.status;
window.status = ' ';
return true;
}
function w_out() {
window.status = povod;
return true;
}
function show_new_window(id,what)
{
var sirka_ = 400;
var vyska_ = 400;
if (what == "tasr")
{
sirka_ = 500;
vyska_ = 500;
}
if (what == "vzn")
{
sirka_ = 750;
vyska_ = 500;
}
if (what == "jedalny_listok")
{
sirka_ = 500;
vyska_ = 500;
}
if (what == 'mapa_data') {
sirka_ = 350;
vyska_ = 150;
}
if (what.substr(0,7) == 'recept_') {
sirka_ = 750;
vyska_ = 700;
}
var properties = "top=15,left=15,width=" + sirka_ + ",height=" + vyska_ + ",scrollbars=yes,resizable=yes";
var nove_okno;
if (nove_okno = window.open('','okno' + id,properties)){
nove_okno.window.location='http://mesta.slovenska.sk/m_portaly/new_window.php?id=' + id + '&what=' + what + '&css=http://www.zvolen.net/_style.css' + '&id_mesto=' + 82;
}
else show_alert();
}
if (navigator.appName.indexOf("Netscape") != -1) var _mozilla = 1; else var _mozilla = 0;
if (navigator.appName.indexOf("Opera") != -1) var _opera = 1; else var _opera = 0;
if (navigator.appName.indexOf("Microsoft") != -1) {
if (navigator.appVersion.indexOf("MSIE 7.0") != -1) var _ie7 = 1; else var _ie7 = 0;
if (navigator.appVersion.indexOf("MSIE 6.0") != -1) var _ie6 = 1; else var _ie6 = 0;
if (navigator.appVersion.indexOf("MSIE 5.5") != -1) var _ie55 = 1; else var _ie55 = 0;
if (navigator.appVersion.indexOf("MSIE 5.0") != -1) var _ie50 = 1; else var _ie50 = 0;
}
else {
var _ie7 = 0;
var _ie6 = 0;
var _ie55 = 0;
var _ie50 = 0;
}
function is_navigator_type(type) {
if (type == 'ie' && (_ie7 || _ie6 || _ie55 || _ie50)) return true;
if (type == 'firefox' && _mozilla) return true;
if (type == '_opera' && _opera) return true;
return false;
}
var buble_start = 0;
function window_width()
{
if (_mozilla) return self.innerWidth;
else return document.body.offsetWidth;
}
function window_height()
{
if (_mozilla) return self.innerHeight;
else return document.body.offsetHeight;
}
function get_scroll(os) {
var navrat = '';
if (os == 'x') {
if (_mozilla) {
navrat = window.scrollX;
}
else {
if (_ie6) navrat = document.documentElement.scrollLeft;
if (_ie50 || _ie55) navrat = document.body.scrollLeft;
}
}
else {
if (_mozilla) {
navrat = window.scrollY;
}
else {
if (_ie6) navrat = document.documentElement.scrollTop;
if (_ie50 || _ie55) navrat = document.body.scrollTop;
}
}
return navrat;
}
function show_bubble(cislo,_left,_top) {
if (buble_start) {
_scrollLeft = get_scroll('x');
_scrollTop = get_scroll('y');
var _x_p = document.getElementById("_xp" + cislo);
if (_x_p.style.display == "none")
{
if ((_left + _scrollLeft + 250 > window_width()) && (_left + _scrollLeft > 250)) _left = _left - 250;
var all_xps = document.getElementsByTagName("div");
for (x=0;x<all_xps.length;x++)
{
if (all_xps[x].id.substr(0,3) == "_xp") all_xps[x].style.display = "none";
}
_left += _scrollLeft;
_top += _scrollTop;
_x_p.style.left = _left + 'px';
_x_p.style.top = _top + 'px';
_x_p.style.display = "block";
}
}
}
obr=new Array();
obr[0]="images/plus.gif";
obr[1]="images/minus.gif";
Menu=new Array();
menu_flag=new Array();
i=0;
function st_r(x)
{window.status=x;
return true;}
back_img = new Image(); back_img.src = "images/nacitavam_udaje.gif";
function nove_o_menu(x)
{
var sirka = 320;
var vyska = 240;
var properties="width=" + sirka + ",height=" + vyska + ",scrollbars=yes,resizable=yes,top=15,left=15";
var nove_okno;
if (nove_okno = window.open('','okno',properties)){
nove_okno.window.location="http://mesta.slovenska.sk/m_portaly/big_foto_menu.php?id=" + x + "&css=http://www.zvolen.net/_style.css";
}
else show_alert();
}
function firma_n(id_firm,ubytovanie_flag)
{
var properties="width=567,height="+(screen.availHeight - 100)+",scrollbars=yes,resizable=yes,top=15,left=15,status=yes";
var nove_okno;
if (nove_okno = window.open('','okno',properties)){
var new_location = "firma_detail.php?firma="+id_firm+"&css=http://www.zvolen.net/_style.css";
if (ubytovanie_flag != '') new_location += "#" + ubytovanie_flag;
nove_okno.window.location = new_location;
}
else show_alert();
}
function firma_a(id_firm,ubytovanie_flag)
{
var properties="width=567,height="+(screen.availHeight - 100)+",scrollbars=yes,resizable=yes,top=15,left=15,status=yes";
var nove_okno;
if (nove_okno = window.open('','okno',properties)){
var new_location = "firma_detail.php?firma="+id_firm+"&css=http://www.zvolen.net/_style.css&id_jazyk=3";
if (ubytovanie_flag != '') new_location += "#" + ubytovanie_flag;
nove_okno.window.location = new_location;
}
else show_alert();
}
function firma_de(id_firm,ubytovanie_flag)
{
var properties="width=567,height="+(screen.availHeight - 100)+",scrollbars=yes,resizable=yes,top=15,left=15,status=yes";
var nove_okno;
if (nove_okno = window.open('','okno',properties)){
var new_location = "firma_detail.php?firma="+id_firm+"&css=http://www.zvolen.net/_style.css&id_jazyk=2";
if (ubytovanie_flag != '') new_location += "#" + ubytovanie_flag;
nove_okno.window.location = new_location;
}
else show_alert();
}
function nove_o_all(x)
{
var sirka = 320;
var vyska = 240;
var properties="width=" + sirka + ",height=" + vyska + ",scrollbars=yes,resizable=yes,top=15,left=15";
var nove_okno;
if (nove_okno = window.open('','okno',properties)){
nove_okno.window.location="http://mesta.slovenska.sk/m_portaly/big_foto_all.php?id=" + x + "&css=http://www.zvolen.net/_style.css";
}
else show_alert();
}
var old_class_name = '';
function change_parent_style(obj,what,class_name) {
while (obj.parentNode.tagName != what) {
obj = obj.parentNode;
}
old_class_name = obj.parentNode.className;
obj.parentNode.className = class_name;
}
function get_date(obj,zrus) {
var properties = 'width=200,height=170,resizable=0,scrollbars=0';
var nove_okno;
if (nove_okno = window.open('','date',properties)) {
nove_okno.window.location='admin/tiny_mce/get_date.php?obj=' + obj.id + '&zrus=' + zrus;
}
else show_alert();
}
function get_time(obj,zrus) {
var properties = 'width=';
if (zrus) properties += '280'; else properties += '250';
properties += ',height=100,resizable=0,scrollbars=0';
var nove_okno;
if (nove_okno = window.open('','date',properties)) {
var next = '';
if (obj.value != '') next = '&hour_actual=' + obj.value.substr(0,2) + '&minute_actual=' + obj.value.substr(3,2);
nove_okno.window.location='admin/tiny_mce/get_time.php?obj=' + obj.id + next + '&zrus=' + zrus;
}
else show_alert();
}
function print_select(how,sort) {
var properties = 'width=550,height=250,top=5,left=5,scrollbars=0,resizable=0';
var nove_okno;
if (nove_okno = window.open('','print',properties)) {
nove_okno.window.location='http://mesta.slovenska.sk/m_portaly/new_window.php?id=4c9d90382fcb6a0a7e453259b75ea727&what=print&how=' + how + '&sort=' + sort + '&css=http://www.zvolen.net/_style.css' + '&id_mesto=82';
}
else show_alert();
}
function set_other(id) {
document.getElementById(id).checked = 1;
}
function open_div(obj) {
while (obj.parentNode.tagName != 'DIV') obj = obj.parentNode;
if (obj.parentNode.id != 'stop_div') {
obj.parentNode.style.display = 'block';
document.getElementById(obj.parentNode.id.substr(0,obj.parentNode.id.length - 1)).src = 'images/grayminus.gif';
open_div(obj.parentNode);
}
}
var _password_verify_error;
var _login_verify_error;
var permitted_chars = new Array('+','*','/',',',':','.','\'',';','&','"',' ',String.fromCharCode(34),String.fromCharCode(92));
function in_array(string,array) {
if (array.toString().indexOf(string) == -1) return false;
else return true;
}
function has_permitted_chars(text) {
var navrat = false;
for (var x=0;x<text.length;x++) {
if (in_array(text.substr(x,1),permitted_chars)) navrat = true;
}
return navrat;
}
function password_verify_insert(password,password_verify,min_length) {
var navrat = false;
if (!has_permitted_chars(password)) {
if (password.length >= min_length) {
if (password == password_verify) navrat = true; else _password_verify_error = 'Heslo a jeho potvrdenie sa nezhodujú';
}
else _password_verify_error = 'Heslo je kratšie ako minimálna povolená dĺžka';
}
else _password_verify_error = 'Heslo obsahuje zakázané znaky';
return navrat;
}
function verify_login(login,min_length) {
navrat = false;
if (!has_permitted_chars(login)) {
if (login.length >= min_length) navrat = true; else _login_verify_error = 'Meno je kratšie ako minimálna povolená dĺžka';
}
else _login_verify_error = 'Meno obsahuje nepovolené znaky';
return navrat;
}
var show_flag = new Array();
function init_menu() {
var _left;
var _top;
var active_menu;
var obj;
for (number=0;number<show_flag.length;number++) {
active_menu = document.getElementById('d_menu_' + number);
obj = document.getElementById('submenu' + number);
_top = obj.offsetTop + document.getElementById('search_row').offsetHeight - 5;
if (is_navigator_type('ie')) _top += document.getElementById('v_header').offsetHeight;
_left = obj.offsetLeft;
if (is_navigator_type('ie')) _left += document.getElementById('for_v_menu').offsetLeft;
active_menu.style.left = _left + 'px';
active_menu.style.top = _top + 'px';
}
}
function activate_submenu(number) {
var active_menu = document.getElementById('d_menu_' + number);
show_flag[number] = 1;
window.setTimeout('activate_submenu1('+number+')',300);
}
function activate_submenu1(number) {
if (show_flag[number]) {
var active_menu = document.getElementById('d_menu_' + number);
if (show_flag[number]) active_menu.style.display = 'block';
}
}
function deactivate_submenu(number) {
var active_menu = document.getElementById('d_menu_' + number);
show_flag[number] = 0;
window.setTimeout('deactivate_submenu1(' + number + ')',300);
}
function deactivate_submenu1(number) {
var active_menu = document.getElementById('d_menu_' + number);
if (!show_flag[number]) active_menu.style.display = 'none';
}
function my_add_listener() {
}
