
function loading() {}

function reloading() {
document.getElementById("VadBGcovers").style.display="none";
MEGKERESO.preload=0;
if (MEGKERESO.predo!=0) {

Vadlist.listcur["A0"]={};
Vadlist.listnext["A0"]={};
Vadlist.listprev["A0"]={};
Vadlist.listcur["A0"]["ads"]={};
Vadlist.showpagination(0,MEGKERESO.resultlist.END);
if (MEGKERESO.resultlist.END!=MEGKERESO.resultlist.END) {
MEGKERESO.resultlist.END=MEGKERESO.resultlist.END;
}
eval(MEGKERESO.predo);
}
Vsitestart.PINshow();
Vsitestart.PINXshow();
}

var Vsitestart={

PINshow:function() {
if (document.getElementById("VPINright") && SLsystem.isdefined("SLPIN")) {
if (SLPIN.cnt>0) {
var pin="";
for (var a=1;a<=SLPIN.cnt;a++) {
if (SLPIN[a]) {
pin=pin+"<span><a href=\"http://www.videohirdeto.hu/"+SLPIN[a]["id"]+"\">"+SLPIN[a]["title"]+"</a></span><br><img src=\""+SLPIN["url_vimage"]+SLPIN[a]["videoimg"]+"\" alt=\""+SLPIN[a]["title"]+"\"><br><a href=\"http://www.videohirdeto.hu/"+SLPIN[a]["id"]+"\">MEGTEKINTÉS</a><br>";
}
}
document.getElementById("VPINright").innerHTML=pin;
}
}
},

xpinload:0,

PINXshow:function() {
if (this.xpinload==0) {
var listfile="http://q--ld0.videohirdeto.hu/pinload/xpin/0/videohirdeto.js";
SLsystem.extloadfile("js",listfile,"GET","0");
this.xpinload=9;
document.getElementById("VheadhistoryVC").innerHTML="Ninch elmentett tétel";
} else if (this.xpinload==9) {
if (SLsystem.isdefined("SLPINX")) {
if (SLPINX.FH.cnt>0) {
var adimg="";
var newad="";
for (var a=1;a<=SLPINX.FH.cnt;a++) {
adimg="<img src=\""+SLPINX["url_vimage"]+SLPINX.FH[a]["videoimg"]+"\" border=\"0\" width=\"38px\" height=\"24px\">";
newad=newad+"<div id=\"FHAlist"+SLPINX.FH[a]["id"]+"\" class=\"VHistbox\"><table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"center\" valign=\"middle\" width=\"40px\" onclick=\"top.location='http://www.filmhirado.hu/"+SLPINX.FH[a]["id"]+"'\">"+adimg+"</td><td align=\"left\" valign=\"middle\"  width=\"105px\" class=\"VHistboxtitle\" onclick=\"top.location='http://www.filmhirado.hu/"+SLPINX.FH[a]["id"]+"'\" title="+SLPINX.FH[a]["title"]+">"+SLPINX.FH[a]["title"]+"</td></tr></tbody></table></div>";
document.getElementById("VheadhistoryFH").innerHTML=newad;
}
} else {
document.getElementById("VheadhistoryFH").innerHTML="Nincs elmentett tétel";
}
adimg="";
newad="";
if (SLPINX.VC.cnt>0) {
var adimg="";
var newad="";
for (var a=1;a<=SLPINX.VC.cnt;a++) {
adimg="<img src=\""+SLPINX["url_vimage"]+SLPINX.VC[a]["videoimg"]+"\" border=\"0\" width=\"38px\" height=\"24px\">";
newad=newad+"<div id=\"VCAlist"+SLPINX.VC[a]["id"]+"\" class=\"VHistbox\"><table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"center\" valign=\"middle\" width=\"40px\" onclick=\"top.location='http://www.filmhirado.hu/"+SLPINX.VC[a]["id"]+"'\">"+adimg+"</td><td align=\"left\" valign=\"middle\"  width=\"105px\" class=\"VHistboxtitle\" onclick=\"top.location='http://www.filmhirado.hu/"+SLPINX.VC[a]["id"]+"'\" title="+SLPINX.VC[a]["title"]+">"+SLPINX.VC[a]["title"]+"</td></tr></tbody></table></div>";
document.getElementById("VheadhistoryVC").innerHTML=newad;
}
} else {
//document.getElementById("VheadhistoryVC").innerHTML="<div style=\"font-family:sans-serif;text-align:center;font-size:12px;color:#222222\">Szakmai cégadatbázis (fényképes és videós megjelenéssel). A regisztráció a videocégkatalógusba cégeknek ingyenes. A videohirdet&#337; és filmhíradó céges el&#337;fizet&#337;i automatikusan bekerülnek videójukkal vagy fényképes hirdetésükkel a videocégkatalógusba is. Ha van videója, rendeljen el&#337;fizetést, és felkerül mindhárom portálunkra. Ha nincs videója, leforgatjuk. További Információ: <a href=\"http://www.videohirdeto.info\" style=\"color:#222222\">www.videohirdeto.info</a> blogunkban.</div>";
document.getElementById("VheadhistoryVC").innerHTML="<div style=\"font-family:sans-serif;text-align:center;font-size:12px;color:#222222\">- Cégbemutató filmgyártás<br>- Esküv&#337;i videó<br>- A reklámfilmek internetes megjelentetése<br>- Zártláncú televíziós bemutatás<br>- Banner ajánlataink<br>- Kiemelt reklámhelyeink<br>- PR cikkek megjelentetése fényképpel<br>- PR riportvideók gyártása<br>- Termékbemutató videók<br>- Nyomdai tevékenység<br>- Honlapkészítés<br>- Látogatottságnövelés</div>";
}
}
this.xpinload=1;
}
}

}

