function addEvent(el, evname, func) { if (el.attachEvent) { // IE el.attachEvent("on" + evname, func); } else if (el.addEventListener) { // Gecko / W3C el.addEventListener(evname, func, true); } else { el["on" + evname] = func; } } function removeEvent(el, evname, func) { if (el.detachEvent) { // IE el.detachEvent("on" + evname, func); } else if (el.removeEventListener) { // Gecko / W3C el.removeEventListener(evname, func, true); } else { el["on" + evname] = null; } } function findPosXY(obj) { var curleft = 0; var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.x) { curleft += obj.x; curtop += obj.y; } return [curleft, curtop]; } function setOpacity(obj, value) { obj.style.opacity = value/100; obj.style.filter = 'alpha(opacity=' + value + ')'; } function stopBubble(e) { e = e || window.event; if (e == null) return; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); } function bblock(sh) { var el = document.getElementById('emptydiv'); var targ = gId('body'); if (targ != undefined) { var y = (wndH > targ.scrollHeight && document.all) ? wndH - 80 : targ.scrollHeight; } else { var y = wndH; } setOpacity(el, 50); el.style.visibility = (sh == 1) ? 'visible' : 'hidden'; el.style.width = ((sh == 1) ? wndW : 0) + "px"; el.style.height = ((sh == 1) ? y : 0) + "px"; el.style.zIndex = 10; if (sh == 1) { if (navigator.userAgent.indexOf("MSIE 6.0") != -1) { // IE script to cover .777hp.com '; document.getElementById('subd_u').innerHTML = 'Schreiben Sie die Adresse der neuen Internetseite ein'; document.getElementById('subd_a').innerHTML = ' '; document.getElementById('IchSubDomain').focus(); } function cancelRenSubDomain() { document.getElementById('subd_t').innerHTML = gl_subd_t; document.getElementById('subd_u').innerHTML = gl_subd_u; document.getElementById('subd_a').innerHTML = gl_subd_a; } function renSubDomain(n) { inputz = document.getElementById('IchSubDomain'); if (inputz.value == '') { return false; } var rt = document.getElementById('subDomRespText'); if (inputz.value.match(/^([a-z0-9][0-9a-z-]{0,61}[a-z0-9])$/i)) { rt.innerHTML = aLoader; ajaxReq('ren_subdomain=' + inputz.value + '&n='+ n, 'd'); } else { rt.innerHTML = 'Nepareizs domēns'; } } function postfunc ( a ) { var form = document.createElement('form'); form.method = 'POST'; form.action = a; form.appendChild(document.createElement('input')).name = 'deltrue'; form.style.display = 'none'; document.body.appendChild(form); form.submit(); } var oldFormText; function changeToForm(w, pgid) { if (w.firstChild.name == 'chf') { return false; } oldFormText = w.innerHTML; w.innerHTML = '
'; inputz = document.getElementById('changerteksts'); inputz.focus(); } function hideEditForm(w, pgid) { if (oldFormText != document.getElementById('changerteksts').value) { if (confirm('saglabaat?')) saveEditForm(w, pgid); else w.parentNode.parentNode.innerHTML = oldFormText; } else { w.parentNode.parentNode.innerHTML = oldFormText; } document.getElementById('entText').style.visibility = 'hidden'; } function saveEditForm (w, pgid) { inputz = document.getElementById('changerteksts'); if (inputz.value != '') { ajaxReq('page_name=' + inputz.value + '&page_id='+ pgid, 'd'); document.getElementById('chfrm').parentNode.innerHTML = inputz.value; //window.location.reload(); } else { document.getElementById('chfrm').parentNode.innerHTML = oldFormText; } } function checkDomain() { inputz = document.getElementById('IchDomain'); if (inputz.value == '') { return false; } ajaxReq('check_domain=' + inputz.value, 'd'); var rt = document.getElementById('domRespText'); rt.innerHTML = aLoader; } function checkSubDomain() { inputz = document.getElementById('IchSubDomain'); if (inputz.value == '') { return false; } var rt = document.getElementById('subDomRespText'); if (inputz.value.match(/^([a-z0-9][0-9a-z-]{0,61}[a-z0-9])$/i)) { rt.innerHTML = aLoader; ajaxReq('check_subdomain=' + inputz.value, 'd'); } else { rt.innerHTML = 'Falsches Domain. Es soll mindestens 2 Symbole lang sein, darf Symbole a-z enthalten und auch "-", wenn es nicht am Anfang oder Ende des Namens sich befindet.'; } } function chkSubDomain() { inputz = document.getElementById('IchSubDomain'); if (inputz.value == '') { return false; } var rt = document.getElementById('chk_subDomRespText'); if (inputz.value.match(/^([a-z0-9][0-9a-z-]{0,61}[a-z0-9])$/i)) { rt.innerHTML = aLoader; document.getElementById('ex_td_first_data').innerHTML = inputz.value; ajaxReq('chk_subdomain=' + inputz.value, 'd'); } else { rt.innerHTML = 'Falsches Domain. Es soll mindestens 2 Symbole lang sein, darf Symbole a-z enthalten und auch "-", wenn es nicht am Anfang oder Ende des Namens sich befindet.'; document.getElementById('hide_ex_pay').style.display = 'none'; } } function registerSubDomain() { inputz = document.getElementById('IchSubDomain'); if (inputz.value == '') { return false; } ajaxReq('register_subdomain=' + inputz.value, 'd'); var rt = document.getElementById('subDomRespText'); rt.innerHTML = aLoader; } function delUsr() { ajaxReq('delusr=' + document.getElementById('dpassword').value); } function delProj() { ajaxReq('delproj=' + document.getElementById('dpassword').value); } function delGal() { ajaxReq('delgal=' + document.getElementById('dpassword').value + '&delgalid=' + document.getElementById('dgalid').value ); } function changeNewDomaindivs (w) { switch(w.value) { case '1': document.getElementById('divSubDomain').style.display = 'inline'; document.getElementById('divDomain').style.display = 'none'; document.getElementById('divYourDomain').style.display = 'none'; break; case '2': document.getElementById('divSubDomain').style.display = 'none'; document.getElementById('divDomain').style.display = 'inline'; document.getElementById('divYourDomain').style.display = 'none'; break; case '3': document.getElementById('divSubDomain').style.display = 'none'; document.getElementById('divDomain').style.display = 'none'; document.getElementById('divYourDomain').style.display = 'inline'; } } function pay_page (pnr) { var e = document.getElementById('pay_months['+pnr+']'); document.getElementById('td_pay_btn['+pnr+']').innerHTML = aLoader; ajaxReq('pay_per_page=' + pnr + '&amount=' + e.options[e.selectedIndex].value, 'd'); } function pay_extras (eid, pnr, pgi) { var e = document.getElementById(pnr); document.getElementById('td_payex_btn['+pnr+']').innerHTML = aLoader; ajaxReq('pay_per_extras=' + pgi + '&eid=' + eid + '&amount=' + e.options[e.selectedIndex].value, 'd'); } function buy_page (pnr) { document.getElementById('td_buy_btn').innerHTML = aLoader; ajaxReq('buy_page=' + pnr, 'd'); } function pay_sd (pnr) { var e = document.getElementById('pay_sd_months['+pnr+']'); document.getElementById('td_paysd_btn['+pnr+']').innerHTML = aLoader; ajaxReq('pay_per_sd=' + pnr + '&amount=' + e.options[e.selectedIndex].value, 'd'); } function reset_ex_sub_texts () { ajaxReq('reset_ex_sub_texts=1', 'd'); } function reset_ex_gb_texts() { ajaxReq('reset_ex_gb_texts=1', 'd'); } function rem_unp_extra(pnr) { ajaxReq('rem_unp_extra=' + pnr, 'd'); } /* order stuff */ function post_new_order() { var pname = gId('i_proj_name').value; var opt = document.getElementsByName('web_type'); var ptype = 0; for (n = 0; n < opt.length; n++) { if (opt[n].checked) ptype = opt[n].value; } if (pname == '') { alert(lang_txt_enter_title); return false; } if (ptype == 0) { alert(lang_txt_order_cat); return false; } var stxt = gId('stxt').value; var pr_type = gId('pr_type').value; var o_type = gId('o_type').value; gId('div_order_pg_info').innerHTML = aLoader; ajaxReq('post_new_order=' + encodeURIComponent(pname) + '&cat_id=' + ptype + '&stxt=' + encodeURIComponent(stxt) + '&otype=' + o_type + '&pr_type=' + pr_type, 'd'); } function post_new_ban() { var pname = gId('i_proj_nameb').value; var stxt = gId('stxt_b').value; var o_type = gId('o_type').value; if (pname == '') { alert(lang_txt_enter_title); return false; } gId('div_order_ban').innerHTML = aLoader; ajaxReq('post_new_ban=' + encodeURIComponent(pname) + '&stxt=' + encodeURIComponent(stxt) + '&otype=' + o_type, 'd'); } function post_new_pdwn() { var o_type = gId('o_type').value; ajaxReq('post_new_pdwn=' + o_type); } function post_new_adddom() { var o_type = gId('o_type').value; var adddom = gId('i_adddom_b').value; if (adddom != '') { ajaxReq('post_new_adddom=' + o_type + '&adddom=' + adddom); } } function cancel_order(o, oid) { o.parentNode.innerHTML = aLoader; ajaxReq('cancel_order=' + oid, 'd'); } function pay_order(o, oid) { o.parentNode.innerHTML = aLoader; ajaxReq('pay_order=' + oid, 'd'); } function hide_order_divs() { gId('apinfo').style.fontWeight = 'normal'; gId('adesign').style.fontWeight = 'normal'; gId('aban').style.fontWeight = 'normal'; gId('aban7h').style.fontWeight = 'normal'; //gId('apdwn').style.fontWeight = 'normal'; gId('aadddom').style.fontWeight = 'normal'; if (gId('div_order_adddom')) gId('div_order_adddom').style.display = 'none'; //if (gId('div_order_pdwn')) gId('div_order_pdwn').style.display = 'none'; if (gId('div_order_pg_info')) gId('div_order_pg_info').style.display = 'none'; if (gId('div_order_ban')) gId('div_order_ban').style.display = 'none'; if (gId('div_orders')) gId('div_orders').style.display = 'none'; } function js_close_div_order_pg_info () { hide_order_divs(); if (gId('div_orders')) gId('div_orders').style.display = 'block'; } function chat_refresh(oid) { gId('chat_wnd').innerHTML = aLoader + gId('chat_wnd').innerHTML; ajaxReq('chat_refresh=' + oid, 'd'); } function add_sect(oid, pid) { gId('sAddBtn').innerHTML = aLoader; var sname = gId('i_new_sect').value; gId('i_new_sect').value = ''; ajaxReq('add_sect=' + pid + '&name=' + encodeURIComponent(sname) + '&oid=' + oid, 'd'); } var prevbtn; function o_show_pg(bt, oid, pdid) { var ifod = gId('ifod'); ifod.src = 'order_d.php?oid=' + oid + '&did=' + pdid; if (prevbtn) { prevbtn.style.border = '1px solid #0b7500'; } bt.style.border = '3px solid #0b7500'; bt.blur(); prevbtn = bt; } function save_od_txt() { gId('spn_od_txt').innerHTML = aLoader; if (gId('did')) { ajaxReq('order_save_txt=' + encodeURIComponent(gId('o_txt').value) + '&did=' + gId('did').value + '&oid=' + gId('oid').value, 'd'); } else { ajaxReq('order_save_txt=' + encodeURIComponent(gId('o_txt').value) + '&oid=' + gId('oid').value, 'd'); } } /* end order stuff*/ /* tooltip */ function getLeft (elem) { var n = 0; while ( elem ) { n += elem.offsetLeft; elem = elem.offsetParent; } return n; } function getBottom (elem) { var n = elem.offsetHeight; while ( elem ) { n += elem.offsetTop; elem = elem.offsetParent; } return n; } var wndH = window.innerHeight != null? window.innerHeight: document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight:document.body != null? document.body.clientHeight:null; var wndW = window.innerWidth != null? window.innerWidth: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth:document.body != null? document.body.clientWidth:null; var isOpenTT = false; function setTooltipPosT (elem, text, isToc, wi) { if (isOpenTT) { hideTooltip(); return; } if (wi != undefined) { var to = document.createElement('img'); to.src = 'i/' + text; to.width = wi; } else { var to = document.createElement('div'); to.innerHTML = text; } var tooltip = document.getElementById('tooltip'); tooltip.innerHTML = '
×
'; tooltip.appendChild(to); tooltip.onclick = function () { hideTooltip(); } var wSum = getLeft(elem) + tooltip.offsetWidth; fLeft = getLeft(elem); if ( wSum + 20 > wndW ) { fLeft = fLeft - (wSum - wndW + 20); } var hSum = getBottom(elem) + tooltip.offsetHeight; fBottom = getBottom(elem); if ( hSum + 20 > wndH ) { fBottom = fBottom - (hSum - wndH + 20); } if (isToc) fBottom -= 80; // TOC height tooltip.style.left = fLeft - Math.floor(tooltip.offsetWidth/2.5) + 'px'; tooltip.style.top = fBottom + 'px'; tooltip.style.visibility = 'visible'; isOpenTT = true; } function hideTooltip() { document.getElementById('tooltip').style.visibility = 'hidden'; isOpenTT = false; } function findxy (elem) { curleft = getLeft(elem); curtop = getBottom(elem); return {x:curleft, y:curtop} } /* end tooltip */ addEvent(window,'load',web_chkbut); function web_chkbut() { var cl = document.getElementsByTagName('a'); for (i=0; i < cl.length; i++) { if (cl[i].className == 'web_payizv') { cl[i].onmousedown = new Function("this.className='web_payizv_d';"); cl[i].onmouseup = new Function("this.className='web_payizv'"); cl[i].onmouseout = new Function("this.className='web_payizv'"); } } } function showWnd(el, wi) { bblock(0); var obj = el; el = gId(el === 'banner3' ? 'banner2' : el); el.style.width = wi + 'px'; el.style.left = el.parentNode.parentNode.offsetWidth / 2 - wi / 2 + 'px'; el.style.top = '25px'; el.style.display = 'block'; if (obj == 'banner2' || obj == 'banner3') { el.lastChild.firstChild.onclick=function(){ closeWnd(obj); }; } bblock(1); } function closeWnd(el) { bblock(0); el2 = gId(el === 'banner3' ? 'banner2' : el); el2.style.display = 'none'; if (el == 'banner2') { bblock(1); } // 4 competition section } /* wipe ff -- start*/ var globsteps = 10; var globpwr = 1.5; function wipeInOut(minValue,maxValue,actualStep,totalSteps,powr) { //Generic Animation Step Value Generator By www.hesido.com powr = powr || globpwr; totalSteps = totalSteps || globsteps; var delta = maxValue - minValue; var stepp = minValue+(Math.pow(((1 / totalSteps) * actualStep), powr) * delta); return Math.ceil(stepp) ; } function opcl(el, force) { var oc = el.getAttribute('isopen'); if (oc == null) { if (force == 'close') return; if (el.timer != undefined) clearTimeout(el.timer); wipe(el,'open', function () { el.style.overflow = 'visible'; el.style.height='auto'; }); el.setAttribute('isopen',1); } else { if (force == 'open') return; if (el.timer != undefined) clearTimeout(el.timer); wipe(el,'close'); el.removeAttribute('isopen'); } } function wipe(bigel, type, func) { var cont = bigel; cont.timer = ''; var s = cont.offsetHeight; var e = type == 'open' ? cont.scrollHeight : 0; cont.style.overflow = 'hidden'; cont.style.height = s+'px'; doWipe(cont, s, e, 0, func); } function doWipe(el, minv, maxv, curstep, func) { clearTimeout(el.timer); curstep++; var newh = wipeInOut(minv,maxv,curstep); el.style.height = newh+'px'; if (newh != maxv) el.timer = setTimeout(function() { doWipe(el, minv, maxv, curstep, func); },10); else { if (func) func(); } } /* end wipe */