
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;
},

urlencode:function(str) {
str = escape(str);
str = str.replace("+", "%2B");
str = str.replace("%20", "+");
str = str.replace("*", "%2A");
str = str.replace("/", "%2F");
str = str.replace("@", "%40");
return str;
},

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);
}



}

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,"all":"VadCatAdsbody","tipcnt":1,"playerinsert":0},

initialize:function(div, url, widths, heights, scrollings, vspaces, hspaces) {  
if (document.getElementById("IF_"+div)) {
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);
},

veilvars:{"veiltimera":0,"veiltimerb":0,"curscrollx":0,"curscrolly":0},

showveil:function(veil) {
this.veilvars.curscrollx=(document.all)?document.body.scrollTop:window.pageXOffset;
this.veilvars.curscrolly=(document.all)?document.body.scrollTop:window.pageYOffset;
this.hideveil();
window.scrollTo(0,0);
document.body.style.overflow="hidden";
document.getElementById("VadBGcoverl").style.display="block";
},

hideveil:function() {
document.getElementById("VadBGcoverl").style.display="none";
document.body.style.overflow="auto";
window.scrollTo(0,800);
window.scrollTo(this.veilvars.curscrollx,this.veilvars.curscrolly);
},

showTopbox:function(veil,cnt,cntt,cnts,vad,vadl) {
this.showveil(veil);
document.getElementById("VadTopContainer").style.display="block";
if (cnts==1) {
document.getElementById("VadTopContainercnts").style.display="block";
}
},

Doaftershow:0,

closeTopbox:function() {
if (Vsite.Doaftershow!="0") {
eval(Vsite.Doaftershow);
} else {
document.getElementById("VadTopContainer").style.display="none";
document.getElementById("VadTopContainercnts").style.display="none";
this.hideveil();
document.getElementById("VadTopContainercnts").innerHTML="";
}
},

nexttipp:function(div) {
this.dropid("IF_"+div);
this.sitevars.tipcnt++;
this.initialize(div,"http://q--sla.videohirdeto.hu/engines/showtipp/cat/"+this.sitevars.tipcnt+"/0/","750", "60","no", 1, 1);
},

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) {
document.getElementById("soundeffect").src="";
document.getElementById("soundeffect").src="http://www.videohirdeto.hu/solutionlive/imglib/button1.wav";
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;
}
},

startentpost:function() {
var usr1=SLsystem.getcookievalue("MEGNYIT");
var usr2=SLsystem.getcookievalue("VPOSTuserMEMORY");
var start=0;
if (usr1 && usr2) {
if (usr1!=0) {
var cat=Vsite.sitevars.sub;
this.initialize("VadTopContainercnts", "http://q--ld0.videohirdeto.hu/postad/"+usr1+"/ENT-"+cat+"/ent.html", "898px", "538px", "no", "2px", "2px");
this.showTopbox('i',0,0,1,1,1);
Doaftershow="Vsite.postclose(0)";
start=1;
}
}
if (start==0) {
alert("A videófeltöltéshez bejelentkezés szükséges!\n\nKérjük jelentkezzen be!")
}
},

startdatpost:function() {
var usr1=SLsystem.getcookievalue("MEGNYIT");
var usr2=SLsystem.getcookievalue("VPOSTuserMEMORY");
var start=0;
if (usr1 && usr2) {
if (usr1!=0) {
var cat=Vsite.sitevars.sub;
this.initialize("VadTopContainercnts", "http://q--ld0.videohirdeto.hu/postad/"+usr1+"/DAT-"+cat+"/ent.html", "898px", "538px", "no", "2px", "2px");
this.showTopbox('i',0,0,1,1,1);
Doaftershow="Vsite.postclose(0)";
start=1;
}
}
if (start==0) {
alert('A funkció rövidesen elérhetö lesz!')
}
},

