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=.filmhirado.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=.filmhirado.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 (SLgetcookievalue (cookieName)) SLsetsavedcookie (cookieName,"0","years", -1);  
return true;     
},

urlencode:function(str) {
str = escape(str);
str = str.replace("+", "%2B");
str = str.replace("%20", "+");
str = str.replace("*", "%2A");
str = str.replace("/", "%2F");
str = str.replace("@", "%40");
return str;
},

datatodiv:function(http_request, divid, msg, after) {

var error=0;
if (http_request.readyState == 4 && http_request.status==200) {
var res=http_request.responseText;
if (res) {
if (res.length>1 && document.getElementById(divid)) {
document.getElementById(divid).innerHTML=res;
if (after.length>0) {
eval(after);
}
}
} else {
error=1;
}
} else {
//error=1;
}
if (error==1) {
if (document.getElementById(divid)) {
document.getElementById(divid).innerHTML=msg;
}
}

},

datatoeval:function(http_request, after) {

var error=0;
if (http_request.readyState == 4 && http_request.status==200) {
var res=http_request.responseText;
if (res) {
if (res.length>1) {
after=after.replace(/RESULT/g, res);
eval(after);
}
} else {
error=1;
}
} else {
//error=1;
}
if (error==1) {
//on error!!!
}

},

loadedobjects:"-",
loadnext:"0",

extloadfile:function(fileType,fileName,requestType,loadAfter) {
if (!document.getElementById)
return
var fileref=""
if (this.loadedobjects.indexOf(fileName)==-1){
if (fileType=="js") {
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", fileName);
} else if (fileType=="css") {
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", fileName);
} else if (fileType=="html" && requestType=="GET") {
//+ajax load get
} else if (fileType=="html" && requestType=="POST") {
//+ajax load post
} else if (fileType=="html" && requestType=="FILE") {
//+iframe load file
}
}
if (fileref!=""){
this.loadnext=loadAfter;
document.getElementsByTagName("head").item(0).appendChild(fileref)
this.loadedobjects+=fileName+" "
}

},

extloadpage:function(method,url,divid,data,cach,emsg,after) {
if (method=="GET" || method=="POST") {
var http_request=false;
if (window.XMLHttpRequest) {
http_request=new XMLHttpRequest();
} else if (window.ActiveXObject) { 
try {
http_request=new ActiveXObject("Msxml2.XMLHTTP");
} 
catch (e){
try{
http_request=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){}
}
}
} else {
return false
}
http_request.onreadystatechange=function(){
if (divid=="0") {
SLsystem.datatoeval(http_request, after);
} else {
SLsystem.datatodiv(http_request, divid, emsg, after);
}
}
if (cach!=0) {
var cachparam=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime();
}

var sendvalue=null;
if (method=="POST") {
if (data.indexOf("=")==-1) {
data="QUERY="+data;
}
http_request.open(method, url+cachparam, true)
http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http_request.setRequestHeader("Content-length", data.length);
http_request.setRequestHeader("Connection", "close");
sendvalue=data;
} else {
http_request.open(method, url+cachparam, true);
}
http_request.send(sendvalue);
}


}

var SLmks={
megkereso:function() {
if (document.getElementById("VadSitesearchbox1").value.length>3) {
//var word=this.makewords(document.getElementById("VadSitesearchbox1").value);
//window.location="http://www.filmhirado.hu/megkereso/--/0-0-"+word+"/";
var w=document.getElementById('VadSitesearchbox1').value.toLowerCase();
window.location="http://www.filmhirado.hu/keres/?"+w+"";
}
},

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,"all":"VadCatAdsbody","tipcnt":1},

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+")");
}
},

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);
},

nexttipp:function(div) {
this.dropid("IF_"+div);
this.sitevars.tipcnt++;
this.initialize(div,"http://q--sla.videohirdeto.hu/engines/showtipp/cat/"+this.sitevars.tipcnt+"/0/","750", "60","no", 1, 1);
},

startofferaprice:function() {
this.initialize("VadTopContainercnts", "http://q--ld0.videohirdeto.hu/specials/0/0/offeraprice.html", "798px", "538px", "no", "2px", "2px");
document.getElementById("VadTopContainercnts").style.display="block";
document.getElementById("VadSpecialofferaprice").style.display="none";
},

