/* assuming you already have XHConn.js included in your HTML file */ var szalak = 0; var stopopacity = false; var fnallfut = false; var scriptids=0; var maxszal=0; var adminmode=false; var fostatusshowtimer=0; var pillheight=0; var akttimer; var adtimers = Array(); var activemenu=0; var userinfotimer = 0 ; var user_logged_in; var IE =0 ; var statconn=new XHConn_hidden(); var keycodes=Array(); var DOC_TITLE=''; var indexpicover; var Conn_count=0; var hashtimer=0; var STEPPING_BACK =0; var typeing = false; var typeing_timer =0; var e=0; var uploadnums = 0; //currentOpac('userinfok', 0, 1); //var keyevents=Array(); if (document.all) { IE=1; e=true;} else { IE=0;e=false;} //if (!IE) document.captureEvents(Event.MOUSEMOVE) var conid=0; var app='N'; if (IE=='1') app='M'; var lang='hu'; var debugmode_on=false; // HIBAKEZELES function betterhandler(description,pagename,lineno) { if (debugmode_on==true) { alert( 'An Error occurred! (sajat hibauzi) \n' +'\n Description: \t'+description +'\n Page Name: \t'+pagename +'\n At Line : \t'+lineno+'\n' ); } return true; } window.onerror=betterhandler; //HIBAKEZELES VEGE function updateStylesheets() { var i,a,s; a=document.getElementsByTagName('link'); for(i=0;i=0&&s.href) { var h=s.href.replace(/(&|\\?)forceReload=d /,''); s.href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new Date().valueOf()); } } } function previewStylesheets(stid) { var i,a,s; a=document.getElementsByTagName('link'); for(i=0;i=0&&s.href) { var h=s.href.replace(/(&|\\?)forceReload=d /,''); s.href=h+(h.indexOf('?')>=0?'&':'?')+'forceid='+AKTstilusid+'&forceReload='+(scriptids); } } } // globalis billentyuleutes beallitasa: function kH(e) { var pK = e? e.which: window.event.keyCode; eval(keycodes[pK]); typeing=true; clearTimeout(typeing_timer); typeing_timer=setTimeout('typeing=false;',1000); if (keycodes[pK]) { //alert(keycodes[pK]); try { } catch(err) { txt="Hiba van az oldalon.\n\n"; txt+="Hiba leirasa: " + err.description + "\n\n"; txt+="Click OK to continue.\n\n keycodes[pk]= \n"+keycodes[pK]; alert(txt); } } else { //alert(pK); } return pK; } document.onkeypress = kH; if (document.layers) document.captureEvents(Event.KEYPRESS); function registerkeyevent(keycode,eventstr) { keycodes[keycode]=eventstr; } //window.location.hash="back"; //setTimeout('window.location.hash="OK"',100); var andjel='&'; andjel=andjel.substr(0,1); //alert(andjel); var connsor = new Array(); connsor[0]= new Array(); connsor[1]= new Array(); connsor[2]= new Array(); connsor[3]= new Array(); connsor[4]= new Array(); connsor[5]= new Array(); function clickedOnScBar(obj,num,fnWhenClicked) { var objid=obj.id; var stid=objid.substr(13); var mouse = getMouseXY(); var pos = findPos(obj); var voted=(mouse[0]-pos[0]); var valueobj=document.getElementById('small_voting_new_value_'+num); var belso=document.getElementById('vote_span_inner_new_'+num); if (belso) { belso.style.width=voted+'px'; var ertek=Math.round((voted/obj.offsetWidth)*100); ertek=Math.abs(ertek); valueobj.value=ertek; document.getElementById('small_voting_new_txt_'+num).innerHTML=valueobj.value+' '; } if (fnWhenClicked) {fnWhenClicked(objid,ertek)}; } function kisebb(a,b) { if (a | dest: '+dest+''; var mynewtr = document.createElement('tr'); var newtd =new Array(); for (var ix=0; ix<6; ix++) { newtd[ix] = document.createElement('td'); } newtd[4].innerHTML=conid; mynewtr.appendChild(newtd[4]); newtd[5].innerHTML='N/A'; newtd[5].setAttribute('id','hist_td_'+conid); mynewtr.appendChild(newtd[5]); newtd[0].innerHTML=sURL; mynewtr.appendChild(newtd[0]); newtd[1].innerHTML=sMethod; mynewtr.appendChild(newtd[1]); newtd[2].innerHTML=dest; mynewtr.appendChild(newtd[2]); newtd[3].innerHTML=sVars; mynewtr.appendChild(newtd[3]); conhist.appendChild(mynewtr); document.getElementById('connecthistory').scrollTop = document.getElementById('connecthistory').scrollHeight; } var destdiv=document.getElementById(dest); //var procdiv=document.getElementById('processdiv'); //alert(procdiv); //if (procdiv!=null) { if (destdiv!=null) { var divpos= findPos(destdiv); divpos[1]=((divpos[1]+divpos[1]+destdiv.offsetHeight)/2)-20; divpos[0]=((divpos[0]+divpos[0]+destdiv.offsetWidth)/2)-20; var processing="
"; //alert(processing); //destdiv.innerHTML=(destdiv.innerHTML+processing); } if (fnallfut==false) { fnallfut=true; var actuel=popconnect(); if (actuel[4]==null) { actuel[4]=fnWhenAllDone; } mainconn.connect(actuel[0],actuel[1],actuel[2],actuel[4],actuel[3],actuel[5]); } } function nextconnect() { //setTimeout('alert("asd");',1000); if (connsor[0].length==0) { fnallfut=false; maxszal=0; } else { var actuel=popconnect(); //alert(actuel[4]); if (actuel[4]==null) { actuel[4]=fnWhenAllDone; } mainconn.connect(actuel[0],actuel[1],actuel[2],actuel[4],actuel[3],actuel[5]); } } function putOneConnect() { var now = popconnect(); alert('sUrl: '+now[0]+' \nsMethod: '+now[1]+' \nsVars: '+now[2]+' \ndest: '+now[3]); //alert(escape(m)); } function popconnect() { //var meret = connsor.length; //var cache = connsor[meret]; var last = new Array(); last[0] = connsor[0].shift(); last[1] = connsor[1].shift(); last[2] = connsor[2].shift(); last[3] = connsor[3].shift(); last[4] = connsor[4].shift(); last[5] = connsor[5].shift(); //alert(last[3]); return last; } function XHConn_hidden(statusnm) { var xmlhttp, bComplete = false; var statusname=statusnm; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; }}} if (!xmlhttp) return null; //xmlhttp.onError = function () {alert('connect hiba');} this.connect = function(sURL, sMethod, sVars, fnDone, dest,madeid) { /* alert( ' Url : '+sURL+ '\n Method : '+sMethod+ '\n Vars : '+sVars+ '\n fnDone : ---'+ '\n Dest : '+dest+ '\n Madeid : '+madeid );*/ if (statusname) { if (document.getElementById(statusname)) { // document.getElementById(statusname).style.visibility='visible'; } } if (!xmlhttp) return false; bComplete = false; sMethod = sMethod.toUpperCase(); try { if (sMethod == "GET") { var destobj = document.getElementById(dest); var destwidth; if (destobj) { destwidth=destobj.offsetWidth; } xmlhttp.open(sMethod, sURL+"?"+"ddiv="+dest+'&langnow='+lang+'&madeid='+madeid+'&destwidth='+destwidth+'&'+sVars, true); sVars = ""; } else { xmlhttp.open(sMethod, sURL, true); xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1"); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send("ddiv="+dest+'&langnow='+lang+'&madeid='+madeid+'&destwidth='+destwidth+'&'+sVars); } xmlhttp.onreadystatechange = function(){ makehistok(madeid,xmlhttp.readyState); //var statusdiv = document.getElementById('status'); if (xmlhttp.readyState == 1 && !bComplete) { // statusdiv.innerHTML='Loading'; //statusdiv.style.visibility='visible'; if (document.getElementById(statusname)) { // fostatusshowtimer = setTimeout( "document.getElementById(statusname).style.visibility='visible';", // 1000); } } if (xmlhttp.readyState == 4 && !bComplete) { if (statusname) { if (document.getElementById(statusname)) { //opacity(statusname,0,0,500); //document.getElementById(statusname).style.visibility='hidden'; } } bComplete = true; fnDone(xmlhttp,dest,madeid); //statusdiv.innerHTML='Finished'; //statusdiv.style.visibility='hidden'; }}; xmlhttp.send(sVars); } catch(z) { alert(z); return false; } return true; }; return this; } function XHConn() { var xmlhttp, bComplete = false; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; }}} if (!xmlhttp) return null; this.connect = function(sURL, sMethod, sVars, fnDone, dest,madeid) { if (!xmlhttp) return false; bComplete = false; sMethod = sMethod.toUpperCase(); try { if (sMethod == "GET") { var destobj = document.getElementById(dest); var destwidth; if (destobj) { destwidth=destobj.offsetWidth; } xmlhttp.open(sMethod, sURL+"?"+"ddiv="+dest+'&madeid='+madeid+'&langnow='+lang+'&'+'destwidth='+destwidth+'&'+sVars, true); sVars = ""; } else { xmlhttp.open(sMethod, sURL, true); xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1"); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send("ddiv="+dest+'&langnow='+lang+'&madeid='+madeid+'&destwidth='+destwidth+'&'+sVars); } xmlhttp.onreadystatechange = function(){ /* marci ide irj egzfuggvenyt ha megszakad a kapcsolat */ //makehistok(madeid,xmlhttp.readyState); //var statusdiv = document.getElementById('status'); if (xmlhttp.readyState == 1 && !bComplete) { // statusdiv.innerHTML='Loading'; //statusdiv.style.visibility='visible'; addload(); } if (xmlhttp.readyState == 4 && !bComplete) { if (xmlhttp.status!=200 || xmlhttp.responseText=='') { return false; } bComplete = true; fnDone(xmlhttp,dest,madeid); delload(); //statusdiv.innerHTML='Finished'; //statusdiv.style.visibility='hidden'; }}; xmlhttp.send(sVars); } catch(z) { return false; } return true; }; return this; } function fnWhenParamDone(oXML,dest) { var resp=oXML.responseText; //alert(resp); document.getElementById('dest').innerHTML=resp; nextconnect(); } function addload() { szalak=szalak+1; //alert("fel"+szalak); //var connections=document.getElementById('activeconnections'); //connections.innerHTML=connsor[0].length+"/"+maxszal; } function stopload() { //szalak=0; connsor[0]= new Array(); connsor[1]= new Array(); connsor[2]= new Array(); connsor[3]= new Array(); connsor[4]= new Array(); //mainconn.disconnect(); //mainconn.abort(); } function delload() { szalak=szalak-1; //var statusBar=document.getElementById('statusbar'); if (connsor[0].length>maxszal) { maxszal=connsor[0].length; //statusBar.style.width=; } //if (maxszal>=1) { //if (statusBar.style.offsetWidth != 100-(Math.round((connsor[0].length *100)/maxszal))+"%") //statusBar.style.width=100-(Math.round((connsor[0].length *100)/maxszal))+"%"; //} else { //statusbar.style.width=100+"%"; //} //var connections=document.getElementById('activeconnections'); //connections.innerHTML=connsor[0].length+"/"+maxszal; //alert(szalak); //alert("le"+szalak); //if (szalak==0) { //var statusdiv = document.getElementById('status'); // csinald(get_height()); //statusdiv.style.visibility='hidden'; maxszal=0; } /*function closeStatusWindow() { clearTimeout(fostatusshowtimer); fostatusshowtimer=0; var statusdiv = document.getElementById('status'); if (statusdiv) { //statusdiv.style.visibility='hidden'; opacity('status',0,0,300); } } */ function fnWhenAllDone(oXML,dest,madeid) { scriptids++; //currentOpac(dest, 100, 200); var resp=oXML.responseText; //alert(resp); //if (resp.length<5) { //alert('semmisincsenarespben'); //return false; //} var logok=document.getElementById('logok_div'); var newmemdiv = document.createElement('span'); //alert('eleje'); //alert(newmemdiv.innerHTML); newmemdiv.setAttribute('id','newmemdiv_'+scriptids); newmemdiv.innerHTML=resp; logok.appendChild(newmemdiv); //alert('.'+resp+'.'); //alert('monst indul a scriptek vegrehajtasa:'); //alert('hello'); while (document.getElementById('runscript') != null) { if (document.getElementById('runscript') != null ) { document.getElementById('runscript').setAttribute('id','scriptdiv_'+scriptids); var thisscript=document.getElementById('scriptdiv_'+scriptids); //alert(dest+'\n'+thisscript.id+'\n'+thisscript.innerText); //var inditanivalo =thisscript.innerHTML; //eval(inditanivalo); var logscript=document.createElement('script'); logscript.setAttribute('id','newlogscript_'+scriptids); logscript.text=thisscript.innerHTML; try { logok.appendChild(logscript); } catch(err) { alert('BAJ VAN:\n'+'DDIV:'+dest+'\n'+thisscript.innerHTML+'\n hiba: \n'+err.description+'\n in: '+err.number+'\n name:'+err.name); } thisscript.innerHTML=''; //alert('megtortentem;'); //document.getElementById('runscript').innerText=''; } } while (document.getElementById('runscript2') != null) { if (document.getElementById('runscript2') != null ) { document.getElementById('runscript2').setAttribute('id','scriptdiv2_'+scriptids); var thisscript=document.getElementById('scriptdiv2_'+scriptids); //alert(dest+'\n'+thisscript.id+'\n'+thisscript.innerText); var inditanivalo =thisscript.innerHTML; var scripthistory=document.getElementById('scripthistory_inner'); if (scripthistory) { scripthistory.innerHTML=scripthistory.innerHTML+'
-----
'+inditanivalo; document.getElementById('scripthistory_inner_sc').scrollTop = document.getElementById('scripthistory_inner_sc').scrollHeight; } var inditani_array=inditanivalo.split('\n'); var tombmeret=inditani_array.length; //eval(inditanivalo); var logscript=document.createElement('script'); logscript.setAttribute('id','newlogscript_'+scriptids); logscript.text=inditanivalo; try { logok.appendChild(logscript); } catch(err) { alert('BAJ VAN:\n'+'DDIV:'+dest+'\n'+inditanivalo); } thisscript.innerHTML=''; //document.getElementById('runscript').innerText=''; } } var onelinerun; while (onelinerun = document.getElementById('onelinerun')) { try { eval(onelinerun.innerHTML); } catch(err) { alert('BAJ VAN:\n'+'DDIV:'+dest+'\n\n'+onelinerun.innerHTML); } onelinerun.id='oneline_made'; onelinerun.setAttribute('id','oneline_made'); onelinerun.innerHTML=''; } //alert('monst indul a scriptek vegrehajtasa: (VEGE)'); if (document.getElementById(dest)!=null) { //resize(dest); //document.getElementById(dest).style.visibility="hidden"; document.getElementById(dest).innerHTML=newmemdiv.innerHTML; //document.getElementById(dest).style.visibility="visible"; } logok.removeChild(newmemdiv); if (dest=='winpage') { //alert('winpage'); center_object(document.getElementById('normalwindow')); } //alert('vege'); nextconnect(); } /*function makehistok(madeid,state) { if (madeid) { var histmade = document.getElementById('hist_td_'+madeid); //alert(madeid); if (histmade) { var statestr=''; switch (state) { case 1: statestr='Connecting'; break; case 2: statestr='Connected'; break; case 3: statestr='Waiting'; break; case 4: statestr='Ready'; break; default: statestr='no info'; break; } histmade.innerHTML=statestr; //alert('van'+dest+' '); } else { } } }*/ var mainconn = new XHConn(); var paramConn = new XHConn(); var pageinmain; function hashfigyel() { if (pageinmain!=location.hash) { if (startsitehash(location.hash)!='none') { addconnect(startsitehash(location.hash),'GET','','main'); } } setTimeout("hashfigyel()",50); } function sethash(hash) { location.hash="#"+hash; pageinmain='#'+hash; } function startsitehash(val) { var ret='none'; switch (val.substr(1)) { case 'Sajtoszoba': ret='sajtoszoba.php'; break; case 'Referenciak': ret='referenciak.php'; break; case 'Lector': ret='outside.php?page=1&'; break; case 'Varazslo': ret='varazslo.php'; break; case 'Collab': ret='outside.php'; break; case 'Ugyfelkapu': ret='userlogin.php'; break; } return ret; } if (!mainconn) alert("Bongeszo tul regi."); function init() { if( tryloginnow==1 ) addconnect('userlogin.php','GET','','eldob'); dhtmlHistory.initialize(); dhtmlHistory.addListener(yourListener); } function init_bej() { // document.title=DOC_TITLE; addconnect ("userlogin.php", "GET", "",'login'); addconnect ("bejelentkezes.php", "GET", "",'content'); // hashfigyel(); // init_drag(); // changeOpac(0,"loginwindrag"); } function fnWhenLang(oXML,dest,madeid) { var resp=oXML.responseText; //alert('most jott: '+resp); //alert(dest); var eldob = document.getElementById('eldob'); eldob.innerHTML=resp; /*if (document.all[dest] != null ) { if (document.all[dest].id!='') { document.all[dest].innerHTML=resp; } }*/ var docall; if (document.all) { //alert('van doc.all'); docall = document.all; } else { docall = document.getElementsByTagName("body")[0].getElementsByTagName("*"); } var darab = docall.length; for (var i=0; i= 0) { this.isIE = true; this.version = parseFloat(ua.substr(i + s.length)); return; } s = "Netscape6/"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true; this.version = parseFloat(ua.substr(i + s.length)); return; } // Treat any other "Gecko" browser as NS 6.1. s = "Gecko"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true; this.version = 6.1; return; } } var browser = new Browser(); function nyelvvalt(tolang) { stopload(); nygetstr=''; var nyelvvaltogomb=document.getElementById('langbutt'+tolang); //nyelvvaltogomb.style.visibility='hidden'; //nyelvvaltogomb.style.zoom="120%"; //nyelvvaltogomb.style.height="40px"; var docall; if (lang!=tolang) { lang=tolang; if (document.all) { //alert('van doc.all'); docall = document.all; } else { docall = document.getElementsByTagName("body")[0].getElementsByTagName("span"); } var darab = docall.length; //alert(darab); //addconnect('params.php','GET','newlang='+tolang,'Storing',fnWhenParamDone); for (i=0; iClose ""+divIdName+"""; ni.appendChild(newdiv); } function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop]; } function get_height() { var curleft = curtop = 0; var obj=document.getElementById('fotabla'); curleft = obj.offsetHeight return curleft; } function pausecomp(millis) { date = new Date(); var curDate = null; do { var curDate = new Date(); } while(curDate-date < millis); } function menulinkclick(url,get,vars,destination,menuid) { //stopload(); if (!adminmode) { addconnect(url,get,vars,destination); //addhistory(url,get+andjel+'hova='+destination); } } function edit_normal_ml_force(obj) { var lastadminstate=adminmode; adminmode=true; //alert(obj.id); edit_normal_ml(obj); adminmode=lastadminstate; } function edit_normal_ml(obj,fck) { if (!obj) {alert('nincs meg az ojjektum');} else { } if (adminmode==true) { var txt=obj.innerHTML; // ' aposztrof problema megoldva txt=txt.replace(/'/g,"'"); var etxt=(txt); //txt=txt.replace("'",'''); // alert(txt); var objid=obj.id; var id=objid.substring(6); //alert(id); //alert(id); var objwidth=obj.offsetWidth; if (objwidth<400) {objwidth=400;} // obj.innerHTML=""+ ""+ ""+ ""+ ""+ ""+ ""+""; obj.onclick=''; document.getElementById("label_editing_"+id).focus(); if (fck=='1') { var oFCKeditor = new FCKeditor("label_editing_"+id ) ; oFCKeditor.BasePath = "/fck/" ; oFCKeditor.Config["CustomConfigurationsPath"] = "/fck/fckconfig.js" ; oFCKeditor.ToolbarSet = 'Moderate' ; oFCKeditor.Height = 500; oFCKeditor.Width = objwidth ; oFCKeditor.ReplaceTextarea() ; } } } function switch_editor_ml(id) { var fckinf = document.getElementById('label_editing_fck_'+id).value; var fc; if (fckinf =='1') { fc='0'; } else { fc='1'; } modosit_ml(id); setTimeout("edit_normal_ml(document.getElementById('label_"+id+"'),'"+fc+"');",500); addconnect('param.php','GET','command=set_editor'+andjel+'labelid='+id+andjel+'big='+fc,'footer'); } function edit_normal_ml_(objid) { //if (adminmode==true) { var obj=document.getElementById('label_'+objid); //alert(objid); var txt=obj.innerHTML; var langarray=langs.split(','); var objpos=findPos(obj); var mleditor=document.getElementById('mlmodosito'); mleditor.style.left=objpos[0]; mleditor.style.top=objpos[1]; // alert(txt); var objid=obj.id; var id=objid.substring(6); addconnect('mleditor.php','GET','txtid='+id,'mlmodosito'); //alert(id); //alert(id); var objwidth=obj.offsetWidth; //if (objwidth<100) {objwidth=100;} obj.innerHTML=obj.innerHTML+""; // ez van a vegen, amit kitoroltem: obj.onclick=''; mleditor.style.visibility='visible'; //} } function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, false); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); //return r; } else { return false; } } function modositml_enter(id,e) { if (browser.isIE) { //alert('asdf'); if (window.event.keyCode == 13) {modosit_ml(id);} if (window.event.keyCode == 27) {canc_modosit_ml(id);} } else { if (e.keyCode == 13) { modosit_ml(id); } if (e.keyCode == 27) { canc_modosit_ml(id); } } } var okeobj ; function canc_modosit_ml(id) { var lastadmin=adminmode; adminmode=false; if (okeobj==null) {okeobj=document.getElementById('label_editing_'+id).parentNode;} var obj=document.getElementById('label_editing_'+id).parentElement; okeobj= document.getElementById('label_editing_'+id).parentElement; if (obj==null) {obj=document.getElementById('label_editing_'+id).parentNode;} var txtid=obj.id.substring(6); //alert(obj); var edobj=document.getElementById('label_editing_orig_'+id); var onclickevent=unescape(document.getElementById('label_editing_onclick_'+id).value); //alert(obj.id); obj.innerHTML=edobj.value; //eval("obj.onclick="+onclickevent); //eval("var okefunc="+onclickevent+"; okeobj.onclick=okefunc;"); setTimeout('adminmode='+lastadmin+';',100); //addconnect('modosit_ml.php','GET','txtid='+txtid+andjel+'txt='+obj.innerHTML ,'eldob'); } function modosit_ml_(id) { var obj=document.getElementById('label_editing_orig_'+id).parentElement; if (obj==null) {obj=document.getElementById('label_editing_orig_'+id).parentNode;} var txtid=obj.id.substring(6); //alert(obj); //alert(obj); var edobj=document.getElementById('label_editing_'+id); var onclickevent=document.getElementById('label_editing_onclick_'+id).value; //alert(obj.id); obj.innerHTML=edobj.value; eval("obj.onclick="+onclickevent); //addconnect('modosit_ml.php','GET','txtid='+txtid+andjel+'txt='+obj.innerHTML ,'eldob'); } function modosit_ml(id) { var lastadmin=adminmode; adminmode=false; //alert(id); okeobj=document.getElementById('label_editing_'+id).parentElement; if (okeobj==null) {okeobj=document.getElementById('label_editing_'+id).parentNode;} //alert(okeobj); var txtid=okeobj.id.substring(6); //alert("txtid:"+txtid+" ..:"+okeobj.id); //alert(obj); //alert(obj); //var edobj=document.getElementById('label_editing_'+id); var onclickevent=unescape(document.getElementById('label_editing_onclick_'+id).value); //alert(obj.id); var innerContent=' '; var utftxt=' '; var fckedused =document.getElementById('label_editing_fck_'+id).value; if (document.getElementById('label_editing_fck_'+id).value=='1') { var fckObj = FCKeditorAPI.GetInstance('label_editing_'+id); innerContent= fckObj.GetHTML(); utftxt=escapeval(fckObj.GetHTML()); } else { innerContent=document.getElementById('label_editing_'+id).value; utftxt=encodeURI(innerContent); //alert(utftxt); } okeobj.innerHTML=innerContent;//edobj.innerHTML; eval("var okefunc="+onclickevent+"; okeobj.onclick=okefunc;"); addconnect('modosit_ml.php','GET','txtid='+id+andjel+'fcked='+fckedused+andjel+'txt='+utftxt ,'eldob'); setTimeout('adminmode='+lastadmin+';',100); return false; } var okeobj; function htmlEntities(texto){ return texto; //by Micox - elmicoxcodes.blogspot.com - www.ievolutionweb.com /*var i; var carac; var letra; var novo=''; for(i=0;i 47 && carac < 58) || (carac > 62 && carac < 127) ){ //se for numero ou letra normal novo += texto[i]; }else{ novo += "&#" + carac + ";"; } } return novo;*/ } function csinald(magas) { var di = document.getElementById('anim'); //di.style.height=magas; // di.style.height=magas; } function getElementsByClassName(oElm, strTagName, strClassName){ var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName); var arrReturnElements = new Array(); strClassName = strClassName.replace(/\-/g, "\\-"); var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)"); var oElement; for(var i=0; i\,\;\:\\\"\[\]]/ ; if (fld.value == "") { error = "1"; } else if (!emailFilter.test(tfld)) { //test email for illegal characters error = "2"; } else if (fld.value.match(illegalChars)) { error = "2"; } else { } return error; } function showuploaderwindow() { document.getElementById('corp_upl').style.display='block'; } function hideuploaderwindow() { document.getElementById('corp_upl').style.display='none'; } function isInt(x) { var y=parseInt(x); if (isNaN(y)) return false; return x==y && x.toString()==y.toString(); } function ismaxlength(obj){ var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : "" if (obj.getAttribute && obj.value.length>mlength) obj.value=obj.value.substring(0,mlength) }// JavaScript Document function validateUsername(fld) { var error = "0"; var illegalChars = /\W/; // allow letters, numbers, and underscores if (fld.value == "") { error = "1"; } else if ((fld.value.length < 5) || (fld.value.length > 15)) { error = "2"; } else if (illegalChars.test(fld.value)) { error = "2"; } else if (document.getElementById(fld.id+'_free').value!='1') { //alert(document.getElementById(fld.id+'_free').value); error='3'; } return error; } function validatePassword2(fld) { var error = "0"; error = validatePassword(fld); if (error=='0') { if (document.getElementById(fld.id.substr(0,(fld.id.length)-1)).value != fld.value) { error='2'; } } return error; } function validatePassword(fld) { var error = "0"; var illegalChars = /[\W_]/; // allow only letters and numbers if (fld.value == "") { error = "1"; } else if ((fld.value.length < 5) || (fld.value.length > 15)) { error = "2"; } else if (illegalChars.test(fld.value)) { error = "2"; } else { } return error; } function validateCheckbox(fld) { var error = "0"; if (fld.checked==false) { error='1'; } return error; } function validateMultiCheckbox(fld) { var error = "0"; var inputok= fld.value.split(","); var egyelem; var vankijelolt=0; for (egyid in inputok) { var egyelem=inputok[egyid]; //alert(document.getElementById(egyelem).checked); if (document.getElementById(egyelem).checked==true) { vankijelolt=1; //alert('talaltam egyet'); } } if (vankijelolt==0) { error='1'; } return error; } function trim(s) { return s.replace(/^\s+|\s+$/, ''); } function validateEmail(fld) { var error="0"; var tfld = trim(fld.value); // value of field with whitespace trimmed off var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ; var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ; if (fld.value == "") { error = "1"; } else if (!emailFilter.test(tfld)) { //test email for illegal characters error = "2"; } else if (fld.value.match(illegalChars)) { error = "2"; } else { } return error; } function validatePhone(fld) { var error = "0"; var stripped = fld.value.replace(/[\(\)\.\-\ ]/g, ''); if (fld.value == "") { error = "1"; } else if (isNaN(parseInt(stripped))) { error = "2"; } else if (!(stripped.length == 10)) { error = "2"; } return error; } function validateName(fld) { var error = '0'; if (fld.value=='') { error = '1'; } /*else if (isAlphabetic(fld.value)==false) { error='2'; }*/ return error; } function isAlphabetic(val) { if (val.match(/^[a-zA-Z ]+$/)) { return true; } else { return false; } } // JavaScript Document var b64str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"0123456789+/="; var b64str_m = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"0123456789-_="; function base64enc(inp,m) { if (inp=="") return(""); var b64ch=(m==1)?b64str:b64str_m; for (i=0;i255) alert("i:"+i+" code:"+inp.charCodeAt(i)+" ch:"+inp.charAt(i)); if (inp.charCodeAt(i)>255) alert("i:"+i+" code:"+inp.charCodeAt(i)+" code:"+inp.charCodeAt(i+1)); //alert(inp.charCodeAt(i)+inp.charAt(i)); } if (typeof(btoa)=="function") { alap=btoa(inp); if (m!=1) { alap=alap.replace(/\x2B/g,"-"); alap=alap.replace(/\x2F/g,"_"); } return alap; } var out = ""; //This is the output var chr1, chr2, chr3 = ""; //These are the 3 bytes to be encoded var enc1, enc2, enc3, enc4 = ""; //These are the 4 encoded bytes var i = 0; //Position counter do { //Set up the loop here chr1 = inp.charCodeAt(i++); //Grab the first byte chr2 = inp.charCodeAt(i++); //Grab the second byte chr3 = inp.charCodeAt(i++); //Grab the third byte //Here is the actual base64 encode part. //There really is only one way to do it. enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } //Lets spit out the 4 encoded bytes out = out + b64ch.charAt(enc1) + b64ch.charAt(enc2) + b64ch.charAt(enc3) + b64ch.charAt(enc4); // OK, now clean out the variables used. chr1 = chr2 = chr3 = ""; enc1 = enc2 = enc3 = enc4 = ""; } while (i < inp.length); //And finish off the loop //Now return the encoded values. return out; } /** * * URL encode / decode * http://www.webtoolkit.info/ * **/ var Url = { // public method for url encoding encode : function (string) { return escape(this._utf8_encode(string)); }, // public method for url decoding decode : function (string) { return this._utf8_decode(unescape(string)); }, // private method for UTF-8 encoding _utf8_encode : function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }, // private method for UTF-8 decoding _utf8_decode : function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } } /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * Distributed under the BSD License * See http://pajhome.org.uk/crypt/md5 for more info. */ /* * Configurable variables. You may need to tweak these to be compatible with * the server-side, but the defaults work in most cases. */ var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ /* * These are the functions you'll usually want to call * They take string arguments and return either hex or base-64 encoded strings */ function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } /* * Perform a simple self-test to see if the VM is working */ function md5_vm_test() { return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; } /* * Calculate the MD5 of an array of little-endian words, and a bit length */ function core_md5(x, len) { /* append padding */ x[len >> 5] |= 0x80 << ((len) % 32); x[(((len + 64) >>> 9) << 4) + 14] = len; var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; for(var i = 0; i < x.length; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d; a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); c = md5_ff(c, d, a, b, x[i+10], 17, -42063); b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); } return Array(a, b, c, d); } /* * These functions implement the four basic operations the algorithm uses. */ function md5_cmn(q, a, b, x, s, t) { return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); } function md5_ff(a, b, c, d, x, s, t) { return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); } function md5_gg(a, b, c, d, x, s, t) { return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); } function md5_hh(a, b, c, d, x, s, t) { return md5_cmn(b ^ c ^ d, a, b, x, s, t); } function md5_ii(a, b, c, d, x, s, t) { return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); } /* * Calculate the HMAC-MD5, of a key and some data */ function core_hmac_md5(key, data) { var bkey = str2binl(key); if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); var ipad = Array(16), opad = Array(16); for(var i = 0; i < 16; i++) { ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5C5C5C5C; } var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); return core_md5(opad.concat(hash), 512 + 128); } /* * Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. */ function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); } /* * Bitwise rotate a 32-bit number to the left. */ function bit_rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); } /* * Convert a string to an array of little-endian words * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. */ function str2binl(str) { var bin = Array(); var mask = (1 << chrsz) - 1; for(var i = 0; i < str.length * chrsz; i += chrsz) bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); return bin; } /* * Convert an array of little-endian words to a string */ function binl2str(bin) { var str = ""; var mask = (1 << chrsz) - 1; for(var i = 0; i < bin.length * 32; i += chrsz) str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); return str; } /* * Convert an array of little-endian words to a hex string. */ function binl2hex(binarray) { var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var str = ""; for(var i = 0; i < binarray.length * 4; i++) { str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); } return str; } /* * Convert an array of little-endian words to a base-64 string */ function binl2b64(binarray) { var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var str = ""; for(var i = 0; i < binarray.length * 4; i += 3) { var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); for(var j = 0; j < 4; j++) { if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); } } return str; } function skeress() { var keresinp = document.getElementById('skeres').value; keresinp = str_replace(keresinp,'ő', "ö"); keresinp = str_replace(keresinp,'Ő', "Ö"); keresinp = str_replace(keresinp,'Ű', "Ü"); keresinp = str_replace(keresinp,'ű', "ü"); keresinp = str_replace(keresinp,'Í', "I"); keresinp = str_replace(keresinp,'í', "i"); addconnect('kereses.php','POST','keres='+keresinp,'content'); } function str_replace(haystack, needle, replacement) { var temp = haystack.split(needle); return temp.join(replacement); } function cikkeres(str) { var keresinp = str; keresinp = encodeURI(keresinp); addconnect('kereses.php','POST','keres='+keresinp,'content'); } function addSzavazat(szavid,optid) { addconnect("szavazas_uses.php",'GET','show=false'+andjel+'showId='+szavid+andjel+'command=szavaz'+andjel+'optid='+optid,'szavazas_'+szavid); } function addOpcCont(szavid) { document.getElementById('szav_addopt_cont_'+szavid).style.display='block'; } function addOpcio(szavid) { var valtxt=document.getElementById("szav_addopt_text_"+szavid).value; addconnect("szavazas_uses.php",'POST','show=false'+andjel+'showId='+szavid+andjel+'command=addopt'+andjel+'ujopt='+valtxt,'szavazas_'+szavid); } function delOpt(szavid,optid) { if (confirm('Biztosan törlöd ez az opciót?')) addconnect("szavazas_uses.php",'GET','show=false'+andjel+'showId='+szavid+andjel+'command=delopt'+andjel+'optid='+optid,'szavazas_'+szavid); } function resetSzavazas(szavid) { if (confirm('Biztosan nullázod a szavazás állását?')) addconnect("szavazas_uses.php",'GET','show=false'+andjel+'showId='+szavid+andjel+'command=reset','szavazas_'+szavid); } function szerkesztSzavazNev(szavid) { var ujcim=document.getElementById('szavaz_cim_'+szavid).value; addconnect("szavazas_uses.php",'POST','show=false'+andjel+'showId='+szavid+andjel+'command=ujcim'+andjel+'ujcim='+ujcim,'szavazas_'+szavid); } function visszajelzest_kuld(cid) { if (document.getElementById('visszajelzes_uzenet')) { var txt=document.getElementById('visszajelzes_uzenet').value; addconnect('visszajelzesek.php','POST','command=visszajelzes'+andjel+'szoveg='+txt+andjel+'cid='+cid,'visszajelzes_kuldes_box'); } } function showkatleirasbox(katid, url) { var katpic=document.getElementById('katpic_'+katid); var picurl='images/site_thumbs/'+url; if(katpic) { if (url) { if (picurl!=katpic.src) { katpic.src=picurl; } } } document.getElementById('leirasbox_'+katid).style.display='block'; } function hidekatleirasbox(katid) { document.getElementById('leirasbox_'+katid).style.display='none'; }/** * jscolor, JavaScript Color Picker * * @version 1.2.3 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License * @author Honza Odvarko * @created 2008-06-15 * @updated 2009-02-25 * @link http://jscolor.com */ var jscolor = { dir : '', // location of jscolor directory (leave empty to autodetect) bindClass : 'color', // class name binding : true, // automatic binding via preloading : true, // use image preloading? install : function() { jscolor.addEvent(window, 'load', jscolor.init) }, init : function() { if(jscolor.binding) { jscolor.bind() } if(jscolor.preloading) { jscolor.preload() } }, getDir : function() { if(!jscolor.dir) { var detected = jscolor.detectDir() jscolor.dir = detected!=false ? detected : 'jscolor/' } return jscolor.dir }, detectDir : function() { var base = location.href var e = document.getElementsByTagName('base') for(var i=0; i vs[a] ? (-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) : tp[a], -vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ? (-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) : (tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c) ] drawPicker(pp[a], pp[b]) } } this.importColor = function() { if(!valueElement) { this.exportColor() } else { if(!this.adjust) { if(!this.fromString(valueElement.value, leaveValue)) { styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor styleElement.style.color = styleElement.jscStyle.color this.exportColor(leaveValue | leaveStyle) } } else if(!this.required && /^\s*$/.test(valueElement.value)) { valueElement.value = '' styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor styleElement.style.color = styleElement.jscStyle.color this.exportColor(leaveValue | leaveStyle) } else if(this.fromString(valueElement.value)) { // OK } else { this.exportColor() } } } this.exportColor = function(flags) { if(!(flags & leaveValue) && valueElement) { var value = this.toString() if(this.caps) value = value.toUpperCase() if(this.hash) value = '#'+value valueElement.value = value } if(!(flags & leaveStyle) && styleElement) { styleElement.style.backgroundColor = '#'+this.toString() styleElement.style.color = 0.213 * this.rgb[0] + 0.715 * this.rgb[1] + 0.072 * this.rgb[2] < 0.5 ? '#FFF' : '#000' } if(!(flags & leavePad) && isPickerOwner()) { redrawPad() } if(!(flags & leaveSld) && isPickerOwner()) { redrawSld() } } this.fromHSV = function(h, s, v, flags) { // null = don't change h<0 && (h=0) || h>6 && (h=6) s<0 && (s=0) || s>1 && (s=1) v<0 && (v=0) || v>1 && (v=1) this.rgb = HSV_RGB( h==null ? this.hsv[0] : (this.hsv[0]=h), s==null ? this.hsv[1] : (this.hsv[1]=s), v==null ? this.hsv[2] : (this.hsv[2]=v) ) this.exportColor(flags) } this.fromRGB = function(r, g, b, flags) { // null = don't change r<0 && (r=0) || r>1 && (r=1) g<0 && (g=0) || g>1 && (g=1) b<0 && (b=0) || b>1 && (b=1) var hsv = RGB_HSV( r==null ? this.rgb[0] : (this.rgb[0]=r), g==null ? this.rgb[1] : (this.rgb[1]=g), b==null ? this.rgb[2] : (this.rgb[2]=b) ) if(hsv[0] != null) { this.hsv[0] = hsv[0] } if(hsv[2] != 0) { this.hsv[1] = hsv[1] } this.hsv[2] = hsv[2] this.exportColor(flags) } this.fromString = function(hex, flags) { var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i) if(!m) { return false } else { if(m[1].length == 6) { // 6-char notation this.fromRGB( parseInt(m[1].substr(0,2),16) / 255, parseInt(m[1].substr(2,2),16) / 255, parseInt(m[1].substr(4,2),16) / 255, flags ) } else { // 3-char notation this.fromRGB( parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255, parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255, parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255, flags ) } return true } } this.toString = function() { return ( (0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) + (0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) + (0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1) ) } function RGB_HSV(r, g, b) { var n = Math.min(Math.min(r,g),b) var v = Math.max(Math.max(r,g),b) var m = v - n if(m == 0) return [ null, 0, v ] var h = r==n ? 3+(b-g)/m : (g==n ? 5+(r-b)/m : 1+(g-r)/m) return [ h==6?0:h, m/v, v ] } function HSV_RGB(h, s, v) { if(h == null) return [ v, v, v ] var i = Math.floor(h) var f = i%2 ? h-i : 1-(h-i) var m = v * (1 - s) var n = v * (1 - s*f) switch(i) { case 6: case 0: return [v,n,m] case 1: return [n,v,m] case 2: return [m,v,n] case 3: return [m,n,v] case 4: return [n,m,v] case 5: return [v,m,n] } } function removePicker() { delete jscolor.picker.owner document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB) } function drawPicker(x, y) { if(!jscolor.picker) { jscolor.picker = { box : document.createElement('div'), boxB : document.createElement('div'), pad : document.createElement('div'), padB : document.createElement('div'), padM : document.createElement('div'), sld : document.createElement('div'), sldB : document.createElement('div'), sldM : document.createElement('div') } for(var i=0,segSize=4; i= er) { r = r - rint; } else { r = parseInt(r) + parseInt(rint); } if(g >= eg) { g = g - gint; } else { g = parseInt(g) + parseInt(gint); } if(b >= eb) { b = b - bint; } else { b = parseInt(b) + parseInt(bint); } color = 'rgb(' + r + ',' + g + ',' + b + ')'; if(element == 'background') { target.style.backgroundColor = color; } else if(element == 'border') { target.style.borderColor = color; } else { target.style.color = color; } target.r = r; target.g = g; target.b = b; target.step = target.step + 1; } else { clearInterval(target.timer); color = 'rgb(' + er + ',' + eg + ',' + eb + ')'; if(element == 'background') { target.style.backgroundColor = "none"; target.style.background = "none"; } else if(element == 'border') { target.style.borderColor = color; } else { target.style.color = color; } } } // convert the color to rgb from hex // function colorConv(color) { var rgb = [parseInt(color.substring(0,2),16), parseInt(color.substring(2,4),16), parseInt(color.substring(4,6),16)]; return rgb; }//= 0) { this.isIE = true; this.version = parseFloat(ua.substr(i + s.length)); return; } s = "Netscape6/"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true; this.version = parseFloat(ua.substr(i + s.length)); return; } // Treat any other "Gecko" browser as NS 6.1. s = "Gecko"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true; this.version = 6.1; return; } } var browser = new Browser(); // Global object to hold drag information. var dragObj = new Object(); dragObj.zIndex = 0; function dragStart(event, id) { var el; var x, y; // If an element id was given, find it. Otherwise use the element being // clicked on. if (id) dragObj.elNode = document.getElementById(id); else { if (browser.isIE) dragObj.elNode = window.event.srcElement; if (browser.isNS) dragObj.elNode = event.target; // If this is a text node, use its parent element. if (dragObj.elNode.nodeType == 3) dragObj.elNode = dragObj.elNode.parentNode; } // Get cursor position with respect to the page. if (browser.isIE) { x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft; y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop; } if (browser.isNS) { x = event.clientX + window.scrollX; y = event.clientY + window.scrollY; } // Save starting positions of cursor and element. dragObj.cursorStartX = x; dragObj.cursorStartY = y; dragObj.elStartLeft = parseInt(dragObj.elNode.style.left, 10); dragObj.elStartTop = parseInt(dragObj.elNode.style.top, 10); if (isNaN(dragObj.elStartLeft)) dragObj.elStartLeft = 0; if (isNaN(dragObj.elStartTop)) dragObj.elStartTop = 0; // Update element's z-index. dragObj.elNode.style.zIndex = ++dragObj.zIndex; // Capture mousemove and mouseup events on the page. if (browser.isIE) { document.attachEvent("onmousemove", dragGo); document.attachEvent("onmouseup", dragStop); window.event.cancelBubble = true; window.event.returnValue = false; } if (browser.isNS) { document.addEventListener("mousemove", dragGo, true); document.addEventListener("mouseup", dragStop, true); event.preventDefault(); } } function dragGo(event) { var x, y; // Get cursor position with respect to the page. if (browser.isIE) { x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft; y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop; } if (browser.isNS) { x = event.clientX + window.scrollX; y = event.clientY + window.scrollY; } // Move drag element by the same amount the cursor has moved. dragObj.elNode.style.left = (dragObj.elStartLeft + x - dragObj.cursorStartX) + "px"; dragObj.elNode.style.top = (dragObj.elStartTop + y - dragObj.cursorStartY) + "px"; if (browser.isIE) { window.event.cancelBubble = true; window.event.returnValue = false; } if (browser.isNS) event.preventDefault(); } function dragStop(event) { // Stop capturing mousemove and mouseup events. if (browser.isIE) { document.detachEvent("onmousemove", dragGo); document.detachEvent("onmouseup", dragStop); } if (browser.isNS) { document.removeEventListener("mousemove", dragGo, true); document.removeEventListener("mouseup", dragStop, true); } } //]]> // JavaScript Document var winopen=false; function showfriendsnow() { setTimeout("addconnect('friendlist.php','GET','','friendlist');",100); } function hidefriendsnow() { setTimeout("addconnect('blank.php','GET','','friendlist');",100); } function maximaze(objnev,id) { var nev=objnev; var infonev=nev+'_url'; var infobj = document.getElementById(infonev); var winnev=document.getElementById(nev+'_name'); var gets=document.getElementById(nev+'_gets'); winopen=true; makewindow(infobj.value,gets.value,winnev.value); removetalcagomb(id); } function magassagcsokkent(objnev) { var obj=document.getElementById(objnev); obj.style.position='fixed'; /*obj.style.height=obj.offsetHeight-15;*/ if (kisebb(obj.offsetHeight,20)==false) { /*obj.style.height='40';*/ var swin=document.getElementById("normalwindow"); swin.style.visibility='hidden'; } else { setTimeout('magassagcsokkent("'+objnev+'")',10); } } function closewindow() { magassagcsokkent('winopage'); var winopen=false; document.getElementById('winpage').innerHTML=''; } function minimize(obj) { var openurl = document.getElementById('openwin_url').value; var opennev=document.getElementById('openwin_name').value; var opengets=document.getElementById('openwin_gets').value; addconnect('dokk_list.php','GET','action=add'+andjel+'url='+openurl+andjel+'name='+opennev+andjel+'gets='+opengets,'dokker'); /*document.write('action=add'+andjel+'url='+openurl+andjel+'name='+opennev+andjel+'gets='+opengets);*/ closewindow(''); } function makewindow(url,gets,winname) { if (adminmode==true) {return 0;} var swin=document.getElementById("normalwindow"); //var maindiv=document.getElementById('main'); //var mainwidth=main.offsetWidth; /*alert(mainwidth);*/ winname=escape(winname); var openurl = document.getElementById('openwin_url'); var opennev=document.getElementById('openwin_name'); var opengets=document.getElementById('openwin_gets'); document.getElementById('window_cimsor').innerHTML=unescape(winname); openurl.value=url; opennev.value=winname; opengets.value=gets; addconnect(url,'GET',gets,'winpage'); swin.style.visibility='visible'; /*var pos = findPos(main); if (kisebb(pos[1],0)) { pos[1]=10; } /*swin.style.top=pos[1]; swin.style.left=pos[0];*/ //center_object(swin); //center_object(swin); //swin.style.width=mainwidth; winopen=true; var winopage = document.getElementById('winopage'); /* alert(winopage.style.);*/ } function center_object(obj) { var winW = 630, winH = 460; if (kisebb(3,parseInt(navigator.appVersion))) { if (navigator.appName=="Netscape") { winW = window.innerWidth; winH = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth; winH = document.body.offsetHeight; } } var objh=obj.offsetHeight; var objw=obj.offsetWidth; var scrollXY = getScrollXY(); obj.style.left=(((winW/2)+scrollXY[0])-objw/2)+'px'; obj.style.top=(((winH/2)+scrollXY[1])-objh/2)+'px'; if (kisebb(((winH/2)+scrollXY[1])-objh/2,50)) { obj.style.top='50px'; } } function removetalcagomb(id) { addconnect('dokk_list.php','GET','remove='+id,'dokker'); } var dokkblinktimer; /* json.js 2007-08-19 Public Domain This file adds these methods to JavaScript: array.toJSONString(whitelist) boolean.toJSONString() date.toJSONString() number.toJSONString() object.toJSONString(whitelist) string.toJSONString() These methods produce a JSON text from a JavaScript value. It must not contain any cyclical references. Illegal values will be excluded. The default conversion for dates is to an ISO string. You can add a toJSONString method to any date object to get a different representation. The object and array methods can take an optional whitelist argument. A whitelist is an array of strings. If it is provided, keys in objects not found in the whitelist are excluded. string.parseJSON(filter) This method parses a JSON text to produce an object or array. It can throw a SyntaxError exception. The optional filter parameter is a function which can filter and transform the results. It receives each of the keys and values, and its return value is used instead of the original value. If it returns what it received, then structure is not modified. If it returns undefined then the member is deleted. Example: // Parse the text. If a key contains the string 'date' then // convert the value to a date. myData = text.parseJSON(function (key, value) { return key.indexOf('date') >= 0 ? new Date(value) : value; }); It is expected that these methods will formally become part of the JavaScript Programming Language in the Fourth Edition of the ECMAScript standard in 2008. This file will break programs with improper for..in loops. See http://yuiblog.com/blog/2006/09/26/for-in-intrigue/ This is a reference implementation. You are free to copy, modify, or redistribute. Use your own copy. It is extremely unwise to load untrusted third party code into your pages. */ /*jslint evil: true */ // Augment the basic prototypes if they have not already been augmented. if (!Object.prototype.toJSONString) { Array.prototype.toJSONString = function (w) { var a = [], // The array holding the partial texts. i, // Loop counter. l = this.length, v; // The value to be stringified. // For each value in this array... for (i = 0; i < l; i += 1) { v = this[i]; switch (typeof v) { case 'object': // Serialize a JavaScript object value. Ignore objects thats lack the // toJSONString method. Due to a specification error in ECMAScript, // typeof null is 'object', so watch out for that case. if (v) { if (typeof v.toJSONString === 'function') { a.push(v.toJSONString(w)); } } else { a.push('null'); } break; case 'string': case 'number': case 'boolean': a.push(v.toJSONString()); // Values without a JSON representation are ignored. } } // Join all of the member texts together and wrap them in brackets. return '[' + a.join(',') + ']'; }; Boolean.prototype.toJSONString = function () { return String(this); }; Date.prototype.toJSONString = function () { // Eventually, this method will be based on the date.toISOString method. function f(n) { // Format integers to have at least two digits. return n < 10 ? '0' + n : n; } return '"' + this.getUTCFullYear() + '-' + f(this.getUTCMonth() + 1) + '-' + f(this.getUTCDate()) + 'T' + f(this.getUTCHours()) + ':' + f(this.getUTCMinutes()) + ':' + f(this.getUTCSeconds()) + 'Z"'; }; Number.prototype.toJSONString = function () { // JSON numbers must be finite. Encode non-finite numbers as null. return isFinite(this) ? String(this) : 'null'; }; Object.prototype.toJSONString = function (w) { var a = [], // The array holding the partial texts. k, // The current key. i, // The loop counter. v; // The current value. // If a whitelist (array of keys) is provided, use it assemble the components // of the object. if (w) { for (i = 0; i < w.length; i += 1) { k = w[i]; if (typeof k === 'string') { v = this[k]; switch (typeof v) { case 'object': // Serialize a JavaScript object value. Ignore objects that lack the // toJSONString method. Due to a specification error in ECMAScript, // typeof null is 'object', so watch out for that case. if (v) { if (typeof v.toJSONString === 'function') { a.push(k.toJSONString() + ':' + v.toJSONString(w)); } } else { a.push(k.toJSONString() + ':null'); } break; case 'string': case 'number': case 'boolean': a.push(k.toJSONString() + ':' + v.toJSONString()); // Values without a JSON representation are ignored. } } } } else { // Iterate through all of the keys in the object, ignoring the proto chain // and keys that are not strings. for (k in this) { if (typeof k === 'string' && Object.prototype.hasOwnProperty.apply(this, [k])) { v = this[k]; switch (typeof v) { case 'object': // Serialize a JavaScript object value. Ignore objects that lack the // toJSONString method. Due to a specification error in ECMAScript, // typeof null is 'object', so watch out for that case. if (v) { if (typeof v.toJSONString === 'function') { a.push(k.toJSONString() + ':' + v.toJSONString()); } } else { a.push(k.toJSONString() + ':null'); } break; case 'string': case 'number': case 'boolean': a.push(k.toJSONString() + ':' + v.toJSONString()); // Values without a JSON representation are ignored. } } } } // Join all of the member texts together and wrap them in braces. return '{' + a.join(',') + '}'; }; (function (s) { // Augment String.prototype. We do this in an immediate anonymous function to // avoid defining global variables. // m is a table of character substitutions. var m = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\' }; s.parseJSON = function (filter) { var j; function walk(k, v) { var i; if (v && typeof v === 'object') { for (i in v) { if (Object.prototype.hasOwnProperty.apply(v, [i])) { v[i] = walk(i, v[i]); } } } return filter(k, v); } // Parsing happens in three stages. In the first stage, we run the text against // a regular expression which looks for non-JSON characters. We are especially // concerned with '()' and 'new' because they can cause invocation, and '=' // because it can cause mutation. But just to be safe, we will reject all // unexpected characters. // We split the first stage into 3 regexp operations in order to work around // crippling deficiencies in Safari's regexp engine. First we replace all // backslash pairs with '@' (a non-JSON character). Second we delete all of // the string literals. Third, we look to see if only JSON characters // remain. If so, then the text is safe for eval. if (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(this. replace(/\\./g, '@'). replace(/"[^"\\\n\r]*"/g, ''))) { // In the second stage we use the eval function to compile the text into a // JavaScript structure. The '{' operator is subject to a syntactic ambiguity // in JavaScript: it can begin a block or an object literal. We wrap the text // in parens to eliminate the ambiguity. j = eval('(' + this + ')'); // In the optional third stage, we recursively walk the new structure, passing // each name/value pair to a filter function for possible transformation. return typeof filter === 'function' ? walk('', j) : j; } // If the text is not JSON parseable, then a SyntaxError is thrown. throw new SyntaxError('parseJSON'); }; s.toJSONString = function () { // If the string contains no control characters, no quote characters, and no // backslash characters, then we can simply slap some quotes around it. // Otherwise we must also replace the offending characters with safe // sequences. if (/["\\\x00-\x1f]/.test(this)) { return '"' + this.replace(/[\x00-\x1f\\"]/g, function (a) { var c = m[a]; if (c) { return c; } c = a.charCodeAt(); return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16); }) + '"'; } return '"' + this + '"'; }; })(String.prototype); }/* Copyright (c) 2007 Brian Dillard and Brad Neuberg: Brian Dillard | Project Lead | bdillard@pathf.com | http://blogs.pathf.com/agileajax/ Brad Neuberg | Original Project Creator | http://codinginparadise.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* dhtmlHistory: An object that provides history, history data, and bookmarking for DHTML and Ajax applications. dependencies: * the historyStorage object included in this file. */ window.dhtmlHistory = { /*Public: User-agent booleans*/ isIE: false, isOpera: false, isSafari: false, isKonquerer: false, isGecko: false, isSupported: false, /*Public: Create the DHTML history infrastructure*/ create: function(options) { /* options - object to store initialization parameters options.debugMode - boolean that causes hidden form fields to be shown for development purposes. options.toJSON - function to override default JSON stringifier options.fromJSON - function to override default JSON parser */ var that = this; /*set user-agent flags*/ var UA = navigator.userAgent.toLowerCase(); var platform = navigator.platform.toLowerCase(); var vendor = navigator.vendor || ""; if (vendor === "KDE") { this.isKonqueror = true; this.isSupported = false; } else if (typeof window.opera !== "undefined") { this.isOpera = true; this.isSupported = true; } else if (typeof document.all !== "undefined") { this.isIE = true; this.isSupported = true; } else if (vendor.indexOf("Apple Computer, Inc.") > -1) { this.isSafari = true; this.isSupported = (platform.indexOf("mac") > -1); } else if (UA.indexOf("gecko") != -1) { this.isGecko = true; this.isSupported = true; } /*Set up the historyStorage object; pass in init parameters*/ window.historyStorage.setup(options); /*Execute browser-specific setup methods*/ if (this.isSafari) { this.createSafari(); } else if (this.isOpera) { this.createOpera(); } /*Get our initial location*/ var initialHash = this.getCurrentLocation(); /*Save it as our current location*/ this.currentLocation = initialHash; /*Now that we have a hash, create IE-specific code*/ if (this.isIE) { this.createIE(initialHash); } /*Add an unload listener for the page; this is needed for FF 1.5+ because this browser caches all dynamic updates to the page, which can break some of our logic related to testing whether this is the first instance a page has loaded or whether it is being pulled from the cache*/ var unloadHandler = function() { that.firstLoad = null; }; this.addEventListener(window,'unload',unloadHandler); /*Determine if this is our first page load; for IE, we do this in this.iframeLoaded(), which is fired on pageload. We do it there because we have no historyStorage at this point, which only exists after the page is finished loading in IE*/ if (this.isIE) { /*The iframe will get loaded on page load, and we want to ignore this fact*/ this.ignoreLocationChange = true; } else { if (!historyStorage.hasKey(this.PAGELOADEDSTRING)) { /*This is our first page load, so ignore the location change and add our special history entry*/ this.ignoreLocationChange = true; this.firstLoad = true; historyStorage.put(this.PAGELOADEDSTRING, true); } else { /*This isn't our first page load, so indicate that we want to pay attention to this location change*/ this.ignoreLocationChange = false; /*For browsers other than IE, fire a history change event; on IE, the event will be thrown automatically when its hidden iframe reloads on page load. Unfortunately, we don't have any listeners yet; indicate that we want to fire an event when a listener is added.*/ this.fireOnNewListener = true; } } /*Other browsers can use a location handler that checks at regular intervals as their primary mechanism; we use it for IE as well to handle an important edge case; see checkLocation() for details*/ var locationHandler = function() { that.checkLocation(); }; setInterval(locationHandler, 100); }, /*Public: Initialize our DHTML history. You must call this after the page is finished loading.*/ initialize: function() { /*IE needs to be explicitly initialized. IE doesn't autofill form data until the page is finished loading, so we have to wait*/ if (this.isIE) { /*If this is the first time this page has loaded*/ if (!historyStorage.hasKey(this.PAGELOADEDSTRING)) { /*For IE, we do this in initialize(); for other browsers, we do it in create()*/ this.fireOnNewListener = false; this.firstLoad = true; historyStorage.put(this.PAGELOADEDSTRING, true); } /*Else if this is a fake onload event*/ else { this.fireOnNewListener = true; this.firstLoad = false; } } }, /*Public: Adds a history change listener. Note that only one listener is supported at this time.*/ addListener: function(listener) { this.listener = listener; /*If the page was just loaded and we should not ignore it, fire an event to our new listener now*/ if (this.fireOnNewListener) { this.fireHistoryEvent(this.currentLocation); this.fireOnNewListener = false; } }, /*Public: Generic utility function for attaching events*/ addEventListener: function(o,e,l) { if (o.addEventListener) { o.addEventListener(e,l,false); } else if (o.attachEvent) { o.attachEvent('on'+e,function() { l(window.event); }); } }, /*Public: Add a history point.*/ add: function(newLocation, historyData) { if (this.isSafari) { /*Remove any leading hash symbols on newLocation*/ newLocation = this.removeHash(newLocation); /*Store the history data into history storage*/ historyStorage.put(newLocation, historyData); /*Save this as our current location*/ this.currentLocation = newLocation; /*Change the browser location*/ window.location.hash = newLocation; /*Save this to the Safari form field*/ this.putSafariState(newLocation); } else { /*Most browsers require that we wait a certain amount of time before changing the location, such as 200 MS; rather than forcing external callers to use window.setTimeout to account for this, we internally handle it by putting requests in a queue.*/ var that = this; var addImpl = function() { /*Indicate that the current wait time is now less*/ if (that.currentWaitTime > 0) { that.currentWaitTime = that.currentWaitTime - that.waitTime; } /*Remove any leading hash symbols on newLocation*/ newLocation = that.removeHash(newLocation); /*IE has a strange bug; if the newLocation is the same as _any_ preexisting id in the document, then the history action gets recorded twice; throw a programmer exception if there is an element with this ID*/ if (document.getElementById(newLocation) && that.debugMode) { var e = "Exception: History locations can not have the same value as _any_ IDs that might be in the document," + " due to a bug in IE; please ask the developer to choose a history location that does not match any HTML" + " IDs in this document. The following ID is already taken and cannot be a location: " + newLocation; throw new Error(e); } /*Store the history data into history storage*/ historyStorage.put(newLocation, historyData); /*Indicate to the browser to ignore this upcomming location change since we're making it programmatically*/ that.ignoreLocationChange = true; /*Indicate to IE that this is an atomic location change block*/ that.ieAtomicLocationChange = true; /*Save this as our current location*/ that.currentLocation = newLocation; /*Change the browser location*/ window.location.hash = newLocation; /*Change the hidden iframe's location if on IE*/ if (that.isIE) { that.iframe.src = "blank.htm?" + newLocation; } /*End of atomic location change block for IE*/ that.ieAtomicLocationChange = false; }; /*Now queue up this add request*/ window.setTimeout(addImpl, this.currentWaitTime); /*Indicate that the next request will have to wait for awhile*/ this.currentWaitTime = this.currentWaitTime + this.waitTime; } }, /*Public*/ isFirstLoad: function() { return this.firstLoad; }, /*Public*/ getVersion: function() { return "0.6"; }, /*Get browser's current hash location; for Safari, read value from a hidden form field*/ /*Public*/ getCurrentLocation: function() { var r = (this.isSafari ? this.getSafariState() : this.getCurrentHash() ); return r; }, /*Public: Manually parse the current url for a hash; tip of the hat to YUI*/ getCurrentHash: function() { var r = window.location.href; var i = r.indexOf("#"); return (i >= 0 ? r.substr(i+1) : "" ); }, /*- - - - - - - - - - - -*/ /*Private: Constant for our own internal history event called when the page is loaded*/ PAGELOADEDSTRING: "DhtmlHistory_pageLoaded", /*Private: Our history change listener.*/ listener: null, /*Private: MS to wait between add requests - will be reset for certain browsers*/ waitTime: 200, /*Private: MS before an add request can execute*/ currentWaitTime: 0, /*Private: Our current hash location, without the "#" symbol.*/ currentLocation: null, /*Private: Hidden iframe used to IE to detect history changes*/ iframe: null, /*Private: Flags and DOM references used only by Safari*/ safariHistoryStartPoint: null, safariStack: null, safariLength: null, /*Private: Flag used to keep checkLocation() from doing anything when it discovers location changes we've made ourselves programmatically with the add() method. Basically, add() sets this to true. When checkLocation() discovers it's true, it refrains from firing our listener, then resets the flag to false for next cycle. That way, our listener only gets fired on history change events triggered by the user via back/forward buttons and manual hash changes. This flag also helps us set up IE's special iframe-based method of handling history changes.*/ ignoreLocationChange: null, /*Private: A flag that indicates that we should fire a history change event when we are ready, i.e. after we are initialized and we have a history change listener. This is needed due to an edge case in browsers other than IE; if you leave a page entirely then return, we must fire this as a history change event. Unfortunately, we have lost all references to listeners from earlier, because JavaScript clears out.*/ fireOnNewListener: null, /*Private: A variable that indicates whether this is the first time this page has been loaded. If you go to a web page, leave it for another one, and then return, the page's onload listener fires again. We need a way to differentiate between the first page load and subsequent ones. This variable works hand in hand with the pageLoaded variable we store into historyStorage.*/ firstLoad: null, /*Private: A variable to handle an important edge case in IE. In IE, if a user manually types an address into their browser's location bar, we must intercept this by calling checkLocation() at regular intervals. However, if we are programmatically changing the location bar ourselves using the add() method, we need to ignore these changes in checkLocation(). Unfortunately, these changes take several lines of code to complete, so for the duration of those lines of code, we set this variable to true. That signals to checkLocation() to ignore the change-in-progress. Once we're done with our chunk of location-change code in add(), we set this back to false. We'll do the same thing when capturing user-entered address changes in checkLocation itself.*/ ieAtomicLocationChange: null, /*Private: Create IE-specific DOM nodes and overrides*/ createIE: function(initialHash) { /*write out a hidden iframe for IE and set the amount of time to wait between add() requests*/ this.waitTime = 400;/*IE needs longer between history updates*/ var styles = (historyStorage.debugMode ? 'width: 800px;height:80px;border:1px solid black;' : historyStorage.hideStyles ); var iframeID = "rshHistoryFrame"; var iframeHTML = ''; document.write(iframeHTML); this.iframe = document.getElementById(iframeID); }, /*Private: Create Opera-specific DOM nodes and overrides*/ createOpera: function() { this.waitTime = 400;/*Opera needs longer between history updates*/ var imgHTML = ''; document.write(imgHTML); }, /*Private: Create Safari-specific DOM nodes and overrides*/ createSafari: function() { var formID = "rshSafariForm"; var stackID = "rshSafariStack"; var lengthID = "rshSafariLength"; var formStyles = historyStorage.debugMode ? historyStorage.showStyles : historyStorage.hideStyles; var inputStyles = (historyStorage.debugMode ? 'width:800px;height:20px;border:1px solid black;margin:0;padding:0;' : historyStorage.hideStyles ); var safariHTML = '
' + '' + '' + '
'; document.write(safariHTML); this.safariStack = document.getElementById(stackID); this.safariLength = document.getElementById(lengthID); if (!historyStorage.hasKey(this.PAGELOADEDSTRING)) { this.safariHistoryStartPoint = history.length; this.safariLength.value = this.safariHistoryStartPoint; } else { this.safariHistoryStartPoint = this.safariLength.value; } }, /*Private: Safari method to read the history stack from a hidden form field*/ getSafariStack: function() { var r = this.safariStack.value; return historyStorage.fromJSON(r); }, /*Private: Safari method to read from the history stack*/ getSafariState: function() { var stack = this.getSafariStack(); var state = stack[history.length - this.safariHistoryStartPoint - 1]; return state; }, /*Private: Safari method to write the history stack to a hidden form field*/ putSafariState: function(newLocation) { var stack = this.getSafariStack(); stack[history.length - this.safariHistoryStartPoint] = newLocation; this.safariStack.value = historyStorage.toJSON(stack); }, /*Private: Notify the listener of new history changes.*/ fireHistoryEvent: function(newHash) { /*extract the value from our history storage for this hash*/ var historyData = historyStorage.get(newHash); /*call our listener*/ this.listener.call(null, newHash, historyData); }, /*Private: See if the browser has changed location. This is the primary history mechanism for Firefox. For IE, we use this to handle an important edge case: if a user manually types in a new hash value into their IE location bar and press enter, we want to to intercept this and notify any history listener.*/ checkLocation: function() { /*Ignore any location changes that we made ourselves for browsers other than IE*/ if (!this.isIE && this.ignoreLocationChange) { this.ignoreLocationChange = false; return; } /*If we are dealing with IE and we are in the middle of making a location change from an iframe, ignore it*/ if (!this.isIE && this.ieAtomicLocationChange) { return; } /*Get hash location*/ var hash = this.getCurrentLocation(); /*Do nothing if there's been no change*/ if (hash == this.currentLocation) { return; } /*In IE, users manually entering locations into the browser; we do this by comparing the browser's location against the iframe's location; if they differ, we are dealing with a manual event and need to place it inside our history, otherwise we can return*/ this.ieAtomicLocationChange = true; if (this.isIE && this.getIframeHash() != hash) { this.iframe.src = "blank.htm?" + hash; } else if (this.isIE) { /*the iframe is unchanged*/ return; } /*Save this new location*/ this.currentLocation = hash; this.ieAtomicLocationChange = false; /*Notify listeners of the change*/ this.fireHistoryEvent(hash); }, /*Private: Get the current location of IE's hidden iframe.*/ getIframeHash: function() { var doc = this.iframe.contentWindow.document; var hash = String(doc.location.search); if (hash.length == 1 && hash.charAt(0) == "?") { hash = ""; } else if (hash.length >= 2 && hash.charAt(0) == "?") { hash = hash.substring(1); } return hash; }, /*Private: Remove any leading hash that might be on a location.*/ removeHash: function(hashValue) { var r; if (hashValue === null || hashValue === undefined) { r = null; } else if (hashValue === "") { r = ""; } else if (hashValue.length == 1 && hashValue.charAt(0) == "#") { r = ""; } else if (hashValue.length > 1 && hashValue.charAt(0) == "#") { r = hashValue.substring(1); } else { r = hashValue; } return r; }, /*Private: For IE, tell when the hidden iframe has finished loading.*/ iframeLoaded: function(newLocation) { /*ignore any location changes that we made ourselves*/ if (this.ignoreLocationChange) { this.ignoreLocationChange = false; return; } /*Get the new location*/ var hash = String(newLocation.search); if (hash.length == 1 && hash.charAt(0) == "?") { hash = ""; } else if (hash.length >= 2 && hash.charAt(0) == "?") { hash = hash.substring(1); } /*Keep the browser location bar in sync with the iframe hash*/ window.location.hash = hash; /*Notify listeners of the change*/ this.fireHistoryEvent(hash); } }; /* historyStorage: An object that uses a hidden form to store history state across page loads. The mechanism for doing so relies on the fact that browsers save the text in form data for the life of the browser session, which means the text is still there when the user navigates back to the page. This object can be used independently of the dhtmlHistory object for caching of Ajax session information. dependencies: * json2007.js (included in a separate file) or alternate JSON methods passed in through an options bundle. */ window.historyStorage = { /*Public: Set up our historyStorage object for use by dhtmlHistory or other objects*/ setup: function(options) { /* options - object to store initialization parameters - passed in from dhtmlHistory or directly into historyStorage options.debugMode - boolean that causes hidden form fields to be shown for development purposes. options.toJSON - function to override default JSON stringifier options.fromJSON - function to override default JSON parser */ /*process init parameters*/ if (typeof options !== "undefined") { if (options.debugMode) { this.debugMode = options.debugMode; } if (options.toJSON) { this.toJSON = options.toJSON; } if (options.fromJSON) { this.fromJSON = options.fromJSON; } } /*write a hidden form and textarea into the page; we'll stow our history stack here*/ var formID = "rshStorageForm"; var textareaID = "rshStorageField"; var formStyles = this.debugMode ? historyStorage.showStyles : historyStorage.hideStyles; var textareaStyles = (historyStorage.debugMode ? 'width: 800px;height:80px;border:1px solid black;' : historyStorage.hideStyles ); var textareaHTML = '
' + '' + '
'; document.write(textareaHTML); this.storageField = document.getElementById(textareaID); if (typeof window.opera !== "undefined") { this.storageField.focus();/*Opera needs to focus this element before persisting values in it*/ } }, /*Public*/ put: function(key, value) { this.assertValidKey(key); /*if we already have a value for this, remove the value before adding the new one*/ if (this.hasKey(key)) { this.remove(key); } /*store this new key*/ this.storageHash[key] = value; /*save and serialize the hashtable into the form*/ this.saveHashTable(); }, /*Public*/ get: function(key) { this.assertValidKey(key); /*make sure the hash table has been loaded from the form*/ this.loadHashTable(); var value = this.storageHash[key]; if (value === undefined) { value = null; } return value; }, /*Public*/ remove: function(key) { this.assertValidKey(key); /*make sure the hash table has been loaded from the form*/ this.loadHashTable(); /*delete the value*/ delete this.storageHash[key]; /*serialize and save the hash table into the form*/ this.saveHashTable(); }, /*Public: Clears out all saved data.*/ reset: function() { this.storageField.value = ""; this.storageHash = {}; }, /*Public*/ hasKey: function(key) { this.assertValidKey(key); /*make sure the hash table has been loaded from the form*/ this.loadHashTable(); return (typeof this.storageHash[key] !== "undefined"); }, /*Public*/ isValidKey: function(key) { return (typeof key === "string"); }, /*Public - CSS strings utilized by both objects to hide or show behind-the-scenes DOM elements*/ showStyles: 'border:0;margin:0;padding:0;', hideStyles: 'left:-1000px;top:-1000px;width:1px;height:1px;border:0;position:absolute;', /*Public - debug mode flag*/ debugMode: false, /*- - - - - - - - - - - -*/ /*Private: Our hash of key name/values.*/ storageHash: {}, /*Private: If true, we have loaded our hash table out of the storage form.*/ hashLoaded: false, /*Private: DOM reference to our history field*/ storageField: null, /*Private: Assert that a key is valid; throw an exception if it not.*/ assertValidKey: function(key) { var isValid = this.isValidKey(key); if (!isValid && this.debugMode) { throw new Error("Please provide a valid key for window.historyStorage. Invalid key = " + key + "."); } }, /*Private: Load the hash table up from the form.*/ loadHashTable: function() { if (!this.hashLoaded) { var serializedHashTable = this.storageField.value; if (serializedHashTable !== "" && serializedHashTable !== null) { this.storageHash = this.fromJSON(serializedHashTable); this.hashLoaded = true; } } }, /*Private: Save the hash table into the form.*/ saveHashTable: function() { this.loadHashTable(); var serializedHashTable = this.toJSON(this.storageHash); this.storageField.value = serializedHashTable; }, /*Private: Bridges for our JSON implementations - both rely on 2007 JSON.org library - can be overridden by options bundle*/ toJSON: function(o) { return o.toJSONString(); }, fromJSON: function(s) { return s.parseJSON(); } }; lang = ''; var tryloginnow=0; window.dhtmlHistory.create(); var yourListener = function(newLocation, historyData) { //do something; var historyMsg = (typeof historyData == "object" && historyData != null ? historyStorage.toJSON(historyData) : historyData ); addconnect(historyData[0],historyData[1],historyData[2],historyData[3],historyData[4],true); } var AKTmappa = '2010-es-horoszkop'; function frissit_sav1() { addconnect('part_sav1.php','GET','pontosido='+sav1_current_time+andjel+'mappa='+AKTmappa,'sidebar1'); sav1_timer = setTimeout("frissit_sav1();",10000); } var sav1_timer = setTimeout("frissit_sav1();",10000); var sav1_current_time='1283853549'; function frissit_sav1_now() { if ( sav1_timer ){ clearTimeout( sav1_timer ); } frissit_sav1(); } var ETincInterval='60000'; var ETftval='28709'; function ETinc() { ETftval=parseInt(ETftval)+1; var ftobj=document.getElementById('penzval'); if (ftobj) { /* ne frissitsuk, amig nem jo * * ftobj.innerHTML=ETftval; */ } setTimeout('ETinc();',ETincInterval); } setTimeout('ETinc();',ETincInterval); var AKTstilusid='16'; AKTbackground='f8d6ff'; AKTvillbackground='cccccc'; var SAVED_sUrl; var SAVED_sMethod; var SAVED_sVars; var SAVED_dest; var SAVED_need=false; var SAVED_skip_all=false; function handleLoginProblem(sUrl, sMethod, sVars, dest) { SAVED_need=true; SAVED_sUrl=sUrl; SAVED_sMethod=sMethod; SAVED_sVars=sVars; SAVED_dest=dest; addconnect('speclogin.php','GET','',dest); } var scrollerTimer=0; var allowdelsc=true; var scpos=0; var scrolling=false; function scrollto(sy) { if (document.body.scrollTop>sy || document.documentElement.scrollTop>sy){ var nowTop=document.body.scrollTop || document.documentElement.scrollTop; var maxspeed=70; scrolling=true; // pozitiv ertek var speed=Math.ceil((nowTop-sy)/20); if (speed<=1) { speed = 1; } if (speed>maxspeed) { speed=maxspeed; } if (speed>(nowTop-sy)) { speed=nowTop-sy; } allowdelsc=false; scpos=nowTop+(-1 * speed); window.scrollBy(0,-1 * speed); scrollerTimer=setTimeout('scrollto('+sy+')',10); setTimeout('allowdelsc=true;',10); } else { clearTimeout(scrollerTimer); scrolling=false; } } function scrolltoobj(obj) { var pos = findPos(obj); var top= pos[1]; scrollto(sy); } function scrolltoobjid(objid) { var obj=document.getElementById(objid); if (obj) { scrolltooobj(obj); } } function delscroller() { var nowTop=document.body.scrollTop || document.documentElement.scrollTop; if (debugmode_on) { /*alert(nowTop+"\n"+scpos);*/ } if (nowTop==scpos) { } else { /*alert(nowTop+"\n"+scpos);*/ clearTimeout(scrollerTimer); } }