
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/allas/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();
}


var Vsitestart={

PAGEdetails:function() {
Vsite.sitevars.cat=0;
Vsite.sitevars.sub=0;
Vsite.sitevars.cal=0;
if ("cat"=="cat") {
var catparts=document.location.pathname.split("/");
Vsite.sitevars.cat=catparts[1];
if (catparts[2]) {
Vsite.sitevars.sub=catparts[2];
} else {
Vsite.sitevars.sub=0;
}
if (catparts[3]) {
Vsite.sitevars.cal=catparts[3];
} else {
Vsite.sitevars.cal=0;
}
} else if ("cat"=="src"){
//get from cookie;
}
},

CATLISTsytle:function() {
var stylecookie=SLsystem.getcookievalue("Vcond-cats");
if (SLsystem.isdefined("Vstatus")) {
SLsystem.setsessioncookie("Vcond-cats", Vstatus);
this.CATLISTupdate(Vstatus);
} else if(stylecookie) {
this.CATLISTupdate(stylecookie);
}

},

CATLISTupdate:function(list) {
var sugcat="";
var catname="";
var catcnt=1;
var listnew=list["new"];
for (var m in listnew) {
if (document.getElementById("Catbox_"+m)) {
document.getElementById("Catbox_"+m).className=document.getElementById("Catbox_"+m).className+"n";
}
if (catcnt<8 && m.length>1) {
sugcat=sugcat+"<a href=\"/"+m+"/\" class=\"Vadsuggestn\">"+listnew[m]+"</a>";
catcnt++;
}
}

if (list.type=="all") {
for (var a in list.all) {
if (document.getElementById("Catbox_"+a)) {
document.getElementById("Catbox_"+a).className=document.getElementById("Catbox_"+a).className+"a";
}
}
} else {
// implement show numbr of ads!!!
}

if (document.getElementById("VadSuggestedcat")) {
if (catcnt>4) {
document.getElementById("VadSuggestedcat").innerHTML=sugcat;
} else {
document.getElementById("VadSuggestedcat").innerHTML=sugcat+document.getElementById("VadSuggestedcat").innerHTML;
}
}

},

PINshowleft:function() {
if (document.getElementById("VPINleft") && 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("VPINleft").innerHTML="<br>"+pin;
}
}
this.PINXshow();
},

PINshowstart:function() {
if (document.getElementById("VPINstartlow") && SLsystem.isdefined("SLPIN")) {
if (SLPIN.cnt>0) {
var pin="";
for (var a=1;a<=SLPIN.cnt;a++) {
if (SLPIN[a]) {
pin=pin+"<div class=\"pinstartbox\"><a href=\"http://www.videohirdeto.hu/"+SLPIN[a]["id"]+"\">MEGTEKINTÉS</a><img src=\""+SLPIN["url_vimage"]+SLPIN[a]["videoimg"]+"\" alt=\""+SLPIN[a]["title"]+"\"><br><span><a href=\"http://www.videohirdeto.hu/"+SLPIN[a]["id"]+"\">"+SLPIN[a]["title"]+"</a></span></div>";
}
}
var pinw=SLPIN.cnt*150;
pin="<div style=\"width:"+pinw+"px;\">"+pin+"</div>";
document.getElementById("VPINstartlow").innerHTML=pin;
}
}
this.PINXshow();
},

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;
}
},

ADLISTget:function() {
if ("cat"=="start") {
this.PINshowstart();
} else if (SLsystem.isdefined("Vstatus") && "cat"=="cat") { 
this.PINshowleft();
Vadlist.listcur["del"]={};
var deld=SLsystem.getcookievalue("Vaddelcurr");
if (deld) {
var dels=deld.split("/");
for (var a=0;a<dels.length;a++) {
Vadlist.listcur["del"][dels[a]]=dels[a];
}
}

if ("cat"=="cat") {
var savdat=SLsystem.getcookievalue("Vadlistcurrdat");
if (savdat) {
var savdats=savdat.split("/|/");
var b;
for (var a=0;a<savdats.length;a++) {
b=savdats[a].split("||");
if (SLsystem.isdefined("Vadlist")) {
if (!Vadlist.addata[b[0]]) {
Vadlist.addata[b[0]]={};
Vadlist.addata[b[0]]["iurl"]=b[1];
Vadlist.addata[b[0]]["title"]=b[2];
}
}
}
}
var saved=SLsystem.getcookievalue("Vadlistcurr");
if (saved) {
var savs=saved.split("/");
for (var b=1;b<savs.length;b++) {
if (savs[b]>8000000000) {
if (!Vadlist.listcur["del"][savs[b]] || Vadlist.listcur["del"][savs[b]]!=dels[b]) {
if (Vadlist.addata[savs[b]]) {
Vadlist.preload(savs[b]);
}
}
}
}
//setTimeout("Vadlist.checkpreload()",20000);
}

}
var starttab=Vstatus.type;
var moretabs=0;
if (document.getElementById("VHcatsubslist")) {
if (Vsite.sitevars.sub) {
if (Vsite.sitevars.sub!=0) {
moretabs=0;
}
}
}
if (moretabs==1 && (Vstatus.list["extra"]>0 || 0<50)) {
Vadlist.getlists("extra",1,Vadlist.pagelength);
Vadlist.listcur["Aextra"]={};
Vadlist.listnext["Aextra"]={};
Vadlist.listprev["Aextra"]={};
Vadlist.listcur["Aextra"]["ads"]={}
Vadlist.showpagination("extra",Vstatus.list["extra"]);
if (Vstatus.list["extra"]>0 && moretabs==1) {
starttab="extra";
}
} else if (moretabs==1) {
document.getElementById(Vsite.sitevars["extra"]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars["extra"]+"cntno").style.display="block";
document.getElementById(Vsite.sitevars["extra"]+"cnterr").style.display="none";
}
if (Vstatus.list["new"]>0 && moretabs==1) {
Vadlist.getlists("new",1,Vadlist.pagelength);
Vadlist.listcur["Anew"]={};
Vadlist.listnext["Anew"]={};
Vadlist.listprev["Anew"]={};
Vadlist.listcur["Anew"]["ads"]={}
Vadlist.showpagination("Anew",Vstatus.list["new"]);
starttab="new";
} else if (moretabs==1) {
document.getElementById(Vsite.sitevars["new"]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars["new"]+"cntno").style.display="block";
document.getElementById(Vsite.sitevars["new"]+"cnterr").style.display="none";
}
if (Vstatus.list["all"]>0) {
Vadlist.getlists("all",1,Vadlist.pagelength);
Vadlist.listcur["Aall"]={};
Vadlist.listnext["Aall"]={};
Vadlist.listprev["Aall"]={};
Vadlist.listcur["Aall"]["ads"]={}
Vadlist.showpagination("all",Vstatus.list["all"]);
} else {
document.getElementById(Vsite.sitevars["all"]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars["all"]+"cntno").style.display="block";
document.getElementById(Vsite.sitevars["all"]+"cnterr").style.display="none";
}
//switcs to tab!!;
if (starttab=="extra" && Vsite.sitevars.sub!=0) {
//VadCatAdsswitch(4);
} else if (starttab=="new" && Vsite.sitevars.sub!=0) {
//VadCatAdsswitch(3);
//VadCatAdsswitch(2);
} else {
//VadCatAdsswitch(2);
}
//for (var a in Vstatus.list) {
//if (Vstatus.list[a]==0)
//Vadlist.loadnolist(a,0,0);
//}

} else if ("cat"=="cat") {
if (document.getElementById(Vsite.sitevars["extra"]+"cnterr")) {
document.getElementById(Vsite.sitevars["extra"]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars["extra"]+"cntno").style.display="none";
document.getElementById(Vsite.sitevars["extra"]+"cnterr").style.display="block";
}
if (document.getElementById(Vsite.sitevars["new"]+"cnterr")) {
document.getElementById(Vsite.sitevars["new"]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars["new"]+"cntno").style.display="none";
document.getElementById(Vsite.sitevars["new"]+"cnterr").style.display="block";
}
document.getElementById(Vsite.sitevars["all"]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars["all"]+"cntno").style.display="none";
document.getElementById(Vsite.sitevars["all"]+"cnterr").style.display="block";
}
}




}

var Vsiteload= {

}

var Vstartfunctions={
"hirdetesfeladas":"Vsite.startpost()",
"hirdeteskezeles":"Vsite.startmodify()",
"test":"Vadlist.openadviewer"

}

function loading() {
// TMP CODE*********************************************
var intro=SLsystem.getcookievalue("Vstart-intro")
if (intro) {
if (intro=="now") {
SLshowintro();
SLsystem.setsessioncookie("Vstart-intro", 0);
}
if (startid>0) {
Vsite.Doaftershow="window.location='"+GotoUrl+"';";
}
SLsystem.setsavedcookie("Vlastvisit", 20100731, "months", 1);

//Vadlist.getlists('all',1,10);

}

// TMP CODE*********************************************

SLsystem.setsessioncookie("Vcond-session", "0")

Vsitestart.CATLISTsytle();

//if (SLsystem.isdefined("MEGNYIT")) {
//document.getElementById("Vmegnyit").style.display="block";
//}

if (document.getElementById("VHcachestart")) {
setTimeout("document.getElementById('VHcachestart').style.display='none'",7000);
}

}

