
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/8808473257/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();
}

function loading() {
VADp.loadadtoviewer(VADAD.next);
Vadvote.getvote(VADAD.next, "VADAD");
Vsitestart.PINXshow();
}

function reloading() {

}

var Vsitestart={

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;
}
}

}

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?";
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>";
}
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);
}

}

Vadvadpage={

loaded:0,

startload:function() {
if (this.loaded!=1) {
//req pin
var file="http://q--ld0.videohirdeto.hu/pinload/vadpin/0/videohirdeto.sld";
SLsystem.extloadfile("js",file,"GET","");
var u="http://q--med.videohirdeto.hu/img/";
if (VADAD.aditem[VADAD.next].header.url_image) {
u=VADAD.aditem[VADAD.next].header.url_image;
}
document.getElementById("FBGl1R").innerHTML="<table border=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\" cellspacing=\"0\"><tbody><tr><td width=\"100%\" valign=\"middle\" align=\"center\" class=\"Vadcurr\">"+VADAD.aditem[VADAD.next]["body"]["title"]+"<br><img id=\"\" src=\""+u+VADAD.aditem[VADAD.next]["body"]["videoimg"]+"\" border=\"0\" width=\"125\" height=\"100\"></td></tr></tbody></table>";
var mem=SLsystem.getcookievalue("Vadlistcurrdat");
if (mem) {
var w=0;
var memcnt="";
var prc="";
var mems=mem.split("/|/");
var memss=new Array();
for (var a=0;a<mems.length;a++) {
memss=mems[a].split("||");
if (memss[0].length>5) {
prc="&#160;";
if (memss[3]) {
prc="Ár:&#160;"+memss[3]+"&#160;Ft";
}
memcnt=memcnt+"<div class=\"Vadmemorylist\" onclick=\"window.location='http://www.videohirdeto.hu/"+memss[0]+"'\"><img id=\"\" src=\""+memss[1]+"\" border=\"0\" width=\"105\" height=\"80\"><br>"+memss[2]+"<br><span>"+prc+"</span></div>";
w++;
}
}
w=w*230;
if (w<800) {
w=800;
}
document.getElementById("FBGl3C").innerHTML="<div class=\"Vadmemorybox\" style=\"width:"+w+"px;\">"+memcnt+"</div>";
document.getElementById("FBGl3C").style.display="block";
} else {
document.getElementById("FBGl3C").style.display="none";
}

this.loaded=1;
}
},

pinload:function() {
if (SLsystem.isdefined("SLPIN")) {
if (SLPIN.cnt>0) {
var pin="";
var b=1;
var c=1;
var hid="";
for (var a=1;a<=SLPIN.cnt;a++) {
if (SLPIN[a]) {
if (c>1) {
hid="style=\"display:none;\"";
}
if (b==1) {
pin=pin+"<div id=\"VadPIN"+c+"\" class=\"Vadpinbox\" "+hid+"><table border=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\" cellspacing=\"0\"><tbody><tr>";
}
pin=pin+"<td width=\"33%\" valign=\"top\" align=\"center\" onclick=\"window.location='http://www.videohirdeto.hu/"+SLPIN[a]["id"]+"'\"><div class=\"Vadpinitem\">MEGTEKINTÉS<br><img src=\""+SLPIN["url_vimage"]+SLPIN[a]["videoimg"]+"\" alt=\""+SLPIN[a]["title"]+"\" width=\"100px\" height=\"75px\"><br><span>"+SLPIN[a]["title"]+"</span><div></td>";
if (b==3) {
pin=pin+"</tr></tbody></table></div>";
b=1;
c++;
} else {
b++;
}
}
}
if (b==2 || b==3) {
for (var d=1;d<4;d++) {
pin=pin+"<td>&#160;</td>";
}
pin=pin+"</tr></tbody></table></div>";
c++;
}
this.maxpin=c-1;
this.curpin=1;
document.getElementById("FBGl1LM").innerHTML=pin;
}
}
},

curpin:0,
maxpin:0,

sitchpinlist:function(dir) {
var next=0;
if (dir==1) {
next=this.curpin+1;
} else {
next=this.curpin-1;
}
if (next>this.maxpin) {
next=1;
} else if (next<1) {
next=this.maxpin;
}
if (document.getElementById("VadPIN"+this.curpin) && document.getElementById("VadPIN"+next)) {
document.getElementById("VadPIN"+this.curpin).style.display="none";
document.getElementById("VadPIN"+next).style.display="block";
this.curpin=next;
}
}




}



VADAD={

aditem:{},
next:0

}

VADp={

finishadload:function(adid) {
VADAD.aditem[adid]=eval("SLVADV"+adid);
VADAD.next=adid;
},

loadadtoviewer:function(adid) {
if (VADAD.aditem[adid]) {
window.scrollTo(0,0);
this.loadtabs(adid);
document.title=VADAD.aditem[adid]["body"]["title"];
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);
Vadvote.showtovoter(adid);
}
},

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\">";
}
},

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");
}
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/8808473257/";
},

makedate:function(str) {
var newdate="";
var adate=new Array();
adate["20120208"]="Ma";
adate["20120209"]="Holnap";
adate["20120207"]="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="20120208";
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();
Vadvadpage.startload();
document.getElementById("VadBGmove").style.display="block";
document.getElementById("VadBGcover").style.display="none";
document.getElementById("VadTopContainer").style.display="none";
document.getElementById("VadTopContainercnt").style.display="none";
this.closemove();
},

closemove:function() {
var startheight=document.getElementById("VadBGmove").clientHeight;
var startwidth=document.getElementById("VadBGmove").clientWidth;
var startop=0;
var startleft=0;
var toheight=150;
var towidth=200;
var totop=156;
var toleft=(startwidth/2)+250;
var i=1000/20;
var t=i;
var h=startheight;
var w=startwidth;
var l=startleft;
var p=startop;
var dh=toheight-startheight;
var dw=towidth-startwidth;
var dp=totop-startop;
var dl=toleft-startleft;
dh=dh-dp;
dh=dh/20;
dw=dw/20;
dp=dp/20;
dl=dl/20;
for (var a=1;a<21;a++) {
h=h+dh;
w=w+dw;
p=p+dp;
l=l+dl;
h=Math.round(h);
w=Math.round(w);
p=Math.round(p);
l=Math.round(l);
if (h>=toheight && w>=towidth) {
setTimeout("document.getElementById('VadBGmove').style.height='"+h+"px'",t);
setTimeout("document.getElementById('VadBGmove').style.width='"+w+"px'",t);
setTimeout("document.getElementById('VadBGmove').style.top='"+p+"px'",t);
setTimeout("document.getElementById('VadBGmove').style.left='"+l+"px'",t);
} else {
a=100;
}
t=t+i;
}
setTimeout("VADp.controls.closenow()",t);
setTimeout("document.getElementById('VadBGmove').style.display='none'",t);
t=t+200;
setTimeout("VADp.controls.resetbg()",t);
//document.getElementById("VadBGmove").style.display="none";
},

resetbg:function() {
document.getElementById("VadBGmove").style.height="100%";
document.getElementById("VadBGmove").style.width="100%";
document.getElementById("VadBGmove").style.top="0";
document.getElementById("VadBGmove").style.left="0";
},

closenow:function() {
document.body.style.overflow="auto";
},

reopen:function() {
document.getElementById("VadBGmove").style.display="none";
document.getElementById("VadBGcover").style.display="block";
document.getElementById("VadTopContainer").style.display="block";
document.getElementById("VadTopContainercnt").style.display="block";
document.body.style.overflow="hidden";
},

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+"1328715606."+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!!!

}
}


}