var MEGKERESO={

current:0,
resultlist:{},
resultcnt:0,
preload:1,
predo:0,
usersrc:"",

start:function(){
if ((document.getElementById("Vsrctext").value.length>3 || document.getElementById("Vsrctag").value.length>1) && document.getElementById("Vsrctext").value!=this.current) {
var tag=document.getElementById("Vsrctag").value;
var word=this.makewords(document.getElementById("Vsrctext").value);
if (!document.getElementById("Vsrctag").value || tag.lenght<1) {
tag=0;
}
window.location="http://www.videohirdeto.hu/megkereso/--/0-"+tag+"-"+word+"/";
}
},

load:function(vars){
if (vars!=0) {
this.resultlist=eval("SLSRC"+vars);
this.resultcnt=this.resultlist.END;
Vadlist.getlists(0,1,10);
}
},

keycheck:function(ev) {
var keyCode = ev.keyCode ? ev.keyCode : ev.which ? ev.which : ev.charCode;
if(keyCode==13){
MEGKERESO.start();
return false;
} else {
return true;
}
},

makewords:function(inp) {
var a=new Array(" ","-","/","_",":",".","&","\"","'","+","!","%","=","(",")","{","[","]","}","@","#","<",">","?",";","*","\\");
var result=inp;
var c="";
for (var b=0;b<a.length;b++) {
if (result.indexOf(a[b])!=-1) {
c=eval("/"+a[b]+"/g");
result=result.replace(c, ",");
}
}
var i=eval("/"+decodeURI("%C5%90")+"/g");
result=result.replace(i, "&&336;");
i=eval("/"+decodeURI("%C5%91")+"/g");
result=result.replace(i, "&&337;");
i=eval("/"+decodeURI("%C5%B0")+"/g");
result=result.replace(i, "&&368;");
i=eval("/"+decodeURI("%C5%B1")+"/g");
result=result.replace(i, "&&369;");
result=encodeURIComponent(result);
return result;
},

fillvalues:function(tag,word,filter) {
if (word!=0) {
var i=decodeURI("%C5%90");
word=word.replace(/&#336;/g,i);
i=decodeURI("%C5%91");
word=word.replace(/&#337;/g,i);
i=decodeURI("%C5%B0");
word=word.replace(/&#368;/g,i);
i=decodeURI("%C5%B1");
word=word.replace(/&#369;/g,i);
word=word.replace(/,/g, " ")
this.current=word;
document.getElementById("Vsrctext").value=word;
}
if (tag!=0) {
document.getElementById("Vsrctag").value=tag;
}
if (filter!=0) {

}
}




}

var Vadlist={

"SLP":0,
"SLPAdbox":0,
"SLPBox":0,
"SLPdata":{"listcount":0,"savedcount":0},
"SLPlist":{},
"SLPlisting":{},
"listcur":{},
"listnext":{},
"listprev":{},
"firstload":0,
"now":{"next":0,"prev":0,"vadid":0,"islast":0},
"Adlist":{},
"checks":{},
"returnUrl":"0",
"pagelength":10,

//-----------------------------
getlists:function(type,from,to) {

var l="";
for (var a=from;a<=to;a++) {
if (MEGKERESO.resultlist[a]) {
if (MEGKERESO.resultlist[a]!="END") {
if (a!=from) {
l=l+",";
}
l=l+MEGKERESO.resultlist[a];
}
}
}
if (l.length>8) {
var listfile="http://q--ld0.videohirdeto.hu/loadsearch/"+l+"/0,"+from+","+to+"/filmhirado.sljx?"+cache;

var cache=Math.random()*10000;
cache=Math.round(cache);
SLsystem.extloadfile("js",listfile,"GET","0");
if (document.getElementById("VadCatAdsbodycntload")) {
document.getElementById("VadCatAdsbodycntload").style.display="block";
}
this.checks[type+"-"+from+"_"+to]=setTimeout("Vadlist.checkloadlist('"+type+"',"+from+","+to+")",30000);
}
},

//-----------------------------

checkloadlist:function(type,from,to) {
if (document.getElementById("VadCatAdsbodycntload")) {
document.getElementById("VadCatAdsbodycntload").style.display="none";
document.getElementById("VadCatAdsbodycntno").style.display="none";
document.getElementById("VadCatAdsbodycntload").style.display="block";
}
},

loadlist:function(type,from,to) {
clearTimeout(this.checks[type+"-"+from+"_"+to]);
if (!this.Adlist["A"+type]) {
this.Adlist["A"+type]={};
}
if (MEGKERESO.preload==1) {
MEGKERESO.predo="Vadlist.loadlist("+type+","+from+","+to+")";
} else {
var topage=to/Vadlist.pagelength;
topage=Math.round(topage);
document.getElementById("VadCatAdsbodycntload").style.display="none";
document.getElementById("VadCatAdsbodycntno").style.display="none";
document.getElementById("VadCatAdsbodycnterr").style.display="none";
for (var c=from;c<=to;c++) {
if (eval("SLVADL"+type+"_"+from+"_"+to+"["+c+"]")) {
eval("Vadlist.Adlist.A"+type+"["+c+"]=SLVADL"+type+"_"+from+"_"+to+"["+c+"];");
}
}
//create div
if (!document.getElementById("VadCatAdsbodycnt"+topage)) {
document.getElementById("VadCatAdsbodycnt").innerHTML=document.getElementById("VadCatAdsbodycnt").innerHTML+"<div id=\"VadCatAdsbodycnt"+topage+"\" style=\"display:none\"></div>";
}
//get cnt 2 div
var content="";
var count=0
for (var d=from;d<=to;d++) {
if (this.Adlist["A"+type][d]) {
content=content+this.makeadbox(type, d,topage);
}
}
if (content.length>0) {

document.getElementById("VadCatAdsbodycnt"+topage).innerHTML=content;
//hide msg
document.getElementById("VadCatAdsbodycnt"+topage).style.display="block";
document.getElementById("VadCatAdsbodycntload").style.display="none";
document.getElementById("VadCatAdsbodycntno").style.display="none";
document.getElementById("VadCatAdsbodycnterr").style.display="none";
} else {
document.getElementById("VadCatAdsbodycnt"+topage).style.display="none";
document.getElementById("VadCatAdsbodycntload").style.display="none";
document.getElementById("VadCatAdsbodycntno").style.display="none";
document.getElementById("VadCatAdsbodycnterr").style.display="block";
}
}
},

loadnolist:function(type,from,to) {
if (MEGKERESO.preload==1) {
MEGKERESO.predo="Vadlist.loadnolist("+type+","+from+","+to+")";
} else {
//document.getElementById("VadCatAdsbodycnt"+topage).style.display="none";
document.getElementById("VadCatAdsbodycntload").style.display="none";
document.getElementById("VadCatAdsbodycntno").style.display="block";
document.getElementById("VadCatAdsbodycnterr").style.display="none";
}
},

showpagination:function(type,amount) {

var pagenum=Math.ceil(amount/this.pagelength);
if (pagenum>10) {
pagenum=10;
}
var divname=type;
if (pagenum>1) {
var paginatet="<ul><li class=\"VadPagenavNxt\" onclick=\"Vadlist.switchpagination('"+type+"', Vadlist.listprev['A"+type+"']['page'])\" id=\"paginatet_"+divname+"_S\" title=\"elöző oldal\"> < </li> Oldalak: <li class=\"VadPagenavCur\" onclick=\"Vadlist.switchpagination('"+type+"', '1')\"  id=\"paginatet_"+divname+"_1\">1</li>";
var paginateb="<ul><li class=\"VadPagenavNxt\" onclick=\"Vadlist.switchpagination('"+type+"', Vadlist.listprev['A"+type+"']['page'])\" id=\"paginateb_"+divname+"_S\" title=\"elöző oldal\"> < </li> Oldalak: <li class=\"VadPagenavCur\" onclick=\"Vadlist.switchpagination('"+type+"', '1')\" id=\"paginateb_"+divname+"_1\">1</li>";
for (var i=2;i<=pagenum;i++) {
paginatet=paginatet+"<li class=\"VadPagenavAll\" onclick=\"Vadlist.switchpagination('"+type+"', '"+i+"')\" id=\"paginatet_"+divname+"_"+i+"\">"+i+"</li>";
paginateb=paginateb+"<li class=\"VadPagenavAll\" onclick=\"Vadlist.switchpagination('"+type+"', '"+i+"')\" id=\"paginateb_"+divname+"_"+i+"\">"+i+"</li>";
}
paginatet=paginatet+"<li class=\"VadPagenavNxt\" onclick=\"Vadlist.switchpagination('"+type+"', Vadlist.listnext['A"+type+"']['page'])\" id=\"paginatet_"+divname+"_E\" title=\"következő oldal\"> > </li></ul>";
paginateb=paginateb+"<li class=\"VadPagenavNxt\" onclick=\"Vadlist.switchpagination('"+type+"', Vadlist.listnext['A"+type+"']['page'])\" id=\"paginateb_"+divname+"_E\" title=\"következő oldal\"> > </li></ul>";
document.getElementById('VadCatAdsbodytop').innerHTML=paginatet;
document.getElementById('VadCatAdsbodybtm').innerHTML=paginateb;
document.getElementById('paginatet_'+divname+'_S').style.display="none";
document.getElementById('paginateb_'+divname+'_S').style.display="none";
document.getElementById('VadCatAdsbodytop').style.display="inline";
document.getElementById('VadCatAdsbodybtm').style.display="inline";
this.listcur["A"+type]["page"]=1;
this.listcur["A"+type]["all"]=pagenum;
this.listnext["A"+type]["page"]=1;
this.listprev["A"+type]["page"]=pagenum;
if (pagenum>1) {
this.listnext["A"+type]["page"]++;
if (this.listnext["A"+type]["page"]>pagenum) {
this.listnext["A"+type]["page"]=1;
}
}
}


},

switchpagination:function(type, topage) {
if (topage<=this.listcur["A"+type]["all"]) {
var to=this.pagelength*topage;
var from=to-this.pagelength+1;
if (document.getElementById("VadCatAdsbodycnt"+this.listcur["A"+type]["page"])) {
document.getElementById("VadCatAdsbodycnt"+this.listcur["A"+type]["page"]).style.display="none";
}
if (this.Adlist["A"+type][from]) {
document.getElementById("VadCatAdsbodycnt"+topage).style.display="block";
} else {
this.listcur["A"+type]["ads"][topage]={};
this.getlists(type,from,to);
document.getElementById("VadCatAdsbodycntload").style.display="block";
}
this.listcur["A"+type]["page"]=topage;
this.listnext["A"+type]["page"]++;
this.listprev["A"+type]["page"]--;
if (this.listnext["A"+type]["page"]>this.listcur["A"+type]["all"]) {
this.listnext["A"+type]["page"]=1;
}
if (this.listprev["A"+type]["page"]<1) {
this.listnext["A"+type]["page"]=this.listcur["A"+type]["all"];
}
}
var divname=type;
if (this.listcur["A"+type]["all"]>1) {
if (topage==1) {
document.getElementById('paginatet_'+divname+'_S').style.display="none";
document.getElementById('paginateb_'+divname+'_S').style.display="none";
} else {
document.getElementById('paginatet_'+divname+'_S').style.display="inline";
document.getElementById('paginateb_'+divname+'_S').style.display="inline";
}
if (topage==this.listcur["A"+type]["all"]) {
document.getElementById('paginatet_'+divname+'_E').style.display="none";
document.getElementById('paginateb_'+divname+'_E').style.display="none";
} else {
document.getElementById('paginatet_'+divname+'_E').style.display="inline";
document.getElementById('paginateb_'+divname+'_E').style.display="inline";
}
for (var i=1;i<=this.listcur["A"+type]["all"];i++) {
if (document.getElementById('paginatet_'+divname+'_'+i)) {
document.getElementById('paginatet_'+divname+'_'+i).className="VadPagenavAll";
}
if (document.getElementById('paginateb_'+divname+'_'+i)) {
document.getElementById('paginateb_'+divname+'_'+i).className="VadPagenavAll";
}
}
if (document.getElementById('paginatet_'+divname+'_'+this.listcur["A"+type]["page"])) {
document.getElementById('paginatet_'+divname+'_'+topage).className="VadPagenavCur";
document.getElementById('paginateb_'+divname+'_'+topage).className="VadPagenavCur";
}
}

},

makedate:function(str) {
var newdate="";
var adate=new Array();
adate["20100731"]="Ma";
adate["20100801"]="Holnap";
adate["20100730"]="Tegnap";
if (adate[str]) {
newdate=adate[str];
} else {
var year=str.substring(0, 4);
var month=str.substring(4, 6);
var day=str.substring(6, 8);
newdate=year+"."+month+"."+day+".";
}
return newdate;
},

makeadbox:function(type, count, page) {
var result="";
if (this.Adlist["A"+type][count]) {
if (this.Adlist["A"+type][count]["id"]) {

var adimg="http://q--med.videohirdeto.hu/img/"+this.Adlist["A"+type][count].videoimg;
var height=130;

var totop="<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.totop("+this.Adlist["A"+type][count]["id"]+")\" title=\"Előrehelyezés\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/totop.png\" border=\"0\" width=\"30\" height=\"30\"></a>";
var toextra="<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.toextra("+this.Adlist["A"+type][count]["id"]+")\" title=\"Kiemelés\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/toextra.png\" border=\"0\" width=\"30\" height=\"30\"></a>";
var toid=this.Adlist["A"+type][count]["id"].substring(5,10);
if (this.Adlist["A"+type][count].top!=0) {
totop="<img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/istop.png\" border=\"0\" width=\"30\" height=\"30\">";
} else if(count<3 || toid>86400) {
totop="<img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/notop.png\" border=\"0\" width=\"30\" height=\"30\">";
}
var xtra="border:2px solid #FFFFFF;margin-left:2px;padding-top:2px;";
if (this.Adlist["A"+type][count].extra!=0 || toid>86400) {
toextra="<img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/isextra.png\" border=\"0\" width=\"30\" height=\"30\">";
if (this.Adlist["A"+type][count].extra!=0) {
xtra="border:2px solid #E5DFC2;margin-left:2px;padding-top:2px;";
}
}
var showad="VIDEÓ > >";
var showadtitle="Videó";
var showadclass="VAdboxshow";
if (this.Adlist["A"+type][count].video==0) {
showad="KÉP > > ";
showadtitle="Kép";
showadclass=showadclass+"a";
if (this.Adlist["A"+type][count].image>1) {
showad="KÉPEK > > ";
showadtitle="Képek";
}
} else if(this.Adlist["A"+type][count].image>0) {
showadtitle="Videó és Kép";
}
adimg="<img src=\""+adimg+"\" border=\"0\" width=\"120px\" height=\"90px\"><div class=\""+showadclass+"\" title=\""+showadtitle+"\">"+showad+"</div>";
if (this.Adlist["A"+type][count].video==0 && this.Adlist["A"+type][count].image==0) {
adimg="&#160;";
}
var sum="";
var theend="";
if (toid<=86400) {
theend="&#160;::&#160;<b>Lejár:</b>&#160;"+this.makedate(this.Adlist["A"+type][count].end);
}
//var catlink=" :: Csatorna: <a href=\"http://www.videohirdeto.hu/"+this.Adlist["A"+type][count].FHcat+"/\">"+this.Adlist["A"+type][count].cat+"</a>";
//theend=theend+catlink
var adv="&#160;::&#160;<a href=\"http://www.videohirdeto.hu/megkereso/hirdeto/"+this.Adlist["A"+type][count].usercode+"/\"><b>"+this.Adlist["A"+type][count].user+"</b> hirdetései</a>";
sum="<div class=\"VAdboxdata\"><b>Feladva:</b>&#160;"+this.makedate(this.Adlist["A"+type][count].start)+theend+adv+"</div>";
//+sum;

//var specclass=this.Adlist["A"+type][count].extra;

var addbtn="&#160;";
var viewbtn="<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+", this, "+count+")\" class=\"Vadboxtopbtn\" title=\"lejátszás és saját listába gyüjtés\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/playnow.png\" border=\"0\" width=\"30\" height=\"25\" id=\"Adview"+type+this.Adlist["A"+type][count]["id"]+"\"><span>MEGTEKINTÉS</span></a>";
var aid=this.Adlist["A"+type][count]["id"];
aid=aid.substring(5,10);
if (aid>86400) {
var viewbtn="<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+", this, "+count+")\" class=\"Vadboxtopbtn\" title=\"lejátszás és saját listába gyüjtés\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/playnow.png\" border=\"0\" width=\"30\" height=\"25\" id=\"Adview"+type+this.Adlist["A"+type][count]["id"]+"\"><span>A VIDEÓ RIPORT MEGTEKINTÉSE</span></a>";
}

if (Vadlist.SLPlist[this.Adlist["A"+type][count]["id"]]==1) {
//addbtn="<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.add("+this.Adlist["A"+type][count]["id"]+", this)\" class=\"Vadboxtopbtn\" title=\"ez a hirdetés már szerepel a kiválasztott hirdetések között\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/addtolistno.png\" border=\"0\" width=\"30\" height=\"25\" id=\"Adadd"+type+this.Adlist["A"+type][count]["id"]+"\"><span>MÁR KIVÁLASZTOTTA A HIRDETÉST </span></a>";
viewbtn="<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+", this, "+count+")\" class=\"Vadboxtopbtn\" title=\"ez a hirdetés már szerepel a kiválasztott hirdetések között\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/playnowon.png\" border=\"0\" width=\"30\" height=\"25\" id=\"Adview"+type+this.Adlist["A"+type][count]["id"]+"\"><span>A HIRDETÉS MEGTEKINTÉSE</span></a>";
}

result="<div id=\"Ad"+type+this.Adlist["A"+type][count]["id"]+"\" title=\""+this.Adlist["A"+type][count].title+"\" style=\""+xtra+"\"><table width=\"660px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"right\" valign=\"bottom\" class=\"VAdboxlistnav\">"+viewbtn+"&#160;"+addbtn+"&#160;&#160;&#160;&#160;&#160;&#160;</td></tr><tr><td align=\"center\" valign=\"top\"><table width=\"658px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"center\" height=\""+height+"px\" valign=\"top\" class=\"\"><div id=\"Adbox"+type+this.Adlist["A"+type][count]["id"]+"\"><table width=\"657px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"right\" valign=\"top\" width=\"33px\" class=\"VAdboxleftbtn\">"+totop+"<br>"+toextra+"</td><td align=\"center\" valign=\"middle\" width=\"130px\" class=\"VAdboxIbox"+this.Adlist["A"+type][count].style+"\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+",this)\">"+adimg+"</td><td align=\"left\" valign=\"top\" width=\"495px\" class=\"VAdboxbody"+this.Adlist["A"+type][count].style+"\"><div class=\"VAdboxtitle0\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+", this)\">"+this.Adlist["A"+type][count].title+"</div><div class=\"VAdboxintro0\">"+this.Adlist["A"+type][count].intro+"</div><div class=\"margin-top:4px;\">"+sum+"</div></td></tr></tbody></table></div></td></tr></tbody></table></td></tr></tbody></table></div>";
result=result+"<hr class=\"Vadboxhr\">";


}
}
return result;
},

