

function newplayer() {
VshowTopbox('',1,0,0,1,0)

}


//BUST FRAMES
var frameallow=0;

if (frameallow==0) {
if (self.parent.frames.length!=0) {
self.parent.location="/";
}
}

//CHECK browser
var browser=navigator.userAgent;
var Vbrowser=0; //0=IE!!
if (browser.indexOf("MS")==-1) {
Vbrowser=1;
if (browser.indexOf("Firefox")==-1 && browser.indexOf("Netscape")==-1 && browser.indexOf("Gecko")==-1) {
Vbrowser=2;
}
}

//**************************************

function VadVPload(adid, type, here) {
//if (window.XMLHttpRequest) {
Vadlist.addtolist(type,adid,here,0);
//} else {
//setTimeout("window.location='http://"+window.location.hostname+"/"+adid+"'",300);
//}
}
function videohirdeto_hu() {

}


//**************************************

//CHECK URL#
var curtab="0";
var RequestUrl=window.location.href;
var startid=0;
var GotoUrl="http://www.videoadsweb.com/";
var todaycode="MjAxMjAyMDQ=";
var Doaftershow="0";

var curpage=new Array();
curpage["all"]=0;
curpage["ent"]=0;
curpage["new"]=0;
curpage["extra"]=0;
curpage["save"]=0;
curpage["search"]=0;
curpage["extrasearch"]=0;
curpage["savesearch"]=0;

var istab=new Array();
istab["all"]=1;
istab["ent"]=1;
istab["new"]=1;
istab["extra"]=1;
istab["save"]=1;

var tabname=new Array();
tabname["start"]=new Array();
tabname["cat"]=new Array();
tabname["dat"]=new Array();
tabname["profile"]=new Array();
tabname["src"]=new Array();

tabname["start"]["osszes"]=2;
tabname["start"]["uj"]=2;
tabname["start"]["ajanlott"]=2;
tabname["start"]["2"]=2;
tabname["start"]["elmentett"]=3;
tabname["start"]["megtekintett"]=3;

tabname["cat"]["1"]=1;
tabname["cat"]["2"]=2;
tabname["cat"]["3"]=3;
tabname["cat"]["4"]=4;
tabname["cat"]["elmentett"]=1;
tabname["cat"]["megtekintett"]=1;
tabname["cat"]["osszes"]=2;
tabname["cat"]["uj"]=3;
tabname["cat"]["kiemelt"]=4;



//******************************************dat/profile/search tabnames!!!

var tabtypename=new Array();
tabtypename["all"]="osszes";
tabtypename["ent"]="szorakoztato";
tabtypename["new"]="legfrisebb";
tabtypename["extra"]="kiemelt";
tabtypename["save"]="elmentett";

function VadAdsboxopen() {
if (document.getElementById("VadBanner01")) {
document.getElementById("VadBanner01").style.visibility="visible";
}
if (document.getElementById("VadBanner02")) {
document.getElementById("VadBanner02").style.visibility="visible";
}
if (document.getElementById("VadBanner03")) {
document.getElementById("VadBanner03").style.visibility="visible";
}
if (document.getElementById("VadBanner04")) {
document.getElementById("VadBanner04").style.visibility="visible";
}
if (document.getElementById("VadBanner05")) {
document.getElementById("VadBanner05").style.visibility="visible";
}
if (document.getElementById("VadSearchline1")) {
document.getElementById("VadSearchline1").style.display="block";
}
if (document.getElementById("VadSearchtypebox2")) {
document.getElementById("VadSearchtypebox2").style.visibility="visible";
}
if (document.getElementById("Vadtippbox1")) {
document.getElementById("Vadtippbox1").style.visibility="visible";
}
if (document.getElementById("VadBanner03_m")) {
document.getElementById("VadBanner03_m").style.visibility="visible";
}
}

function VadCntnonieopen() {
if (document.getElementById("Vadscroller2")) {
document.getElementById("Vadscroller2").style.visibility="visible";
}
if (document.getElementById("VadBanner03_m")) {
document.getElementById("VadBanner03_m").style.visibility="visible";
}
if (document.getElementById("Vadstartintro")) {
document.getElementById("Vadstartintro").style.display="block";
}
}

function VadAdsboxclose() {
if (document.getElementById("VadBanner01")) {
document.getElementById("VadBanner01").style.visibility="hidden";
}
if (document.getElementById("VadBanner02")) {
document.getElementById("VadBanner02").style.visibility="hidden";
}
if (document.getElementById("VadBanner03")) {
document.getElementById("VadBanner03").style.visibility="hidden";
}
if (document.getElementById("VadBanner04")) {
document.getElementById("VadBanner04").style.visibility="hidden";
}
if (document.getElementById("VadBanner05")) {
document.getElementById("VadBanner05").style.visibility="hidden";
}
if (document.getElementById("VadSearchline1")) {
document.getElementById("VadSearchline1").style.display="none";
}
if (document.getElementById("VadSearchtypebox2")) {
document.getElementById("VadSearchtypebox2").style.visibility="hidden";
}
if (document.getElementById("Vadtippbox1")) {
document.getElementById("Vadtippbox1").style.visibility="hidden";
}
if (document.getElementById("VadBanner03_m")) {
document.getElementById("VadBanner03_m").style.visibility="hidden";
}
}

function VadCntnonieclose() {
if (document.getElementById("Vadstartintro")) {
document.getElementById("Vadstartintro").style.display="none";
}
if (document.getElementById("VadBanner03_m")) {
document.getElementById("VadBanner03_m").style.visibility="hidden";
}
if (document.getElementById("Vadscroller2")) {
document.getElementById("Vadscroller2").style.visibility="hidden";
}
}

//*********************************************
function SLlogincheck() {
var errorcount=0;
if (document.location.hash.length>1) {
var splitaurl=new Array();
splitaurl[0]=RequestUrl.replace(document.location.hash,"") 
splitaurl[1]=document.location.hash.replace(/#/,"") 
if (splitaurl[1].length>5 && splitaurl[1].indexOf("{")!=-1 && splitaurl[1].indexOf("}")!=-1) {
var tmpcode=splitaurl[1].replace(/{/,"");
tmpcode=tmpcode.replace(/}/,"");
if (tmpcode.indexOf("&")!=-1) {
var usecode=tmpcode.split('&');
if (usecode.length==3) {

if (todaycode==usecode[0]) {

SLsetsessioncookie ('vadCurrentUSER', usecode[1]);
SLsetsessioncookie ('vadCurrentTOKEN', usecode[2]);
var dologin=1;
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
window.location=splitaurl[0];
} else if (usecode[0]==0) {
SLsetsessioncookie ('vadCurrentUSER', 0);
SLsetsessioncookie ('vadCurrentTOKEN', 0);
SLdeletecookie ('vadCurrentUSER');
SLdeletecookie ('vadCurrentTOKEN');
window.location=splitaurl[0];
} else {
errorcount++;
}
} else {
errorcount++;
}
} else {
errorcount++;
}
} else {
if (splitaurl[1].indexOf(":")!=-1) {
var tmppage=splitaurl[1].split(':');

if (tmppage.length==2) {
var seltab=tmppage[0];
var selpag=tmppage[1];
} else {
var seltab=splitaurl[1];
var selpag=1;
}

} else {
var seltab=splitaurl[1];
var selpag=1;
}
var tmpfunc=changepagecookie(seltab, selpag);
window.location=splitaurl[0];
}
}
if (errorcount!=0 && dologin!=1) {
window.location=splitaurl[0];
return false;
} else if (errorcount==0 && dologin==0) {
return true;
}
}

function changepagecookie(tab, page) {
if (tab.length>1 && page>0) {
var found=0;
if (tabname[loadparam["list"]]) {
for (var i in tabname[loadparam["list"]]) {
if (i==tab) {
found=1;
}
}
}
if (found==1) {
var pagename=loadparam["list"];
if (pagename="cat") {
pagename=loadparam["cat"];
}
var endpagename="&"+pagename+":"+tab+":";
var curpagestr="";
curpagestr=SLgetcookievalue('vadCurrentPage');
if (curpagestr && curpagestr.length>0) {
if (curpagestr.indexOf(pagename)!=-1) {
var tmppages=curpagestr.split(pagename+":");
var tmppgs=tmppages[0].split(":");
if (tmppgs[1]) {
var tmppg=tmppgs[1].split("&");
tmppages[1]=tmppg[1];
} else {
tmppages[1]="";
}
curpagestr=tmppages[0]+tmppages[1];
}
} else {
curpagestr="";
}
curpagestr=curpagestr+endpagename+page+"&";
SLsetsessioncookie ('vadCurrentPage', curpagestr);
return true;
} else {
return false;
}
}

}
//*********************************************

var veiltimera=0;
var veiltimerb=0;
var curscrollx=0;
var curscrolly=0;

function Vshowveil(veil) {
if (veiltimera!="0") {
clearTimeout(veiltimera);
veiltimera=0;
}
if (veiltimerb!="0") {
clearTimeout(veiltimerb);
veiltimerb=0;
}
curscrollx=(document.all)?document.body.scrollTop:window.pageXOffset;
curscrolly=(document.all)?document.body.scrollTop:window.pageYOffset;
Vhideveil();
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";
}
}

