var client = new HttpClient(); client.isAsync = true; function goLoadContent(goUrl){ client.callback=function(xxresult){ document.getElementById(client.dest).innerHTML=xxresult; } client.makeRequest(goUrl, null); } function calcResPos(){ pgY = document.all ? document.documentElement.scrollTop : window.pageYOffset; if(pgY > 112){ document.getElementById('topMenus').style.position = 'fixed'; }else{ document.getElementById('topMenus').style.position = 'relative'; } } function goLoadForm(goUrl, form, dest){ if(dest) ajaxDestionation = dest; client.callback=function(result){ document.getElementById(ajaxDestionation).innerHTML=result; } client.makeFormRequest(goUrl, null, form); } function doLoadResNoIE(lSrc){ var head= document.getElementsByTagName('head')[0]; var script= document.createElement('script'); script.type= 'text/javascript'; script.src= lSrc; head.appendChild(script); } function showWindow(width, height, title, sUrl){ var MW = document.createElement('div'); MW.id = 'pWindow'; MW.setAttribute('style', 'display:table; '); document.body.appendChild(MW); var MWbg = document.createElement('div'); MWbg.id = 'windowBg'; MW.appendChild(MWbg); var MWins = document.createElement('div'); MWins.id = 'windowIns'; MW.appendChild(MWins); var MWinsIn = document.createElement('div'); MWinsIn.setAttribute('style', 'position:relative; '); MWins.appendChild(MWinsIn); var MWSpan = document.createElement('span'); MWSpan.innerHTML = title; MWinsIn.appendChild(MWSpan); var MWimg = document.createElement('img'); MWimg.src = 'http://rendeles.pizzagusto.ro/servo/w-close.png'; MWimg.title = 'Inchide'; MWimg.setAttribute('onclick', 'document.body.removeChild(document.getElementById("pWindow")); '); MWinsIn.appendChild(MWimg); var MWIframe = document.createElement('iframe'); MWIframe.id = 'windowFrame'; MWIframe.setAttribute('style', 'width:' + width + 'px; height:' + height + 'px; '); if(sUrl){ MWIframe.src = sUrl; } MWinsIn.appendChild(MWIframe); } function closeWindow(){ document.body.removeChild(document.getElementById("pWindow")); } function closeWindowAfterAlert(alertString){ document.body.removeChild(document.getElementById("pWindow")); alert(alertString); } function loadH(sUrl){ document.getElementById('hiddenFrame').src = sUrl; } function reloadPage(){ location.href = location.href; } window.onscroll = document.documentElement.onscroll = calcResPos;