preload:function(adid) {
this.adboxaction.toselect(adid);
Vadlist.addtolist(0,adid,'',1,0);
},

checkpreload:function() {
if (document.getElementById("VadAdsellist").innerHTML.length<5) {
document.getElementById("VadAdseltab").className="VadAdseltaboff";
document.getElementById("Vadselboxstart").style.display="none";
document.getElementById("VadAdseltabtext").style.display="none";
Vsite.tabflip('list-search',0);
}
},

adboxaction:{

add:function(adid, here){
var inl=0;
if (this.inlist) {
if (this.inlist[adid]!=0) {
inl=1;
}
}
if (inl==0) {
Vadlist.tolist(adid);
if (here!=0) {
VadPupBoxopen(here, '0', '200', 'info', '<span style="color:#00FF00;font-size:20px;font-weight:bold;">[i]</span>   A videóhirdetést sikeresen hozzáadtuk a hirdetéslistához. Megtekintéshez nyomja meg a \"Kiválasztott videóirdetések\" gombot középen felül!', '3000');
}
} else {
if (here!=0) {
VadPupBoxopen(here, '0', '200', 'info', '<span style="color:#00FF00;font-size:20px;font-weight:bold;">[i]</span>   A videóhirdetést már tartalmazza a hirdetéslista. Megtekintéshez nyomja meg a \"Kiválasztott hirdetések\" gombot felül!', '3000');
}
}
//this.tosave(adid);
//this.toselect(adid);
//Vadlist.addtolist(0,adid,here,0,1);
},

view:function(adid, here, cnt){
var loc=top.location.hostname;
top.location=top.location.protocol+"//"+loc+"/"+adid+"";
},

delad:function(adid, type) {
Vadlist.listcur["del"][adid]=adid;
if (SLsystem.isdefined("VSLPs")) {
VSLPs.deleteanad(adid);
}
//del from prelist, other tabs!!!
if (type!="all" && document.getElementById("Adall"+adid)) {
document.getElementById("Adall"+adid).style.display="none";
}
if (type!="new" && document.getElementById("Adnew"+adid)) {
document.getElementById("Adnew"+adid).style.display="none";
}
if (type!="extra" && document.getElementById("Adextra"+adid)) {
document.getElementById("Adextra"+adid).style.display="none";
}
if (type!="save" && document.getElementById("Adsave"+adid)) {
document.getElementById("Adsave"+adid).style.display="none";
}
var saved=SLsystem.getcookievalue("Vadlistcurr");
if (saved && saved.indexOf("/"+adid)!=-1) {
saved=saved.replace("/"+adid, "");
SLsystem.setsavedcookie("Vadlistcurr", saved, "days", 7);
}
var deld=SLsystem.getcookievalue("Vaddelcurr");
var list="";
if (deld) {
list=deld;
}
if (list.indexOf("/"+adid)==-1) {
list=list+"/"+adid;
SLsystem.setsavedcookie("Vaddelcurr", list, "days", 1);
}
},

hide:function(type, adid, page, here){
VadPupBoxopen(here, '120', '200', 'info', '<span style="color:#00FF00;font-size:20px;font-weight:bold;">[i]</span>   A hirdetés 1 napig nem jelentik meg az Ön gépén!', '4500');
this.delad(adid, type);
document.getElementById("Ad"+type+adid).style.display="none";
this.listcur["A"+type]["ads"][page][adid]=0;
var cnt=0;
for (var a in this.listcur["A"+type]["ads"][page]) {
if (this.listcur["A"+type]["ads"][page][a]==1) {
cnt++;
}
}
if (cnt==0) {
document.getElementById(Vsite.sitevars[type]+"cnt"+page).innerHTML+="AZ OLDALON LEVŐ HIRDETÉSEKET ÖN TÖRÖLTE.";
}
},

start:function() {
if (Vadlist.SLPlist) {
var ad=0;
for (var a in Vadlist.SLPlist) {
if (a!=0 && Vadlist.SLPlist[a]==1) {
ad=a;
}
}
if (ad!=0) {
this.view(ad,0,0);
}
}
},

totop:function(adid){
alert('Előrehelyezés a hatékonyságot növeli! Hamarosan elérhető...');
},

toextra:function(adid){
alert('Kiemelés a hatékonyságot növeli! Hamarosan elérhető...');
},

help:function(){
//...
},

opt:function(type){},

contact:function(adid){},

userpage:function(adid,type){},

showattr:function(name){},

tosave:function(adid){
if (adid>8000100000) {
var saved=SLsystem.getcookievalue("Vadlistcurr");
var datlist="";
var list="";
if (saved) {
list=saved;
datlist=SLsystem.getcookievalue("Vadlistcurrdat");
}
if (list.indexOf("/"+adid)==-1) {
list=list+"/"+adid;
var prc="";
if (Vadlist.addata[adid]["price"]) {
if (Vadlist.addata[adid]["price"]!=0) {
prc=Vadlist.addata[adid]["price"];
}
}
SLsystem.setsavedcookie("Vadlistcurr", list, "days", 7);
datlist=datlist+"/|/"+adid+"||"+Vadlist.addata[adid]["iurl"]+"||"+Vadlist.addata[adid]["title"]+"||"+prc;
SLsystem.setsavedcookie("Vadlistcurrdat", datlist, "days", 7);
}
}
},

toselect:function(adid){
document.getElementById("VadAdseltabtext").style.display="block";
document.getElementById("Vadselboxstart").style.display="block";
document.getElementById("VadAdseltab").className="VadAdseltabon";

if (document.getElementById("Adaddall"+adid)) {
document.getElementById("Adaddall"+adid).src="http://q--sli0.videohirdeto.hu/cat/adlistbox/addtolistno.png";
}
if (document.getElementById("Adaddnew"+adid)) {
document.getElementById("Adaddnew"+adid).src="http://q--sli0.videohirdeto.hu/cat/adlistbox/addtolistno.png";
}
if (document.getElementById("Adaddextra"+adid)) {
document.getElementById("Adaddwxtra"+adid).src="http://q--sli0.videohirdeto.hu/cat/adlistbox/addtolistno.png";
}
if (document.getElementById("Adaddsave"+adid)) {
document.getElementById("Adaddsave"+adid).src="http://q--sli0.videohirdeto.hu/cat/adlistbox/addtolistno.png";
}
if (document.getElementById("Adviewall"+adid)) {
document.getElementById("Adviewall"+adid).src="http://q--sli0.videohirdeto.hu/cat/adlistbox/playnowon.png";
}
if (document.getElementById("Adviewnew"+adid)) {
document.getElementById("Adviewnew"+adid).src="http://q--sli0.videohirdeto.hu/cat/adlistbox/playnowon.png";
}
if (document.getElementById("Adviewextra"+adid)) {
document.getElementById("Adviewwxtra"+adid).src="http://q--sli0.videohirdeto.hu/cat/adlistbox/playnowon.png";
}
if (document.getElementById("Adviewsave"+adid)) {
document.getElementById("Adviewsave"+adid).src="http://q--sli0.videohirdeto.hu/cat/adlistbox/playnowon.png";
}
}

},

//-----------------------------

textconvert:function(inp) {
if (inp.length>0) {
var out=inp;
out=unescape(out);
//out=decodeURIComponent(out);
return out;
}
},

addtolist:function(type,adid,place,silent,manual) {

if (document.getElementById("IF_SLPPvideo")) {
dropid("IF_SLPPvideo");
}
document.title="::: hirdetés betöltés folyamatban - videohirdeto.hu :::";
var found=0;
if (this.SLPdata.listcount>0) {
if (this.SLPlisting[adid]) {
if (this.SLPlisting[adid]!=0) {
found=adid;
}
}
}
if (found==adid) {
if (type==1 && this.SLPlist[adid]==1) {
this.SLPBox=2;
this.openadviewer(adid);
}
} else if (this.SLP==0 && this.SLPBox==0) {
var cache=Math.random()*10000;
//1000
cache=Math.round(cache);
var startfile="http://q--sls0.videohirdeto.hu/slp/0/videohirdeto.js?"+cache;
SLsystem.extloadfile("js",startfile,"GET","Vadlist.addtolist('"+type+"','"+adid+"','','1','"+manual+"')");
this.SLPBox=2;
if (silent==1 && manual==0) {
// && 0==10
setTimeout("Vadlist.addtolist('"+type+"','"+adid+"','0','1','"+manual+"')",500);
}
} else if (this.SLPdata.listcount<=Vsystem.limits.listmax[0]) {
var adfile="http://q--ld0.videohirdeto.hu/loadad/"+adid+"/1"+manual+"/videohirdeto.sljx";
this.SLPBox=2;
if (silent==1 && manual==0 && this.SLP==0) {
setTimeout("SLsystem.extloadfile('js','"+adfile+"','GET','0');",700);
} else {
SLsystem.extloadfile("js",adfile,"GET","0");
}

if (window.XMLHttpRequest) {
} else {
//Vshowveil('s');
alert("A hirdetés betöltése folyamatban van, kis türelmet kérünk!\nTovábblépéshez nyomja meg az 'OK' gombot!")
}
//+voting
//var votefile="http://q--???.videohirdeto.hu/getvote/"+adid+"/0/videohirdeto.sljx";
//SLsystem.extloadfile("js",votefile,"GET","0");
if (this.SLPdata.listcount==0) {
var intfile="http://q--ld0.videohirdeto.hu/interstitial/0/0/videohirdeto.sljx";
}
this.SLPdata.listcount++;
this.SLPlist[adid]=9;
if (type==1){
this.SLPlist[adid]=8;
}
}
if (found==adid && type==0) {
document.title=Vsystem.values.title;
//+notify
} else if (this.SLPdata.listcount<=Vsystem.limits.listmax[0] || found==adid) {
//+update playlist
if (type==0) {
document.title=Vsystem.values.title;
if (window.XMLHttpRequest && silent!=1) {
VadPupBoxopen(place, '120', '200', 'info', '<span style="color:#FF0000;font-size:20px;font-weight:bold;">[i]</span>   A videóhirdetést sikeresen hozzáadtuk a hirdetéslistához. Megtekintéshez nyomja meg a \"Kiválasztott videóirdetések\" gombot középen felül!', '3500');
}
} else {
if (this.SLP==1 && this.SLPlist[adid]==1) {
this.openadviewer(adid);
} else {
//+show wait
}
}
} else {
document.title=Vsystem.values.title;
}

},