var TopContainerCnt=new Array();
TopContainerCnt["VadTopContainercnt"]="";
TopContainerCnt["VadTopContainercntt"]="";
TopContainerCnt["VadTopContainercnts"]="";

function Vhideveil() {
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(curscrollx,curscrolly);
}

function VshowTopbox(veil,cnt,cntt,cnts,vad,vadl) {
VadAdsboxclose();
Vshowveil(veil);
document.getElementById("VadTopContainer").style.display="block";
if (Vbrowser>0) {
VadCntnonieclose();
}
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";
}
}

function VcloseTopbox() {
if (document.getElementById("IF_SLPPvideo")) {
dropid("IF_SLPPvideo");
}
if (document.getElementById("SLPPvideo")) {
document.getElementById("SLPPvideo").innerHTML="";
}
var ret=SLgetcookievalue ("Vstart-return");
if (ret) {
SLsetsessioncookie("Vstart-return", 0);
if (ret.length>5) {
window.location=ret;
}
} else if (Showaftershow!="0") {
eval(Showaftershow);
Showaftershow=0;
}
if (Doaftershow!="0") {
eval(Doaftershow);
//Doaftershow=0;
} 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";
if (Vbrowser>0) {
VadCntnonieopen();
}
VadAdsboxopen();
Vhideveil();
if (document.getElementById("VadTopContainercnt").innerHTML.length>1) {
TopContainerCnt["VadTopContainercnt"]=document.getElementById("VadTopContainercnt").innerHTML;
}
if (document.getElementById("VadTopContainercntt").innerHTML.length>1) {
TopContainerCnt["VadTopContainercntt"]=document.getElementById("VadTopContainercntt").innerHTML;
}
if (document.getElementById("VadTopContainercnts").innerHTML.length>1) {
TopContainerCnt["VadTopContainercnts"]=document.getElementById("VadTopContainercnts").innerHTML;
}
//document.getElementById("VadTopContainercnt").innerHTML="";
document.getElementById("VadTopContainercntt").innerHTML="";
document.getElementById("VadTopContainercnts").innerHTML="";
}
}

//CATBOX stuff
var Starting=0;
var OnloadRun=new Array();
function checkcatstatus() {
if (Starting==0) {
var file='http://s1.videohirdetesek.com/pagepartloader.php?type=catnum';
loadfiles(file, 'js');
} else {
OnloadRun[OnloadRun.length]="checkcatstatus()";
}
}

function changecatstyle(div, type) {
if (document.getElementById(div)) {
if (type==1) {
document.getElementById(div).style.color="#0000FF";
} else if (type==2) {
document.getElementById(div).style.color="#FF0000";
}
}
}

//ADD TO FAVS
function addtofavs(url, title) {
var alttext="Kérjük adja hozzá oldalunkat a kedvencekhez!<br>Az Ön böngészőjében <br>-ha Netscapet használ: a 'CTRL-D' betükombinációval,<br>-ha Operát használ:a 'CTRL-T' betükombinációval<br>tudja ezt megtenni.";
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
window.external.AddFavorite(url,title);
} else if (navigator.appName == "Netscape") {
window.sidebar.addPanel(title,url,"");
} else {
alert(alttext);
}
}

//  DRAG AND DROP
var Drag = {

obj : null,

init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
{
o.onmousedown= Drag.start;

o.hmode= bSwapHorzRef ? false : true ;
o.vmode= bSwapVertRef ? false : true ;

o.root = oRoot && oRoot != null ? oRoot : o ;

if (o.hmode  && isNaN(parseInt(o.root.style.left  ))) o.root.style.left   = "0px";
if (o.vmode  && isNaN(parseInt(o.root.style.top   ))) o.root.style.top    = "0px";
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right  = "0px";
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";

o.minX= typeof minX != 'undefined' ? minX : null;
o.minY= typeof minY != 'undefined' ? minY : null;
o.maxX= typeof maxX != 'undefined' ? maxX : null;
o.maxY= typeof maxY != 'undefined' ? maxY : null;

o.xMapper = fXMapper ? fXMapper : null;
o.yMapper = fYMapper ? fYMapper : null;

o.root.onDragStart= new Function();
o.root.onDragEnd= new Function();
o.root.onDrag= new Function();
},

start : function(e)
{
var o = Drag.obj = this;
e = Drag.fixE(e);
var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
o.root.onDragStart(x, y);

o.lastMouseX= e.clientX;
o.lastMouseY= e.clientY;

if (o.hmode) {
if (o.minX != null)o.minMouseX= e.clientX - x + o.minX;
if (o.maxX != null)o.maxMouseX= o.minMouseX + o.maxX - o.minX;
} else {
if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
}

if (o.vmode) {
if (o.minY != null)o.minMouseY= e.clientY - y + o.minY;
if (o.maxY != null)o.maxMouseY= o.minMouseY + o.maxY - o.minY;
} else {
if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
}

document.onmousemove= Drag.drag;
document.onmouseup= Drag.end;

return false;
},

drag : function(e)
{
e = Drag.fixE(e);
var o = Drag.obj;

var ey= e.clientY;
var ex= e.clientX;
var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
var nx, ny;

if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);

nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));

if (o.xMapper)nx = o.xMapper(y)
else if (o.yMapper)ny = o.yMapper(x)

Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
Drag.obj.lastMouseX= ex;
Drag.obj.lastMouseY= ey;

Drag.obj.root.onDrag(nx, ny);
return false;
},

end : function()
{
document.onmousemove = null;
document.onmouseup   = null;
Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]), 
parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]));
Drag.obj = null;
},

fixE : function(e)
{
		if (typeof e == 'undefined') e = window.event;
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
return e;
}
};

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 SLsetsessioncookie (cookieName, cookieValue) {
document.cookie = escape(cookieName) + "=" + escape(cookieValue) + "; path=/" + "; domain=.videoadsweb.com";
return true;
}

function SLsetsavedcookie (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=.videoadsweb.com";
} 

function SLgetcookievalue (cookieName) {
var exp = new RegExp (escape(cookieName) + "=([^;]+)");
if (exp.test (document.cookie + ";")) {
exp.exec (document.cookie + ";");
return unescape(RegExp.$1);
}
else return false;
}