startnewblog:function() {
var usr1=SLsystem.getcookievalue("MEGNYIT");
var usr2=SLsystem.getcookievalue("VPOSTuserMEMORY");
var start=0;
if (usr1 && usr2) {
if (usr1!=0) {
this.initialize("VadTopContainercnts", "http://q--ld0.videohirdeto.hu/postad/"+usr1+"/BLOG-NEW/ent.html", "898px", "538px", "no", "2px", "2px");
this.showTopbox('i',0,0,1,1,1);
Doaftershow="Vsite.postclose(0)";
start=1;
}
}
if (start==0) {
alert('A funkció rövidesen elérhetö lesz!')
}
},

startblogspost:function() {
var usr1=SLsystem.getcookievalue("MEGNYIT");
var usr2=SLsystem.getcookievalue("MEGNYITVH");
var usr3=0;
var start=0;
if (usr1 && usr2) {
var uu=usr2.split("§§");
if (uu[1] && usr1!=0) {
if (uu[1]>8000000000) {
usr3=1;
}
}
}
if (usr3==1) {
var usr4=SLsystem.getcookievalue("VPOSTuserMEMORY");
if (usr4) {
var blog=0;
this.initialize("VadTopContainercnts", "http://q--ld0.videohirdeto.hu/postad/"+usr1+"/BLOGS-"+blog+"/ent.html", "898px", "538px", "no", "2px", "2px");
this.showTopbox('i',0,0,1,1,1);
Doaftershow="Vsite.postclose(0)";
start=1;
}
} else if(usr1) {
this.startnewblog();
start=1;
}
if (start==0) {
alert('A funkció rövidesen elérhetö lesz!')
}
},

postclose:function(level) {
var close=1;
if (level==0) {
var post=SLsystem.getcookievalue("VPOSTent");
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("VPOSTent",0);
close=1;
}
}
}
}
if (close==1) {
Doaftershow=0;
VcloseTopbox();
}
},

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");
result=true;
SLsystem.deletecookie("MEGNYIT");
return result;
},

loadpin:function(type) {
if (SLsystem.isdefined("SLVADPIN")) {
var a="";
for (var b in SLVADPIN.cat) {
a=a+"<a href=\"/"+b+"/\">"+SLVADPIN.cat[b]+"</a>";
}
if (a.length>1) {
a="<div class=\"Vpincat\">Info témák:"+a+"</div>";
}
var c="";
for (var d in SLVADPIN.cnt) {
c=c+"<a href=\""+SLVADPIN.cnt[d]+"\">"+d+"</a>";
}
if (c.length>1) {
c="<div class=\"Vpincnt\">Fontos információk:"+c+"</div>";
}
a=a+"<br>"+c;
if (a.length>1) {
document.getElementById("VCatAdslist2").innerHTML=a;
} else {
document.getElementById("VCatAdslist2").style.display="none";
}
} else if (type==0) {
setTimeout("Vsite.loadpin(1)",5000);
}
},

loadcat:function(type) {
if (SLsystem.isdefined("SLVADL")) {
var b=1;
var result="";
var cl="";
for (var a=1;a<31;a++) {
if (SLVADL[a]) {
cl="listitem";
if (b==1) {
result=result+"<tr>";
}
if (b==2) {
cl=cl+"m"
}
result=result+"<td align=\"center\" valign=\"top\" width=\"33%\" height=\"150px\" class=\""+cl+"\" onmouseover=\"Vsite.catlisthover(1,"+SLVADL[a]["id"]+")\" onmouseout=\"Vsite.catlisthover(0,"+SLVADL[a]["id"]+")\" onclick=\"Vsite.showadvert("+a+")\"><div class=\"listtitle\">"+SLVADL[a].title+"</div><div class=\"Vlistimg\" style=\"background:url('"+SLVADL.url_vimage+SLVADL[a].videoimg+"') center center no-repeat;\"><img id=\"Vlistview"+SLVADL[a]["id"]+"\" src=\"http://www.videohirdeto.hu/solutionlive/imglib/playnow.gif\" width=\"25\" height=\"20\" border=\"0\"></div></td>";
if (b==3) {
result=result+"</tr>";
}
b++;
if (b>3) {
b=1;
}
} else {
a=31;
}
}
if (b<3 && b>1) {
cl="listiteml";
for (var c=b;c<4;c++) {
result=result+"<td class=\""+cl+"\">&#160;</td>";
cl="";
}
result=result+"</tr>";
}
result="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"center\" colspan=\"3\" class=\"listhead\">Válogass a kategória videóiból:</td></tr>"+result+"</tbody></table>";
document.getElementById("VCatAdslist1").innerHTML=result;
if (window.location.hash.length==11) {
var adid=window.location.hash;
adid=adid.replace(/#/g, "");
if (adid>8000000000 && adid<8936686401) {
if (SLVADL[adid]) {
this.showadvert(adid);
} else {

}
}
}
}
},

catlisthover:function(dir,adid) {
var disp=new Array("block","none");
if (document.getElementById("Vlistview"+adid)) {
document.getElementById("Vlistview"+adid).style.display=disp[dir];
}
},

showadvert:function(listid) {
if (this.sitevars.playerinsert==0) {
document.getElementById("VFootMsg").innerHTML=document.getElementById("VCatAdslist21").innerHTML;
document.getElementById("VCatAdslist21").style.display="none";
document.getElementById("VFootMsg").style.display="block";
VADp.loadfirst();
}
VADp.finishadload(listid);
},

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;
}
}

}

};