function reloading() {

if (document.location.hash.length>1) {
var dohash=document.location.hash.replace(/#/,"");
var dohashes=dohash.split(";");
var dohashess=new Array();
for (var a=0;a<dohashes.length;a++) {
dohashess=dohashes[a].split(":");
if (Vstartfunctions[dohashess[0]]) {
if (dohashess[1]) {
eval(Vstartfunctions[dohashess[0]]+"("+dohashess[1]+")");
} else {
eval(Vstartfunctions[dohashess[0]]);
}
}
}
var loc=window.location.href.replace(document.location.hash,"");
//window.location=loc+"#";
} else {
Vsite.closeTopbox;
}

Vsitestart.PAGEdetails();
Vsitestart.ADLISTget();

if (SLsystem.isdefined("megnyit")) {
megnyit();
}

if (SLsystem.isdefined("HirdessVideon") && document.getElementById("VRight0C")) {
if (HirdessVideon.length>10) {
document.getElementById("VRight0C").innerHTML=HirdessVideon;
} else {
document.getElementById("VRight0").style.display="none";
}
} else if (document.getElementById("VRight0C")) {
document.getElementById("VRight0").style.display="none";
}

}

function analyzequery() {
var intro=0;
Vsite.hideveils();
}

function start() {
Vsite.hideveils();
}

VADAD={

aditem:{},
next:0,

loadad:function(adid) {
var adfile="http://q--ld0.videohirdeto.hu/loadad/"+adid+"/11/videohirdeto.sljx?"+Math.random();
if (window.XMLHttpRequest) {
SLsystem.extloadfile("js",adfile,"GET","0");
} else {
setTimeout('SLsystem.extloadfile("js","'+adfile+'","GET","0")',500);
}
}

}

var VADsel={

aditem:{},
adtitle:{},
adimg:{}

}

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,
"addata":{},
"adselect":{},
"adstart":{},
"usersetting":{"deltime":1,"savetime":7},

//-----------------------------

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);
var listfile="http://q--ld0.videohirdeto.hu/loadlist/"+call+"/"+type+","+from+","+to+"/videohirdeto.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);
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(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["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"]) {
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 adiurl=adimg;
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;
}
var totop="<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.totop("+this.Adlist["A"+type][count]["id"]+",0)\" 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>";
if (this.Adlist["A"+type][count].top!=0) {
if (page==1 && count<4) {
totop="<img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/istop.png\" border=\"0\" width=\"30\" height=\"30\"  title=\"Előrehelyezett hirdetés\">";
} else {
totop="<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.totop("+this.Adlist["A"+type][count]["id"]+",1)\" title=\"Előrehelyezés (újból)\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/istop.png\" border=\"0\" width=\"30\" height=\"30\"></a>";
}
} else if (count<3) {
totop="<img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/notop.png\" border=\"0\" width=\"30\" height=\"30\" title=\"Előrehelyezés nem lehetséges\">";
}
var xtra="border:2px solid #FFFFFF;margin-left:2px;padding-top:2px;";
if (this.Adlist["A"+type][count].extra!=0) {
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>";
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+"
var pricing="";
if (this.Adlist["A"+type][count].price) {
if (this.Adlist["A"+type][count].price!="0") {
pricing="&#160;::&#160;<b>Ár:</b>&#160;"+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;--><b>Feladva:</b>&#160;"+this.makedate(this.Adlist["A"+type][count].start)+"&#160;::&#160;<b>Lejár:</b>&#160;"+this.makedate(this.Adlist["A"+type][count].end)+"&#160;::&#160;<b>Régió:</b>&#160;"+this.Adlist["A"+type][count].regname+pricing+"</div>";
//+sum;

//var specclass=this.Adlist["A"+type][count].extra;

var addbtn="<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.add("+this.Adlist["A"+type][count]["id"]+", this)\" class=\"Vadboxtopbtn\" title=\"megtekintés később a kiválasztott hirdetések listájából\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/addtolist.png\" border=\"0\" width=\"30\" height=\"25\" id=\"Adadd"+type+this.Adlist["A"+type][count]["id"]+"\"><span>SAJÁT LISTÁBA GYÜJTÉS</span></a>";
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>";
if (Vadlist.SLPlist[this.Adlist["A"+type][count]["id"]]==1 || this.adselect[this.Adlist["A"+type][count]["id"]]) {
if (Vadlist.SLPlist[this.Adlist["A"+type][count]["id"]]==1 || this.adselect[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ÁLASZTVA</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>MEGTEKINTÉS</span></a>";
}
}
var up=0;
var upt="";
var upu="";
if (!Vadlist.addata[this.Adlist["A"+type][count]["id"]]) {
up=1;
} else if (Vadlist.addata[this.Adlist["A"+type][count]["id"]] && this.inlist[this.Adlist["A"+type][count]["id"]]) {
up=1;
upt=this.Adlist["A"+type][count].title;
upu="http://q--med.videohirdeto.hu/img/"+this.Adlist["A"+type][count].videoimg;
}
var mem=0;
if (up==1) {
Vadlist.addata[this.Adlist["A"+type][count]["id"]]={};
if (!Vadlist.addata[this.Adlist["A"+type][count]["id"]]["title"] || (Vadlist.addata[this.Adlist["A"+type][count]["id"]]["title"]!=upt)) {
Vadlist.addata[this.Adlist["A"+type][count]["id"]]["title"]=this.Adlist["A"+type][count].title;
mem++;
}
if (!Vadlist.addata[this.Adlist["A"+type][count]["id"]]["iurl"] || (Vadlist.addata[this.Adlist["A"+type][count]["id"]]["iurl"]!=upu)) {
Vadlist.addata[this.Adlist["A"+type][count]["id"]]["iurl"]="http://q--med.videohirdeto.hu/img/"+this.Adlist["A"+type][count].videoimg;
mem++;
}
if (mem>0 && Vadlist.inlist[this.Adlist["A"+type][count]["id"]]) {
Vadlist.todel(this.Adlist["A"+type][count]["id"],0);
Vadlist.tolist(this.Adlist["A"+type][count]["id"]);
}
}

if (this.Adlist["A"+type][count].video==0 && this.Adlist["A"+type][count].image==0) {
height=80;
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;<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.hide('"+type+"',"+this.Adlist["A"+type][count]["id"]+",'"+page+"',this)\"  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=\"30px\" height=\"25px\"><span>TÖRLÉS - NEM JELENIK MEG TÖBBÉ!</span></a></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)\">&#160;</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=\"VAdboxintros\">"+this.Adlist["A"+type][count].intro+"</div><div class=\"margin-top:4px;\">"+sum+"</div></td></tr>"+corpmore+"</tbody></table></div></td></tr></tbody></table></td></tr></tbody></table></div>";
//<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>
} else {
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;<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.hide('"+type+"',"+this.Adlist["A"+type][count]["id"]+",'"+page+"',this)\" 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=\"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>"+corpmore+"</tbody></table></div></td></tr></tbody></table></td></tr></tbody></table></div>";
//<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>
}
result=result+"<hr class=\"Vadboxhr\">";
}
}
}
return result;
},

preload:function(adid) {

this.tolist(adid);
//this.adboxaction.toselect(adid);
//Vadlist.addtolist(0,adid,'',1,0);
},

checkpreload:function() {
//DEPRACTED
},