function SLdeletecookie (cookieName) {
if (SLgetcookievalue (cookieName)) SLsetsavedcookie (cookieName,"0","years", -1);  
return true;     
} 

// CHANGE STYLE

function setStyle(styleid){ 

var i, cacheobj, altsheets=[""]
for(i=0; (cacheobj=document.getElementsByTagName("link")[i]); i++) {
if(cacheobj.getAttribute("rel").toLowerCase()=="alternate stylesheet" && cacheobj.getAttribute("title")) {
cacheobj.disabled = true
altsheets.push(cacheobj)
if(cacheobj.getAttribute("title") == styleid)
cacheobj.disabled = false
}
}
return true;
}



function chooseStyle(styleid){
if (document.getElementById){
setStyle(styleid);
SLsetsessioncookie ("vadCurrentSTYLE", styleid);
//show selected
}
}

// AJAX LOAD CONTENT

var thisDate=new Date(); 
var thisYear=thisDate.getYear(); 
var thisMonth=thisDate.getMonth(); 
var thisDay=thisDate.getDay(); 
if (thisDay<10) {
thisDay='0'+thisDay;
}
if (thisMonth<10) {
thisMonth='0'+thisMonth;
}
var loadid=0;

var loadedobjects=""
var rootdomain="http://"+window.location.hostname;

function loadfiles(file, type){
if (!document.getElementById)
return
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (type=="js") { //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
} else if (type=="css") {
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}

menuopntimeout=new Array();

function menuopenddn(div, dir) {
if (dir==1) {
clearTimeout(menuopntimeout[div]);
document.getElementById(div+'_combo').style.display='block';
document.getElementById(div+'_combocnt').style.display='block';
SLPlaylistselect(SLPlaylist[SLPstart]);
} else if (dir=='-1'){
menuopntimeout[div]=0;
document.getElementById(div+'_combo').style.display='none';
document.getElementById(div+'_combocnt').style.display='none';
} else {
menuopntimeout[div]=setTimeout("document.getElementById('"+div+"_combo').style.display='none';document.getElementById('"+div+"_combocnt').style.display='none'", 800);
}
}

// SLIDERS

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 (SLgetcookievalue("vadCurrentREGION")!=selreg) {
SLsetRegion(selreg)
}
}  else {
SLclearregionselect();
}

}

