function show_picture(script, src, alt, width, height) { // alt must be escaped or empty because escape(str) doesn't work with russian symbols if ( (script.substring(0,7).toLowerCase()) != "http://" && (script.substring(0,8).toLowerCase() != "https://" ) ){ script = frontBaseHref + script; } var w_width = 40 + parseInt(width); var w_height = 100 + parseInt(height); if (w_height > window.screen.availHeight) w_height = window.screen.availHeight; if (w_width > window.screen.availWidth) w_width = window.screen.availWidth; window.open(script+"?src=" + escape(src) + "&alt=" + alt + "&width="+width + "&height="+height, "pic", "resizable=yes, status=yes, scrollbars=yes, width=" + w_width + ", height=" + w_height); } function show_details(script) { if ( (script.substring(0,7).toLowerCase()) != "http://" && (script.substring(0,8).toLowerCase() != "https://" ) ){ script = frontBaseHref + script; } var w_width = 200; var w_height = 250; if (w_height > window.screen.availHeight) w_height = window.screen.availHeight; if (w_width > window.screen.availWidth) w_width = window.screen.availWidth; window.open(script, "pic", "resizable=yes, status=yes, scrollbars=yes, width=" + w_width + ", height=" + w_height); } function none(){ return false; } function isEmail_old(string) { if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) return true; else return false; } function isEmail(string) { if (string.search(/^(\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+(;|,|$))+$/) != -1) return true; else return false; } // // following functions will be deleted later // function collect_link(cform){ var vlink = ''; var first = 1; for(var i=0; i'); shownAdvPlaces += (shownAdvPlaces == '' ? ';' : '')+idPlace+';'; // Old scheme - inline method }else{ if (!document.usedAdvData) document.usedAdvData = ''; rndseed = new String(Math.random()); rndseed = rndseed.substring(2,11); document.write ("<" + "script language='JavaScript' type='text/javascript' src='"+viewURL+"adv.php?action=view&rs="+rndseed+"&place="+idPlace+"&used="+document.usedAdvData+"&curl="+escape(viewURL)+"&referer="+escape(advReferrer)+"'><"+"/script>"); } } function showAdvBanner(id, content){ if(document.usedAdvData) document.usedAdvData += ','+id+','; else document.usedAdvData = ','+id+','; document.writeln(content); } function advClick(clickURL){ rndseed = new String(Math.random()); rndseed = rndseed.substring(2,11); clickURL+="&rs="+rndseed; img = new Image(); img.src = clickURL; } /*MODULE ADVERTISEMENT PART */ var prevBodyOnLoad = false; var modAdvertStr = ""; // Set advertisement onload callback and remember previous one ... function setAdvEvtOnLoad(){ if(window.onload != onLoadForAdv){ if(window.onload){ prevBodyOnLoad = window.onload; } window.onload=onLoadForAdv; } } // Execute advertise onload callback and previous one thereafter function onLoadForAdv(){ rndseed = new String(Math.random()); rndseed = rndseed.substring(2,11); modURL='/adv.php?action=modview&&rs='+rndseed+'&data='+modAdvertStr; if(frontBaseHref) modURL=frontBaseHref+'adv.php?action=modview&rs='+rndseed+"&referer="+escape(advReferrer)+'&data='+modAdvertStr; img = new Image(); img.src = modURL; if(prevBodyOnLoad != false){ prevBodyOnLoad(); } }; // Set item view function setView(modName, bodyType, id){ setAdvEvtOnLoad(); modAdvertStr += ';'+modName+'|'+bodyType+'|'+id+';'; } // Returns cookie value function getCookie(name) { var search = name + "="; if (document.cookie.length > 0) { // if there are any cookies offset = document.cookie.indexOf(search); if (offset != -1) { // if cookie exists offset += search.length; // set index of beginning of value end = document.cookie.indexOf(";", offset); // set index of end of cookie value if (end == -1) { end = document.cookie.length; } return unescape(document.cookie.substring(offset, end)); } } } // {{{ window.onLoad events queue implementation var onLoadEvents = new Array (); var previousOnLoadEvent; function addOnLoadEvent(event) { onLoadEvents[onLoadEvents.length] = event; } function savePreviousOnLoadEvent() { previousOnLoadEvent = window.onload; window.onload = runOnLoadEventsQueue; } function runOnLoadEventsQueue() { if (previousOnLoadEvent) { previousOnLoadEvent(); } for (var i = 0 ; i < onLoadEvents.length; i++) { onLoadEvents[i](); } } // }}}