adboxaction:{

add:function(adid, here){
var inl=0;
if (this.inlist) {
if (this.inlist[adid]!=0) {
inl=1;
}
}
var c=0;
for (var b in Vadlist.inlist) {
if (Vadlist.inlist[b]!=0) {
c++;
}
}
if (inl==0) {
if (c<=Vsystem.limits.listmax[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 {
VadPupBoxopen(here, '0', '200', 'info', '<span style="color:#FF0000;font-size:20px;font-weight:bold;">[!]</span>   A hirdetéslista megtelt. Kérjük töröljön a megtekinett hirdetések közül.', '4500');
}
} 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');
}
}

//var dos=0;
//var found=0;
//if (!Vadlist.adselect[adid]) {
//dos=1;
//} else if (Vadlist.adselect[adid]==0) {
//dos=1;
//}
//if (dos==1) {
//if (Vadlist.SLPdata.listcount<Vsystem.limits.listmax[0]) {
//this.tosave(adid);
//this.toselect(adid);
//if (window.XMLHttpRequest) {
//if (Vadlist.SLPdata.listcount>0) {
//if (Vadlist.SLPlisting[adid]) {
//if (Vadlist.SLPlisting[adid]!=0) {
//found=adid;
//}
//}
//}
//if (found==0) {
//Vadlist.loadvideojs('');
//} else {
//Vadlist.loadaddata(adid,9);
//}
//}
//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 {
//VadPupBoxopen(here, '0', '200', 'info', '<span style="color:#FF0000;font-size:20px;font-weight:bold;">[!]</span>   A hirdetéslista megtelt. Kérjük töröljön a megtekinett hirdetések közül.', '4500');
//}
//}
},

view:function(adid, here){
//add
var found=0;
if (VADAD.aditem[adid]) {
if (VADAD.aditem[adid]!=0) {
VADp.loadadtoviewer(adid);
found=1;
}
}
if (found==0) {
VADAD.loadad(adid);
}
},

delad:function(adid, type, ini) {
Vadlist.adselect[adid]=0;
Vadlist.listcur["del"][adid]=adid;
if (SLsystem.isdefined("VSLPs") && ini==0) {
VSLPs.deleteanad(adid);
}
if (ini==0) {
//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 deld=SLsystem.getcookievalue("Vaddelcurr");
var list="";
if (deld) {
list=deld;
}
if (list.indexOf("/"+adid)==-1) {
list=list+"/"+adid;
SLsystem.setsavedcookie("Vaddelcurr", list, "days", Vadlist.usersetting.deltime);
}
}
if (document.getElementById("Adlist"+adid)) {
document.getElementById("Adlist"+adid).innerHTML="";
Vsite.dropid("Adlist"+adid);
}
var saved=SLsystem.getcookievalue("Vadlistcurr");
if (saved && saved.indexOf("/"+adid)!=-1) {
saved=saved.replace("/"+adid, "");
SLsystem.setsavedcookie("Vadlistcurr", saved, "days", Vadlist.usersetting.savetime);
}
var savedat=SLsystem.getcookievalue("Vadlistcurrdat");
if (savedat && saved.indexOf("/|/"+adid)!=-1) {
saved=saved.replace("/|/"+adid+"||"+Vadlist.addata[adid]["iurl"]+"||"+Vadlist.addata[adid]["title"], "");
SLsystem.setsavedcookie("Vadlistcurrdat", savedat, "days", Vadlist.usersetting.savetime);
}
//var cnt=0;
//for (var a in Vadlist.adselect) {
//if (Vadlist.adselect[a]==1) {
//cnt++;
//}
//}
//if (Vadlist.SLPlist) {
//for (var b in Vadlist.SLPlist) {
//if (b!=0 && Vadlist.SLPlist[b]==1 && !Vadlist.adselect[b]) {
//cnt++;
//}
//}
//}
//Vadlist.SLPdata.listcount=cnt;
//if (cnt==0) {
//document.getElementById("VadAdseltab").className="VadMemtaboff";
//document.getElementById("VadAdseltab").innerHTML="Önnek nincs kiválasztott hirdetése";
//document.getElementById("VadAdseltab").title="Önnek nincs kiválasztott hirdetése";
//document.getElementById("VadAdselbtn").className="VadMembox";
//document.getElementById("VadMemCnt").style.display="none";
//Vsite.tabflip('list-search',0);
//} else {
//document.getElementById("Vseladcount").innerHTML="[ "+cnt+" / "+Vsystem.limits.listmax[0]+" ]";
//document.getElementById("Vseladcount").title="A hirdetéslistában "+cnt+" kiválasztott hirdetés van";
//document.getElementById("VadAdselbtn").title="A hirdetéslistában "+cnt+" kiválasztott hirdetés van";
//document.getElementById("VadAdseltab").innerHTML="Kiválasztott hirdetések";
//document.getElementById("VadAdselbtn").className="VadMemboxOn";
//}

},

hide:function(type, adid, page,here){
this.delad(adid, type, 0);
VadPupBoxopen(here, '120', '200', 'info', '<span style="color:#00FF00;font-size:20px;font-weight:bold;">[i]</span>   A hirdetés '+Vadlist.usersetting.deltime+' napig nem jelentik meg az Ön gépén!', '4500');
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.adstart!=0) {
this.view(Vadlist.adstart,0);
} else {
alert('A lejátszási lista üres! Válasszon hirdetést!')
}
},

totop:function(adid,type){
//type 1 already top, but not first
alert('Előrehelyezés a hatékonyságot növeli! Üzleti előfizetőknek elérhető...');
},

toextra:function(adid){
alert('Kiemelés a hatékonyságot növeli! Üzleti előfizetőknek 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;
SLsystem.setsavedcookie("Vadlistcurr", list, "days", Vadlist.usersetting.savetime);
datlist=datlist+"/|/"+adid+"||"+Vadlist.addata[adid]["iurl"]+"||"+Vadlist.addata[adid]["title"];
SLsystem.setsavedcookie("Vadlistcurrdat", datlist, "days", Vadlist.usersetting.savetime);
}
}
},

toselect:function(adid){
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";
}
//Vadlist.adselect[adid]=1;
//Vadlist.adstart=adid;

}


},

inlist:{},

tolist:function(adid) {
if (Vadlist.addata[adid]) {
if (!document.getElementById("adssellist"+adid)) {
if (!this.inlist[adid] || (this.inlist[adid] && this.inlist[adid]!=0)) {
if (!this.inlist[adid]) {
this.inlist[adid]=1;
}
var c=0;
for (var b in Vadlist.inlist) {
if (Vadlist.inlist[b]!=0) {
c++;
}
}
var s="";
if (c>1) {
s=document.getElementById("Fvadlist").innerHTML;
}
document.getElementById("Fvadlist").innerHTML=s+"<div id=\"adssellist"+adid+"\" class=\"Fvadladbox\"><div class=\"Fvadladtitle\">"+Vadlist.addata[adid]["title"]+"</div><div onclick=\"Vadlist.adboxaction.view("+adid+")\" style=\"background:transparent url('"+Vadlist.addata[adid]["iurl"]+"') no-repeat center center;width:160px;height:110px;\">&#160;</div><div><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"center\" valign=\"middle\" class=\"Fvadllbutton\" onclick=\"Vadlist.adboxaction.view("+adid+")\" title=\"Megtekintés\">&#160;</td><td align=\"center\" valign=\"middle\" class=\"Fvadlrbutton\" onclick=\"Vadlist.todel("+adid+",1)\" title=\"Törlés\">&#160;</td></tr></tbody></table></div></div>";
this.adboxaction.toselect(adid);
this.adboxaction.tosave(adid);
}
//autoadd, contplay, next/prev
}
}
},

todel:function(adid,type) {
var saved=SLsystem.getcookievalue("Vadlistcurr");
if (saved && saved.indexOf("/"+adid)!=-1) {
saved=saved.replace("/"+adid, "");
SLsystem.setsavedcookie("Vadlistcurr", saved, "days", Vadlist.usersetting.savetime);
}
var savedat=SLsystem.getcookievalue("Vadlistcurrdat");
if (savedat && saved.indexOf("/|/"+adid)!=-1) {
saved=saved.replace("/|/"+adid+"||"+Vadlist.addata[adid]["iurl"]+"||"+Vadlist.addata[adid]["title"], "");
SLsystem.setsavedcookie("Vadlistcurrdat", savedat, "days", Vadlist.usersetting.savetime);
}
if (type==1) {
this.inlist[adid]=0;
}
Vsite.dropid("adssellist"+adid);
var c=0;
for (var b in this.inlist) {
if (this.inlist[b]!=0) {
c++;
}
}
if (document.getElementById("Fvadlist").innerHTML.length<5 || c==0) {
document.getElementById("Fvadlist").innerHTML="Önnek nincs kiválasztott / elmentett hirdetése!";
}
},

//-----------------------------

textconvert:function(inp) {
if (inp.length>0) {
var out=inp;
out=unescape(out);
//out=decodeURIComponent(out);
return out;
}
},

loadvideojs:function(afterload) {
if(Vadlist.SLP==0 && Vadlist.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", afterload);
this.SLPBox=2;
//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');
}
},

loadaddata:function(adid,type) {
this.SLPlist[adid]=type;
this.SLPBox=2;
var adfile="http://q--ld0.videohirdeto.hu/loadad/"+adid+"/11/videohirdeto.sljx";
if (window.XMLHttpRequest) {
SLsystem.extloadfile("js",adfile,"GET","0");
} else {
setTimeout('SLsystem.extloadfile("js","'+adfile+'","GET","0")',500);
}
},

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;
this.SLPlist[adid]=9;
if (type==1){
this.SLPlist[adid]=8;
}
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 {
if (silent!=1 && manual!=0) {
//Vshowveil('s');
this.SLPlist[adid]=9;
if (type==1){
this.SLPlist[adid]=8;
}
//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/allas/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) {
if (document.getElementById("SLPoptMemory")) {
document.getElementById("SLPoptMemory").checked=false;
}
//VSLPs.insertplayer(startad);
VSLPs.viewer.playerinsert=1;
VSLPs.setnextprev(startad);
VSLPs.loadadtoviewer(startad);
//VSLPs.buildadslist();
}
if (Vadlist.SLPBox==0 || Vadlist.SLPBox==2) {
if (window.XMLHttpRequest) {
} else {
Vhideveil();
}
Vsite.showTopbox("0",1,0,0,1,0);
Vadlist.SLPBox=1;
}
SLsystem.setsessioncookie("tmpSLPmedia", 1);
SLsystem.setsessioncookie("tmpSLPview", 1);
if (this.SLPdata.listcount<2) {
document.getElementById("SLPoptPlaytype").disabled=true;
} else if (document.getElementById("SLPoptPlaytype").disabled) {
document.getElementById("SLPoptPlaytype").disabled=false;
}
if (window.XMLHttpRequest) {
Showaftershow="Vadlist.closeadviewer();";
} else {
Showaftershow="window.location.reload();";
}
},

closeadviewer:function() {
if (this.returnUrl!="0") {
window.location=this.returnUrl;
} else {
if (document.getElementById("SLPoptMemory").checked) {
VSLPs.deleteanad(Vadlist.now.vadid);
}
//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");
clearTimeout(VSLPs.changestart);
clearInterval(VSLPs.changeid);
VSLPs.changestart=0;
VSLPs.changeid=0;
}
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--;
this.adboxaction.delad(startad, '', 1,'');
}

}