openadviewer:function(startad) {
if (startid>0) {
this.returnUrl=GotoUrl;
}
//close wait
if (this.SLPAdbox==0) {
document.getElementById("VadTopContainercnt").innerHTML=VSLPs.container.viewer;
this.SLPAdbox=1;
}
if (startad>0) {
//VSLPs.insertplayer(startad);
VSLPs.viewer.playerinsert=1;
VSLPs.setnextprev(startad);
VSLPs.loadadtoviewer(startad);
}
if (Vadlist.SLPBox==0 || Vadlist.SLPBox==2) {
//VshowTopbox("0",1,0,0,1,0);
Vadlist.SLPBox=1;
}
SLsystem.setsessioncookie("tmpSLPmedia", 1);
SLsystem.setsessioncookie("tmpSLPview", 1);
if (window.XMLHttpRequest) {
Showaftershow="Vadlist.closeadviewer();";
} else {
Showaftershow="window.location.reload();";
}
},

closeadviewer:function() {
if (this.returnUrl!="0") {
window.location=this.returnUrl;
} else {
//Vshowveil('s');
VSLPs.switchtab('SLPboxMC2', 'SLPboxMC1');
if (document.getElementById("IF_SLPPvideo")) {
document.getElementById("SLPPvideo").style.visibility='hidden';
document.getElementById("IF_SLPPvideo").style.visibility='hidden';
dropid("IF_SLPPvideo");
}
SLsystem.setsessioncookie("tmpSLPmedia", 0);
SLsystem.deletecookie("tmpSLPmedia");
SLsystem.setsessioncookie("tmpSLPview", 0);
SLsystem.deletecookie("tmpSLPview");
//VSLPs.dropplayer();
//VSLPs.stopnow();
document.title=Vsystem.values.title;
Vadlist.SLPBox=0;
//Vhideveil();
}
},

deletead:function(startad) {
this.SLPlist[startad]=0;
this.SLPlisting[startad]=0;
this.SLPdata.listcount--;
}

}


if (top.location != self.location) { top.location = self.location.href; }



function videohirdeto() {}

var SLsystem={

isdefined:function(variable) {
return (typeof(window[variable]) == "undefined")?  false: true;
},

setsessioncookie:function(cookieName, cookieValue) {
document.cookie = escape(cookieName) + "=" + escape(cookieValue) + "; path=/" + "; domain=.videohirdeto.hu";
return true;
},

setsavedcookie:function (CookieName, CookieValue, periodType, offset) {

var expireDate = new Date ();
offset = offset / 1;
  
var myPeriodType = periodType;
switch (myPeriodType.toLowerCase()) {
case "years":
expireDate.setYear(expireDate.getFullYear()+offset);
break;
case "months":
expireDate.setMonth(expireDate.getMonth()+offset);
break;
case "days":
expireDate.setDate(expireDate.getDate()+offset);
break;
case "hours":
expireDate.setHours(expireDate.getHours()+offset);
break;
default:
expireDate.setMinutes(expireDate.getMinutes()+offset);
break;
} 
  
document.cookie = escape(CookieName ) + "=" + escape(CookieValue) + "; expires=" + expireDate.toGMTString() + "; path=/" + "; domain=.videohirdeto.hu";
},

getcookievalue:function (cookieName) {
var exp = new RegExp (escape(cookieName) + "=([^;]+)");
if (exp.test (document.cookie + ";")) {
exp.exec (document.cookie + ";");
return unescape(RegExp.$1);
}
else return false;
},

deletecookie:function (cookieName) {
if (this.getcookievalue (cookieName)) this.setsavedcookie (cookieName,"0","years", -1);  
return true;     
},

cookiedecode:function (cookievalue) {
var result=cookievalue;
var i=eval("/"+"%u0150"+"/g");
result=result.replace(i, decodeURI("%C5%90"));
i=eval("/"+"%u0151"+"/g");
result=result.replace(i, decodeURI("%C5%91"));
i=eval("/"+"%u0170"+"/g");
result=result.replace(i, decodeURI("%C5%B0"));
i=eval("/"+"%u0171"+"/g");
result=result.replace(i, decodeURI("%C5%B1"));
return result;
},

datatodiv:function(http_request, divid, msg, after) {

var error=0;
if (http_request.readyState == 4 && http_request.status==200) {
var res=http_request.responseText;
if (res) {
if (res.length>1 && document.getElementById(divid)) {
document.getElementById(divid).innerHTML=res;
if (after.length>0) {
eval(after);
}
}
} else {
error=1;
}
} else {
//error=1;
}
if (error==1) {
if (document.getElementById(divid)) {
document.getElementById(divid).innerHTML=msg;
}
}

},

datatoeval:function(http_request, after) {

var error=0;
if (http_request.readyState == 4 && http_request.status==200) {
var res=http_request.responseText;
if (res) {
if (res.length>1) {
after=after.replace(/RESULT/g, res);
eval(after);
}
} else {
error=1;
}
} else {
//error=1;
}
if (error==1) {
//on error!!!
}

},

loadedobjects:"-",
loadnext:"0",

extloadfile:function(fileType,fileName,requestType,loadAfter) {
if (!document.getElementById)
return
var fileref=""
if (this.loadedobjects.indexOf(fileName)==-1){
if (fileType=="js") {
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", fileName);
} else if (fileType=="css") {
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", fileName);
} else if (fileType=="html" && requestType=="GET") {
//+ajax load get
} else if (fileType=="html" && requestType=="POST") {
//+ajax load post
} else if (fileType=="html" && requestType=="FILE") {
//+iframe load file
}
}
if (fileref!=""){
this.loadnext=loadAfter;
document.getElementsByTagName("head").item(0).appendChild(fileref)
this.loadedobjects+=fileName+" "
}

},

extloadpage:function(method,url,divid,data,cach,emsg,after) {
if (method=="GET" || method=="POST") {
var http_request=false;
if (window.XMLHttpRequest) {
http_request=new XMLHttpRequest();
} else if (window.ActiveXObject) { 
try {
http_request=new ActiveXObject("Msxml2.XMLHTTP");
} 
catch (e){
try{
http_request=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){}
}
}
} else {
return false
}
http_request.onreadystatechange=function(){
if (divid=="0") {
SLsystem.datatoeval(http_request, after);
} else {
SLsystem.datatodiv(http_request, divid, emsg, after);
}
}
if (cach!=0) {
var cachparam=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime();
}

var sendvalue=null;
if (method=="POST") {
if (data.indexOf("=")==-1) {
data="QUERY="+data;
}
http_request.open(method, url+cachparam, true)
http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http_request.setRequestHeader("Content-length", data.length);
http_request.setRequestHeader("Connection", "close");
sendvalue=data;
} else {
http_request.open(method, url+cachparam, true);
}
http_request.send(sendvalue);
}


}

function telecommunication(that) {
var file="http://com1.telecommunication.hu/22222222222222/0/0/script.js?"+Math.random();
SLsystem.extloadfile("js",file,"GET","0");
document.getElementById(that.id).style.display="none";
}

var SLmks={
megkereso:function() {
if (document.getElementById("VadSitesearchbox1").value.length>3) {
var word=this.makewords(document.getElementById("VadSitesearchbox1").value);
window.location="http://www.videohirdeto.hu/megkereso/--/0-0-"+word+"/";
}
},

keycheck:function(ev) {
var keyCode = ev.keyCode ? ev.keyCode : ev.which ? ev.which : ev.charCode;
if(keyCode==13){
MEGKERESO.start();
return false;
} else {
return true;
}
},

makewords:function(inp) {
var a=new Array(" ","-","/","_",":",".","&","\"","'","+","!","%","=","(",")","{","[","]","}","@","#","<",">","?",";","*","\\");
var result=inp;
var c="";
for (var b=0;b<a.length;b++) {
if (result.indexOf(a[b])!=-1) {
c=eval("/"+a[b]+"/g");
result=result.replace(c, ",");
}
}
var i=eval("/"+decodeURI("%C5%90")+"/g");
result=result.replace(i, "&&336;");
i=eval("/"+decodeURI("%C5%91")+"/g");
result=result.replace(i, "&&337;");
i=eval("/"+decodeURI("%C5%B0")+"/g");
result=result.replace(i, "&&368;");
i=eval("/"+decodeURI("%C5%B1")+"/g");
result=result.replace(i, "&&369;");
result=encodeURIComponent(result);
return result;
}

}

var Vsystem={
"limits":{
"listmax":{"0":"20","1":"30","2":"40"}
},
"defaults":{
"listlength":{"0":"10","1":"30","2":"30"}
},
"values":{
"type":0,"cat":0,"sub":0,"title":document.title
},

updatedeafults:function() {

}

}