var Vsitestart={

}

var Vsiteload= {

}

function loading() {

}

function reloading() {
//Vsite.loadpin(0);
if ("cat"=="cat") {
//VADp.startadplay();
Vsite.loadcat(0);
}
megnyit();
}


var Vstart=0;

var VADp={
viewer:{"OS":"0","BR":"0", "playerinsert":"0", "durationbar":"0", "counter":"0"},

loadfirst:function() {
document.getElementById("VCatAdslist22").innerHTML="<div id=\"SLPPtitle\"></div><div class=\"SLPPvid\"><div id=\"SLPPvideo\" oncontextmenu=\"return false\"></div><div id=\"SLPPsound\" oncontextmenu=\"return false\"></div><div id=\"SLPPintro\" oncontextmenu=\"return false\"></div><div id=\"SLPPvote\" oncontextmenu=\"return false\"></div><div id=\"SLPPvotes\" style=\"display:none\"></div><div id=\"SLPPuser\" oncontextmenu=\"return false\"></div></div>";
document.getElementById("VCatAdslist22").style.display="block";
},

finishadload:function(listid) {
//videoid, SLVADL[listid]["id"]
document.getElementById("SLPPtitle").innerHTML=SLVADL[listid].title;
document.getElementById("SLPPintro").innerHTML=SLVADL[listid].intro;
//document.getElementById("SLPPuser").innerHTML=SLVADL[listid];
this.showvote(SLVADL[listid]["id"]);
var start=0;
window.scrollTo(0,0);
if (this.viewer.BR=="100") {
for (var i in  navigator.plugins) {
var n=navigator.plugins[i].name;
if (n!= null && n.indexOf('Windows Media')>= 0 && n.indexOf('Microsoft')>= 0) {
document.getElementById("SLPPvideovp").style.display="block";
document.getElementById("SLPPvideono").style.display="none";
start=1;
}
}
} else {
start=1;
}


if (start==1) {

if (document.getElementById("IF_SLPPvideo")) {
Vsite.dropid("IF_SLPPvideo");
start=1000;
}

var ifurl="ent";
//"+SLVADL[listid].videoimg+"
ifurl="http://q--vid.videohirdeto.hu/slvp/"+SLVADL[listid]["id"]+"/"+SLVADL[listid].videoid+"/0/0/"+ifurl+".media";
SLsystem.setsessioncookie("tmpSLPview", 1);
if (window.XMLHttpRequest && this.viewer.BR!=41) {
setTimeout("Vsite.initialize('SLPPvideo', '"+ifurl+"', 440, 375, 'no', 0, 0)",start)
} else {
start=start+300;
setTimeout("Vsite.initialize('SLPPvideo', '"+ifurl+"', 440, 375, 'no', 0, 0)",start)
}

} else {

}

},

VPvotes:{},

getvote:function(adid) {
var startfile="http://q--vt0.videohirdeto.hu/"+adid+".js?";
SLsystem.extloadfile("js",startfile,"GET","");
},

setvote:function(adid,vote,err) {
if (err==0 || vote>100 || vote<0) {
this.VPvotes[adid]=999;
} else {
this.VPvotes[adid]=vote;
if (Vadlist.now.vadid==adid) {
this.showvote(adid);
}
}
},

showvote:function(adid) {
var votebar="";
var vote=this.VPvotes[adid];
var vval=0;
if (vote<101 && vote >=0) {
var vshow=0;
var vshows=vote/4;
vshow=vshows.floor();
vshows=vshows-vshow;
if (vshows>0.49) {
vshows=1;
} else {
vshows=0;
}
for (var a=1;a<=4;a++) {
vval=a*25;
if (a<=vshow) {
votebar=votebar+"<img src=\"http://q--sli0.videohirdeto.hu/VP/vote2.png\" width=\"25px\" height=\"20px\" border=\"0\" onclick=\"VADp.votenow("+adid+","+vval+")\" onmouseover=\"this.src='http://q--sli0.videohirdeto.hu/VP/voteit"+a+".png'\" onmouseout=\"this.src='http://q--sli0.videohirdeto.hu/VP/vote2.png'\">";
} else if (a==(vshow+1) && vshows==1) {
votebar=votebar+"<img src=\"http://q--sli0.videohirdeto.hu/VP/vote1.png\" width=\"25px\" height=\"20px\" border=\"0\" onclick=\"VADp.votenow("+adid+","+vval+")\" onmouseover=\"this.src='http://q--sli0.videohirdeto.hu/VP/voteit"+a+".png'\" onmouseout=\"this.src='http://q--sli0.videohirdeto.hu/VP/vote1.png'\">";
} else {
votebar=votebar+"<img src=\"http://q--sli0.videohirdeto.hu/VP/vote0.png\" width=\"25px\" height=\"20px\" border=\"0\" onclick=\"VADp.votenow("+adid+","+vval+")\" onmouseover=\"this.src='http://q--sli0.videohirdeto.hu/VP/voteit"+a+".png'\" onmouseout=\"this.src='http://q--sli0.videohirdeto.hu/VP/vote0.png'\">";
}
}
votebar=votebar+"("+vote+" %)";
} else {
for (var a=1;a<=4;a++) {
vval=a*25;
votebar=votebar+"<img src=\"http://q--sli0.videohirdeto.hu/VP/vote0.png\" width=\"25px\" height=\"20px\" border=\"0\" onclick=\"VADp.votenow("+adid+","+vval+")\" onmouseover=\"this.src='http://q--sli0.videohirdeto.hu/VP/voteit"+a+".png'\" onmouseout=\"this.src='http://q--sli0.videohirdeto.hu/VP/vote0.png'\">";
}
}
votebar="<img src=\"http://q--sli0.videohirdeto.hu/VP/voteitoff.png\" width=\"30px\" height=\"20px\" border=\"0\" onclick=\"VADp.votenow("+adid+",0)\" onmouseover=\"this.src='http://q--sli0.videohirdeto.hu/VP/voteit0.png'\" onmouseout=\"this.src='http://q--sli0.videohirdeto.hu/VP/voteitoff.png'\">"+votebar;
document.getElementById("SLPPvote").innerHTML=votebar;
},

votenow:function(adid, vote) {
document.getElementById("SLPPvotes").innerHTML="<img src=\"http://q--vt0.videohirdeto.hu/vote/"+adid+"/"+vote+"/videohirdeto.png\" width=\"1px\" height=\"1px\" border=\"0\">"
},

closevideo:function() {
if (VSLPs.controlcheck("Pause") && this.playstatus!=2) {
document.getElementById("SLMediaPlayer").controls.pause();
document.getElementById("SLPPvcPlaybtn").src="http://q--sli0.videohirdeto.hu/VP/playnow.gif";
this.playstatus=4;
}
document.getElementById("SLMediaPlayer").uiMode="invisible"
},
openvideo:function() {
if (VSLPs.controlcheck("Play") && this.playstatus==4) {
document.getElementById("SLMediaPlayer").controls.play();
document.getElementById("SLPPvcPlaybtn").src="http://q--sli0.videohirdeto.hu/VP/pausenow.gif";
this.playstatus=1;
}
document.getElementById("SLMediaPlayer").uiMode="none"
},
noadshow:function() {
alert('A keresett hirdetés nem található, vagy lejárt');
}
}

