////////////////////////// // NAVIGATION // ////////////////////////// function win_load() { var num_pages = 30; for (i=1; i<=num_pages; i++) { var txtid = translate_id(i.toString()); if (parent.frames("toolbar").menuitem_status[i] == 1) { document.getElementById("div" + txtid).style.display = "block"; document.getElementById("div" + txtid).style.visibility = "visible"; } // end if } // end for } // end function win_load(). function translate_id(id) { switch(id) { case '': return "home"; break; case '1': return "articles"; break; case '2': return "yourstories"; break; case '3': return "catalog"; break; case '4': return "announces"; break; case '5': return "gallery"; break; case '6': return "forum"; break; case '7': return "jokes"; break; case '8': return "links"; break; case '9': return "homealbum"; break; case '10': return "dates"; break; } } function mi_over(id) { var txtid = translate_id(id); //if (parent.frames("toolbar").menuitem_status[id] == 0) document.getElementById(txtid).style.cursor = "hand"; } function mi_out(id) { var txtid = translate_id(id); document.getElementById(txtid).style.cursor = "auto"; } function mi_click(id) { var txtid = translate_id(id); window.location.href = "index.php?menu_id=" + hid_uid.value + "&p=" + txtid + ""; /* if (txtid == "forum") { window.location.href = "index.php?menu_id=" + hid_uid.value + "&p=forum"; } */ //if (parent.frames("toolbar").menuitem_status[id] == 0) //{ //document.getElementById("div" + txtid).style.display = "block"; //document.getElementById("div" + txtid).style.visibility = "visible"; //parent.frames("toolbar").menuitem_status[id] = 1; //window.location.href = "index.php?menu_id=" + hid_uid.value + "&p=" + txtid + ""; // } // else // { // document.getElementById("div" + txtid).style.display = "none"; // document.getElementById("div" + txtid).style.visibility = "hidden"; // parent.frames("toolbar").menuitem_status[id] = 0; // window.location.href = "index.php?menu_id=" + hid_uid.value + "&p=" + txtid + ""; // } //window.location.href = "index.php?menu_id=&p=" + txtid; } /////////////////////////////// // DATE SETTING // /////////////////////////////// function MakeArray(n) { this.length = n return this } monthNames = new MakeArray(12) monthNames[1] = "Януари" monthNames[2] = "Февруари" monthNames[3] = "Март" monthNames[4] = "Април" monthNames[5] = "Май" monthNames[6] = "Юни" monthNames[7] = "Юли" monthNames[8] = "Август" monthNames[9] = "Септември" monthNames[10] = "Октомври" monthNames[11] = "Ноември" monthNames[12] = "Декември" dayNames = new MakeArray(7) dayNames[1] = "Неделя" dayNames[2] = "Понеделник" dayNames[3] = "Вторник" dayNames[4] = "Сряда" dayNames[5] = "Четвъртък" dayNames[6] = "Петък" dayNames[7] = "Събота" function customDateString() { currentDate = new Date() var theDay = dayNames[currentDate.getDay() + 1] var theMonth = monthNames[currentDate.getMonth() + 1] msie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )); if (msie4) { var theYear = currentDate.getYear() } else { var theYear = currentDate.getYear() +1900 } return currentDate.getDate() + "-" + theMonth + "-" + theYear } ///////////////////////////////////////////////////// // POPUP WINDOWS MANAGER // ///////////////////////////////////////////////////// var win=null; function NewWindow(mypage,myname,w,h,pos,infocus) { if(pos=="random") { myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100; } if(pos=="center") { myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100; } else if((pos!='center' && pos!="random") || pos==null) { myleft=0;mytop=20 } settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings); win.focus(); } // end function NewWindow(). // USER LOG OUT function user_logout() { window.location.href = "index.php?menu_id=0&p=home"; alert("Вие излязохте успешно !"); }