function SLclearregionselect() {
if (SLgetcookievalue("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=SLgetcookievalue("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) {
SLsetsessioncookie ("vadCurrentREGION", id);
location.reload(true);
}

function initialize(div, url, widths, heights, scrollings, vspaces, hspaces) {  
if (document.getElementById("IF_"+div)) {
dropid("IF_"+div);
}
var JSiframe=document.createElement("IFRAME");  
JSiframe.id="IF_"+div;  
JSiframe.name="IF_"+div;
JSiframe.src=url;
JSiframe.width=widths;
JSiframe.height=heights;
JSiframe.frameBorder="0"
JSiframe.border="0"
JSiframe.scrolling=scrollings
JSiframe.marginWidth="0"
JSiframe.marginHeight="0"
JSiframe.vspace=vspaces;
JSiframe.hspace=hspaces;
document.getElementById(div).appendChild(JSiframe);
}

function dropid(div) {
var Node = document.getElementById(div);
Node.parentNode.removeChild(Node);
}

function VadSitesearchsubmit() {
var searchtype=0;
var searchword=document.getElementById("VadSitesearchbox1").value;
var searchstring="0§0§"+searchtype+"§0[,,]"+searchword+"§";
SLsetsessioncookie ("VadSearchstring", searchstring);
window.location="http://www.videoadseb.com/find/";
}

// DUMMY FUNCTION

function videohirdeto() {

}

var regions=new Array();

var paginate=new Array();

var nextpage=new Array();

var prevpage=new Array();

var loadpagestatus=new Array();

var loadingdelay=new Array();

var checkload=new Array();

var noadstoshow=new Array();

var playerclosescript="";

var Showaftershow=0;


var loadparam=new Array();
loadparam["type"]=0;
loadparam["cat"]=0;
loadparam["reg"]=0;
loadparam["src"]=0;



loadingdelay["all"]=500;
loadingdelay["new"]=100;
loadingdelay["extra"]=1000;
loadingdelay["save"]=3000;

paginate["all"]=-1;
paginate["new"]=-1;
paginate["extra"]=-1;
paginate["save"]=-1;
paginate["search"]=0;
paginate["extrasearch"]=0;

nextpage["all"]=0;
nextpage["new"]=0;
nextpage["extra"]=0;
nextpage["save"]=0;
nextpage["search"]=0;
nextpage["extrasearch"]=0;

prevpage["all"]=0;
prevpage["new"]=0;
prevpage["extra"]=0;
prevpage["save"]=0;
prevpage["search"]=0;
prevpage["extrasearch"]=0;

noadstoshow["all"]=0;
noadstoshow["new"]=0;
noadstoshow["extra"]=0;
noadstoshow["save"]=0;
noadstoshow["search"]=0;
noadstoshow["extrasearch"]=0;

loadpagestatus["all"]=new Array();
loadpagestatus["new"]=new Array();
loadpagestatus["extra"]=new Array();
loadpagestatus["save"]=new Array();
loadpagestatus["search"]=new Array();
loadpagestatus["extrasearch"]=new Array();

checkload["all"]=new Array();
checkload["new"]=new Array();
checkload["extra"]=new Array();
checkload["save"]=new Array();
checkload["search"]=new Array();
checkload["extrasearch"]=new Array();

function analyzequery() {
if (SLlogincheck()) {

} else if (startid>0) {

GotoUrl=RequestUrl.replace(startid+".hirdetes","");
VadVPload(startid, 1, 0);

} else {

// check cookie
loadid=thisYear+thisMonth+thisDay+Math.floor(Math.random()*1000);
loadparam["region"]=0;
if (regions.length>0) {
loadparam["region"]=regions[0];
if (regions.length>1) {
for (var i=1;i<regions.length;i++) {
loadparam["region"]=loadparam["region"]+"-"+regions[i];
}
}
}

if (loadparam["list"]=="cat") {

for (var a in loadparam["divid"]) {
startloadadboxcnt(a, loadingdelay[a]);
}
setTimeout("loadplaylist()",2000);

} else {
VadSearchstart();
}
Vhideveil();
}
}

function VadSearchadtyperadio(sel) {
if (document.getElementById("VadSearchradio"+sel)) {
document.getElementById("VadSearchradio"+sel).checked=true;
}
}

function VadCatAdsswitch(show) {
var showdiv='VadCatAdsbody'+show;
var showclass='VadCatAdshead'+show;
if (show==5) {
if (document.getElementById('VadCatAdsbody1')) {
if (document.getElementById('VadCatAdsbody1cnt').style.display=='none' && document.getElementById('VadSLPstarter').style.display=='block') {
VadPupListclose();menuopenddn('VadSLPstarter', 1);
}
}
} else {
if (document.getElementById('VadCatAdsbody1') && document.getElementById('VadCatAdshead1')) {
document.getElementById('VadCatAdsbody1').style.display='none';
document.getElementById('VadCatAdshead1').className='no';
}
if (document.getElementById('VadCatAdsbody2') && document.getElementById('VadCatAdshead2')) {
document.getElementById('VadCatAdsbody2').style.display='none';
document.getElementById('VadCatAdshead2').className='no';
}
if (document.getElementById('VadCatAdsbody3') && document.getElementById('VadCatAdshead3')) {
document.getElementById('VadCatAdsbody3').style.display='none';
document.getElementById('VadCatAdshead3').className='no';
}
if (document.getElementById('VadCatAdsbody4') && document.getElementById('VadCatAdshead4')) {
document.getElementById('VadCatAdsbody4').style.display='none';
document.getElementById('VadCatAdshead4').className='no';
}
document.getElementById(showdiv).style.display='inline';
document.getElementById(showclass).className='VadCatAdsheadh';
curtab=show;
}
}

function VadPagesearchswitch(show) {
document.getElementById("VadSearchtype1").className="VadPagesearchboxt";
document.getElementById("VadSearchtype2").className="VadPagesearchboxt";
document.getElementById("VadSearchtypebox1").style.display="none";
document.getElementById("VadSearchtypebox2").style.display="none";
document.getElementById("VadSearchtype"+show).className="VadPagesearchboxts";
document.getElementById("VadSearchtypebox"+show).style.display="inline";
}

function VadPagesearchsubmit() {
var searchtype=0;
if (document.getElementById("VadSearchradio1").checked) {
searchtype=1;
} else if (document.getElementById("VadSearchradio2").checked) {
searchtype=3;
}
var searchkeyword=document.getElementById("VadSearchsel").value;
var searchword=document.getElementById("VadSearchbox1").value;
var searchstring="0§"+document.getElementById("VadSearchboxh1").value+"§"+searchtype+"§"+searchkeyword+"[,,]"+searchword+"§";
SLsetsessioncookie ("VadSearchstring", searchstring);
window.location="http://www.videoadsweb.com/find/";
}

function showpagination(tabtype, pagenum) {
var divname="";
if (loadparam["list"]=="src") {
loadparam["divid"][tabtype]=loadparam["divid"][curtabname[curtab]];
divname=curtabname[curtab];
} else {
divname=tabtype;
}
if (pagenum>1) {
var paginatet="<ul><li class=\"VadPagenavNxt\" onclick=\"shownextadpage('"+tabtype+"', prevpage['"+tabtype+"'])\" id=\"paginatet_"+divname+"_S\" title=\"elözö oldal\"> < </li> Oldalak: <li class=\"VadPagenavCur\" onclick=\"shownextadpage('"+tabtype+"', '1')\"  id=\"paginatet_"+divname+"_1\">1</li>";
var paginateb="<ul><li class=\"VadPagenavNxt\" onclick=\"shownextadpage('"+tabtype+"', prevpage['"+tabtype+"'])\" id=\"paginateb_"+divname+"_S\" title=\"elözö oldal\"> < </li> Oldalak: <li class=\"VadPagenavCur\" onclick=\"shownextadpage('"+tabtype+"', '1')\" id=\"paginateb_"+divname+"_1\">1</li>";
for (var i=2;i<=pagenum;i++) {
paginatet=paginatet+"<li class=\"VadPagenavAll\" onclick=\"shownextadpage('"+tabtype+"', '"+i+"')\" id=\"paginatet_"+divname+"_"+i+"\">"+i+"</li>";
paginateb=paginateb+"<li class=\"VadPagenavAll\" onclick=\"shownextadpage('"+tabtype+"', '"+i+"')\" id=\"paginateb_"+divname+"_"+i+"\">"+i+"</li>";
}
paginatet=paginatet+"<li class=\"VadPagenavNxt\" onclick=\"shownextadpage('"+tabtype+"', nextpage['"+tabtype+"'])\" id=\"paginatet_"+divname+"_E\" title=\"következö oldal\"> > </li></ul>";
paginateb=paginateb+"<li class=\"VadPagenavNxt\" onclick=\"shownextadpage('"+tabtype+"', nextpage['"+tabtype+"'])\" id=\"paginateb_"+divname+"_E\" title=\"következö oldal\"> > </li></ul>";
document.getElementById(loadparam["divid"][tabtype]+'top').innerHTML=paginatet;
document.getElementById(loadparam["divid"][tabtype]+'btm').innerHTML=paginateb;
if (curpage[tabtype]==1) {
document.getElementById('paginatet_'+divname+'_S').style.display="none";
document.getElementById('paginateb_'+divname+'_S').style.display="none";
}
document.getElementById(loadparam["divid"][tabtype]+'top').style.display="inline";
document.getElementById(loadparam["divid"][tabtype]+'btm').style.display="inline";
paginate[tabtype]=pagenum;
if (paginate[tabtype]>1) {
curpage[tabtype]=curpage[tabtype]*1;
nextpage[tabtype]=curpage[tabtype]+1;
prevpage[tabtype]=curpage[tabtype]-1;
if (nextpage[tabtype]>paginate[tabtype]) {
nextpage[tabtype]=curpage[tabtype];
}
if (prevpage[tabtype]<1) {
prevpage[tabtype]=1;
}
} else {
nextpage[tabtype]=1;
prevpage[tabtype]=1;
}
shownextadpage(tabtype, curpage[tabtype]);
}
}

function switchpagination(tabtype, topage) {


//changepagecookie(tabtypename[tabtype], topage);

var divname="";
if (loadparam["list"]=="src") {
loadparam["divid"][tabtype]=loadparam["divid"][curtabname[curtab]];
divname=curtabname[curtab];
} else {
divname=tabtype;
}
if (paginate[tabtype]>1) {
if (topage==1) {
document.getElementById('paginatet_'+divname+'_S').style.display="none";
document.getElementById('paginateb_'+divname+'_S').style.display="none";
} else {
document.getElementById('paginatet_'+divname+'_S').style.display="inline";
document.getElementById('paginateb_'+divname+'_S').style.display="inline";
}
if (topage==paginate[tabtype]) {
document.getElementById('paginatet_'+divname+'_E').style.display="none";
document.getElementById('paginateb_'+divname+'_E').style.display="none";
} else {
document.getElementById('paginatet_'+divname+'_E').style.display="inline";
document.getElementById('paginateb_'+divname+'_E').style.display="inline";
}
for (var i=1;i<=paginate[tabtype];i++) {
if (document.getElementById('paginatet_'+divname+'_'+i)) {
document.getElementById('paginatet_'+divname+'_'+i).className="VadPagenavAll";
}
if (document.getElementById('paginateb_'+divname+'_'+i)) {
document.getElementById('paginateb_'+divname+'_'+i).className="VadPagenavAll";
}
}
if (document.getElementById('paginatet_'+divname+'_'+curpage[tabtype])) {
document.getElementById('paginatet_'+divname+'_'+topage).className="VadPagenavCur";
document.getElementById('paginateb_'+divname+'_'+topage).className="VadPagenavCur";
}
}
}

function startloadadboxcnt(tabtype, delay) {
if (tabtype=="save") {
// load saved or cookie content!!!
} else {
var showpage=1;
if (curpage[tabtype]>0) {
showpage=curpage[tabtype]
}
setTimeout ("shownextadpage('"+tabtype+"','"+showpage+"')", delay);
}
}

var loadedsearch="";
loadresult=new Array();

function shownextadpage(tabtype, topage) {
if (Vstatus.list["all"]==0 && tabtype!="save") {
var file="http://s1.videohirdetesek.com/";
var newload=0;
if (loadparam["list"]=="src") {
loadparam["divid"][tabtype]=loadparam["divid"][curtabname[curtab]];
loadname=curtabname[curtab];
if (topage==1) {
document.getElementById(loadparam["divid"][tabtype]+'cnt').style.display="block";
//loadpagestatus[tabtype]=new Array();
loadresult[tabtype]=new Array();
//loadresult[tabtype][loadparam["list"]+loadparam["searchtype"]]=new Array();
}
if (tabtype!=cursearch["name"]) {
// *************************************IMPLEMENT LOAD_FROM_MEMORY!!!!!!!!!!!!!
}
var stored=SLgetcookievalue("VadSearchstring");
if (loadedsearch.indexOf("||"+stored+"#"+topage+"||")==-1) {
newload=1;
loadedsearch=loadedsearch+"||"+stored+"#"+topage+"||";
// *************************************IMPLEMENT EXTRASEARCH!!!!!!!!!!!!!
loadparam["searchextra"]=0;
loadparam["searchmore"]=0;
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if (loadparam["searchkeyword"]!=0) {
loadparam["searchkeyword"]=clearname(0, loadparam["searchkeyword"]);
loadparam["searchkeyword"]=clearname(1, loadparam["searchkeyword"]);
}
var isadv=0;
if (loadparam["searchword"].indexOf(advtext)!=-1) {
loadparam["searchword"]=loadparam["searchword"].replace(advtext,"");
isadv=1;
}
var testwordlength=new Array();
testwordlength=loadparam["searchword"].split(" ");
if (testwordlength.length>1) {
loadparam["searchword"]="";
var first=1;
for (var a=0;a<testwordlength.length;a++) {
if (testwordlength[a].length>1) {
if (first==1) {
first=0;
} else {
loadparam["searchword"]=loadparam["searchword"]+"_";
}
loadparam["searchword"]=loadparam["searchword"]+testwordlength[a];
}
}
} else {
loadparam["searchword"]=loadparam["searchword"].replace(/  /g,"");
loadparam["searchword"]=loadparam["searchword"].replace(/ /g,"_");
}
loadparam["searchword"]=loadparam["searchword"].toLowerCase();
if (loadparam["searchword"]!=0) {
loadparam["searchword"]=clearname(0, loadparam["searchword"]);
loadparam["searchword"]=clearname(1, loadparam["searchword"]);
}
if (isadv==1) {
loadparam["searchword"]="§§USERID§§"+loadparam["searchword"]+"§§";
}
loadparam["searchregion"]=0;
var tmpreg=SLgetcookievalue('vadCurrentREGION');
if (tmpreg) {
loadparam["searchregion"]=tmpreg;
}
file=file+"loadsearch/"+curtabname[curtab]+"/"+loadparam["searchtype"]+"/"+loadparam["searchregion"]+"/"+loadparam["searchcat"]+"/"+loadparam["searchkeyword"]+",,"+loadparam["searchword"]+"/"+loadparam["searchextra"]+"/"+topage+"/"+loadid+"/videohirdeto.js?"+loadparam["searchextra"];
}
} else {
var ifpaginate=0;
loadname=tabtype;
if (paginate[tabtype]==-1) {
ifpaginate=1;
}
file=file+"loadlist/auto/"+loadparam["list"]+tabtype+"/"+loadparam[loadparam["list"]]+"/"+loadparam["region"]+"/"+loadparam["divid"][tabtype]+"/"+topage+"/"+ifpaginate+"/videohirdeto.js?loadid="+loadid;
if (loadedobjects.indexOf(file)==-1) {
newload=1;
}
}

switchpagination(tabtype, topage);

curpage[tabtype]=topage;
if (paginate[tabtype]>1) {
topage=topage*1;
nextpage[tabtype]=topage+1;
prevpage[tabtype]=topage-1;

if (nextpage[tabtype]>paginate[tabtype]) {
nextpage[tabtype]=topage;
}
if (prevpage[tabtype]<1) {
prevpage[tabtype]=1;
}
} else {
nextpage[tabtype]=1;
prevpage[tabtype]=1;
}

document.getElementById(loadparam["divid"][tabtype]+'cntload').style.display="none";
document.getElementById(loadparam["divid"][tabtype]+'cntno').style.display="none";
document.getElementById(loadparam["divid"][tabtype]+'cnterr').style.display="none";
for (var i=1;i<=paginate[tabtype];i++) {
if (document.getElementById(loadparam["divid"][tabtype]+'cnt'+i)) {
document.getElementById(loadparam["divid"][tabtype]+'cnt'+i).style.display="none";
}
}

if (tabtype=="save") {

} else {
if (newload==1) {
checkload[tabtype+""+topage]=setTimeout("checkadpageloading('"+tabtype+"','"+topage+"')",30000);
loadfiles(file, 'js');
document.getElementById(loadparam["divid"][tabtype]+'cntload').style.display="block";
if (!document.getElementById(loadparam["divid"][tabtype]+'cnt'+topage)) {
document.getElementById(loadparam["divid"][tabtype]+'cnt').innerHTML=document.getElementById(loadparam["divid"][tabtype]+'cnt').innerHTML+"<div id=\""+loadparam["divid"][tabtype]+"cnt"+topage+"\" style=\"display:none\"></div>";
}
loadpagestatus[loadname][topage]=0;
} else {
if (loadpagestatus[loadname][topage]==1) {
if (document.getElementById(loadparam["divid"][tabtype]+'cnt'+topage)) {
document.getElementById(loadparam["divid"][tabtype]+'cnt'+topage).style.display="block";
}
} else if (loadpagestatus[loadname][topage]==9) {
document.getElementById(loadparam["divid"][tabtype]+'cntno').style.display="block";
} else {
document.getElementById(loadparam["divid"][tabtype]+'cntload').style.display="block";
}
}
}
}

}


function finishloadingadlist(tabtype, pagenum) {
clearTimeout(checkload[tabtype+""+pagenum]);
var toloadcnt="";
if (loadparam["list"]=="src") {
loadparam["divid"][tabtype]=loadparam["divid"][curtabname[curtab]];
toloadcnt=loadresult[tabtype][pagenum];
loadname=curtabname[curtab];
} else {
toloadcnt=loadresult[loadparam["cat"]][tabtype][pagenum];
loadname=tabtype;
}
document.getElementById(loadparam["divid"][tabtype]+'cntload').style.display="none";
if (toloadcnt.length>1 && document.getElementById(loadparam["divid"][tabtype]+'cnt'+pagenum)) {
loadpagestatus[loadname][pagenum]=1;
document.getElementById(loadparam["divid"][tabtype]+'cnt'+pagenum).innerHTML=toloadcnt;
if (curpage[tabtype]==pagenum) {
document.getElementById(loadparam["divid"][tabtype]+'cnt'+pagenum).style.display="block";
}
} else {
loadpagestatus[loadname][pagenum]=9;
if (curpage[tabtype]==pagenum) {
document.getElementById(loadparam["divid"][tabtype]+'cnt'+pagenum).style.display="none";
document.getElementById(loadparam["divid"][tabtype]+'top').style.display="none";
document.getElementById(loadparam["divid"][tabtype]+'btm').style.display="none";
document.getElementById(loadparam["divid"][tabtype]+'cntno').style.display="block";
document.getElementById(loadparam["divid"][tabtype]+'cntload').style.display="none";
}
}
}

function checkadpageloading(tabtype, pagenum) {
if (loadpagestatus[tabtype][pagenum]!=1) {
var file="http://s1.videohirdetesek.com/";
var ifpaginate=0;
if (paginate[tabtype]==-1) {
ifpaginate=1;
}
if (loadparam["list"]=="src") {
loadparam["divid"][tabtype]=loadparam["divid"][curtabname[curtab]];
var stored=SLgetcookievalue("VadSearchstring");
if (loadedsearch.indexOf("||"+stored+"||")!=-1) {
loadedsearch=loadedsearch.replace("||"+stored+"||","");
var file=file+"loadsearch/"+curtabname[curtab]+"/"+loadparam["searchtype"]+"/"+loadparam["searchregion"]+"/"+loadparam["searchcat"]+"/"+loadparam["searchkeyword"]+",,"+loadparam["searchword"]+"/"+loadparam["searchextra"]+"/"+pagenum+"/"+loadid+"/videohirdeto.js?"+loadparam["searchextra"];
}
} else {
var file=file+"/loadlist/auto/"+loadparam["list"]+tabtype+"/"+loadparam[loadparam["list"]]+"/"+loadparam["region"]+"/"+loadparam["divid"][tabtype]+"/"+pagenum+"/"+ifpaginate+"/videohirdeto.js?loadid="+loadid;
}
if (loadedobjects.indexOf(file)!=-1) {
loadedobjects=loadedobjects.replace(file,"");
}
if (curpage[tabtype]==pagenum) {
for (var i=1;i<=paginate[tabtype];i++) {
if (document.getElementById(loadparam["divid"][tabtype]+'cnt'+i)) {
document.getElementById(loadparam["divid"][tabtype]+'cnt'+i).style.display="none";
}
}
if (curpage[tabtype]==1) {
document.getElementById(loadparam["divid"][tabtype]+'cnt1').style.display="none";
}
document.getElementById(loadparam["divid"][tabtype]+'cnterr').style.display="block";
document.getElementById(loadparam["divid"][tabtype]+'cntload').style.display="none";
switchpagination(tabtype, pagenum);
}
}
}


function loadplaylist() {

}

var tipcnt=1;

function nexttipp(div) {
dropid("IF_"+div);
tipcnt++;
initialize(div,"http://q--sla.videohirdeto.hu/engines/showtipp/cat/"+tipcnt+"/0/","750", "60","no", 1, 1);
}



var SLsystem={

isdefined:function(variable) {
return (typeof(window[variable]) == "undefined")?  false: true;
},

setsessioncookie:function(cookieName, cookieValue) {
document.cookie = escape(cookieName) + "=" + escape(cookieValue) + "; path=/" + "; domain=.videoadsweb.com";
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=.videoadsweb.com";
},

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 (SLgetcookievalue (cookieName)) SLsetsavedcookie (cookieName,"0","years", -1);  
return true;     
},

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+" "
}

}


}

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"},

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);
},