Vadvote={

VPvars:"",

VPvotes:{},
VPvoted:{},

closer:0,

openvoter:function(op) {
if (!this.VPvoted[eval(this.VPvars).next]) {
clearTimeout(this.closer);
document.getElementById("Vadvote").style.display="none";
document.getElementById("Vadvotenow").style.display="block";
}
if (op==1) {
this.showtovote(0);
}
},

closevoter:function(tim) {
if (tim==0) {
document.getElementById("Vadvote").style.display="block";
document.getElementById("Vadvotenow").style.display="none";
} else {
this.closer=setTimeout("Vadvote.closevoter(0)",tim);
}
},

getvote:function(adid,vars) {
this.VPvars=vars;
if (!this.VPvotes[adid]) {
var startfile="http://q--vt0.videohirdeto.hu/"+adid+".js?"+Math.random();
SLsystem.extloadfile("js",startfile,"GET","");
} else {
this.showvote(adid);
}
},

setvote:function(adid,vote,err) {
if (err!=0 || vote>100 || vote<0) {
this.VPvotes[adid]=999;
document.getElementById("Vadvotepromo").innerHTML="Még nincs értékelve...";
} else {
this.VPvotes[adid]=vote;
if (eval(this.VPvars).next==adid) {
this.showvote(adid);
}
}
if (!this.VPvoted[adid]) {
document.getElementById("Vadtovote").style.visibility="visible";
} else {
document.getElementById("Vadtovote").style.visibility="hidden";
}
},

showvote:function(adid) {
var votebar="";
var vote=0;
if (this.VPvotes[adid] && this.VPvotes[adid]!=999) {
vote=this.VPvotes[adid];
document.getElementById("Vadvotepromo").innerHTML="<span>"+this.VPvotes[adid]+" %</span>";
} else {
document.getElementById("Vadvotepromo").innerHTML="Még nincs értékelve...";
}
vote=vote/25;
vote=Math.floor(vote);
if (vote>4) {
vote=4;
} else if (vote<0) {
vote=0;
}
for (var a=1;a<=vote;a++) {
votebar=votebar+"<li class=\"yes\">&#160;</li>";
}
for (var b=a;b<5;b++) {
votebar=votebar+"<li class=\"no\">&#160;</li>";
}
if (document.getElementById("Vadvote")) {
votebar="<ul class=\"Vadthevote\">"+votebar+"</ul>";
document.getElementById("Vadvote").innerHTML=votebar;
} 
},

showtovoter:function(adid) {
var votebar="";
for (var a=1;a<=4;a++) {
vote=a*25;
votebar=votebar+"<li id=\"Vadtovotebar"+a+"\" class=\"no\" onmouseover=\"Vadvote.showtovote("+a+")\" onclick=\"Vadvote.votenow("+adid+",vote)\">&#160;</li>";
}
//onmouseout=\"Vadvote.showtovote("+adid+",0)\" 
votebar="<ul class=\"Vadvoteing\">"+votebar+"</ul>";
document.getElementById("Vadvotenow").innerHTML=votebar;
},

showtovote:function(val) {
if (document.getElementById("Vadtovotebar4")) {
for (var a=1;a<=val;a++) {
document.getElementById("Vadtovotebar"+a).className="yes";
}
for (var b=a;b<=4;b++) {
document.getElementById("Vadtovotebar"+b).className="no";
}
}
},

votenow:function(adid, vote) {
this.closevoter();
if (!this.VPvotes[adid] || this.VPvotes[adid]==999) {
document.getElementById("Vadvotepromo").innerHTML="";
}
document.getElementById("Vadtovote").style.visibility="hidden";
this.VPvoted[adid]=vote;
document.getElementById("Vadvotepromo").style.backgroundImage="url('http://q--vt0.videohirdeto.hu/vote/"+adid+"/"+vote+"/videohirdeto.png')";
}

}

var Vadimagelist={

fillimagetab:function(adid, imgdiv){
if (VADAD.aditem[adid].body.image>0) {
var t=".png";
var u="http://q--med.videohirdeto.hu/img/";
if (VADAD.aditem[adid].header.image_format) {
t=VADAD.aditem[adid].header.image_format;
}
if (VADAD.aditem[adid].header.url_image) {
u=VADAD.aditem[adid].header.url_image;
}
var c=0;
var imgs="";
for (var a in VADAD.aditem[adid].body.imgids) {
imgs=imgs+"&#160;<img id=\"VPimgVnavl"+adid+"-"+c+"\" src=\""+u+VADAD.aditem[adid].body.imgids[a]+t+"\" border=\"0\" width=\"85\" height=\"70\" class=\"VPimglistno\" onmouseover=\"Vadimagelist.switchimg("+adid+","+c+")\" onclick=\"Vadimagelist.showlargeimg("+adid+")\">";
c++;
}
c=c*100;
var imgv="<div id=\"VPimgV"+adid+"\" class=\"VPimgbox\"><div id=\"VPimgVnav"+adid+"\" class=\"VPimgboxn\"><div id=\"VPimgVnavV"+adid+"\" class=\"VPimgboxsel\"><table border=\"0\" cellpadding=\"0\" width=\"440\" height=\"265\" cellspacing=\"0\"><tbody><tr><td width=\"440\" valign=\"middle\" align=\"center\"><img id=\"VPimgVnavVi"+adid+"\" src=\"\" border=\"0\" width=\"225\" height=\"225\"></td></tr></tbody></table></div><div id=\"VPimgVnavl"+adid+"\" class=\"VPimgboxseln\"><table border=\"0\" cellpadding=\"0\" width=\""+c+"px\" height=\"75\" cellspacing=\"0\"><tbody><tr><td width=\""+c+"px\" valign=\"middle\" align=\"left\" onmouseout=\"Vadimagelist.imgshow=setTimeout('Vadimagelist.showlargeimg("+adid+")',600)\" onmouseover=\"clearTimeout(Vadimagelist.imgshow)\">"+imgs+"</td></tr></tbody></table></div></div><div id=\"VPimgVV"+adid+"\" class=\"VPimgboxview\" title=\"Klikkeljen másik kép kiválasztásához!\" onclick=\"Vadimagelist.switchtoselect("+adid+")\"><div class=\"VPimgspace\"></div><img src=\"http://q--sli0.videohirdeto.hu/switchimgl.png\" border=\"0\" width=\"30\" height=\"30\" class=\"VPimgswitch\" usemap =\"#Vswitchmap\"><map id =\"Vswitchmap\" name=\"Vswitchmap\"><area shape =\"polygon\" coords =\"30,0,30,30,0,30\" href =\"javascript:videohirdeto()\"  onmouseover=\"Vadimagelist.imgshow=setTimeout('Vadimagelist.switchtoselect("+adid+")',600)\" onmouseout=\"clearTimeout(Vadimagelist.imgshow)\" ></map></div></div>";
document.getElementById(imgdiv).innerHTML=imgv;
//show first!!
this.switchimg(adid,0);
this.showlargeimg(adid);
}
},

switchimg:function(adid,img) {
document.getElementById("VPimgVnavVi"+adid).src=document.getElementById("VPimgVnavl"+adid+"-"+img).src;
for (var a=0;a<100;a++) {
if (document.getElementById("VPimgVnavl"+adid+"-"+a)) {
document.getElementById("VPimgVnavl"+adid+"-"+a).className="VPimglistno";
} else {
a=101;
}
}
document.getElementById("VPimgVnavl"+adid+"-"+img).className="VPimgliston";
},

imgshow:0,

showlargeimg:function(adid) {
document.getElementById("VPimgVV"+adid).style.backgroundImage="url("+document.getElementById("VPimgVnavVi"+adid).src+")";
document.getElementById("VPimgVV"+adid).style.display="block";
document.getElementById("VPimgVnav"+adid).style.display="none";
},

switchtoselect:function(adid) {
document.getElementById("VPimgVV"+adid).style.display="none";
document.getElementById("VPimgVnav"+adid).style.display="block";
clearTimeout(this.imgshow);
}

}