var Vadlist={

"SLP":0,
"SLPAdbox":0,
"SLPBox":0,
"SLPdata":{"listcount":0,"savedcount":0},
"SLPlist":{},
"SLPlisting":{},
"listcur":{},
"listnext":{},
"listprev":{},
"now":{"next":0,"prev":0,"vadid":0,"islast":0},
"Adlist":{},
"checks":{},
"returnUrl":"0",
"pagelength":10,

//-----------------------------

getlists:function(type,from,to) {
var call=Vsite.sitevars.cat+"-"+Vsite.sitevars.sub+"-"+Vsite.sitevars.cal;
var cache=Math.random()*10000;
cache=Math.round(cache);
if ("cat"=="cat") {
var listfile="http://q--ld0.videohirdeto.hu/loadlist/"+call+"/"+type+","+from+","+to+"/filmhirado.sljx?"+cache;
} else {
call="szorakoztato";
var types="cat";
var listfile="http://q--ld0.videohirdeto.hu/loadlist/"+call+"/"+types+","+from+","+to+"/filmhirado.sljx?"+cache;
}
SLsystem.extloadfile("js",listfile,"GET","0");
document.getElementById(Vsite.sitevars[type]+"cntload").style.display="block";
this.checks[type+"-"+from+"_"+to]=setTimeout("Vadlist.checkloadlist('"+type+"',"+from+","+to+")",30000);
},

checkloadlist:function(type,from,to) {
document.getElementById(Vsite.sitevars[type]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cntno").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cnterr").style.display="block";
},

loadlist:function(type,from,to) {
clearTimeout(this.checks[type+"-"+from+"_"+to]);
if (!this.Adlist["A"+type]) {
this.Adlist["A"+type]={};
}
var topage=to/Vadlist.pagelength;
topage=Math.round(topage);
document.getElementById(Vsite.sitevars[type]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cntno").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cnterr").style.display="none";
//this.listcur["A"+type]["ads"][topage]={};
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(Vsite.sitevars[type]+"cnt"+topage)) {
document.getElementById(Vsite.sitevars[type]+"cnt").innerHTML=document.getElementById(Vsite.sitevars[type]+"cnt").innerHTML+"<div id=\""+Vsite.sitevars[type]+"cnt"+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]["status"]) {
//this.Adlist["A"+type][d]["status"]=1;
//}
//["id"]
if (this.Adlist["A"+type][d]) {
content=content+this.makeadbox(type, d,topage);
}
}
if (content.length>0) {
document.getElementById(Vsite.sitevars[type]+"cnt"+topage).innerHTML=content;
//hide msg
document.getElementById(Vsite.sitevars[type]+"cnt"+topage).style.display="block";
document.getElementById(Vsite.sitevars[type]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cntno").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cnterr").style.display="none";
} else {
document.getElementById(Vsite.sitevars[type]+"cnt"+topage).style.display="none";
document.getElementById(Vsite.sitevars[type]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cntno").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cnterr").style.display="block";
}
},

