/* assuming you already have XHConn.js included in your HTML file */ var szalak = 0; var stopopacity = false; var fnallfut = false; var scriptids=0; var adszamlalo=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 friendtimer=0; var statconn=new XHConn_hidden(); var keycodes=Array(); var DOC_TITLE='Sulikereso.hu - '; var kn = String.fromCharCode(60); var kc = String.fromCharCode(62); var Conn_count=0; var hashtimer=0; var STEPPING_BACK =0; var typeing = false; var typeing_timer =0; var e=0; 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()); } } } // ha ezt beteszed egy onclick vegere: roc(this) akkor arra csak 1X lehet kattintani 3mp ig function roc(obj) { try { if (typeof(obj.onclick) == "function") { var tempfunc = obj.onclick; obj.onclick = function () { } var dofunc= function () { obj.onclick = tempfunc; }; setTimeout(dofunc,3000); } } catch (terr) { } } var workIsDone = false; //window.onbeforeunload = confirmBrowseAway; function confirmBrowseAway() { if (!workIsDone) { //window.location.href='http://www.starhost.hu'; return true; //"Megtaláltad az érettségi tételeket az " + // "Érettségi dokumentumok menüpont alatt?"; } } function Browser() { var ua, s, i; this.isIE = false; this.isNS = false; this.version = null; ua = navigator.userAgent; s = "MSIE"; if ((i = ua.indexOf(s)) >= 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(); 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'; // HIBAKEZELES function betterhandler(description,pagename,lineno) { debugmode_on=false; if (false) { alert( 'An Error occurred! (sajat hibauzi) \n' +'\n Description: \t'+description +'\n Page Name: \t'+pagename +'\n At Line : \t'+lineno+'\n' ); } return true; } function nohandler(description,pagename,lineno) { return false; } window.onerror=nohandler; //HIBAKEZELES VEGE // 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 0; } //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)) { // $(statusname).style.visibility='visible'; } } if (!xmlhttp) return false; bComplete = false; sMethod = sMethod.toUpperCase(); try { if (sMethod == "GET") { if (sVars=='semmise') { xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); alert('most NO'); xmlhttp.open("GET", sURL, true); } else { var destobj = document.getElementById(dest); var destwidth; if (destobj) { destwidth=destobj.offsetWidth; } xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); 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; charset=utf-8"); if (sVars!='') {xmlhttp.send(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( "$(statusname).style.visibility='visible';", // 1000); } } if (xmlhttp.readyState == 4 && !bComplete) { if (statusname) { if (document.getElementById(statusname)) { //opacity(statusname,0,0,500); //$(statusname).style.visibility='hidden'; } } bComplete = true; fnDone(xmlhttp,dest,madeid); //statusdiv.innerHTML='Finished'; //statusdiv.style.visibility='hidden'; }}; xmlhttp.send(sVars); } catch(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" || sMethod == "NO") { if (sMethod=='NO') { alert('most NO'); xmlhttp.open("GET", sURL, true); } else { 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; charset=utf-8;"); xmlhttp.setRequestHeader("Accept-Charset:", "utf-8"); if (sVars!='') {xmlhttp.send(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) { 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, 500); var resp=oXML.responseText; //alert(resp); //if (resp.length<5) { //alert('semmisincsenarespben'); //return false; //} var logok=document.getElementById('logok'); 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("XMLHTTP not available. Try a newer/better browser."); function init() { //document.title=DOC_TITLE; addconnect ("userlogin.php", "GET", "",'login'); addconnect ("friendlist.php", "GET", "",'friends'); //document.getElementById('tmajdnemlat').style.display='none'; // hashfigyel(); //init_drag(); //changeOpac(90,"fixme"); } 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 darab = document.all.length; for (var 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; // alert(txt); var objid=obj.id; var id=objid.substring(6); //alert(id); //alert(id); var objwidth=obj.offsetWidth; if (objwidth<300) {objwidth=300;} // 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 = 400; 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); } } } function canc_modosit_ml(id) { var obj=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=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 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; okeobj=document.getElementById('label_editing_'+id).parentElement; if (okeobj==null) {okeobj=document.getElementById('label_editing_'+id).parentNode;} var txtid=okeobj.id.substring(6); //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=' '; 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=escapeval(htmlEntities(innerContent)); } okeobj.innerHTML=innerContent;//edobj.innerHTML; eval("var okefunc="+onclickevent+"; okeobj.onclick=okefunc;"); addconnect('modosit_ml.php','GET','txtid='+txtid+andjel+'txt='+utftxt ,'eldob'); setTimeout('adminmode='+lastadmin+';',100); return false; } 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 opacity(id, opacStart, opacEnd, millisec ) { //speed for each frame var speed = Math.round(millisec / 100); var timer = 0; //determine the direction for the blending, if start and end are the same nothing happens if(opacStart > opacEnd) { for(i = opacStart; i >= opacEnd; i=i-5) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed * 5)); timer++; } } else if(opacStart < opacEnd) { for(i = opacStart; i <= opacEnd; i=i+5) { if (!stopopacity) { var timeri = setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed * 5)); blendtrans_timer.push(timeri); stoptimer=false; } timer++; } } } function clearBlendTimers() { var x; if (blendtrans_timer.length>0) for (x in blendtrans_timer) { clearTimeout(x); } blendtrans_timer=Array(); } var blendtrans_timer = new Array (); var blendok = true; //change the opacity for different browsers function changeOpac(opacity, id) { if (!document.getElementById(id)) return false; var object = document.getElementById(id).style; if (object) { object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } } function shiftOpacity(id, millisec) { //if an element is invisible, make it visible, else make it ivisible if(document.getElementById(id).style.opacity == 0) { opacity(id, 0, 100, millisec); } else { opacity(id, 100, 0, millisec); } } function blendimage(divid, imageid, imagefile, millisec) { var speed = Math.round(millisec / 100); var timer = 0; //set the current image as background document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")"; //make image transparent changeOpac(0, imageid); //make new image document.getElementById(imageid).src = imagefile; //fade in image for(i = 0; i <= 100; i++) { setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed)); timer++; } } function currentOpac(id, opacEnd, millisec) { //standard opacity is 100 var currentOpac = 100; if (!document.getElementById(id)) { return false; } //if the element has an opacity set, get it if(document.getElementById(id).style.opacity < 100) { currentOpac = document.getElementById(id).style.opacity * 100; } //call for the function that changes the opacity opacity(id, currentOpac, opacEnd, millisec) } // 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; } function urlDecode(str){ str=str.replace(new RegExp('\\+','g'),' '); return unescape(str); } function urlEncode(str){ str=escape(str); str=str.replace(new RegExp('\\+','g'),'%2B'); return str.replace(new RegExp('%20','g'),'+'); } var END_OF_INPUT = -1; var base64Chars = new Array( 'A','B','C','D','E','F','G','H', 'I','J','K','L','M','N','O','P', 'Q','R','S','T','U','V','W','X', 'Y','Z','a','b','c','d','e','f', 'g','h','i','j','k','l','m','n', 'o','p','q','r','s','t','u','v', 'w','x','y','z','0','1','2','3', '4','5','6','7','8','9','+','/' ); var reverseBase64Chars = new Array(); for (var i=0; i < base64Chars.length; i++){ reverseBase64Chars[base64Chars[i]] = i; } var base64Str; var base64Count; function setBase64Str(str){ base64Str = str; base64Count = 0; } function readBase64(){ if (!base64Str) return END_OF_INPUT; if (base64Count >= base64Str.length) return END_OF_INPUT; var c = base64Str.charCodeAt(base64Count) & 0xff; base64Count++; return c; } function encodeBase64(str){ setBase64Str(str); var result = ''; var inBuffer = new Array(3); var lineCount = 0; var done = false; while (!done && (inBuffer[0] = readBase64()) != END_OF_INPUT){ inBuffer[1] = readBase64(); inBuffer[2] = readBase64(); result += (base64Chars[ inBuffer[0] >> 2 ]); if (inBuffer[1] != END_OF_INPUT){ result += (base64Chars [(( inBuffer[0] << 4 ) & 0x30) | (inBuffer[1] >> 4) ]); if (inBuffer[2] != END_OF_INPUT){ result += (base64Chars [((inBuffer[1] << 2) & 0x3c) | (inBuffer[2] >> 6) ]); result += (base64Chars [inBuffer[2] & 0x3F]); } else { result += (base64Chars [((inBuffer[1] << 2) & 0x3c)]); result += ('='); done = true; } } else { result += (base64Chars [(( inBuffer[0] << 4 ) & 0x30)]); result += ('='); result += ('='); done = true; } lineCount += 4; if (lineCount >= 76){ result += ('\n'); lineCount = 0; } } return result; } function readReverseBase64(){ if (!base64Str) return END_OF_INPUT; while (true){ if (base64Count >= base64Str.length) return END_OF_INPUT; var nextCharacter = base64Str.charAt(base64Count); base64Count++; if (reverseBase64Chars[nextCharacter]){ return reverseBase64Chars[nextCharacter]; } if (nextCharacter == 'A') return 0; } return END_OF_INPUT; } function ntos(n){ n=n.toString(16); if (n.length == 1) n="0"+n; n="%"+n; return unescape(n); } function decodeBase64(str){ setBase64Str(str); var result = ""; var inBuffer = new Array(4); var done = false; while (!done && (inBuffer[0] = readReverseBase64()) != END_OF_INPUT && (inBuffer[1] = readReverseBase64()) != END_OF_INPUT){ inBuffer[2] = readReverseBase64(); inBuffer[3] = readReverseBase64(); result += ntos((((inBuffer[0] << 2) & 0xff)| inBuffer[1] >> 4)); if (inBuffer[2] != END_OF_INPUT){ result += ntos((((inBuffer[1] << 4) & 0xff)| inBuffer[2] >> 2)); if (inBuffer[3] != END_OF_INPUT){ result += ntos((((inBuffer[2] << 6) & 0xff) | inBuffer[3])); } else { done = true; } } else { done = true; } } return result; } var digitArray = new Array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'); function toHex(n){ var result = '' var start = true; for (var i=32; i>0;){ i-=4; var digit = (n>>i) & 0xf; if (!start || digit != 0){ start = false; result += digitArray[digit]; } } return (result==''?'0':result); } function pad(str, len, pad){ var result = str; for (var i=str.length; i -1; var isMoz = document.implementation && document.implementation.createDocument; var isSafari = ((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false; function curvyCorners() { if(typeof(arguments[0]) != "object") throw newCurvyError("First parameter of curvyCorners() must be an object."); if(typeof(arguments[1]) != "object" && typeof(arguments[1]) != "string") throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name."); if(typeof(arguments[1]) == "string") { var startIndex = 0; var boxCol = getElementsByClass(arguments[1]);} else { var startIndex = 1; var boxCol = arguments;} var curvyCornersCol = new Array(); if(arguments[0].validTags) var validElements = arguments[0].validTags; else var validElements = ["div"]; for(var i = startIndex, j = boxCol.length; i < j; i++) { var currentTag = boxCol[i].tagName.toLowerCase(); if(inArray(validElements, currentTag) !== false) { curvyCornersCol[curvyCornersCol.length] = new curvyObject(arguments[0], boxCol[i]);} } this.objects = curvyCornersCol; this.applyCornersToAll = function() { for(var x = 0, k = this.objects.length; x < k; x++) { this.objects[x].applyCorners();} } } function curvyObject() { this.box = arguments[1]; this.settings = arguments[0]; this.topContainer = null; this.bottomContainer = null; this.masterCorners = new Array(); this.contentDIV = null; var boxHeight = get_style(this.box, "height", "height"); var boxWidth = get_style(this.box, "width", "width"); var borderWidth = get_style(this.box, "borderTopWidth", "border-top-width"); var borderColour = get_style(this.box, "borderTopColor", "border-top-color"); var boxColour = get_style(this.box, "backgroundColor", "background-color"); var backgroundImage = get_style(this.box, "backgroundImage", "background-image"); var boxPosition = get_style(this.box, "position", "position"); var boxPadding = get_style(this.box, "paddingTop", "padding-top"); this.boxHeight = parseInt(((boxHeight != "" && boxHeight != "auto" && boxHeight.indexOf("%") == -1)? boxHeight.substring(0, boxHeight.indexOf("px")) : this.box.scrollHeight)); this.boxWidth = parseInt(((boxWidth != "" && boxWidth != "auto" && boxWidth.indexOf("%") == -1)? boxWidth.substring(0, boxWidth.indexOf("px")) : this.box.scrollWidth)); this.borderWidth = parseInt(((borderWidth != "" && borderWidth.indexOf("px") !== -1)? borderWidth.slice(0, borderWidth.indexOf("px")) : 0)); this.boxColour = format_colour(boxColour); this.boxPadding = parseInt(((boxPadding != "" && boxPadding.indexOf("px") !== -1)? boxPadding.slice(0, boxPadding.indexOf("px")) : 0)); this.borderColour = format_colour(borderColour); this.borderString = this.borderWidth + "px" + " solid " + this.borderColour; this.backgroundImage = ((backgroundImage != "none")? backgroundImage : ""); this.boxContent = this.box.innerHTML; if(boxPosition != "absolute") this.box.style.position = "relative"; this.box.style.padding = "0px"; if(isIE && boxWidth == "auto" && boxHeight == "auto") this.box.style.width = "100%"; if(this.settings.autoPad == true && this.boxPadding > 0) this.box.innerHTML = ""; this.applyCorners = function() { for(var t = 0; t < 2; t++) { switch(t) { case 0: if(this.settings.tl || this.settings.tr) { var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var topMaxRadius = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0); newMainContainer.style.height = topMaxRadius + "px"; newMainContainer.style.top = 0 - topMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.topContainer = this.box.appendChild(newMainContainer);} break; case 1: if(this.settings.bl || this.settings.br) { var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var botMaxRadius = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0); newMainContainer.style.height = botMaxRadius + "px"; newMainContainer.style.bottom = 0 - botMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.bottomContainer = this.box.appendChild(newMainContainer);} break;} } if(this.topContainer) this.box.style.borderTopWidth = "0px"; if(this.bottomContainer) this.box.style.borderBottomWidth = "0px"; var corners = ["tr", "tl", "br", "bl"]; for(var i in corners) { if(i > -1 < 4) { var cc = corners[i]; if(!this.settings[cc]) { if(((cc == "tr" || cc == "tl") && this.topContainer != null) || ((cc == "br" || cc == "bl") && this.bottomContainer != null)) { var newCorner = document.createElement("DIV"); newCorner.style.position = "relative"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; if(this.backgroundImage == "") newCorner.style.backgroundColor = this.boxColour; else newCorner.style.backgroundImage = this.backgroundImage; switch(cc) { case "tl": newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.tr.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.left = -this.borderWidth + "px"; break; case "tr": newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.tl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; newCorner.style.left = this.borderWidth + "px"; break; case "bl": newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.br.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = -this.borderWidth + "px"; newCorner.style.backgroundPosition = "-" + (this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break; case "br": newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.bl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = this.borderWidth + "px" newCorner.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break;} } } else { if(this.masterCorners[this.settings[cc].radius]) { var newCorner = this.masterCorners[this.settings[cc].radius].cloneNode(true);} else { var newCorner = document.createElement("DIV"); newCorner.style.height = this.settings[cc].radius + "px"; newCorner.style.width = this.settings[cc].radius + "px"; newCorner.style.position = "absolute"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; var borderRadius = parseInt(this.settings[cc].radius - this.borderWidth); for(var intx = 0, j = this.settings[cc].radius; intx < j; intx++) { if((intx +1) >= borderRadius) var y1 = -1; else var y1 = (Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((intx+1), 2))) - 1); if(borderRadius != j) { if((intx) >= borderRadius) var y2 = -1; else var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius,2) - Math.pow(intx, 2))); if((intx+1) >= j) var y3 = -1; else var y3 = (Math.floor(Math.sqrt(Math.pow(j ,2) - Math.pow((intx+1), 2))) - 1);} if((intx) >= j) var y4 = -1; else var y4 = Math.ceil(Math.sqrt(Math.pow(j ,2) - Math.pow(intx, 2))); if(y1 > -1) this.drawPixel(intx, 0, this.boxColour, 100, (y1+1), newCorner, -1, this.settings[cc].radius); if(borderRadius != j) { for(var inty = (y1 + 1); inty < y2; inty++) { if(this.settings.antiAlias) { if(this.backgroundImage != "") { var borderFract = (pixelFraction(intx, inty, borderRadius) * 100); if(borderFract < 30) { this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, 0, this.settings[cc].radius);} else { this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, -1, this.settings[cc].radius);} } else { var pixelcolour = BlendColour(this.boxColour, this.borderColour, pixelFraction(intx, inty, borderRadius)); this.drawPixel(intx, inty, pixelcolour, 100, 1, newCorner, 0, this.settings[cc].radius, cc);} } } if(this.settings.antiAlias) { if(y3 >= y2) { if (y2 == -1) y2 = 0; this.drawPixel(intx, y2, this.borderColour, 100, (y3 - y2 + 1), newCorner, 0, 0);} } else { if(y3 >= y1) { this.drawPixel(intx, (y1 + 1), this.borderColour, 100, (y3 - y1), newCorner, 0, 0);} } var outsideColour = this.borderColour;} else { var outsideColour = this.boxColour; var y3 = y1;} if(this.settings.antiAlias) { for(var inty = (y3 + 1); inty < y4; inty++) { this.drawPixel(intx, inty, outsideColour, (pixelFraction(intx, inty , j) * 100), 1, newCorner, ((this.borderWidth > 0)? 0 : -1), this.settings[cc].radius);} } } this.masterCorners[this.settings[cc].radius] = newCorner.cloneNode(true);} if(cc != "br") { for(var t = 0, k = newCorner.childNodes.length; t < k; t++) { var pixelBar = newCorner.childNodes[t]; var pixelBarTop = parseInt(pixelBar.style.top.substring(0, pixelBar.style.top.indexOf("px"))); var pixelBarLeft = parseInt(pixelBar.style.left.substring(0, pixelBar.style.left.indexOf("px"))); var pixelBarHeight = parseInt(pixelBar.style.height.substring(0, pixelBar.style.height.indexOf("px"))); if(cc == "tl" || cc == "bl"){ pixelBar.style.left = this.settings[cc].radius -pixelBarLeft -1 + "px";} if(cc == "tr" || cc == "tl"){ pixelBar.style.top = this.settings[cc].radius -pixelBarHeight -pixelBarTop + "px";} switch(cc) { case "tr": pixelBar.style.backgroundPosition = "-" + Math.abs((this.boxWidth - this.settings[cc].radius + this.borderWidth) + pixelBarLeft) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "tl": pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "bl": pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs((this.boxHeight + this.settings[cc].radius + pixelBarTop) -this.borderWidth) + "px"; break;} } } } if(newCorner) { switch(cc) { case "tl": if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "tr": if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "bl": if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break; case "br": if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break;} } } } var radiusDiff = new Array(); radiusDiff["t"] = Math.abs(this.settings.tl.radius - this.settings.tr.radius) radiusDiff["b"] = Math.abs(this.settings.bl.radius - this.settings.br.radius); for(z in radiusDiff) { if(z == "t" || z == "b") { if(radiusDiff[z]) { var smallerCornerType = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius)? z +"l" : z +"r"); var newFiller = document.createElement("DIV"); newFiller.style.height = radiusDiff[z] + "px"; newFiller.style.width = this.settings[smallerCornerType].radius+ "px" newFiller.style.position = "absolute"; newFiller.style.fontSize = "1px"; newFiller.style.overflow = "hidden"; newFiller.style.backgroundColor = this.boxColour; switch(smallerCornerType) { case "tl": newFiller.style.bottom = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.topContainer.appendChild(newFiller); break; case "tr": newFiller.style.bottom = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.topContainer.appendChild(newFiller); break; case "bl": newFiller.style.top = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.bottomContainer.appendChild(newFiller); break; case "br": newFiller.style.top = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.bottomContainer.appendChild(newFiller); break;} } var newFillerBar = document.createElement("DIV"); newFillerBar.style.position = "relative"; newFillerBar.style.fontSize = "1px"; newFillerBar.style.overflow = "hidden"; newFillerBar.style.backgroundColor = this.boxColour; newFillerBar.style.backgroundImage = this.backgroundImage; switch(z) { case "t": if(this.topContainer) { if(this.settings.tl.radius && this.settings.tr.radius) { newFillerBar.style.height = topMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.tl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.tr.radius - this.borderWidth + "px"; newFillerBar.style.borderTop = this.borderString; if(this.backgroundImage != "") newFillerBar.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; this.topContainer.appendChild(newFillerBar);} this.box.style.backgroundPosition = "0px -" + (topMaxRadius - this.borderWidth) + "px";} break; case "b": if(this.bottomContainer) { if(this.settings.bl.radius && this.settings.br.radius) { newFillerBar.style.height = botMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.bl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.br.radius - this.borderWidth + "px"; newFillerBar.style.borderBottom = this.borderString; if(this.backgroundImage != "") newFillerBar.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (topMaxRadius + this.borderWidth)) + "px"; this.bottomContainer.appendChild(newFillerBar);} } break;} } } if(this.settings.autoPad == true && this.boxPadding > 0) { var contentContainer = document.createElement("DIV"); contentContainer.style.position = "relative"; contentContainer.innerHTML = this.boxContent; contentContainer.className = "autoPadDiv"; var topPadding = Math.abs(topMaxRadius - this.boxPadding); var botPadding = Math.abs(botMaxRadius - this.boxPadding); if(topMaxRadius < this.boxPadding) contentContainer.style.paddingTop = topPadding + "px"; if(botMaxRadius < this.boxPadding) contentContainer.style.paddingBottom = botMaxRadius + "px"; contentContainer.style.paddingLeft = this.boxPadding + "px"; contentContainer.style.paddingRight = this.boxPadding + "px"; this.contentDIV = this.box.appendChild(contentContainer);} } this.drawPixel = function(intx, inty, colour, transAmount, height, newCorner, image, cornerRadius) { var pixel = document.createElement("DIV"); pixel.style.height = height + "px"; pixel.style.width = "1px"; pixel.style.position = "absolute"; pixel.style.fontSize = "1px"; pixel.style.overflow = "hidden"; var topMaxRadius = Math.max(this.settings["tr"].radius, this.settings["tl"].radius); if(image == -1 && this.backgroundImage != "") { pixel.style.backgroundImage = this.backgroundImage; pixel.style.backgroundPosition = "-" + (this.boxWidth - (cornerRadius - intx) + this.borderWidth) + "px -" + ((this.boxHeight + topMaxRadius + inty) -this.borderWidth) + "px";} else { pixel.style.backgroundColor = colour;} if (transAmount != 100) setOpacity(pixel, transAmount); pixel.style.top = inty + "px"; pixel.style.left = intx + "px"; newCorner.appendChild(pixel);} } function insertAfter(parent, node, referenceNode) { parent.insertBefore(node, referenceNode.nextSibling);} function BlendColour(Col1, Col2, Col1Fraction) { var red1 = parseInt(Col1.substr(1,2),16); var green1 = parseInt(Col1.substr(3,2),16); var blue1 = parseInt(Col1.substr(5,2),16); var red2 = parseInt(Col2.substr(1,2),16); var green2 = parseInt(Col2.substr(3,2),16); var blue2 = parseInt(Col2.substr(5,2),16); if(Col1Fraction > 1 || Col1Fraction < 0) Col1Fraction = 1; var endRed = Math.round((red1 * Col1Fraction) + (red2 * (1 - Col1Fraction))); if(endRed > 255) endRed = 255; if(endRed < 0) endRed = 0; var endGreen = Math.round((green1 * Col1Fraction) + (green2 * (1 - Col1Fraction))); if(endGreen > 255) endGreen = 255; if(endGreen < 0) endGreen = 0; var endBlue = Math.round((blue1 * Col1Fraction) + (blue2 * (1 - Col1Fraction))); if(endBlue > 255) endBlue = 255; if(endBlue < 0) endBlue = 0; return "#" + IntToHex(endRed)+ IntToHex(endGreen)+ IntToHex(endBlue);} function IntToHex(strNum) { base = strNum / 16; rem = strNum % 16; base = base - (rem / 16); baseS = MakeHex(base); remS = MakeHex(rem); return baseS + '' + remS;} function MakeHex(x) { if((x >= 0) && (x <= 9)) { return x;} else { switch(x) { case 10: return "A"; case 11: return "B"; case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";} } } function pixelFraction(x, y, r) { var pixelfraction = 0; var xvalues = new Array(1); var yvalues = new Array(1); var point = 0; var whatsides = ""; var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x,2))); if ((intersect >= y) && (intersect < (y+1))) { whatsides = "Left"; xvalues[point] = 0; yvalues[point] = intersect - y; point = point + 1;} var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y+1,2))); if ((intersect >= x) && (intersect < (x+1))) { whatsides = whatsides + "Top"; xvalues[point] = intersect - x; yvalues[point] = 1; point = point + 1;} var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x+1,2))); if ((intersect >= y) && (intersect < (y+1))) { whatsides = whatsides + "Right"; xvalues[point] = 1; yvalues[point] = intersect - y; point = point + 1;} var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y,2))); if ((intersect >= x) && (intersect < (x+1))) { whatsides = whatsides + "Bottom"; xvalues[point] = intersect - x; yvalues[point] = 0;} switch (whatsides) { case "LeftRight": pixelfraction = Math.min(yvalues[0],yvalues[1]) + ((Math.max(yvalues[0],yvalues[1]) - Math.min(yvalues[0],yvalues[1]))/2); break; case "TopRight": pixelfraction = 1-(((1-xvalues[0])*(1-yvalues[1]))/2); break; case "TopBottom": pixelfraction = Math.min(xvalues[0],xvalues[1]) + ((Math.max(xvalues[0],xvalues[1]) - Math.min(xvalues[0],xvalues[1]))/2); break; case "LeftBottom": pixelfraction = (yvalues[0]*xvalues[1])/2; break; default: pixelfraction = 1;} return pixelfraction;} function rgb2Hex(rgbColour) { try{ var rgbArray = rgb2Array(rgbColour); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); var hexColour = "#" + IntToHex(red) + IntToHex(green) + IntToHex(blue);} catch(e){ alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");} return hexColour;} function rgb2Array(rgbColour) { var rgbValues = rgbColour.substring(4, rgbColour.indexOf(")")); var rgbArray = rgbValues.split(", "); return rgbArray;} function setOpacity(obj, opacity) { opacity = (opacity == 100)?99.999:opacity; if(isSafari && obj.tagName != "IFRAME") { var rgbArray = rgb2Array(obj.style.backgroundColor); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); obj.style.backgroundColor = "rgba(" + red + ", " + green + ", " + blue + ", " + opacity/100 + ")";} else if(typeof(obj.style.opacity) != "undefined") { obj.style.opacity = opacity/100;} else if(typeof(obj.style.MozOpacity) != "undefined") { obj.style.MozOpacity = opacity/100;} else if(typeof(obj.style.filter) != "undefined") { obj.style.filter = "alpha(opacity:" + opacity + ")";} else if(typeof(obj.style.KHTMLOpacity) != "undefined") { obj.style.KHTMLOpacity = opacity/100;} } function inArray(array, value) { for(var i = 0; i < array.length; i++){ if (array[i] === value) return i;} return false;} function inArrayKey(array, value) { for(key in array){ if(key === value) return true;} return false;} function addEvent(elm, evType, fn, useCapture) { if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true;} else if (elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r;} else { elm['on' + evType] = fn;} } function removeEvent(obj, evType, fn, useCapture){ if (obj.removeEventListener){ obj.removeEventListener(evType, fn, useCapture); return true;} else if (obj.detachEvent){ var r = obj.detachEvent("on"+evType, fn); return r;} else { alert("Handler could not be removed");} } function format_colour(colour) { var returnColour = "#ffffff"; if(colour != "" && colour != "transparent") { if(colour.substr(0, 3) == "rgb") { returnColour = rgb2Hex(colour);} else if(colour.length == 4) { returnColour = "#" + colour.substring(1, 2) + colour.substring(1, 2) + colour.substring(2, 3) + colour.substring(2, 3) + colour.substring(3, 4) + colour.substring(3, 4);} else { returnColour = colour;} } return returnColour;} function get_style(obj, property, propertyNS) { try { if(obj.currentStyle) { var returnVal = eval("obj.currentStyle." + property);} else { if(isSafari && obj.style.display == "none") { obj.style.display = ""; var wasHidden = true;} var returnVal = document.defaultView.getComputedStyle(obj, '').getPropertyValue(propertyNS); if(isSafari && wasHidden) { obj.style.display = "none";} } } catch(e) { } return returnVal;} function getElementsByClass(searchClass, node, tag) { var classElements = new Array(); if(node == null) node = document; if(tag == null) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)"); for (i = 0, j = 0; i < elsLen; i++) { if(pattern.test(els[i].className)) { classElements[j] = els[i]; j++;} } return classElements;} function newCurvyError(errorMessage) { return new Error("curvyCorners Error:\n" + errorMessage) } var map = null; var geocoder = geocoder = new GClientGeocoder(); function switch_helpwin() { if (document.getElementById('fixed_collapse').style.display=='none') { document.getElementById('fixed_collapse').style.display='block'; document.getElementById('hori').style.display='none'; } else { document.getElementById('fixed_collapse').style.display='none'; document.getElementById('hori').style.display='block'; } } function loadmap() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(37.4419, -122.1419), 13); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); } } function updateadr(pont) { } function showAddress(address,title,zoom) { if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { showAddress("Hungary","Nincs Talalat",6); } else { if (!zoom) zoom=13; map.setCenter(point, zoom); var marker = new GMarker(point); map.addOverlay(marker); marker.openInfoWindowHtml(address); updateadr(point); } } ); } }