initialize:function(div, url, widths, heights, scrollings, vspaces, hspaces) {  
if (document.getElementById("IF_"+div)) {
dropid("IF_"+div);
}
var JSiframe=document.createElement("IFRAME");  
JSiframe.id="IF_"+div;  
JSiframe.name="IF_"+div;
JSiframe.src=url;
JSiframe.width=widths;
JSiframe.height=heights;
JSiframe.frameBorder="0"
JSiframe.border="0"
JSiframe.scrolling=scrollings
JSiframe.marginWidth="0"
JSiframe.marginHeight="0"
JSiframe.vspace=vspaces;
JSiframe.hspace=hspaces;
document.getElementById(div).appendChild(JSiframe);
},

dropid:function(div) {
var Node = document.getElementById(div);
Node.parentNode.removeChild(Node);
},

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;

}

},

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;
}
}

}

}

//VPOST

var Vsitestart={

PAGEdetails:function() {
Vsite.sitevars.cat=0;
Vsite.sitevars.sub=0;
Vsite.sitevars.cal=0;
if ("cat"=="cat") {
var catparts=document.location.pathname.split("/");
Vsite.sitevars.cat=catparts[1];
if (catparts[2]) {
Vsite.sitevars.sub=catparts[2];
} else {
Vsite.sitevars.sub=0;
}
if (catparts[3]) {
Vsite.sitevars.cal=catparts[3];
} else {
Vsite.sitevars.cal=0;
}
} else if ("cat"=="src"){
//get from cookie;
}
},

CATLISTsytle:function() {
var stylecookie=SLsystem.getcookievalue("Vcond-cats");
if (SLsystem.isdefined("Vstatus")) {
SLsystem.setsessioncookie("Vcond-cats", Vstatus);
this.CATLISTupdate(Vstatus);
} else if(stylecookie) {
this.CATLISTupdate(stylecookie);
}

},

CATLISTupdate:function(list) {
var sugcat="";
var catname="";
var catcnt=1;
var listnew=list["new"];
for (var m in listnew) {
if (document.getElementById("Catbox_"+m)) {
document.getElementById("Catbox_"+m).className=document.getElementById("Catbox_"+m).className+"n";
}
if (catcnt<8) {
sugcat=sugcat+"<a href=\"/"+m+"/\" class=\"Vadsuggestn\">"+listnew[m]+"</a>";
catcnt++;
}
}

if (list.type=="all") {
for (var a in list.all) {
if (document.getElementById("Catbox_"+a)) {
document.getElementById("Catbox_"+a).className=document.getElementById("Catbox_"+a).className+"a";
}
}
} else {
// implement show numbr of ads!!!
}

if (document.getElementById("VadSuggestedcat")) {
if (catcnt>3) {
document.getElementById("VadSuggestedcat").innerHTML=sugcat;
} else {
document.getElementById("VadSuggestedcat").innerHTML=sugcat+document.getElementById("VadSuggestedcat").innerHTML;
}
}

},

ADLISTget:function() {

var inf=Vstatus.list["extra"]+'/'+Vstatus.list["new"]+'/'+Vstatus.list["all"];
//document.getElementById('VadSuggestedcat').innerHTML=document.getElementById('VadSuggestedcat').innerHTML+"<div id='tmpinf'>"+inf+"</div>";

if (SLsystem.isdefined("Vstatus") && "cat"=="cat") { 
var starttab=Vstatus.type;
if (Vstatus.list["extra"]>0 && Vsite.sitevars.sub!=0) {
//Vadlist.getlists("extra",1,Vadlist.pagelength);
Vadlist.showpagination("extra",Vstatus.list["extra"]);
starttab="extra";
}
if (Vstatus.list["new"]>0 && Vsite.sitevars.sub!=0) {
//Vadlist.getlists("new",1,Vadlist.pagelength);
Vadlist.showpagination("new",Vstatus.list["new"]);
starttab="new";
}
if (Vstatus.list["all"]>0) {
//Vadlist.getlists("all",0,Vadlist.pagelength);
Vadlist.showpagination("all",Vstatus.list["all"]);
}
//switcs to tab!!;
//tmp
if (starttab=="extra" && Vsite.sitevars.sub!=0) {
VadCatAdsswitch(4);
} else if (starttab=="new" && Vsite.sitevars.sub!=0) {
VadCatAdsswitch(3);
} else {
VadCatAdsswitch(2);
}
for (var a in Vstatus.list) {
if (Vstatus.list[a]==0)
Vadlist.loadnolist(a,0,0);
}

}
}




}