loadnolist:function(type,from,to) {
//0-0: not loaded
//alert('Server Installáció Folyamatban! (0/'+Vstatus.list["all"]+')');
//var topage=to/Vadlist.pagelength;
//topage=Math.round(topage);
//if (document.getElementById(Vsite.sitevars[type]+"cnt"+topage)) {
//document.getElementById(Vsite.sitevars[type]+"cnt"+topage).style.display="none";
//}
//document.getElementById(Vsite.sitevars[type]+"cntload").style.display="none";
//document.getElementById(Vsite.sitevars[type]+"cntno").style.display="block";
//document.getElementById(Vsite.sitevars[type]+"cnterr").style.display="none";
},

showpagination:function(type,amount) {

var pagenum=Math.ceil(amount/this.pagelength);
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(Vsite.sitevars[type]+'top').innerHTML=paginatet;
document.getElementById(Vsite.sitevars[type]+'btm').innerHTML=paginateb;
document.getElementById('paginatet_'+divname+'_S').style.display="none";
document.getElementById('paginateb_'+divname+'_S').style.display="none";
document.getElementById(Vsite.sitevars[type]+'top').style.display="inline";
document.getElementById(Vsite.sitevars[type]+'btm').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;
}
}
//this.switchpagination(type, this.listcur["A"+type]["page"]);
}


},