var Vsite={
sitevars:{"veiltimera":0,"veiltimerb":0,"curscrollx":0,"curscrolly":0,"new":"VadCatAdsbody3","all":"VadCatAdsbody2","extra":"VadCatAdsbody4"},

sendmessage:function(n) {
var err="";
var ecnt=0;
if (document.getElementById("CNTorder"+n).checked || document.getElementById("CNTinterest"+n).checked) {
if (document.getElementById("CNTemail"+n).value.length>5 || document.getElementById("CNTphone"+n).value.length>6) {
if (!document.getElementById("CNTcallback"+n).checked || (document.getElementById("CNTcallback"+n).checked && document.getElementById("CNTphone"+n).value.length>6)) {

} else {
err=", Visszahíváshoz a telefonszámot meg kell adni"+err;
ecnt++;
}
if (document.getElementById("CNTemail"+n).value.length>5) {
if (document.getElementById("CNTemail"+n).value.indexOf("@")!=-1 && document.getElementById("CNTemail"+n).value.indexOf("@")<document.getElementById("CNTemail"+n).value.lastIndexOf(".")) {

} else {
err=", Az emailcím hibás"+err;
ecnt++;
}
}
if (!document.getElementById("CNTcallback"+n).checked && document.getElementById("CNTtext"+n).value.length>1) {

} else {
err=", Kérjük írjon üzenetet (megrendelés / kérdés)"+err;
ecnt++;
}
} else {
err=", Elérhetöséget meg kell adni"+err;
ecnt++;
}
} else {
err="megkeresés típusa (megrendelés / érdeklödés)"+err;
ecnt++;
}
if (ecnt==0) {
var ready=false;
var o="";
if (document.getElementById("CNTorder"+n).checked) {
document.getElementById("CNTsubject"+n).value=document.getElementById("CNTcontacting"+n).title;
ready=confirm("Ön most megrendeli az alabbi szolgáltatást\n\n"+document.getElementById("CNTcontacting"+n).title);
o="MEGRENDELÉS: "+document.getElementById("CNTcontacting"+n).title+"\n\n";
} else {
ready=true;
}
if (ready) {
document.getElementById("CNTtext"+n).value=o+document.getElementById("CNTtext"+n).value;
document.getElementById("CNTpage"+n).value=document.location.href;
document.getElementById("CNTcontacting"+n).submit();
}
} else {
alert("Kitöltési híbák, kérjük javítsa!\n\n("+err+")");
}
},

showveils:function(veil) {
if (this.sitevars.veiltimera!="0") {
clearTimeout(this.sitevars.veiltimera);
this.sitevars.veiltimera=0;
}
if (this.sitevars.veiltimerb!="0") {
clearTimeout(this.sitevars.veiltimerb);
this.sitevars.veiltimerb=0;
}
this.sitevars.curscrollx=(document.all)?document.body.scrollTop:window.pageXOffset;
this.sitevars.curscrolly=(document.all)?document.body.scrollTop:window.pageYOffset;
this.hideveils();
window.scrollTo(0,0);
document.body.style.overflow="hidden";
if (veil=="0") {
document.getElementById("VadBGcover1").style.display="block";
veiltimera=setTimeout('document.getElementById("VadBGcover2").style.display="block";document.getElementById("VadBGcover1").style.display="none"',300);
veiltimerb=setTimeout('document.getElementById("VadBGcover").style.display="block";document.getElementById("VadBGcover2").style.display="none"',600);
} else {
document.getElementById("VadBGcover"+veil).style.display="block";
}
},

hideveils:function() {
document.getElementById("VadBGcover").style.display="none";
document.getElementById("VadBGcover1").style.display="none";
document.getElementById("VadBGcover2").style.display="none";
document.getElementById("VadBGcoverl").style.display="none";
document.getElementById("VadBGcoveri").style.display="none";
document.getElementById("VadBGcovera").style.display="none";
document.getElementById("VadBGcovers").style.display="none";
document.body.style.overflow="auto";
window.scrollTo(0,800);
window.scrollTo(this.sitevars.curscrollx,this.sitevars.curscrolly);
},

Doaftershow:0,
TopContainerCnt:{},

showTopbox:function(veil,cnt,cntt,cnts,vad,vadl) {
Vsite.showveils(veil);
document.getElementById("VadTopContainer").style.display="block";
if (cnt==1) {
document.getElementById("VadTopContainercnt").style.display="block";
}
if (cntt==1) {
document.getElementById("VadTopContainercntt").style.display="block";
}
if (cnts==1) {
document.getElementById("VadTopContainercnts").style.display="block";
}
if (vad==1) {
document.getElementById("VadTopContainervad").style.display="block";
}
if (vadl==1) {
document.getElementById("VadTopContainervadl").style.display="block";
}
},

closeTopbox:function() {
if (document.getElementById("SLPPvideo")) {
document.getElementById("SLPPvideo").innerHTML="";
}
if (Vsite.Showaftershow!="0") {
eval(Vsite.Showaftershow);
Vsite.Showaftershow=0;
}
if (Vsite.Doaftershow!="0") {
eval(Vsite.Doaftershow);
} else {
document.getElementById("VadTopContainer").style.display="none";
document.getElementById("VadTopContainercnt").style.display="none";
document.getElementById("VadTopContainercntt").style.display="none";
document.getElementById("VadTopContainercnts").style.display="none";
document.getElementById("VadTopContainervad").style.display="none";
document.getElementById("VadTopContainervadl").style.display="none";
Vsite.hideveils();
if (document.getElementById("VadTopContainercnt").innerHTML.length>1) {
Vsite.TopContainerCnt["VadTopContainerCnt"]=document.getElementById("VadTopContainercnt").innerHTML;
}
if (document.getElementById("VadTopContainercntt").innerHTML.length>1) {
Vsite.TopContainerCnt["VadTopContainercntt"]=document.getElementById("VadTopContainercntt").innerHTML;
}
if (document.getElementById("VadTopContainercnts").innerHTML.length>1) {
Vsite.TopContainerCnt["VadTopContainercnts"]=document.getElementById("VadTopContainercnts").innerHTML;
}
//document.getElementById("VadTopContainercnt").innerHTML="";
document.getElementById("VadTopContainercntt").innerHTML="";
document.getElementById("VadTopContainercnts").innerHTML="";
}
},

initialize:function(div, url, widths, heights, scrollings, vspaces, hspaces) {  
if (document.getElementById("IF_"+div)) {
this.dropid("IF_"+div);
}
var JSiframe=document.createElement("IFRAME");  
JSiframe.id="IF_"+div;  
JSiframe.name="IF_"+div;
JSiframe.src=url;
JSiframe.width=widths;
JSiframe.height=heights;
JSiframe.frameBorder="0"
JSiframe.border="0"
JSiframe.scrolling=scrollings
JSiframe.marginWidth="0"
JSiframe.marginHeight="0"
JSiframe.vspace=vspaces;
JSiframe.hspace=hspaces;
document.getElementById(div).appendChild(JSiframe);
},

dropid:function(div) {
var Node = document.getElementById(div);
Node.parentNode.removeChild(Node);
},

makereglist:function() {
var reglist=new Array();
reglist['101']=1;
reglist['102']=2;
var result=reglist;
return result;
},

makecatlist:function() {
var catlist=new Array();
catlist['a']='a';
catlist['b']='b';
var result=catlist;
return result;
},

makesublist:function(cat) {
var result=false;
var sublist=new Array();
sublist['a']=new Array();
sublist['a']['a']='a';
sublist['a']['b']='b';
if (sublist[cat]) {
result=sublist[cat];
}
return result;
},

fillselect:function(list,divid) {
var s=document.getElementById(divid);
s.innerHTML="";
s.disabled=true;
var o=document.createElement("option");
var otxt = document.createTextNode(" ");
o.appendChild(otxt);
o.setAttribute("value", "0");
s.appendChild(o);
var b=0;
for (var a in list) {
b++;
o=document.createElement("option");
otxt=document.createTextNode(list[a]);
o.appendChild(otxt);
o.setAttribute("value", a);
s.appendChild(o);
}
if (b>0) {
s.disabled=false;
}
},

tabflip:function(place,side) {

switch(place) {
case "list-search":
if (side==1) {
//document.getElementById("VadAdseltab").className="VadAdseltabon";
document.getElementById("VadBasicsearch1").style.display="none";
document.getElementById("VadBasicsearch2").style.display="block";
} else {
//document.getElementById("VadAdseltab").className="VadAdseltaboff";
document.getElementById("VadBasicsearch1").style.display="block";
document.getElementById("VadBasicsearch2").style.display="none";
}
break;

}

},

showmem:function() {
if (Vadlist.SLPdata.listcount>0) {
document.getElementById("VadMemCnt").style.display="block";
} else {
document.getElementById("VadMemCnt").style.display="none";
}
},

hidemem:function() {
document.getElementById("VadMemCnt").style.display="none";
},

Vbuttonsound:function (sound) {
if (document.all && document.getElementById){
document.getElementById("soundeffect").src=""
document.getElementById("soundeffect").src="http://www.videohirdeto.hu/solutionlive/imglib/button"+sound+".wav";
}
},

VheadstatusBG:{"1":0,"2":0,"3":0},

headbuttonanimate:function(button) {
var b=0;
var c=50;
document.getElementById("Vheadbutton"+button+"a").style.filter="wave(add=false, freq=1, light=5, phase=1, strength=3)";
for (var a=1;a<10;a++) {
setTimeout("if(Vsite.VheadstatusBG["+button+"]==1) {document.getElementById('Vheadbutton"+button+"a').style.filter='wave(add=false, freq="+a+", light=5, phase=5, strength=3)'}",b);
setTimeout("if(Vsite.VheadstatusBG["+button+"]==1) {document.getElementById('Vheadbutton"+button+"').style.filter='progid:DXImageTransform.Microsoft.alpha(opacity="+c+");opacity:"+c/100+"';}",b);
b=b+100;
c=c+(50/10);
}
for (a;a>=0;a--) {
setTimeout("if(Vsite.VheadstatusBG["+button+"]==1) {document.getElementById('Vheadbutton"+button+"a').style.filter='wave(add=false, freq="+a+", light=5, phase=5, strength=3)'}",b);
b=b+100;
}
//setTimeout("if(Vsite.VheadstatusBG["+button+"]==1) {document.getElementById('Vheadbutton"+button+"a').style.filter=''}",b);
},

headbutton:function(button,type,dir) {
switch (type) {
case 0:
document.getElementById("Vheadbutton"+button).className="Vheadbutton"+dir+button;
if (dir==1) {
this.Vbuttonsound(1);
this.VheadstatusBG[button]=1;
this.headbuttonanimate(button);
} else {
this.VheadstatusBG[button]=0;
document.getElementById("Vheadbutton"+button+"a").style.filter="";
document.getElementById("Vheadbutton"+button).style.filter="";
}
break;
case 2:
this.headbutton(button,0,0);
window.location=document.getElementById("Vheadbutton"+button+"a").href;
break;
}
},

headhistory:function(elem,dir) {
if (dir==1) {
document.getElementById("VheadhistoryFH").style.display="none";
document.getElementById("VheadhistoryVC").style.display="none";
document.getElementById("Vheadhistory"+elem).style.display="block";
} else {
document.getElementById("Vheadhistory"+elem).style.display="none";
}
},

navbutton:function(btn, dir) {
if (dir==1) {
this.Vbuttonsound(1);
var b=0;
var c=50;
document.getElementById("VExtraBtn"+btn).style.filter="wave(add=false, freq=1, light=5, phase=1, strength=3)";
for (var a=1;a<10;a++) {
setTimeout("document.getElementById('VExtraBtn"+btn+"').style.filter='wave(add=false, freq="+a+", light=5, phase=5, strength=3)'",b);
b=b+100;
c=c+(50/10);
}
for (a;a>=0;a--) {
setTimeout("document.getElementById('VExtraBtn"+btn+"').style.filter='wave(add=false, freq="+a+", light=5, phase=5, strength=3)'",b);
b=b+100;
}
setTimeout("Vsite.navbutton("+btn+", 0)",b);
} else {
document.getElementById("VExtraBtn"+btn).style.filter="";
}
},

startpost:function() {
var call="post";
if (Vsite.sitevars.cat) {
call=Vsite.sitevars.cat;
if (Vsite.sitevars.sub) {
call=call+","+Vsite.sitevars.sub;
}
}
Vsite.initialize("VadTopContainercnts", "http://q--ld0.videohirdeto.hu/postad/0/0/videohirdeto.html", "898px", "538px", "no", "2px", "2px");
Vsite.showTopbox('i',0,0,1,1,1);
Vsite.Doaftershow="Vsite.postclose(0)";
},

startmodify:function() {
Vsite.initialize("VadTopContainercnts", "http://q--ld0.videohirdeto.hu/postad/0/8888888888/videohirdeto.html", "898px", "538px", "no", "2px", "2px");
Vsite.showTopbox('i',0,0,1,1,1);
},

postclose:function(level) {
var close=1;
if (level==0) {
var post=SLsystem.getcookievalue("VPOSTprivate");
if (post) {
if (post>8000000000 && post<8936699999) {
close=0;
var conf=confirm("A hirdetésfeladást nem fejezte be. Biztosan ki akar lépni?");
if (conf==true) {
SLsystem.setsessioncookie("VPOSTprivate",0);
close=1;
}
}
}
}
if (close==1) {
Vsite.Doaftershow=0;
Vsite.closeTopbox();
}
},

loginpage:function() {
var udat=SLsystem.getcookievalue("VPOSTuserMEMORY");
if (udat && Vsite.logincheck()) {
udat=SLsystem.cookiedecode(udat);
var udats=udat.split("§§");
var udatss=new Array();
for (var a=0;a<udats.length;a++) {
var b=udats[a].split("==");
udatss[b[0]]=b[1];
}
if (udatss["NAME"]) {
var a=document.getElementById("VadFlexUser").innerHTML;
a=a.replace("BEJELENTKEZVE",udatss["NAME"]);
document.getElementById("VadFlexUser").innerHTML=a;
}
}
},

logincheck:function() {
var a=SLsystem.getcookievalue("MEGNYIT");
var b=SLsystem.getcookievalue("MEGNYITSID");
var result=false;
if (a && b) {
if (a!="0" && a!="999" & a!="0") {
result=true;
}
}
return result;
},

logout:function(type) {
result=false;
SLsystem.deletecookie("VPOSTuserMEMORY");
SLsystem.deletecookie("MEGNYITVH");
SLsystem.deletecookie("MEGNYITSID");
SLsystem.deletecookie("Vadlistmore");
if (type==0) {
var a=SLsystem.getcookievalue("Vadlistcurr");
var b=SLsystem.getcookievalue("Vaddelcurr");
if (a || b) {
megnyitVH.savedata("memory","logout","Vsite.logout(1)");
} else {
result=true;
SLsystem.deletecookie("MEGNYIT");
}
} else if (type==1) {
SLsystem.deletecookie("MEGNYIT");
var conf=confirm("Önnek vannak elmentett/törölt hirdetései\n\nMaradjanak elérhetöek a kijelentkezés után?")
if (conf) {
//trim memory!!!

} else {
SLsystem.deletecookie("Vadlistcurr");
SLsystem.deletecookie("Vadlistcurrdat");
SLsystem.deletecookie("Vaddelcurr");
}
result=true;
_Mlogouttrue();
} else {
SLsystem.deletecookie("MEGNYIT");
result=true;
}
return result;
},

startwcm:function(type,from,sendto,copyto,bccto,format) {
this.initialize("VadTopContainercntt", "", "898px", "538px", "no", "2px", "2px");
Vsite.showTopbox('i',0,1,0,0,0);
var nh="<html><body style=\"padding:0;margin:0;text-align:center;margin-top:280px\"><MARQUEE WIDTH=\"100%\" DIRECTION=\"RIGHT\" SCROLLAMOUNT=\"40\"><div><div style=\"display:block;height:20px;width:20px;background-color:#AACCFF;float:left;margin:2px;\">&#160;</div><div style=\"display:block;height:20px;width:20px;background-color:#AAAAFF;float:left;margin:2px;\">&#160;</div><div style=\"display:block;height:20px;width:20px;background-color:#9999FF;float:left;margin:2px;\">&#160;</div><div style=\"display:block;height:20px;width:20px;background-color:#7777FF;float:left;margin:2px;\">&#160;</div><div style=\"display:block;height:20px;width:20px;background-color:#5555FF;float:left;margin:2px;\">&#160;</div><div style=\"display:block;height:20px;width:20px;background-color:#3333FF;float:left;margin:2px;\">&#160;</div><div style=\"display:block;height:20px;width:20px;background-color:#1111FF;float:left;margin:2px;\">&#160;</div><div style=\"display:block;height:20px;width:20px;background-color:#0000FF;float:left;margin:2px;\">&#160;</div><div style=\"display:block;height:20px;width:20px;background-color:#0000DD;float:left;margin:2px;\">&#160;</div><div style=\"display:block;height:20px;width:20px;background-color:#0000BB;float:left;margin:2px;\">&#160;</div><div style=\"display:block;height:20px;width:20px;background-color:#000099;float:left;margin:2px;\">&#160;</div></div></MARQUEE></body></html>";
document.getElementById("IF_VadTopContainercntt").contentWindow.document.write(nh);
document.getElementById("IF_VadTopContainercntt").contentWindow.document.close();
if (document.getElementById("IF_VadTopContainercntt")) {
setTimeout("document.getElementById('inputform').submit()",1000);
}
},

startofferaprice:function() {
Vsite.initialize("VadTopContainercnts", "http://q--ld0.videohirdeto.hu/specials/0/0/offeraprice.html", "898px", "538px", "no", "2px", "2px");
Vsite.showTopbox('i',0,0,1,1,1);
},

search:{

doonenter:function(ev, funct) {
var keyCode = ev.keyCode ? ev.keyCode : ev.which ? ev.which : ev.charCode;
if(keyCode==13){
eval(funct);
return false;
} else {
return true;
}
}

}

}