var Vsiteload= {

}

function loading() {
// TMP CODE*********************************************
var intro=SLsystem.getcookievalue("Vstart-intro")
if (intro) {
if (intro=="now") {
SLshowintro();
SLsystem.setsessioncookie("Vstart-intro", 0);
}
if (startid>0) {
Doaftershow="window.location='"+GotoUrl+"';";
}
SLsystem.setsavedcookie("Vlastvisit", 20120204, "months", 1);

//Vadlist.getlists('all',1,10);

}

// TMP CODE*********************************************

SLsystem.setsessioncookie("Vcond-session", "0")
Vsitestart.CATLISTsytle();

}

function reloading() {

Vsitestart.PAGEdetails();
Vsitestart.ADLISTget();

}

//window.onload=initload;


//window.onpageshow= function (evt) {
//if (evt.persisted) {
//alert(1)
// window.onload();
//}
//}



var Vadlist={

"SLP":0,
"SLPAdbox":0,
"SLPBox":0,
"SLPdata":{"listcount":0,"savedcount":0},
"SLPlist":{},
"SLPlisting":{},
"listnext":{},
"listprev":{},
"now":{"next":0,"prev":0,"vadid":0,"islast":0},
"Adlist":{},
"returnUrl":"0",
"pagelength":10,

//-----------------------------

getlists:function(type,from,to) {
var call=Vsite.sitevars.cat+"-"+Vsite.sitevars.sub+"-"+Vsite.sitevars.cal;
var listfile="http://q--ld0.videoadsweb.com/loadlist/"+call+"/"+type+","+from+","+to+"/videohirdeto.sljx";
SLsystem.extloadfile("js",listfile,"GET","0");
document.getElementById(Vsite.sitevars[type]+"cntload").style.display="block";
},

loadlist:function(type,from,to) {
if (!this.Adlist["A"+type]) {
this.Adlist["A"+type]={};
}
//alert('Server Installáció Folyamatban! (1)');
//alert(eval('SLVADL'+type+'_1_10[1]["id"]'))
var topage=to/Vadlist.pagelength;
topage=Math.round(topage);
for (var c=from;c<=to;c++) {
if (eval("SLVADL"+type+"_"+from+"_"+to+"["+c+"]")) {
eval("Vadlist.Adlist.A"+type+"["+c+"]=SLVADL"+type+"_"+from+"_"+to+"["+c+"];");
document.getElementById('tmpinf').innerHTML=document.getElementById('tmpinf').innerHTML+c+this.Adlist["A"+type][c]["id"]
}
}
//create div
if (!document.getElementById(Vsite.sitevars[type]+"cnt"+topage)) {
document.getElementById(Vsite.sitevars[type]+"cnt").innerHTML=document.getElementById(Vsite.sitevars[type]+"cnt").innerHTML+"<div id=\""+Vsite.sitevars[type]+"cnt"+topage+"\" style=\"display:none\"></div>";
}
//get cnt 2 div
var content="+";
var count=0;
for (var d=from;d<=to;d++) {
//if (!this.Adlist["A"+type][d]["status"]) {
//this.Adlist["A"+type][d]["status"]=1;
//}
if (this.Adlist["A"+type][d]["id"]) {
content=content+this.makeadbox(type, d);
document.getElementById('tmpinf').innerHTML=document.getElementById('tmpinf').innerHTML+'<br>'+type+d+':'+this.Adlist["A"+type][d]["id"]+this.makeadbox(type, d);
//alert(this.makeadbox(type, d));
}
}
if (content.length>0) {
document.getElementById(Vsite.sitevars[type]+"cnt"+topage).innerHTML=content;
//hide msg
document.getElementById(Vsite.sitevars[type]+"cnt"+topage).style.display="block";
document.getElementById(Vsite.sitevars[type]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cntno").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cnterr").style.display="none";
} else {
document.getElementById(Vsite.sitevars[type]+"cnt"+topage).style.display="none";
document.getElementById(Vsite.sitevars[type]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cntno").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cnterr").style.display="block";
}
},

loadnolist:function(type,from,to) {
//0-0: not loaded
//alert('Server Installáció Folyamatban! (0/'+Vstatus.list["all"]+')');
var topage=to/Vadlist.pagelength;
topage=Math.round(topage);
if (document.getElementById(Vsite.sitevars[type]+"cnt"+topage)) {
document.getElementById(Vsite.sitevars[type]+"cnt"+topage).style.display="none";
}
document.getElementById(Vsite.sitevars[type]+"cntload").style.display="none";
document.getElementById(Vsite.sitevars[type]+"cntno").style.display="block";
document.getElementById(Vsite.sitevars[type]+"cnterr").style.display="none";
},

checkloadlist:function(type,from,to) {

},

showpagination:function(type,amount) {

//showpagination(type, amount/this.pagelength);

},

switchpagination:function(type, to) {

},

makedate:function(str) {
var newdate="";
var adate=new Array();
adate["Array"]='Ma';
adate["Array"]='Holnap';
adate["Array"]='Tegnap';
if (adate[str]) {
newdate=adate[str];
} else {
var year=str.substring(0, 4);
var month=str.substring(4, 6);
var day=str.substring(6, 8);
newdate=year+"."+month+"."+day+".";
return newdate;
}
},

makeadbox:function(type, count) {
var result="";
if (this.Adlist["A"+type][count]) {
if (this.Adlist["A"+type][count]["id"]) {
var adimg="http://start07.livenetserver.com/video/img"+this.Adlist["A"+type][count].videoimg;
var height=130;
if (this.Adlist["A"+type][count].usertype!=10) {
var corpmore="<tr><td align=\"right\" valign=\"top\" class=\"\">&#160;</td><td align=\"left\" valign=\"top\" class=\"\" colspan=\"3\">--mr--</td></tr>";
height=180;
adimg="http://start07.livenetserver.com/video/img/"+this.Adlist["A"+type][count].videoimg;
}
var totop="<a href=\"videohirdeto()\" onclick=\"Vadlist.adboxaction.totop("+this.Adlist["A"+type][count]["id"]+")\" title=\"Hirdetés előrehelyezése\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/totop.png\" border=\"0\" width=\"30\" height=\"30\"></a>";
var toextra="<a href=\"videohirdeto()\" onclick=\"Vadlist.adboxaction.toextra("+this.Adlist["A"+type][count]["id"]+")\" title=\"Hirdetés kiemelése\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/toextra.png\" border=\"0\" width=\"30\" height=\"30\"></a>";
if (this.Adlist["A"+type][count].top!=0) {
totop="<img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/istop.png\" border=\"0\" width=\"30\" height=\"30\">";
}
if (this.Adlist["A"+type][count].extra!=0) {
toextra="<img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/isextra.png\" border=\"0\" width=\"30\" height=\"30\">";
}
var showad="VIDEÓ > >";
var showadtitle="Videó";
var showadclass="VAdboxshow";
if (this.Adlist["A"+type][count].video==0) {
showad="KÉP > > ";
showadtitle="Kép";
showadclass=showadclass+"a";
if (this.Adlist["A"+type][count].image>1) {
showad="KÉPEK > > ";
showadtitle="Képek";
}
} else if(this.Adlist["A"+type][count].image>0) {
showadtitle="Videó és Kép";
}
adimg="<img src=\""+adimg+"\" border=\"0\" width=\"120px\" height=\"90px\"><div class=\""+showadclass+"\" title=\""+showadtitle+"\">"+showad+"</div>";
if (this.Adlist["A"+type][count].video==0 && Adlist["A"+type][count].image==0) {
adimg="&#160;";
}
var sum="";
if (this.Adlist["A"+type][count].attr){
var attr=this.Adlist["A"+type][count].attr.split(",");
for (var a=0;a<attr.length;a++) {
sum=sum+"&#160;<a href=\"videohirdeto()\" onclick=\"Vadlist.adboxaction.showattr("+this.Adlist["A"+type][count].attr[a]+")\">"+this.Adlist["A"+type][count].attr[a]+"</a>";
}
sum="<div class=\"VAdboxattr\">"+sum+"</div>";
}
//"+this.Adlist["A"+type][count].price+"

//sum="<div class=\"VAdboxdata\"><span>Hirdető:&#160;<a href=\"videohirdeto()\" onclick=\"Vadlist.adboxaction.userpage("+this.Adlist["A"+type][count].usertype+","+this.Adlist["A"+type][count]["id"]+")\">"+this.Adlist["A"+type][count].user+"</a></span>&#160;::&#160;Feladva:&#160;"+this.makedate(this.Adlist["A"+type][count].start)+"&#160;::&#160;Lejár:&#160;"+this.makedate(this.Adlist["A"+type][count].start)+"&#160;::&#160;Ár:&#160;hamarosan</div>"+sum;

var specclass=(this.Adlist["A"+type][count].usertype/1)+(this.Adlist["A"+type][count].extra/1);

result="<div id=\"Ad"+type+this.Adlist["A"+type][count]["id"]+"\"><table width=\"800px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"right\" valign=\"bottom\" class=\"VAdboxlistnav\"><a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.add("+this.Adlist["A"+type][count]["id"]+")\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/addtolist.png\" border=\"0\" width=\"30\" height=\"30\"></a>&#160;<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+")\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/playnow.png\" border=\"0\" width=\"30\" height=\"30\"></a>&#160;<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.hide("+this.Adlist["A"+type][count]["id"]+")\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/hide.png\" border=\"0\" width=\"30\" height=\"30\"></a>&#160;<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.delad("+this.Adlist["A"+type][count]["id"]+")\"><img src=\"http://q--sli0.videohirdeto.hu/cat/adlistbox/delete.png\" border=\"0\" width=\"30\" height=\"30\"></a></td></tr><tr><td align=\"center\" valign=\"top\"><table width=\"798px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"center\" height=\""+height+"px\" valign=\"middle\" class=\"\"><div id=\"Adbox"+type+this.Adlist["A"+type][count]["id"]+"\"><table width=\"790px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td align=\"right\" valign=\"top\" width=\"33px\" class=\"VAdboxleftbtn\">"+totop+"<br>"+toextra+"</td><td align=\"center\" valign=\"middle\" width=\"130px\" class=\"VAdboxIbox"+this.Adlist["A"+type][count].style+"\" onclick=\"Vadlist.adboxaction.view("+this.Adlist["A"+type][count]["id"]+")\">"+adimg+"</td><td align=\"left\" valign=\"top\" width=\"585px\" class=\"VAdboxbody"+this.Adlist["A"+type][count].style+"\"><div class=\"VAdboxtitle"+specclass+"\">"+this.Adlist["A"+type][count].title+"</div><div class=\"VAdboxintro"+specclass+"\">"+this.Adlist["A"+type][count].intro+"</div><div class=\"\">"+sum+"</div></td><td align=\"center\" valign=\"middle\" class=\"VAdboxright"+this.Adlist["A"+type][count].style+"\"><a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.help()\" title=\"Segítség, GYIK\"></a><br><a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.opt("+this.Adlist["A"+type][count].usertype+")\" title=\"Hirdetői opciók\"></a><br><!--<a href=\"javascript:videohirdeto()\" onclick=\"Vadlist.adboxaction.contact("+this.Adlist["A"+type][count]["id"]+")\" title=\"Kapcsolatfelvétel\"></a>--></td></tr>"+corpmore+"</tbody></table></div></td></tr></tbody></table></td></tr></tbody></table></div>";
}
}
return result;
},