switchpagination:function(type, topage) {
if (topage<=this.listcur["A"+type]["all"]) {
var to=this.pagelength*topage;
var from=to-this.pagelength+1;
document.getElementById(Vsite.sitevars[type]+"cnt"+this.listcur["A"+type]["page"]).style.display="none";
if (this.Adlist["A"+type][from]) {
document.getElementById(Vsite.sitevars[type]+"cnt"+topage).style.display="block";
} else {
this.listcur["A"+type]["ads"][topage]={};
this.getlists(type,from,to);
document.getElementById(Vsite.sitevars[type]+"cntload").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[""]='Ma';
adate[""]='Holnap';
adate[""]='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"]) {
if (!Vadlist.listcur["del"][this.Adlist["A"+type][count]["id"]] || Vadlist.listcur["del"][this.Adlist["A"+type][count]["id"]]!=this.Adlist["A"+type][count]["id"]) {
//Vadlist.listcur["A"+type]["ads"][page][this.Adlist["A"+type][count]["id"]]=1;
var adimg="http://q--med.videohirdeto.hu/img/"+this.Adlist["A"+type][count].videoimg;
var height=130;
var corpmore="";
if (this.Adlist["A"+type][count].usertype!=10) {
corpmore="<tr><td align=\"right\" valign=\"top\" class=\"\">&#160;</td><td align=\"left\" valign=\"top\" class=\"\" colspan=\"3\">--mr--</td></tr>";
height=180;
adimg="http://q--med.videohirdeto.hu/img/"+this.Adlist["A"+type][count].videoimg;
}
if ("cat"=="xadv") {
height=180;
}
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 || toid>86400) {
totop="<img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/istop.png\" border=\"0\" width=\"30\" height=\"30\">";
}
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\">";
}
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="";
if (this.Adlist["A"+type][count].attr){
var attr=this.Adlist["A"+type][count].attr.split(",");
for (var a=0;a<attr.length;a++) {
sum=sum+"&#160;<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.showattr("+this.Adlist["A"+type][count].attr[a]+")\">"+this.Adlist["A"+type][count].attr[a]+"</a>";
}
sum="<div class=\"VAdboxattr\">"+sum+"</div>";
}
//"+this.Adlist["A"+type][count].price+"

//sum="<div class=\"VAdboxdata\"><span>Hirdető:&#160;<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.userpage("+this.Adlist["A"+type][count].usertype+","+this.Adlist["A"+type][count]["id"]+")\">"+this.Adlist["A"+type][count].user+"</a></span>&#160;::&#160;Feladva:&#160;"+this.makedate(this.Adlist["A"+type][count].start)+"&#160;::&#160;Lejár:&#160;"+this.makedate(this.Adlist["A"+type][count].start)+"&#160;::&#160;Ár:&#160;hamarosan</div>"+sum;

var specclass=(this.Adlist["A"+type][count].usertype/1)+(this.Adlist["A"+type][count].extra/1);

var addbtn="&#160;";
var viewbtn="<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+", this)\" 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)\" 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)\" 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>";
}

