/* ## # sb_vht : A rendszer kliensoldali scriptjei ## */ xhr = null gBase = "http://istenesbence.hu/" gBaseAdmin = "http://istenesbence.hu/admin/" gInterface = new Array() gModRewrite = true gErrorPng = "http://istenesbence.hu/admin/templates/default/images/icons/error.png" oEditor = null function getCookie(c_name){ if (document.cookie.length>0){ c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1){ c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; } function createXHR(){ obj = sbAjax.getAjax() if (obj != null){ if (!getCookie("has_ajax")){ document.cookie="has_ajax=true;path=/" if (getCookie("has_ajax")){ window.location.reload() } } } xhr = obj } function ajaxCall(page, action, opcode, id, callBack, admin, load, modul, specLoad){ admin = (admin)? gBaseAdmin : gBase qStr = eval("moduleGetParams_"+modul+"(page, action, opcode, id)") loader1 = (load)? "moduleSetLoader()" : specLoad loader2 = (load)? "moduleSetLoader()" : specLoad sbAjax.addQuery("POST", admin+"ajax.php", qStr, true, callBack, loader1, loader2, true) } function getSlot(page, action, opcode, id, admin){ admin = (admin)? gBaseAdmin : gBase qStr = "page="+page+"&action="+action+"&opcode="+opcode+"&id="+id sbAjax.addQuery("POST", admin+"getSlot.php", qStr, true, "getSlotComplete('"+page+"', '"+action+"', '"+opcode+"', '"+id+"')", "moduleSetLoader(1)", "moduleSetLoader(0)", true) } function sScroll(obj, x){ switch (obj){ case 0: //document.getElementById("arrow_up").style.backgroundImage = "url('templates/default/images/arrow_fill_up.png')" break case 1: //document.getElementById("arrow_down").style.backgroundImage = "url('templates/default/images/arrow_fill_down.png')" break } scroller.startScroll(0, x) } function eScroll(obj){ switch (obj){ case 0: //document.getElementById("arrow_up").style.backgroundImage = "url('templates/default/images/arrow_up.png')" break case 1: //document.getElementById("arrow_down").style.backgroundImage = "url('templates/default/images/arrow_down.png')" break } scroller.stopScroll() } function createUrl(page, action, opcode, id, absol, nocache, user){ nocache = (!nocache)? "" : ((absol)? "?nocache="+Math.random() : "&nocache="+Math.random()) if (gModRewrite){ if (page && !action && !opcode && !id){ rStr = page+".html" }else{ rStr = "modules/"+page rStr += (action)? "/"+action : "" rStr += (id)? "/"+id : "" rStr += (opcode)? "/"+opcode+".html" : "" } }else{ rStr = "index.php?page="+page rStr += (action)? "&action="+action : "" rStr += (opcode)? "&opcode="+opcode : "" rStr += (id)? "&id="+id : "" } rStr += nocache return (absol)? ((!user)? gBaseAdmin : gBase)+rStr : rStr }