function SLRange() {
this._value = 1;
this._minimum=0;
this._maximum=4;
this._extent=0;
this._isChanging=false;
}

SLRange.prototype.setValue = function (value) {
value = Math.round(parseFloat(value));
if (isNaN(value)) return;
if (this._value != value) {
SLsliderchange(this._value, value);
if (value + this._extent > this._maximum)
this._value = this._maximum - this._extent;
else if (value < this._minimum)
this._value = this._minimum;
else
this._value = value;
if (!this._isChanging && typeof this.onchange == "function")
 this.onchange();
}
};

SLRange.prototype.getValue = function () {
return this._value;
};

SLRange.prototype.setExtent = function (extent) {
if (this._extent != extent) {
if (extent < 0)
this._extent = 0;
else if (this._value + extent > this._maximum)
this._extent = this._maximum - this._value;
else
this._extent = extent;
if (!this._isChanging && typeof this.onchange == "function")
this.onchange();
}
};

SLRange.prototype.getExtent = function () {
return this._extent;
};

SLRange.prototype.setMinimum = function (minimum) {
if (this._minimum != minimum) {
var oldIsChanging = this._isChanging;
this._isChanging = true;
this._minimum = minimum;
if (minimum > this._value)
this.setValue(minimum);
if (minimum > this._maximum) {
this._extent = 0;
this.setMaximum(minimum);
this.setValue(minimum)
}
if (minimum + this._extent > this._maximum)
this._extent = this._maximum - this._minimum;
this._isChanging = oldIsChanging;
if (!this._isChanging && typeof this.onchange == "function")
this.onchange();
}
};

SLRange.prototype.getMinimum = function () {
return this._minimum;
};

SLRange.prototype.setMaximum = function (maximum) {
if (this._maximum != maximum) {
var oldIsChanging = this._isChanging;
this._isChanging = true;
this._maximum = maximum;
if (maximum < this._value)
this.setValue(maximum - this._extent);
if (maximum < this._minimum) {
this._extent = 0;
this.setMinimum(maximum);
this.setValue(this._maximum);
}
if (maximum < this._minimum + this._extent)
this._extent = this._maximum - this._minimum;
if (maximum < this._value + this._extent)
this._extent = this._maximum - this._value;
this._isChanging = oldIsChanging;
if (!this._isChanging && typeof this.onchange == "function")
this.onchange();
}
};

SLRange.prototype.getMaximum = function () {
return this._maximum;
};

// ****************************

SLSlider.isSupported = typeof document.createElement != "undefined" &&
typeof document.documentElement != "undefined" &&
typeof document.documentElement.offsetWidth == "number";


function SLSlider(oElement, oInput, sOrientation) {
if (!oElement) return;
this._orientation = sOrientation || "horizontal";
this._range = new SLRange();
this._range.setExtent(0);
this._blockIncrement = 10;
this._unitIncrement = 1;
this._timer = new SLTimer(100);


if (SLSlider.isSupported && oElement) {

this.document = oElement.ownerDocument || oElement.document;

this.element = oElement;
this.element.SLSlider = this;
this.element.unselectable = "on";

// add class name tag to class name
this.element.className = this._orientation + " " + this.classNameTag + " " + this.element.className;

// create line
this.line = this.document.createElement("DIV");
this.line.className = "line";
this.line.unselectable = "on";
this.line.appendChild(this.document.createElement("DIV"));
this.element.appendChild(this.line);

// create handle
this.handle = this.document.createElement("DIV");
this.handle.className = "handle";
this.handle.unselectable = "on";
this.handle.appendChild(this.document.createElement("DIV"));
this.handle.firstChild.appendChild(
this.document.createTextNode(String.fromCharCode(160)));
this.element.appendChild(this.handle);
}

this.input = oInput;

// events
var oThis = this;
this._range.onchange = function () {
oThis.recalculate();
if (typeof oThis.onchange == "function")
oThis.onchange();
};

if (SLSlider.isSupported && oElement) {
this.element.onfocus= SLSlider.eventHandlers.onfocus;
this.element.onblur= SLSlider.eventHandlers.onblur;
this.element.onmousedown= SLSlider.eventHandlers.onmousedown;
this.element.onmouseover= SLSlider.eventHandlers.onmouseover;
this.element.onmouseout= SLSlider.eventHandlers.onmouseout;
this.element.onkeydown= SLSlider.eventHandlers.onkeydown;
this.element.onkeypress= SLSlider.eventHandlers.onkeypress;
this.element.onmousewheel= SLSlider.eventHandlers.onmousewheel;
this.handle.onselectstart=
this.element.onselectstart= function () { return false; };

this._timer.ontimer = function () {
oThis.ontimer();
};

// extra recalculate for ie
window.setTimeout(function() {
oThis.recalculate();
}, 1);
}
else {
this.input.onchange = function (e) {
oThis.setValue(oThis.input.value);
};
}
}