if ("cat"=="cat") {
result="<div id=\"Ad"+type+this.Adlist["A"+type][count]["id"]+"\"><table width=\"800px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"right\" valign=\"bottom\" class=\"VAdboxlistnav\">"+viewbtn+"&#160;"+addbtn+"&#160;&#160;<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.hide('"+type+"',"+this.Adlist["A"+type][count]["id"]+",'"+page+"')\"  class=\"Vadboxtopbtn\" title=\"visszaállítás csak regisztrált felhasználóknak\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/hide.png\" border=\"0\" width=\"30\" height=\"25\"><span>TÖRLÉS - NEM JELENIK MEG TÖBBÉ!</span></a></td></tr><tr><td align=\"center\" valign=\"top\"><table width=\"798px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"center\" height=\""+height+"px\" valign=\"middle\" class=\"\"><div id=\"Adbox"+type+this.Adlist["A"+type][count]["id"]+"\"><table width=\"790px\" 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"]+")\">"+adimg+"</td><td align=\"left\" valign=\"top\" width=\"585px\" class=\"VAdboxbody"+this.Adlist["A"+type][count].style+"\"><div class=\"VAdboxtitle"+specclass+"\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+", this)\">"+this.Adlist["A"+type][count].title+"</div><div class=\"VAdboxintro"+specclass+"\">"+this.Adlist["A"+type][count].intro+"</div><div class=\"\">"+sum+"</div></td><td align=\"center\" valign=\"middle\" class=\"VAdboxright"+this.Adlist["A"+type][count].style+"\"><a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.help()\" title=\"Segítség, GYIK\"></a><br><a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.opt("+this.Adlist["A"+type][count].usertype+")\" title=\"Hirdetői opciók\"></a><br><!--<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.contact("+this.Adlist["A"+type][count]["id"]+")\" title=\"Kapcsolatfelvétel\"></a>--></td></tr>"+corpmore+"</tbody></table></div></td></tr></tbody></table></td></tr></tbody></table></div>";
} else {
result="<div id=\"Ad"+type+this.Adlist["A"+type][count]["id"]+"\"><table width=\"800px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"right\" valign=\"bottom\" class=\"VAdboxlistnav\">"+viewbtn+"&#160;"+addbtn+"&#160;&#160;&#160;&#160;</td></tr><tr><td align=\"center\" valign=\"top\"><table width=\"798px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"center\" height=\""+height+"px\" valign=\"middle\" class=\"\"><div id=\"Adbox"+type+this.Adlist["A"+type][count]["id"]+"\"><table width=\"790px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"center\" valign=\"top\" width=\"130px\" height=\""+height+"px\"  class=\"VAdboxIbox"+this.Adlist["A"+type][count].style+"\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+")\">"+adimg+"</td><td align=\"left\" valign=\"top\" width=\"618px\" class=\"VAdboxbody"+this.Adlist["A"+type][count].style+"\"><div class=\"VAdboxtitle"+specclass+"\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+", this)\">"+this.Adlist["A"+type][count].title+"</div><br><div class=\"VAdboxintro"+specclass+"\">"+this.Adlist["A"+type][count].intro+"</div><div class=\"\">"+sum+"</div></td><td align=\"center\" valign=\"middle\" class=\"VAdboxright"+this.Adlist["A"+type][count].style+"\"><a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.help()\" title=\"Segítség, GYIK\"></a><br><a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.opt("+this.Adlist["A"+type][count].usertype+")\" title=\"Hirdetői opciók\"></a><br><!--<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.contact("+this.Adlist["A"+type][count]["id"]+")\" title=\"Kapcsolatfelvétel\"></a>--></td></tr>"+corpmore+"</tbody></table></div></td></tr></tbody></table></td></tr></tbody></table></div>";

}

}
}
}
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){
this.tosave(adid);
this.toselect(adid);
Vadlist.addtolist(0,adid,here,0,1);
},

view:function(adid, here){
//this.tosave(adid);
//this.toselect(adid);
//Vadlist.addtolist(1,adid,'',0,1);
var loc=top.location.hostname;
if ("cat"!="cat") {
//loc="www.filmhirado.hu";
}
top.location=top.location.protocol+"//"+loc+""+top.location.pathname+""+adid+".blog";
},

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", 7);
}
},

hide:function(type, adid, page){
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);
}
}
},

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 list="";
if (saved) {
list=saved;
}
if (list.indexOf("/"+adid)==-1) {
list=list+"/"+adid;
SLsystem.setsavedcookie("Vadlistcurr", list, "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/szorakoztato/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--;
}

}