var VADp={

finishadload:function(adid) {
VADAD.aditem[adid]=eval("SLVADV"+adid);
VADAD.next=adid;
VADp.loadadtoviewer(adid);
},

loadadtoviewer:function(adid) {
if (VADAD.aditem[adid]) {
window.scrollTo(0,0);
this.loadtabs(adid);
document.getElementById("Vadtitle").innerHTML=VADAD.aditem[adid]["body"]["title"];
if (VADAD.aditem[adid]["body"]["video"]==0 && VADAD.aditem[adid]["body"]["sound"]==1) {
this.loadbgsound(adid);
}
this.fillright(adid);
//document.getElementById("Vadinfoleft").innerHTML="A hirdetést eddig "+this.TMPcountviewer(VADAD.aditem[adid]["header"]["viewcount"],VADAD.aditem[adid]["body"]["start"])+" látogató nézte meg";
this.showdownloadlink(adid);
if (this.adboxopen==0) {
this.origtitle=document.title;
this.loadedad=adid;

var f=0;
for (var b in Vadlist.inlist) {
if (Vadlist.inlist[b]!=0) {
if (adid==b) {
f++;
}
}
}
var sav="CHECKED";
if (f>0) {
sav="CHECKED DISABLED";
}
document.getElementById("Vadtopmenu").innerHTML="<input type=\"checkbox\" id=\"FvadSavead\" "+sav+"> Hirdetés elmentése (kiválasztott hirdetések) ";
}

this.openadbox();
}
Vadvote.getvote(adid, "VADAD");
Vadvote.showtovoter(adid);
document.title=VADAD.aditem[adid]["body"]["title"];
},

loadedad:0,

openadbox:function() {
Doaftershow="VADp.closenow()";
if (this.adboxopen==0) {
Vsite.showTopbox("0",1,0,0,1,0);
this.adboxopen=1;
}
VADp.controls.opentab(1);
},

adboxopen:0,
origtitle:"",

loadbgsound:function(adid) {

},

fillright:function(adid) {
var data="";
var cnt="<div class=\"Vadtextalt\">Ehhez a hirdetéshez nincsenek részletek</div>";
var int="";
if (VADAD.aditem[adid]["body"]["detail"].length>0) {
cnt=VADAD.aditem[adid]["body"]["detail"];
}
if (VADAD.aditem[adid]["body"]["detail"].indexOf(VADAD.aditem[adid]["body"]["intro"])==-1) {
int="<div id=\"Vadintrohead\">ÖSSZEFOGLALÓ:</div><div id=\"Vadintro\">"+VADAD.aditem[adid]["body"]["intro"]+"</div>";
}
var user="<a href=\"javascript:videohirdeto()\" onclick=\"VADp.controls.tab('right',2)\">"+VADAD.aditem[adid].body.username+"</a>";
if (VADAD.aditem[adid].body.username.length>20) {
user="<a href=\"javascript:videohirdeto()\" onclick=\"VADp.controls.tab('right',2)\">"+VADAD.aditem[adid].body.username.substring(0,20)+"...</a>";
}
var catlink="";
catlink="<a href=\"http://www.videohirdeto.hu/"+VADAD.aditem[adid].body.FHcat+"/\">"+VADAD.aditem[adid].header.cat+"</a>";
var postdate=this.makedate(VADAD.aditem[adid].body.start);
var expdate=this.makedate(VADAD.aditem[adid].body.end);
var adsurl=VADAD.aditem[adid].body.domain;
if (adsurl!="videohirdeto.hu" && adsurl!="videohirdeto.hu") {
if (adsurl.indexOf("videohirdeto.hu")!=-1) {
adsurl="videohirdeto.hu";
}
}
data="<table id=\"VadPDtld"+adid+"\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"\"><tbody><tr><td width=\"100px\" align=\"right\" valign=\"top\" class=\"VadaddataL\">Azonosító:</td><td align=\"left\" valign=\"top\" class=\"VadaddataR\">"+adid+"</td></tr><tr><td width=\"100px\" align=\"right\" valign=\"top\" class=\"VadaddataL\">URL:</td><td align=\"left\" valign=\"top\" class=\"VadaddataR\"><span>www."+adsurl+"/"+adid+"</span></td></tr><tr><td width=\"100px\" align=\"right\" valign=\"top\" class=\"VadaddataL\">Rovat:</td><td align=\"left\" valign=\"top\" class=\"VadaddataR\">"+catlink+"</td></tr><tr><td width=\"100px\" align=\"right\" valign=\"top\" class=\"VadaddataL\">Hirdet&#337;:</td><td align=\"left\" valign=\"top\" class=\"VadaddataR\">"+user+"</td></tr><tr><td width=\"100px\" align=\"right\" valign=\"top\" class=\"VadaddataL\">Frissítve:</td><td align=\"left\" valign=\"top\" class=\"VadaddataR\">"+postdate+"</td></tr><tr><td width=\"100px\" align=\"right\" valign=\"top\" class=\"VadaddataL\">Lejár:</td><td align=\"left\" valign=\"top\" class=\"VadaddataR\">"+expdate+"</td></tr></tbody></table>";
document.getElementById("Vadinfotop").innerHTML="<div id=\"Vadvadlogobox\" style=\"background-image:url('')\"></div><div id=\"Vaddatabox\">"+data+"<div class=\"VadaddataR\"><span>A hirdetést eddig "+this.TMPcountviewer(VADAD.aditem[adid]["header"]["viewcount"],VADAD.aditem[adid]["body"]["start"])+" látogató nézte meg</span></div></div>";
document.getElementById("Vadintrobox").innerHTML=int;
document.getElementById("Vadtextbox").innerHTML="<div id=\"Vadtexthead\">RÉSZLETEK:</div><div id=\"Vadtext\">"+cnt+"</div>";
document.getElementById("Vadinfobottom").innerHTML="<a href=\"http://www.videohirdeto.hu/megkereso/hirdeto/"+VADAD.aditem[adid].body.usercode+"/\">"+VADAD.aditem[adid].body.username+" összes hirdetése</a>";

var rows=1;
var contact="";
if (VADAD.aditem[adid].body.contact==1) {
contact="<tr><td align=\"left\" valign=\"top\"><a href=\"\" class=\"VadaddataBtn\">KAPCSOLATFELVÉTEL</a></td></tr>";
} else {
var admail="";
var adphone="";
var homephone="";
var workphone="";
var adfax="";
var ademail="";
var adweb="";
if (VADAD.aditem[adid].body.mail) {
if (VADAD.aditem[adid].body.mail.length>1) {
rows++;
rows++;
var tmpmail=VADAD.aditem[adid].body.mail.split("|");
if (tmpmail.length>=5) {
if (tmpmail[0]=="901") {
tmpmail[0]="Magyarország";
}
admail=tmpmail[1]+", "+tmpmail[2]+",<br>&#160;&#160;"+tmpmail[3]+" "+tmpmail[4]+" "+tmpmail[5]+".<br>&#160;&#160;"+tmpmail[0];
admail="<tr><td align=\"left\" valign=\"top\" class=\"VadaddataL\">Cím:</td></tr><tr><td align=\"left\" valign=\"top\" class=\"VadaddataRs\">&#160;&#160;"+admail+"</td></tr>";
}
}
}
if (VADAD.aditem[adid].body.phone_work || VADAD.aditem[adid].body.phone_home) {
rows++;
rows++;
if (VADAD.aditem[adid].body.phone_home) {
var tmptel="";
for (var a in VADAD.aditem[adid].body.phone_home) {
tmptel=VADAD.aditem[adid].body.phone_home[a];
adphone=adphone+"&#160;&#160;"+tmptel+"<br>";
}
var homephone=adphone;
}
tmptel="";
if (VADAD.aditem[adid].body.phone_work) {
for (var b in VADAD.aditem[adid].body.phone_work) {
tmptel=VADAD.aditem[adid].body.phone_work[b];
adphone=adphone+"&#160;&#160;"+tmptel+"<br>";
workphone=workphone+"&#160;&#160;"+tmptel+"<br>";
}
}
adphone="<tr><td align=\"left\" valign=\"top\" class=\"VadaddataL\">Telefon:</td></tr><tr><td align=\"left\" valign=\"top\" class=\"VadaddataRs\">"+adphone+"</td></tr>";
}
if (VADAD.aditem[adid].body.fax) {
if (VADAD.aditem[adid].body.fax.length>1) {
rows++;
rows++;
adfax="<tr><td align=\"left\" valign=\"top\" class=\"VadaddataL\">Telefax:</td></tr><tr><td align=\"left\" valign=\"top\" class=\"VadaddataRs\">&#160;&#160;"+VADAD.aditem[adid].body.fax+"</td></tr>";
}
}
if (VADAD.aditem[adid].body.email) {
rows++;
rows++;
for (var c in VADAD.aditem[adid].body.email) {
ademail=ademail+"&#160;&#160;<a href=\"mailto:"+VADAD.aditem[adid].body.email[c]+"&subject=http://www.videohirdeto.hu/"+adid+"\">"+VADAD.aditem[adid].body.email[c]+"</a>"+"<br>";
}
ademail="<tr><td align=\"left\" valign=\"top\" class=\"VadaddataL\">E-mail:</td></tr><tr><td align=\"left\" valign=\"top\" class=\"VadaddataRs\">"+ademail+"</td></tr>";
}
if (VADAD.aditem[adid].body.web) {
rows++;
rows++;
for (var d in VADAD.aditem[adid].body.web) {
adweb=adweb+"&#160;&#160;<a href=\"http://"+VADAD.aditem[adid].body.web[d]+"/\"  target=\"hirdetoweb_videohirdeto\">"+VADAD.aditem[adid].body.web[d]+"</a>"+"<br>";
}
adweb="<tr><td align=\"left\" valign=\"top\" class=\"VadaddataL\">Internet:</td></tr><tr><td align=\"left\" valign=\"top\" class=\"VadaddataRs\">"+adweb+"</td></tr>";
}
contact=admail+adphone+adfax+ademail+adweb;
}
var utab="Vendég";
if (VADAD.aditem[adid].body.username.length>1) {
utab=VADAD.aditem[adid].body.username;
if (VADAD.aditem[adid].body.username.length>24) {
utab="<span>"+VADAD.aditem[adid].body.username+"</span>";
}
utab=utab+"<div class=\"Vadadusers\"><a href=\"http://www.videohirdeto.hu/megkereso/hirdeto/"+VADAD.aditem[adid].body.usercode+"/\">(összes hirdetése)</a></div>";
}
var uimg="";
if (VADAD.aditem[adid].body.usercode.substring(1,2)=="0") {
uimg="http://q--sli0.videohirdeto.hu/user.png";
} else {
uimg="http://envagyok.megnyit.com/"+VADAD.aditem[adid].body.userid+".kep";
}
utab="<table id=\"VadPDtlu"+adid+"\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"\"><tbody><tr><td width=\"80px\" align=\"right\" valign=\"top\" rowspan=\""+rows+"\"><img src=\""+uimg+"\" border=\"0\" width=\"60px\" height=\"60px\"></td><td align=\"left\" valign=\"top\" height=\"80px\" class=\"Vadaduser\">"+utab+"</td></tr>"+contact+"<tr><td align=\"left\" valign=\"top\" colspan=\"2\"><!-- +++ --></td></tr></tbody></table>";
document.getElementById("Frighttab2").innerHTML=utab;

},

showdownloadlink:function(adid) {
if (VADAD.aditem[adid]["body"]["video"]==1) {
document.getElementById("Vadinfoleft").innerHTML="<input type=\"button\" class=\"Vadinfodnld\" onclick=\"VADp.controls.downloadvideo('"+adid+"');\" value=\"Film letöltése\">";
} else {
document.getElementById("Vadinfoleft").innerHTML="";
}
},



loadtabs:function(adid) {
if (VADAD.aditem[adid]) {
var left=0;
var lefttabs="";
if (VADAD.aditem[adid]["body"]["site"]==1) {
left=3;
lefttabs="<li id=\"Vlt3\" onclick=\"VADp.controls.tab('left',3)\">Minisite</li>";
}
if (VADAD.aditem[adid]["body"]["image"]>0) {
left=2;
lefttabs="<li id=\"Vlt2\" onclick=\"VADp.controls.tab('left',2)\">Képek</li>"+lefttabs;
Vadimagelist.fillimagetab(adid,"Flefttab2");
}
Vplayer.unloadplayer();
if (document.getElementById("Flefttab1")) {
document.getElementById("Flefttab1").style.display="none";
}
if (VADAD.aditem[adid]["body"]["video"]==1) {
if (this.videonotavail==0 || left==0) {
left=1;
}
var t=100;
if (VADAD.next!=0) {
t=500;
}
setTimeout("Vplayer.loadplayer("+adid+")",t);
lefttabs="<li id=\"Vlt1\" onclick=\"VADp.controls.tab('left',1)\">Videó</li>"+lefttabs;
}
lefttabs="<ul class=\"Vlefttab\">"+lefttabs+"</ul>";
document.getElementById("Flefttabs").innerHTML=lefttabs;
//document.getElementById("Flefttab"+left).style.display="block";
this.controls.tab("left",left);
document.getElementById("Frighttabs").innerHTML="<ul class=\"Vrighttab\"><li id=\"Vrt1\" onclick=\"VADp.controls.tab('right',1)\">részletek:</li><li id=\"Vrt2\" onclick=\"VADp.controls.tab('right',2)\">hirdet&#337;:</li></ul>";
//<li id=\"Vrt3\" onclick=\"VADp.controls.tab('right',3)\">opciók:</li><li id=\"Vrt4\" onclick=\"VADp.controls.tab('right',4)\">ajánlat:</li>
//document.getElementById("Frighttab1").style.display="block";
this.controls.tab("right",1);
}
},

noadshow:function() {
var a=confirm("A keresett hirdetés vagy riport nem található, vagy lejárt");
if (a) {
this.returntocat();
} else {
this.returntocat();
}
},

returntocat:function() {
window.location="http://www.videohirdeto.hu/allas/";
},

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;
},