SLSlider.eventHandlers = {

// helpers to make events a bit easier
getEvent:function (e, el) {
if (!e) {
if (el)
e = el.document.parentWindow.event;
else
e = window.event;
}
if (!e.srcElement) {
var el = e.target;
while (el != null && el.nodeType != 1)
el = el.parentNode;
e.srcElement = el;
}
if (typeof e.offsetX == "undefined") {
e.offsetX = e.layerX;
e.offsetY = e.layerY;
}

return e;
},

getDocument:function (e) {
if (e.target)
return e.target.ownerDocument;
return e.srcElement.document;
},

getSLSlider:function (e) {
var el = e.target || e.srcElement;
while (el != null && el.SLSlider == null){
el = el.parentNode;
}
if (el)
return el.SLSlider;
return null;
},

getLine:function (e) {
var el = e.target || e.srcElement;
while (el != null && el.className != "line"){
el = el.parentNode;
}
return el;
},

getHandle:function (e) {
var el = e.target || e.srcElement;
var re = /handle/;
while (el != null && !re.test(el.className)){
el = el.parentNode;
}
return el;
},
// end helpers

onfocus:function (e) {
var s = this.SLSlider;
s._focused = true;
s.handle.className = "handle hover";
},

onblur:function (e) {
var s = this.SLSlider
s._focused = false;
s.handle.className = "handle";
},

onmouseover:function (e) {
e = SLSlider.eventHandlers.getEvent(e, this);
var s = this.SLSlider;
if (e.srcElement == s.handle)
s.handle.className = "handle hover";
},

onmouseout:function (e) {
e = SLSlider.eventHandlers.getEvent(e, this);
var s = this.SLSlider;
if (e.srcElement == s.handle && !s._focused)
s.handle.className = "handle";
},

onmousedown:function (e) {
e = SLSlider.eventHandlers.getEvent(e, this);
var s = this.SLSlider;
if (s.element.focus)
s.element.focus();

SLSlider._currentInstance = s;
var doc = s.document;

if (doc.addEventListener) {
doc.addEventListener("mousemove", SLSlider.eventHandlers.onmousemove, true);
doc.addEventListener("mouseup", SLSlider.eventHandlers.onmouseup, true);
}
else if (doc.attachEvent) {
doc.attachEvent("onmousemove", SLSlider.eventHandlers.onmousemove);
doc.attachEvent("onmouseup", SLSlider.eventHandlers.onmouseup);
doc.attachEvent("onlosecapture", SLSlider.eventHandlers.onmouseup);
s.element.setCapture();
}

if (SLSlider.eventHandlers.getHandle(e)) {// start drag
SLSlider._SLSliderDragData = {
screenX:e.screenX,
screenY:e.screenY,
dx:e.screenX - s.handle.offsetLeft,
dy:e.screenY - s.handle.offsetTop,
startValue:s.getValue(),
SLSlider:s
};
}
else {
var lineEl = SLSlider.eventHandlers.getLine(e);
s._mouseX = e.offsetX + (lineEl ? s.line.offsetLeft : 0);
s._mouseY = e.offsetY + (lineEl ? s.line.offsetTop : 0);
s._increasing = null;
s.ontimer();
}
},

onmousemove:function (e) {
e = SLSlider.eventHandlers.getEvent(e, this);

if (SLSlider._SLSliderDragData) {// drag
var s = SLSlider._SLSliderDragData.SLSlider;

var boundSize = s.getMaximum() - s.getMinimum();
var size, pos, reset;

if (s._orientation == "horizontal") {
size = s.element.offsetWidth - s.handle.offsetWidth;
pos = e.screenX - SLSlider._SLSliderDragData.dx;
reset = Math.abs(e.screenY - SLSlider._SLSliderDragData.screenY) > 100;
}
else {
size = s.element.offsetHeight - s.handle.offsetHeight;
pos = s.element.offsetHeight - s.handle.offsetHeight -
(e.screenY - SLSlider._SLSliderDragData.dy);
reset = Math.abs(e.screenX - SLSlider._SLSliderDragData.screenX) > 100;
}
s.setValue(reset ? SLSlider._SLSliderDragData.startValue :
s.getMinimum() + boundSize * pos / size);
return false;
}
else {
var s = SLSlider._currentInstance;
if (s != null) {
var lineEl = SLSlider.eventHandlers.getLine(e);
s._mouseX = e.offsetX + (lineEl ? s.line.offsetLeft : 0);
s._mouseY = e.offsetY + (lineEl ? s.line.offsetTop : 0);
}
}

},

onmouseup:function (e) {
e = SLSlider.eventHandlers.getEvent(e, this);
var s = SLSlider._currentInstance;
var doc = s.document;
if (doc.removeEventListener) {
doc.removeEventListener("mousemove", SLSlider.eventHandlers.onmousemove, true);
doc.removeEventListener("mouseup", SLSlider.eventHandlers.onmouseup, true);
}
else if (doc.detachEvent) {
doc.detachEvent("onmousemove", SLSlider.eventHandlers.onmousemove);
doc.detachEvent("onmouseup", SLSlider.eventHandlers.onmouseup);
doc.detachEvent("onlosecapture", SLSlider.eventHandlers.onmouseup);
s.element.releaseCapture();
}

if (SLSlider._SLSliderDragData) {// end drag
SLSlider._SLSliderDragData = null;
}
else {
s._timer.stop();
s._increasing = null;
}
SLSlider._currentInstance = null;
},

onkeydown:function (e) {
e = SLSlider.eventHandlers.getEvent(e, this);
//var s = SLSlider.eventHandlers.getSLSlider(e);
var s = this.SLSlider;
var kc = e.keyCode;
switch (kc) {
case 33:// page up
s.setValue(s.getValue() + s.getBlockIncrement());
break;
case 34:// page down
s.setValue(s.getValue() - s.getBlockIncrement());
break;
case 35:// end
s.setValue(s.getOrientation() == "horizontal" ?
s.getMaximum() :
s.getMinimum());
break;
case 36:// home
s.setValue(s.getOrientation() == "horizontal" ?
s.getMinimum() :
s.getMaximum());
break;
case 38:// up
case 39:// right
s.setValue(s.getValue() + s.getUnitIncrement());
break;

case 37:// left
case 40:// down
s.setValue(s.getValue() - s.getUnitIncrement());
break;
}

if (kc >= 33 && kc <= 40) {
return false;
}
},

onkeypress:function (e) {
e = SLSlider.eventHandlers.getEvent(e, this);
var kc = e.keyCode;
if (kc >= 33 && kc <= 40) {
return false;
}
},

onmousewheel:function (e) {
e = SLSlider.eventHandlers.getEvent(e, this);
var s = this.SLSlider;
if (s._focused) {
s.setValue(s.getValue() + e.wheelDelta / 120 * s.getUnitIncrement());
// windows inverts this on horizontal SLSliders. That does not
// make sense to me
return false;
}
}
};



SLSlider.prototype.classNameTag = "SLSlider-control",

SLSlider.prototype.setValue = function (v) {
this._range.setValue(v);
this.input.value = this.getValue();
};

SLSlider.prototype.getValue = function () {
return this._range.getValue();
};

SLSlider.prototype.setMinimum = function (v) {
this._range.setMinimum(v);
this.input.value = this.getValue();
};

SLSlider.prototype.getMinimum = function () {
return this._range.getMinimum();
};

SLSlider.prototype.setMaximum = function (v) {
this._range.setMaximum(v);
this.input.value = this.getValue();
};

SLSlider.prototype.getMaximum = function () {
return this._range.getMaximum();
};

SLSlider.prototype.setUnitIncrement = function (v) {
this._unitIncrement = v;
};

SLSlider.prototype.getUnitIncrement = function () {
return this._unitIncrement;
};

SLSlider.prototype.setBlockIncrement = function (v) {
this._blockIncrement = v;
};

SLSlider.prototype.getBlockIncrement = function () {
return this._blockIncrement;
};

SLSlider.prototype.getOrientation = function () {
return this._orientation;
};

SLSlider.prototype.setOrientation = function (sOrientation) {
if (sOrientation != this._orientation) {
if (SLSlider.isSupported && this.element) {
// add class name tag to class name
this.element.className = this.element.className.replace(this._orientation,
sOrientation);
}
this._orientation = sOrientation;
this.recalculate();

}
};

SLSlider.prototype.recalculate = function() {
if (!SLSlider.isSupported || !this.element) return;

var w = this.element.offsetWidth;
var h = this.element.offsetHeight;
var hw = this.handle.offsetWidth;
var hh = this.handle.offsetHeight;
var lw = this.line.offsetWidth;
var lh = this.line.offsetHeight;

// this assumes a border-box layout

if (this._orientation == "horizontal") {
this.handle.style.left = (w - hw) * (this.getValue() - this.getMinimum()) /
(this.getMaximum() - this.getMinimum()) + "px";
this.handle.style.top = (h - hh) / 2 + "px";

this.line.style.top = (h - lh) / 2 + "px";
this.line.style.left = hw / 2 + "px";
//this.line.style.right = hw / 2 + "px";
this.line.style.width = Math.max(0, w - hw - 2)+ "px";
this.line.firstChild.style.width = Math.max(0, w - hw - 4)+ "px";
}
else {
this.handle.style.left = (w - hw) / 2 + "px";
this.handle.style.top = h - hh - (h - hh) * (this.getValue() - this.getMinimum()) /
(this.getMaximum() - this.getMinimum()) + "px";

this.line.style.left = (w - lw) / 2 + "px";
this.line.style.top = hh / 2 + "px";
this.line.style.height = Math.max(0, h - hh - 2) + "px";//hard coded border width
//this.line.style.bottom = hh / 2 + "px";
this.line.firstChild.style.height = Math.max(0, h - hh - 4) + "px";//hard coded border width
}
};

SLSlider.prototype.ontimer = function () {
var hw = this.handle.offsetWidth;
var hh = this.handle.offsetHeight;
var hl = this.handle.offsetLeft;
var ht = this.handle.offsetTop;

if (this._orientation == "horizontal") {
if (this._mouseX > hl + hw &&
(this._increasing == null || this._increasing)) {
this.setValue(this.getValue() + this.getBlockIncrement());
this._increasing = true;
}
else if (this._mouseX < hl &&
(this._increasing == null || !this._increasing)) {
this.setValue(this.getValue() - this.getBlockIncrement());
this._increasing = false;
}
}
else {
if (this._mouseY > ht + hh &&
(this._increasing == null || !this._increasing)) {
this.setValue(this.getValue() - this.getBlockIncrement());
this._increasing = false;
}
else if (this._mouseY < ht &&
(this._increasing == null || this._increasing)) {
this.setValue(this.getValue() + this.getBlockIncrement());
this._increasing = true;
}
}

this._timer.start();
};

//***********************************

function SLTimer(nPauseTime) {
this._pauseTime = typeof nPauseTime == "undefined" ? 1000 : nPauseTime;
this._timer = null;
this._isStarted = false;
}

SLTimer.prototype.start = function () {
if (this.isStarted())
this.stop();
var oThis = this;
this._timer = window.setTimeout(function () {
if (typeof oThis.ontimer == "function")
oThis.ontimer();
}, this._pauseTime);
this._isStarted = false;
};

SLTimer.prototype.stop = function () {
if (this._timer != null)
window.clearTimeout(this._timer);
this._isStarted = false;
};

SLTimer.prototype.isStarted = function () {
return this._isStarted;
};

SLTimer.prototype.getPauseTime = function () {
return this._pauseTime;
};

SLTimer.prototype.setPauseTime = function (nPauseTime) {
this._pauseTime = nPauseTime;
};

// **************************************************

function SLsubselect(where, filter) {

//where --> which select, filter --> what is the passed id

if (where=="V_R_select2" && filter=="0") {
document.getElementById("V_R_selectbox2").style.display="none";
document.getElementById("V_R_select2").value=0;
} else if (where=="V_R_select2" && filter<1999) {
document.getElementById("V_R_selectbox2").style.display="block";
} else if (where=="V_R_select2") {
document.getElementById("V_R_selectbox2").style.display="none";
document.getElementById("V_R_select2").value=0;
}

}