adboxaction:{

start:function() {},

add:function(adid){
this.tosave(adid);
this.toselect(adid);
},

view:function(adid){
this.tosave(adid);
this.toselect(adid);
},

hide:function(adid){},

delad:function(adid){
VSLPs.deleteanad(adid);
document.getElementById("Adlist"+adid).style.display="none";
},

totop:function(adid){},

toextra:function(adid){},

help:function(){},

opt:function(type){},

contact:function(adid){},

userpage:function(adid,type){},

showattr:function(name){},

tosave:function(adid){

},

toselect:function(adid){
document.getElementById("VadAdseltabtext").style.display="block";
//TMP

}

},

//-----------------------------

textconvert:function(inp) {
if (inp.length>0) {
var out=inp;
out=unescape(out);
//out=decodeURIComponent(out);
return out;
}
},

addtolist:function(type,adid,place,silent) {

if (document.getElementById("IF_SLPPvideo")) {
dropid("IF_SLPPvideo");
}
document.title="::: hirdetés betöltés folyamatban - videoadsweb.com :::";
var found=0;
if (this.SLPdata.listcount>0) {
if (this.SLPlisting[adid]) {
if (this.SLPlisting[adid]!=0) {
found=adid;
}
}
}
if (found==adid) {
if (type==1 && this.SLPlist[adid]==1) {
this.SLPBox=2;
this.openadviewer(adid);
}
} else if (this.SLP==0) {
var startfile="http://q--sls0.videoadsweb.com/slp/0/videohirdeto.js";
SLsystem.extloadfile("js",startfile,"GET","Vadlist.addtolist('"+type+"','"+adid+"','0','1')");
this.SLPBox=2;
} else if (this.SLPdata.listcount<=Vsystem.limits.listmax[0]) { 
var adfile="http://q--ld0.videoadsweb.com/loadad/"+adid+"/0/videohirdeto.sljx";
this.SLPBox=2;
SLsystem.extloadfile("js",adfile,"GET","0");

if (window.XMLHttpRequest) {
} else {
Vshowveil('s');
alert("A hirdetés betöltése folyamatban van, kis türelmet kérünk!\nTovábblépéshez nyomja meg az 'OK' gombot!")
}
//+voting
//var votefile="http://q--???.videoadsweb.com/getvote/"+adid+"/0/videohirdeto.sljx";
//SLsystem.extloadfile("js",votefile,"GET","0");
if (this.SLPdata.listcount==0) {
var intfile="http://q--ld0.videoadsweb.com/interstitial/children/0/videohirdeto.sljx";
}
this.SLPdata.listcount++;
this.SLPlist[adid]=9;
}
if (found==adid && type==0) {
document.title=Vsystem.values.title;
//+notify
} else if (this.SLPdata.listcount<=Vsystem.limits.listmax[0] || found==adid) {
//+update playlist
if (type==0) {
document.title=Vsystem.values.title;
if (window.XMLHttpRequest) {VadPupBoxopen('', '0', '0', 'info', '<span style="color:#FF0000;font-size:20px;font-weight:bold;">[i]</span>   A videóhirdetést sikeresen hozzáadtuk a hirdetéslistához. Megtekintéshez nyomja meg a \"Kiválasztott videóirdetések\" gombot az oldal jobb felsö sarkában!', '3500');}
} else {
if (this.SLP!=0 && this.SLPlist[adid]==1) {
this.openadviewer(adid);
} else {
//+show wait
}
}
} else {
document.title=Vsystem.values.title;
}

},