TMPcountviewer:function(view,post) {
if (view) {
view=3.347532*view;
} else {
var today="20100731";
var diff=post*1;
diff=today-diff;
diff=diff/(1000/365);
if (diff>300) {
view=(diff-300)/2+480;
} else if (diff>210) {
view=(diff-210)*(2/3)+420;
} else if (diff>150) {
view=(diff-150)*1+360;
} else if (diff>60) {
view=(diff-60)*2+180;
} else {
view=diff*3.2;
}
}
view=Math.round(view);
return view;
},

videonotavail:0,

swicthtonexttab:function() {
this.videonotavail=1;
},

controls:{

tab:function(place,count){
var tabs=0;
var tab="";
var cnt="";
switch (place) {
case "top":
var cnt="";
tabs=0;
tab="";
var cnt="";
break;
case "left":
tabs=4;
tab="Vlt";
var cnt="Flefttab";
break;
case "right":
tabs=4;
tab="Vrt";
var cnt="Frighttab";
break;
}
if (document.getElementById(tab+count)) {
for (var a=1;a<=tabs;a++) {
if (document.getElementById(tab+a) && document.getElementById(cnt+a)) {
document.getElementById(tab+a).className="no";
document.getElementById(cnt+a).style.display="none";
}
}
document.getElementById(tab+count).className="tab";
document.getElementById(cnt+count).style.display="block";
}
},

close:function() {
Vplayer.pauseplay();
Vplayer.unloadplayer();
VcloseTopbox()
this.closenow();
},

closenow:function() {
Doaftershow=0;
VADp.adboxopen=0;
if (document.getElementById("FvadSavead")) {
if (document.getElementById("FvadSavead").checked) {
Vadlist.tolist(VADp.loadedad);
}
}
VADp.loadedad=0;
document.title=VADp.origtitle;
//document.body.style.overflow="auto";
},

opentab:function(tab) {
if (tab==0) {
Vplayer.pauseplay();
} else {
Vplayer.restartplay();
}
if (tab==1 && VADp.loadedad==0) {
var s=0;
for (var a in VADAD.aditem) {
if (s==0) {
s=a;
}
}
if (s==0) {
for (var b in Vadlist.inlist) {
if (Vadlist.inlist[b]!=0) {
if (s==0) {
s=b;
}
}
}
}
if (s==0) {
for (var c in Vadlist.addata) {
if (s==0) {
s=c;
}
}
}
if (s!=0) {
//VADp.loadadtoviewer(s);
//} else if (z!=0) {
Vadlist.adboxaction.view(s);
} else {
alert('Egy hirdetés sincs kiválasztva! A megtekintéshez egy hirdetést ki kell választani!');
}
} else {
var tabs=new Array("list","box");
document.getElementById("Fvadlisttab").style.display="none";
document.getElementById("Fvadboxtab").style.display="none";
document.getElementById("Fvad"+tabs[tab]+"tab").style.display="inline";
}
},

openadlist:function() {
Vsite.showTopbox("0",1,0,0,1,0);
Doaftershow="VADp.closenow()";
this.adboxopen=1;
var c=0;
for (var b in Vadlist.inlist) {
if (Vadlist.inlist[b]!=0) {
c++;
}
}
if (document.getElementById("Fvadlist").innerHTML.length<5 || c==0) {
document.getElementById("Fvadlist").innerHTML="Önnek nincs kiválasztott hirdetése!";
}
this.opentab(0);
},

downloadvideo:function(adid) {
if (VADAD.aditem[adid]["body"]["video"]==1) {
if (!VADAD.aditem[adid]["header"]["downloadlink"]) {
var a=Math.round(1+Math.random());
var v=".wmv";
//if (VADAD.aditem[adid].header.video_format) {
//v=VADAD.aditem[adid].header.video_format;
//}
VADAD.aditem[adid]["header"]["downloadlink"]="http://videoletoltes-"+a+".videohirdeto.hu/"+VADAD.aditem[adid]["body"]["videoid"]+""+v+"";
}
window.location=VADAD.aditem[adid]["header"]["downloadlink"];
}
}



}

}

var doplay=0;