function SLselectchange(what) {
if (document.getElementById("V_R_select"+what)) {
var next=what+1;
SLsubselect("V_R_select"+next, document.getElementById("V_R_select"+what).value);

//TMP
if (what==1) {
document.getElementById("V_R_select0").value="901";
}

if (document.getElementById("V_R_select"+what).value!="0") {
if (what<1) {
regslide.setValue(next);
} else {
if (what==1 && regslide.getValue()==2) {

} else {
regslide.setValue(next+1);
}
}
} else {
if (what<1) {
var sel=document.getElementById("V_R_select"+what).value;
SLclearregionselect();
document.getElementById("V_R_select0").value=sel;
regslide.setValue(what);
} else {
regslide.setValue(what);
}
}

}
}

function SLsliderchange(from, to) {

if (to>=0 && to<5) {
document.getElementById("V_R_slideoption0").className="V_Rslideoption";
document.getElementById("V_R_slideoption1").className="V_Rslideoption";
document.getElementById("V_R_slideoption2").className="V_Rslideoption";
document.getElementById("V_R_slideoption3").className="V_Rslideoption";
document.getElementById("V_R_slideoption4").className="V_Rslideoption";
document.getElementById("V_R_slideoption"+to).className="V_Rslideselected";
if (from<to) {
if (to>0 && from==0) {
document.getElementById("V_R_select0").value=901;
document.getElementById("V_R_select1").value=0;
}
if (to>1) {
document.getElementById("V_R_select1").value=0;
}
if (to>3) {
document.getElementById("V_R_select1").value=1001;
document.getElementById("V_R_selectbox2").style.display="block";
document.getElementById("V_R_select2").value=0;
}
} else {
if (from==4) {
document.getElementById("V_R_selectbox2").style.display="none";
document.getElementById("V_R_select2").value=0;
}
if (to<2) {
document.getElementById("V_R_select0").value=901;
document.getElementById("V_R_select1").value=0;
}
if (to<1) {
document.getElementById("V_R_select0").value=0;
}
}
}

}

function SLsubmitregionselect() {

var sel0=document.getElementById("V_R_select0").value;
var slide=regslide.getValue();
if (sel0>0 && slide>0) {
var selreg=0;
var sel1=document.getElementById("V_R_select1").value;
var sel2=document.getElementById("V_R_select2").value;
sel0=sel0*1;
sel1=sel1*1;
sel2=sel2*1;
if (regslide.getValue()==1 || sel1=="0") {
selreg=sel0-800;
selreg=selreg*100000;
} else if (sel1>0 && slide>1) {
selreg=sel0-800;
selreg=selreg*100000-100000;
if (sel1<1999 && sel2>"0") {
selreg=selreg+(sel1*100);
selreg=selreg+sel2-100;
} else if (sel1<1999) {
selreg=selreg+(sel1*100);
} else {
selreg=selreg+sel1;
}
if (slide=="2") {
selreg=selreg+10000000;
}
}

}

if (selreg>10099999) {
if (SLsystem.getcookievalue("vadCurrentREGION")!=selreg) {
SLsetRegion(selreg)
}
}  else {
SLclearregionselect();
}

}

function SLclearregionselect() {
if (SLsystem.getcookievalue("vadCurrentREGION")!="0") {
SLsetRegion(0);
} else {
document.getElementById("V_R_select0").value=0;
document.getElementById("V_R_select1").value=0;
document.getElementById("V_R_select2").value=0;
document.getElementById("V_R_selectbox2").style.display="none";
regslide.setValue(0);
}
}

function SLshowregiononload() {
var reg=SLsystem.getcookievalue("vadCurrentREGION");
var sel0=901;
var sel1=0;
var sel2=0;
var sel2d="none";
var slide=1;
if (reg>10099999 && reg.length==8) {

sel0="9"+""+reg.slice(1,3);
sel0=sel0*1;
sel1=reg.slice(2,6);
sel2=reg.slice(5,8);
if (sel2<200) {
sel2d="block";
slide=4;
}
if (sel2<101) {
sel2=0;
slide=1;
}

if (sel1==1000) {
sel1=0;
slide=1;
sel2d="none";
} else {
if (sel1>1001) {
sel1=sel1*100;

}
if (slide!=4) {
if (reg>20099999) {
slide=2;
} else {
slide=3;
}
}
}
if (sel0<901) {
sel0=0;
sel1=0;
sel2d="none";
}

}
regslide.setMinimum(0);
regslide.setMaximum(4);
regslide.setValue(0);
setTimeout('document.getElementById("V_R_select0").value="'+sel0+'"', 100);
setTimeout('document.getElementById("V_R_select1").value="'+sel1+'"', 130);
setTimeout('document.getElementById("V_R_selectbox2").style.display="'+sel2d+'"', 130);
setTimeout('document.getElementById("V_R_select2").value="'+sel2+'"', 150);
setTimeout('regslide.setValue('+slide+')',100);
}

function SLsetRegion(id) {
SLsystem.setsessioncookie ("vadCurrentREGION", id);
location.reload(true);
}

var elementstate=new Array();
elementstate["VadPupList"]=0;
elementstate["VadMegnavnew"]=0;
elementstate["VadMegnavmgr"]=0;
elementstate["VadMegnavreg"]=0;
elementstate["VadMegnavopn"]=0;

var currentdiv=new Array();
currentdiv["VadPupList"]=0;

function VadPupListboxswitch(show) {
var showdiv="VadPupListbody"+show;
var showclass="VadPupListhead"+show;
document.getElementById('VadPupListbody1').style.display="none";
document.getElementById('VadPupListbody2').style.display="none";
document.getElementById('VadPupListbody3').style.display="none";
document.getElementById('VadPupListhead1').className="no";
document.getElementById('VadPupListhead2').className="no";
document.getElementById('VadPupListhead3').className="no";
if (show==3) {
SLshowregiononload();
}
document.getElementById(showdiv).style.display="block";
document.getElementById(showclass).className="VadPupListheadh";
}

function VadPupListopen() {
document.getElementById('VadPupList').style.display="block";
document.getElementById('VadPupListcnt').style.display="block";
}

var Doaftercats="0";

function VadPupListclose() {
document.getElementById('VadPupList').style.display="none";
document.getElementById('VadPupListcnt').style.display="none";
elementstate["VadPupList"]=0;
if (Doaftercats!="0") {
eval(Doaftercats);
}
}


function VadPupListbutton(show) {
if (elementstate["VadPupList"]==0) {
VadPupListboxswitch(show);
VadPupListopen();
currentdiv["VadPupList"]=show;
elementstate["VadPupList"]=1;
} else if (currentdiv["VadPupList"]==show) {
VadPupListclose();
currentdiv["VadPupList"]=0;
elementstate["VadPupList"]=0;
} else {
VadPupListboxswitch(show);
currentdiv["VadPupList"]=show;
elementstate["VadPupList"]=1;
}

}


var VadGverticaloffset="0px" //horizontal offset of tooltip from anchor link
var VadGhorizontaloffset="-3px" //horizontal offset of tooltip from anchor link
var ie4=document.all
var ns6=document.getElementById&&!document.all

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function VadGgetposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function VadPupBoxadjdim(width,height) {
boxwidth=width;
boxheight=height;
if (width==0) {
var boxwidth=document.getElementById('VadPupBox');
boxwidth=boxwidth.style.width;
}
if (height==0) {
var boxheight=document.getElementById('VadPupBox');
boxheight=boxheight.style.height;
}
var cntwidth=boxwidth-10;
var cntheight=boxheight-25;
var navwidth=boxwidth-5;
cntwidth=cntwidth+"px";
cntheight=cntheight+"px";
navwidth=navwidth+"px";
document.getElementById('VadPupBoxcnt').style.width=cntwidth;
document.getElementById('VadPupBoxcnt').style.height=cntheight;
document.getElementById('VadPupBoxnav').style.width=navwidth;
}

function VadPupBoxcntfill(type,adid) {
var strrepl="[§id§]";
var types=new Array();
//alltools
types["alltools"]=new Array();
types["alltools"]["width"]=300;
types["alltools"]["height"]=100;
types["alltools"]["html"]="testtext - [§id§]";


if (type=="alltools") {
var strtorep=types["alltools"]["html"];
while (strtorep.indexOf(strrepl)>0){
strtorep=strtorep.replace(strrepl,adid);
}
types["alltools"]["htmls"]=strtorep;
}

types["warn"]=new Array();
types["warn"]["width"]=300;
types["warn"]["height"]=100;
types["warn"]["html"]="warning";
types["warn"]["htmls"]=types["warn"]["html"];

types["confirm"]=new Array();
types["confirm"]["width"]=300;
types["confirm"]["height"]=250;
types["confirm"]["html"]="confirm";
types["confirm"]["htmls"]="";

if (type=="confirm") {
var selectedbtn=new Array();
if (adid["selected"]=="1") {
//selectedbtn[1]="SELECTED=SELECTED";
selectedbtn[1]="";
selectedbtn[2]="";
} else {
//selectedbtn[2]="SELECTED=SELECTED";
selectedbtn[2]="";
selectedbtn[1]="";
}
types["confirm"]["htmls"]="<table width='100%' border='0' cellspacing='0' cellpadding='0'><tbody>";
types["confirm"]["htmls"]=types["confirm"]["htmls"]+"<tr><td align='left' valign='top' class='VadPupBoxcntG'>"+adid["text"]+"</td></tr>";
types["confirm"]["htmls"]=types["confirm"]["htmls"]+"<form><tr><td align='center' valign='middle' class='VadPupBoxcntG'><input type='button' class='VadPupBoxbtn1' "+selectedbtn[1]+" value='"+adid["button1"]+"' onClick='"+adid["onclick1"]+"'/><input type='button' class='VadPupBoxbtn2' "+selectedbtn[2]+" value='"+adid["button2"]+"' onClick='"+adid["onclick2"]+"'/></td></tr></form></tbody></table>";
}


types["info"]=new Array();
types["info"]["width"]=300;
types["info"]["height"]=100;
types["info"]["html"]="<span class='VadPupBoxcntG'>"+adid+"</span>";
types["info"]["htmls"]=types["info"]["html"];

document.getElementById('VadPupBox').style.width=types[type]["width"]+"px";
document.getElementById('VadPupBox').style.height=types[type]["height"]+"px";
VadPupBoxadjdim(types[type]["width"],types[type]["height"]);
document.getElementById('VadPupBoxcnt').innerHTML=types[type]["htmls"];
}

function VadPupBoxopen(obj, adjtop, adjleft, type, adid, close) {
VadPupBoxclose();
if (obj!="") {
var leftp=VadGgetposOffset(obj, "left")
var topp=VadGgetposOffset(obj, "top")
} else {
var leftp=140;
var topp=200;
}
leftp=leftp-adjleft;
topp=topp-adjtop;
if (leftp<1) {
leftp=140;
}
if (topp<1) {
topp=200;
}
leftp=leftp+"px";
topp=topp+"px";
VadPupBoxcntfill(type,adid);
document.getElementById('VadPupBox').style.top=topp;
document.getElementById('VadPupBox').style.left=leftp;
document.getElementById('VadPupBox').style.display="block";
if (close>999) {
setTimeout('VadPupBoxclose()',close);
}
}

function VadPupBoxclose() {
document.getElementById('VadPupBox').style.display="none";
document.getElementById('VadPupBoxcnt').innerHTML="";
}

function VcloseTopbox() {
Vsite.closeTopbox();
}