openadviewer:function(startad) {
if (startid>0) {
this.returnUrl=GotoUrl;
}
//close wait
if (this.SLPAdbox==0) {
document.getElementById("VadTopContainercnt").innerHTML=VSLPs.container.viewer;
this.SLPAdbox=1;
}
if (startad>0) {
//VSLPs.insertplayer(startad);
VSLPs.viewer.playerinsert=1;
VSLPs.setnextprev(startad);
VSLPs.loadadtoviewer(startad);
}
if (Vadlist.SLPBox==0 || Vadlist.SLPBox==2) {
VshowTopbox("0",1,0,0,1,0);
Vadlist.SLPBox=1;
}
SLsystem.setsessioncookie("tmpSLPmedia", 1);
SLsystem.setsessioncookie("tmpSLPview", 1);
if (window.XMLHttpRequest) {
Showaftershow="Vadlist.closeadviewer();";
} else {
Showaftershow="window.location.reload();";
}
},

closeadviewer:function() {
if (this.returnUrl!="0") {
window.location=this.returnUrl;
} else {
//Vshowveil('s');
VSLPs.switchtab('SLPboxMC2', 'SLPboxMC1');
if (document.getElementById("IF_SLPPvideo")) {
document.getElementById("SLPPvideo").style.visibility='hidden';
document.getElementById("IF_SLPPvideo").style.visibility='hidden';
dropid("IF_SLPPvideo");
}
SLsystem.setsessioncookie("tmpSLPmedia", 0);
SLsystem.deletecookie("tmpSLPmedia");
SLsystem.setsessioncookie("tmpSLPview", 0);
SLsystem.deletecookie("tmpSLPview");
//VSLPs.dropplayer();
//VSLPs.stopnow();
document.title=Vsystem.values.title;
Vadlist.SLPBox=0;
//Vhideveil();
}
},

deletead:function(startad) {
this.SLPlist[startad]=0;
this.SLPlisting[startad]=0;
this.SLPdata.listcount--;
}

}