var Vplayer={

loadplayer:function(adid) {
var vidurl=VADAD.aditem[adid].header.video_format;
var type=VADAD.aditem[adid].header.video_format;
if ((type==".wmv" && doplay==1) || type==".flv") {
this.unloadplayer();
Vsite.initialize("SLPbox", "", "440px", "365px", "no", "0", "0");
if (vidurl==".flv") {
vidurl=".swf";
var vurl=VADAD.aditem[adid].header.url_video.replace("/fl/","/videoplayer/")
vidurl=""+vurl+"1280590867."+VADAD.aditem[adid].body.videoid+".00000/VH-PLAYER"+vidurl;
} else {
vidurl=""+VADAD.aditem[adid].header.url_video+VADAD.aditem[adid].body.videoid+""+vidurl;
}
var vidid=new Date();
vidid=vidid.getTime();
vidid="SLVmp"+vidid+Math.round(Math.random()*1000);
var vp="";
var scr="";
var wmscr="function loading(){ifSLvp.status.loaded=1;}function unloading(){ifSLvp.status.loaded=2;if (document.getElementById(ifSLvp.video.player)) {ifSLvp.basics.dropid(ifSLvp.video.player);}parent.Vplayer.unloadplayer();}videohirdeto=parent.videohirdeto;var ifSLvp={basics:{setsessioncookie:function(cookieName, cookieValue) {document.cookie = escape(cookieName) + '=' + escape(cookieValue) + '; path=/' + '; domain=.';return true;},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;},dropid:function(div) {var Node = document.getElementById(div);Node.parentNode.removeChild(Node);}},video:{adid:0,player:'',url:'"+vidurl+"',vimg:'',loaddata:function() {}},controls:{videohover:function(dir) {if (ifSLvp.status.playing==0 && document.getElementById(ifSLvp.video.player).uiMode=='invisible') {var bg=new Array ('url(http://q--sli0.videohirdeto.hu/VP/SLPreplay.png)','url(http://q--sli0.videohirdeto.hu/VP/SLPreplayh.png)');document.getElementById('SLPPvideop').style.cursor='pointer';document.getElementById('SLPPvideop').style.backgroundImage=bg[dir];} else {document.getElementById('SLPPvideop').style.cursor='auto';}},videoclick:function() {if (ifSLvp.status.playing==0 && document.getElementById(ifSLvp.video.player).uiMode=='invisible') {document.getElementById(ifSLvp.video.player).uiMode='none';ifSLvp.action.startnow();}},hover:function(el,dir) {if (document.getElementById(el)) {var pos=new Array ('top center','bottom center');document.getElementById(el).style.backgroundPosition=pos[dir];}},openvolume:function(dir,wait) {wait=wait*600;clearTimeout(ifSLvp.status.volumeopen);ifSLvp.status.volumeopen=setTimeout('ifSLvp.controls.volumeboxopen('+dir+')',wait);ifSLvp.status.volumebox=dir;},volumeboxopen:function(dir) {if (dir==0 || (dir==1 && ifSLvp.status.playing!=0)) {disp=new Array ('none','block');document.getElementById('SLPvolume').style.display=disp[dir];}},setsound:function(mark) {if (ifSLvp.status.playing!=0) {ifSLvp.action.setvolume(0,mark);}},muteit:function(place) {if (ifSLvp.status.playing!=0) {ifSLvp.action.mutenow();if (ifSLvp.status.muted==0 && place==1) {document.getElementById(ifSLvp.video.player).settings.volume=5;}}},infobutton:function() {top.location='http://www.videohirdeto.info/segitseg/';},playbutton:function() {if (ifSLvp.status.interstitial!=2) {if (ifSLvp.status.playing==1) {ifSLvp.action.pausenow();} else if (ifSLvp.status.started==0) {ifSLvp.action.startnow();} else {ifSLvp.action.playnow();}}},pausebutton:function() {if (ifSLvp.status.playing!=0 && ifSLvp.status.interstitial!=2) {ifSLvp.action.pausenow();}},allowdrag:function(dir) {if (ifSLvp.status.playing==1) {if (dir==1) {document.getElementById('SLPscroller').style.cursor='e-resize';document.getElementById('SLPscrollerbg').style.cursor='e-resize';window.clearInterval(ifSLvp.status.durationcounter);} else if (dir==0) {document.getElementById('SLPscroller').style.cursor='pointer';document.getElementById('SLPscrollerbg').style.cursor='pointer';window.clearInterval(ifSLvp.status.durationcounter);setTimeout('ifSLvp.controls.allowdrag(2)',700);} else {ifSLvp.status.durationcounter=window.setInterval('ifSLvp.action.showstate()',1000);dir=0;}ifSLvp.status.dragallowed=dir;}},changeposition:function(event, drag) {if (ifSLvp.status.playing==1) {ifSLvp.action.reposition(event,drag);}},gotoposition:function(event) {if (ifSLvp.status.playing==1) {ifSLvp.action.toposition(event);}}},status:{BR:0,loaded:0,videotype:'',volumebox:0,volumeopen:0,started:0,playing:0,muted:0,interstitials:0,lastvolume:50,duration:0,durationbar:212,currentduration:0,durationcounter:0,dragposition:0,dragallowed:0,startdrag:0,allowinterstitial:0,interstitial:1, interstitialmax:22,interstitialurl:'http://q--med.videohirdeto.hu/vid/int',setinterstitial:function(ints) {if (this.allowinterstitial==1) {if (ints==0) {this.interstitial=0;} else {this.interstitial=1;}} else {this.interstitial=0;}},uniqueurl:function() {var link=0;}},auto:{useraction:function(type, nButton, nShiftState, fX, fY) {},playingstatus:function(state) {if (state) {switch (state) {case 1:ifSLvp.action.stopnow();break;case 2:ifSLvp.status.playing=2;break;case 3:ifSLvp.action.startnow();break;case 8:ifSLvp.action.stopnow();break;case 10:break;}}}},action:{calcvolumemark:function(level) {var mark=95/6;mark=(level-5)/mark;mark=Math.round(mark);return mark;},calcvolumelevel:function(mark) {var level=95/6;level=(mark*level)+5;level=Math.round(level);if (level>100) {level=100;}return level;},mutenow:function() {if (ifSLvp.status.muted==0) {ifSLvp.status.muted=1;document.getElementById('SLPsound').style.backgroundImage='url(http://q--sli0.videohirdeto.hu/VP/SLPsound0.png)';ifSLvp.status.lastvolume=document.getElementById(ifSLvp.video.player).settings.volume;document.getElementById(ifSLvp.video.player).settings.volume=0;this.showvolumebar(0,0);} else {ifSLvp.status.muted=0;document.getElementById('SLPsound').style.backgroundImage='url(http://q--sli0.videohirdeto.hu/VP/SLPsound.png)';if (ifSLvp.status.lastvolume<5) {ifSLvp.status.lastvolume=5;}document.getElementById(ifSLvp.video.player).settings.volume=ifSLvp.status.lastvolume;this.showvolumebar(ifSLvp.status.lastvolume,0);}document.getElementById(ifSLvp.video.player).settings.mute=ifSLvp.status.muted;ifSLvp.basics.setsessioncookie('tmpSLPsound',ifSLvp.status.muted+'&&'+ifSLvp.status.lastvolume);},setvolume:function(level,mark) {this.showvolumebar(level,mark);if (mark>0 && level==0) {level=this.calcvolumelevel(mark);}if (document.getElementById(ifSLvp.video.player).settings.volume!=level) {document.getElementById(ifSLvp.video.player).settings.volume=level;ifSLvp.basics.setsessioncookie('tmpSLPsound',ifSLvp.status.muted+'&&'+level);}},showvolumebar:function(level,mark) {if (mark==0 && level!=0) {mark=this.calcvolumemark(level);}for (var a=0;a<=mark;a++) {if (document.getElementById('SLPvolume'+a)) {document.getElementById('SLPvolume'+a).style.backgroundPosition='top center';}}if (mark==0) {document.getElementById('SLPvolume0').style.backgroundPosition='bottom center';} else {document.getElementById('SLPvolume0').style.backgroundPosition='top center';document.getElementById('SLPsound').style.backgroundImage='url(http://q--sli0.videohirdeto.hu/VP/SLPsound.png)';}for (var b=a;b<7;b++) {document.getElementById('SLPvolume'+b).style.backgroundPosition='bottom center';}},controlcheck:function(type) {var result=false;if (document.getElementById(ifSLvp.video.player)) {if (document.getElementById(ifSLvp.video.player).controls && ifSLvp.status.interstitials!=3) {result=true;if (ifSLvp.status.BR>='50') {result=document.getElementById(ifSLvp.video.player).controls.isAvailable(type);}}}return result;},startnow:function() {if (document.getElementById(ifSLvp.video.player).uiMode!='none') {document.getElementById(ifSLvp.video.player).uiMode='none';}ifSLvp.status.started=1;this.playnow();ifSLvp.status.playing=1;var vols=ifSLvp.basics.getcookievalue('tmpSLPsound');if (vols) {var vol=vols.split('&&');if (vol[0]==1) {document.getElementById('SLPsound').style.backgroundImage='url(http://q--sli0.videohirdeto.hu/VP/SLPsound0.png)';document.getElementById(ifSLvp.video.player).settings.volume=0;this.showvolumebar(0,0);ifSLvp.status.lastvolume=vol[1];} else {if (vol[1]<5) {vol[1]=5;}this.setvolume(vol[1],0);}} else {this.setvolume(0,3);}if (document.getElementById(ifSLvp.video.player).currentMedia) {ifSLvp.status.duration=document.getElementById(ifSLvp.video.player).currentMedia.duration;}if (ifSLvp.status.interstitial!=2) {window.clearInterval(ifSLvp.status.durationcounter);ifSLvp.status.durationcounter=window.setInterval('ifSLvp.action.showstate()',1000);}},stopnow:function() {ifSLvp.status.started=0;ifSLvp.status.playing=0;if (this.controlcheck('Stop')) {document.getElementById(ifSLvp.video.player).controls.stop();}window.clearInterval(ifSLvp.status.durationcounter);document.getElementById('SLPscroller').style.marginLeft='0px';if (ifSLvp.status.interstitial==1 && ifSLvp.status.loaded==1) {document.getElementById('SLPscrollbar').style.width=ifSLvp.status.durationbar+'px';document.getElementById('SLPscroller').style.visibility='hidden';document.getElementById('SLPtime').innerHTML='';ifSLvp.action.showinterstitial();} else {if (ifSLvp.status.interstitial==2) {ifSLvp.action.afterinterstitial();document.getElementById('SLPscroller').style.visibility='visible';}document.getElementById('SLPscrollbar').style.width='1px';document.getElementById('SLPtime').innerHTML='00:00';document.getElementById(ifSLvp.video.player).uiMode='invisible';parent.Vplayer.shownextad();}},playnow:function() {if (this.controlcheck('Play')) {document.getElementById(ifSLvp.video.player).controls.play();ifSLvp.status.playing=1;}},pausenow:function() {if (this.controlcheck('Pause')) {document.getElementById(ifSLvp.video.player).controls.pause();ifSLvp.status.playing=2;}},showstate:function() {if (document.getElementById(ifSLvp.video.player)) {if (document.getElementById(ifSLvp.video.player).controls) {var cur=document.getElementById(ifSLvp.video.player).controls.currentPosition;var tim1=0;var tim2=0;if (cur<60) {tim2=cur;} else {tim1=cur/60;tim1=Math.floor(tim1);tim2=cur-(tim1*60);}if (tim1<10) {tim1='0'+tim1;}tim2=Math.round(tim2);if (tim2<10) {tim2='0'+tim2;}if (cur>0 && ifSLvp.status.duration>0) {cur=cur/ifSLvp.status.duration;cur=ifSLvp.status.durationbar*cur;cur=Math.round(cur);if (!isNaN(cur) && cur>0 && cur<=ifSLvp.status.durationbar) {ifSLvp.status.currentduration=cur;document.getElementById('SLPscrollbar').style.width=cur+'px';document.getElementById('SLPscroller').style.marginLeft=cur+'px';document.getElementById('SLPtime').innerHTML=tim1+':'+tim2;}}}}},jumpposition:function(topercent) {if (topercent) {window.clearInterval(ifSLvp.status.durationcounter);var newp=topercent/100;newp=newp*ifSLvp.status.duration;newp=Math.round(newp);document.getElementById(ifSLvp.video.player).controls.currentPosition=newp;ifSLvp.status.currentduration=newp;ifSLvp.controls.allowdrag(0);}},toposition:function(event) {if (event) {var here=0;window.clearInterval(ifSLvp.status.durationcounter);if (event.offsetX) {here=event.offsetX;} else {var a=document.getElementById('SLPscrollerbg');while (a.offsetParent){here+= a.offsetLeft;a=a.offsetParent;}here+=a.offsetLeft;here=event.pageX-here;}here=here-14;var cur=here/ifSLvp.status.durationbar;if (cur>1) {cur=0.97;} else if (cur<0.01) {cur=0.01;}cur=cur*100;this.jumpposition(cur);}},reposition:function(event,drag) {var here=0;if (drag==0) {document.getElementById('SLPscroller').style.cursor='pointer';document.getElementById('SLPscrollerbg').style.cursor='pointer';ifSLvp.status.startdrag=0;} else if (ifSLvp.status.dragallowed!=0) {window.clearInterval(ifSLvp.status.durationcounter);document.getElementById('SLPscroller').style.cursor='e-resize';document.getElementById('SLPscrollerbg').style.cursor='e-resize';ifSLvp.status.startdrag=document.getElementById(ifSLvp.video.player).controls.currentPosition;if (event.offsetX) {here=event.offsetX;} else {var a=document.getElementById('SLPscrollerbg');while (a.offsetParent){here+= a.offsetLeft;a=a.offsetParent;}here+=a.offsetLeft;here=event.pageX-here;}ifSLvp.status.dragposition=here;if (here>0 && here<=ifSLvp.status.durationbar) {var cur=here/ifSLvp.status.durationbar;cur=cur*ifSLvp.status.duration;cur=Math.round(cur);var tim1=0;var tim2=0;if (cur<60) {tim2=cur;} else {tim1=cur/60;tim1=Math.floor(tim1);tim2=cur-(tim1*60);}if (tim1<10) {tim1='0'+tim1;}tim2=Math.round(tim2);if (tim2<10) {tim2='0'+tim2;}document.getElementById('SLPscrollbar').style.width=here+'px';document.getElementById('SLPscroller').style.marginLeft=here+'px';document.getElementById('SLPtime').innerHTML=tim1+':'+tim2;}}},getinterstitial:function(cnt) {var vid=9999;if (cnt<10) {vid=ifSLvp.status.interstitialmax-0.2;vid=0.6+Math.floor(Math.random()*vid);vid=Math.round(vid);var played=parent.Vplayer.interstitials;if (played[vid]) {if (played[vid]==1) {cnt++;vid=this.getinterstitial(cnt);}}}return vid;},showinterstitial:function() {if (ifSLvp.status.interstitial==1) {ifSLvp.status.interstitial=2;var vid=this.getinterstitial(0);if (vid==9999) {this.stopnow();} else {vid=ifSLvp.status.interstitialurl+vid+'.wmv';parent.Vplayer.interstitials[vid]=1;document.getElementById(ifSLvp.video.player).URL=vid;document.getElementById('SLPmessage').style.display='block';document.getElementById('SLPmessage').innerHTML='Kis türelmet! (Kiemelt rövidfilm lejátszás)';setTimeout('ifSLvp.action.startinterstitial()',400);}}},startinterstitial:function() {if (ifSLvp.status.interstitial==2) {document.getElementById(ifSLvp.video.player).controls.play();}},afterinterstitial:function() {ifSLvp.status.interstitial=3;document.getElementById('SLPmessage').style.display='none';document.getElementById(ifSLvp.video.player).URL=ifSLvp.video.url;document.getElementById(ifSLvp.video.player).controls.stop();}}}";
var wmvp="";
var c=Math.random()*10*adid;
c=Math.round(c);
var flvp="<object id=\""+vidid+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0\" width=\"440\" height=\"365\"><param name=\"movie\" value=\""+vidurl+"?pad="+Math.random()+"\"><param name=\"quality\" value=\"high\"><param name=\"allowScriptAccess\" value=\"sameDomain\" /><param name=\"allowFullScreen\" value=\"False\" /><embed src=\""+vidurl+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"440\" height=\"365\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"False\"></embed></object>";
if (type==".wmv") {
vp=wmvp;
scr=wmscr;
} else if (type==".flv") {
vp=flvp;
scr=wmscr;
}
var vpcnt="<html><meta http-equiv=Content-Type content=\"text/html; charset=iso-8859-2\"><meta http-equiv=\"imagetoolbar\" content=\"no\"><scr"+"ipt type=\"text/jav"+"ascript\">"+scr+"</scr"+"ipt><scr"+"ipt type=\"text/jav"+"ascript\" FOR=\""+vidid+"\"  EVENT=\"Error()\">document."+vidid+".error.clearErrorQueue();</scr"+"ipt><scr"+"ipt type=\"text/jav"+"ascript\" FOR=\""+vidid+"\" EVENT=\"PlayStateChange(NewState)\">if (NewState) {ifSLvp.auto.playingstatus(NewState);};</scr"+"ipt><scr"+"ipt type=\"text/jav"+"ascript\" FOR=\""+vidid+"\" EVENT=\"Click(nButton, nShiftState, fX, fY)\">ifSLvp.auto.useraction(\"Click\", nButton, nShiftState, fX, fY);</scr"+"ipt><scr"+"ipt type=\"text/jav"+"ascript\" FOR=\""+vidid+"\" EVENT=\"DoubleClick(nButton, nShiftState, fX, fY)\">ifSLvp.auto.useraction(\"DoubleClick\", nButton, nShiftState, fX, fY);</scr"+"ipt><head></head><body style=\"margin:0;padding:0;background-color:#000000;\" onload=\"loading()\" onunload=\"unloading()\" >"+vp+"</body></html>";
var vpwin=document.getElementById("IF_SLPbox").contentDocument;
if (vpwin == undefined || vpwin == null) {
vpwin=document.getElementById("IF_SLPbox").contentWindow.document;
}
vpwin.open();
vpwin.write(vpcnt);
vpwin.close();
this.setplayerparam(type,adid,vidid);
//NO INT!!!
} else {

}
},

unloadplayer:function() {
if (document.getElementById("IF_SLPbox")) {
Vsite.dropid("IF_SLPbox");
}
document.getElementById("SLPbox").innerHTML="";
},

setplayerparam:function(type,adid,vidid) {
if (document.getElementById("IF_SLPbox")) {
if (document.getElementById("IF_SLPbox").contentWindow.ifSLvp) {
if (document.getElementById("IF_SLPbox").contentWindow.ifSLvp.status) {
document.getElementById("IF_SLPbox").contentWindow.ifSLvp.status.videotype=type;
document.getElementById("IF_SLPbox").contentWindow.ifSLvp.status.setinterstitial(VADAD.aditem[adid].body.interstitial);
}
if (document.getElementById("IF_SLPbox").contentWindow.ifSLvp.video) {
document.getElementById("IF_SLPbox").contentWindow.ifSLvp.video.player=vidid;
document.getElementById("IF_SLPbox").contentWindow.ifSLvp.video.adid=VADAD.aditem[adid].body.videoid;
document.getElementById("IF_SLPbox").contentWindow.ifSLvp.video.loaddata();
}
}
}
},

interstitials:{},

pauseplay:function() {
if (document.getElementById("IF_SLPbox")) {
if (document.getElementById("IF_SLPbox").contentWindow.ifSLvp.status.loaded==1 && document.getElementById("IF_SLPbox").contentWindow.ifSLvp.status.videotype==".wmv") {
document.getElementById("IF_SLPbox").contentWindow.ifSLvp.controls.pausebutton();
}
}
},

restartplay:function() {
if (document.getElementById("IF_SLPbox")) {
if (document.getElementById("IF_SLPbox").contentWindow.ifSLvp.status.loaded==1 && document.getElementById("IF_SLPbox").contentWindow.ifSLvp.status.videotype==".wmv") {
if (document.getElementById("IF_SLPbox").contentWindow.ifSLvp.status.playing==2) {
document.getElementById("IF_SLPbox").contentWindow.ifSLvp.controls.playbutton();
}
}
}
},

shownextad:function() {
if (document.getElementById("IF_SLPbox").contentWindow.ifSLvp.status.loaded==1) {
//document.getElementById("IF_SLPbox").contentWindow.unloading();
//SHOW NEXT AD!!!

}
}


}