headfill:0,

headhistory:function(elem,dir) {
if (dir==1) {
if (this. headfill==0) {
document.getElementById("VheadhistoryVH").innerHTML="";
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.headfill=1;
}
document.getElementById("VheadhistoryVH").style.display="none";
document.getElementById("VheadhistoryVC").style.display="none";
document.getElementById("Vheadhistory"+elem).style.display="block";
} else {
document.getElementById("Vheadhistory"+elem).style.display="none";
}
},

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 loading() {}

function reloading() {
thispage.finishadsload();
}

var thispage={

loadintro:function() {
if (document.getElementById("TVbox-OLD")) {
var velid="TVPlayer";
var width=470;
var height=264;
var vidid="http://q--med.videohirdeto.hu/videoplayer/1328382739.00000.00000/FHSTART-PLAYER.swf";
var fvars="videoFile=http://q--med.videohirdeto.hu/fl/vid/8729371831.flv&firstFrame=http://q--med.videohirdeto.hu/fl/img/8729371831.jpg&maintainAspectRatio=true&autoResize=true&minWidth=470&minHeight=200&skinAutoHide=true&allowBigPlayButton=true&autoLoad=true&autoPlay=false&loopCount=-1&unloadOnStop=false&bufferTime=6&smoothVideo=true&showFirstFrameWhenStop=true&volume=50&mute=false";
document.getElementById("TVbox").innerHTML="<object id=\""+velid+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0\" width=\""+width+"\" height=\""+height+"\"><param name=\"movie\" value=\""+vidid+"?pad="+Math.random()+"\"><param name=\"FlashVars\" value=\""+fvars+"\"><param name=\"quality\" value=\"high\"><param name=\"allowScriptAccess\" value=\"sameDomain\" /><param name=\"allowFullScreen\" value=\"False\" /><embed src=\""+vidid+"\" FlashVars=\""+fvars+"\" quality=\"high\" name=\""+velid+"\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+width+"\" height=\""+height+"\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"False\"></embed></object>";
}
if (document.getElementById("TVbox")) {

}
},

finishadsload:function() {
thispage.switchtoppromo("intro");
if (SLsystem.isdefined("PINLISTS")) {
//load tvbox
if (PINLISTS["tvbox"]) {
//load buttons
var u="<input type=\"button\" id=\"TVpromoCnt\" class=\"count\" value=\"\"><input type=\"button\" onclick=\"thispage.switchtvpromo(thispage.curtvpromo-1)\" class=\"back\" value=\" \">";
var uu=0;
for (var uuu in PINLISTS["tvbox"]) {
if (uuu<10) {
u=u+"<input type=\"button\" id=\"TVpromotab"+uu+"\" onclick=\"thispage.switchtvpromo("+uu+")\" class=\"sel\" value=\" \">";
thispage.tvpromomax=uu;
uu++;
}
}
u=u+"<input type=\"button\" onclick=\"thispage.switchtvpromo(thispage.curtvpromo+1)\" class=\"fward\" value=\" \">";
document.getElementById("TVboxnav").innerHTML=u;
if (thispage.tvpromomax>0) {
thispage.switchtvpromo(0);
}
}
//load toppromo
var q=new Array();
q["new"]="";
q["intro"]="";
q["offer"]="";
var wi="";
var wit=new Array();
var wic=0;
var vct=0;
var vci=0;
var vcii=0;
var imax=3*30-10;

for (var x in PINLISTS["top"]) {

if (x!="END" && PINADDATA[PINLISTS["top"][x][0]]) {
wi=PINADDATA[PINLISTS["top"][x][0]]["intro"];
vci=PINADDATA[PINLISTS["top"][x][0]]["intro"].length;
if (vci>0) {
if (vci>imax) {
vci=imax-vct-3;
vcii=0;
wic=0;
wit=wi.split(" ");
wi="";
while(vcii<vci) {
wi=wi+wit[wic]+" ";
wic++;
vcii=vcii+wit[wic].length+1;
}
wi=wi.substring(0,wi.length-1);
wi=wi+"...";
}
wi="<br>"+wi+" <img src=\"http://ux1.fh-w.com/FH/promogo.png\" border=\"0\" width=\"15px\" height=\"15px\">";
}
q[x]="<div class=\"toplink\" title=\""+PINADDATA[PINLISTS["top"][x][0]]["title"]+"\" onclick=\"window.location.href='http://www.filmhirado.hu/"+PINLISTS["top"][x][0]+"'\"><div style=\"background-image:url('http://q--med.videohirdeto.hu/img/"+PINADDATA[PINLISTS["top"][x][0]]["videoimg"]+"')\"><em></em></div><span><a href=\"/"+PINLISTS["top"][x][0]+"\"><em>"+PINADDATA[PINLISTS["top"][x][0]]["title"]+"</em>"+wi+"</a></span></div>";
}

var ax=1;

if (x=="intro") {

for (var ax=1;ax<=2;ax++) {
if (PINADDATA[PINLISTS["top"][x][ax]]) {
wi=PINADDATA[PINLISTS["top"][x][ax]]["intro"];
vci=PINADDATA[PINLISTS["top"][x][ax]]["intro"].length;
if (vci>0) {
if (vci>imax) {
vci=imax-vct-3;
vcii=0;
wic=0;
wit=wi.split(" ");
wi="";
while(vcii<vci) {
wi=wi+wit[wic]+" ";
wic++;
vcii=vcii+wit[wic].length+1;
}
wi=wi.substring(0,wi.length-1);
wi=wi+"...";
}
wi="<br>"+wi+" <img src=\"http://ux1.fh-w.com/FH/promogo.png\" border=\"0\" width=\"15px\" height=\"15px\">";
}
q[x]=q[x]+"<div class=\"toplink\" title=\""+PINADDATA[PINLISTS["top"][x][ax]]["title"]+"\" onclick=\"window.location.href='http://www.filmhirado.hu/"+PINLISTS["top"][x][ax]+"'\"><div style=\"background-image:url('http://q--med.videohirdeto.hu/img/"+PINADDATA[PINLISTS["top"][x][ax]]["videoimg"]+"')\"><em></em></div><span><a href=\"/"+PINLISTS["top"][x][ax]+"\"><em>"+PINADDATA[PINLISTS["top"][x][ax]]["title"]+"</em>"+wi+"</a></span></div>";
}
}
}

if (x!="END") {
for (var xx=ax;xx<=(ax+2);xx++) {
if (PINADDATA[PINLISTS["top"][x][xx]]) {
q[x]=q[x]+"<div class=\"toplinks\"><a href=\"/"+PINLISTS["top"][x][xx]+"\">"+PINADDATA[PINLISTS["top"][x][xx]]["title"]+" <img src=\"http://ux1.fh-w.com/FH/promogo.png\" border=\"0\" width=\"15px\" height=\"15px\"></a></div>";
}
}
}

}

for (var qq in q) {
document.getElementById("Toppromo"+qq).innerHTML=q[qq];
}

//load left
var v="";
for (var a in PINLISTS["left"]) {
if (a!="END" && PINADDATA[PINLISTS["left"][a]]) {
v=v+"<div class=\"leftlink\" title=\""+PINADDATA[PINLISTS["left"][a]]["title"]+"\" onclick=\"window.location.href='http://www.filmhirado.hu/"+PINLISTS["left"][a]+"'\"><div style=\"background-image:url('http://q--med.videohirdeto.hu/img/"+PINADDATA[PINLISTS["left"][a]]["videoimg"]+"')\"><em></em></div><span><a href=\"/"+PINLISTS["left"][a]+"\">"+PINADDATA[PINLISTS["left"][a]]["title"]+"</a></span></div>";
}
}
document.getElementById("Leftpromo").innerHTML=v;

var w="";
imax=4*30-10;
for (var b in PINLISTS["right"]) {
if (b!="END" && PINADDATA[PINLISTS["right"][b]]) {
vct=PINADDATA[PINLISTS["right"][b]]["title"].length;
wi=PINADDATA[PINLISTS["right"][b]]["intro"];
vci=PINADDATA[PINLISTS["right"][b]]["intro"].length;
if (vci>0) {
vci=vct+vci;
if (vci>imax) {
vci=imax-vct-3;
vcii=0;
wic=0;
wit=wi.split(" ");
wi="";
while(vcii<vci) {
wi=wi+wit[wic]+" ";
wic++;
vcii=vcii+wit[wic].length+1;
}
wi=wi.substring(0,wi.length-1);
wi=wi+"...";
}
wi="<em>: </em>"+wi+" <em>(tovább)</em>";
}
w=w+"<div class=\"rightlink\" title=\""+PINADDATA[PINLISTS["right"][b]]["title"]+"\" onclick=\"window.location.href='http://www.filmhirado.hu/"+PINLISTS["right"][b]+"'\"><div style=\"background-image:url('http://q--med.videohirdeto.hu/img/"+PINADDATA[PINLISTS["right"][b]]["videoimg"]+"')\"><em></em></div><span><a href=\"/"+PINLISTS["right"][b]+"\"><em>"+PINADDATA[PINLISTS["right"][b]]["title"]+"</em>"+wi+"</a></span></div>";
}
}
document.getElementById("Mainpromo").innerHTML=w;

}

},

curtvpromo:0,
tvpromomax:0,
tvpromotimer:0,

switchtvpromo:function(pro) {
clearTimeout(thispage.tvpromotimer);
if (thispage.tvpromomax<pro) {
pro=0;
} else if (pro<0) {
pro=thispage.tvpromomax;
}
if (PINLISTS["tvbox"][pro]==0) {
var b=1;
var i="";
for (var a=6;a<=18;a++) {
if (PINADDATA[PINLISTS["top"]["intro"][a]]) {
if (document.getElementById("TVboxi"+b)) {
document.getElementById("TVboxi"+b).src="http://q--med.videohirdeto.hu/img/"+PINADDATA[PINLISTS["top"]["intro"][a]]["videoimg"];
b++;
}
if (i.length<95) {
i=i+PINADDATA[PINLISTS["top"]["intro"][a]]["title"]+"¤";
}
}
}
document.getElementById("TVboxtext").innerHTML="<span>Friss Hírek</span>"+i;
document.getElementById("TVbox4ads").style.display="none";
document.getElementById("TVbox4cat").style.display="block";
} else if (PINADDATA[PINLISTS["tvbox"][pro]]) {
document.getElementById("TVboxi").src="http://q--med.videohirdeto.hu/fl/img/"+PINADDATA[PINLISTS["tvbox"][pro]]["tv"]+".jpg";
document.getElementById("TVbox4cat").style.display="none";
document.getElementById("TVbox4ads").style.display="block";
var i="<span>"+PINADDATA[PINLISTS["tvbox"][pro]]["title"]+"</span>"+PINADDATA[PINLISTS["tvbox"][pro]]["intro"].substring(0,100);
if (PINADDATA[PINLISTS["tvbox"][pro]]["headline"].length>1) {
i=PINADDATA[PINLISTS["tvbox"][pro]]["headline"]
}
document.getElementById("TVboxtext").innerHTML=i;
}
var pros=pro+1;
var prot=thispage.tvpromomax+1;
document.getElementById("TVpromoCnt").value=pros+" / "+prot;
for (var a=0;a<=thispage.tvpromomax;a++) {
if (document.getElementById("TVpromotab"+a)) {
document.getElementById("TVpromotab"+a).className="sel";
}
}
document.getElementById("TVpromotab"+pro).className="current";
thispage.curtvpromo=pro;
document.getElementById("TVbox").style.display="block";
thispage.tvpromotimer=setTimeout("thispage.switchtvpromo(thispage.curtvpromo+1)",7000); 
},

gotopromo:function(pro) {
if (PINLISTS["tvbox"][pro]==0) {
window.location.href="http://www.filmhirado.hu/hirado/";
} else {
window.location.href="http://www.filmhirado.hu/"+PINLISTS["tvbox"][pro];
}
},

switchtoppromo:function(box) {
document.getElementById("Toppromonew").style.display="none";
document.getElementById("Toppromointro").style.display="none";
document.getElementById("Toppromooffer").style.display="none";
document.getElementById("toppromotabnew").className="toppromotabs";
document.getElementById("toppromotabintro").className="toppromotabs";
document.getElementById("toppromotaboffer").className="toppromotabs";
document.getElementById("Toppromo"+box).style.display="block";
document.getElementById("toppromotab"+box).className="toppromotabscurrent";
}


}

