function resizeframe(frame,w,h,maxw,maxh)
{if(arguments.length==5){w=w>maxw?maxw:w;h=h>maxh?maxh:h;}
var fr=document.getElementById(frame);if(fr.getAttribute('height')!=h)
{fr.style.height=h+"px";fr.setAttribute('height',h);}
if(fr.getAttribute('width')!=w)
{fr.style.width=w+"px";fr.setAttribute('width',w);}
if(w==0&&h==0&&maxw==200&&maxh==800)
{document.getElementById("gh_sky").style.width='0px';document.getElementById("gh_sky").style.display='none';}
if(w>1&&h>1)fr.style.display='block';}
function set10ycookie(name,value)
{var date=new Date();date.setTime(date.getTime()-1000*86400);document.cookie=name+"="+escape(value)+"; expires="+date.toGMTString();date.setTime(date.getTime()+1000*86400*365*10);document.cookie=name+"="+escape(value)+"; expires="+date.toGMTString()+"; path=/";}
function getcookie(name)
{if(document.cookie.length==0)return"";var i=document.cookie.indexOf(name+"=");if(i>=0)
{var end=document.cookie.indexOf(";",i+name.length+1);if(end==-1)end=document.cookie.length;return unescape(document.cookie.substring(i+name.length+1,end));}
return"";}
function bl_lim()
{var a=document.getElementById("bl1_id").value;set10ycookie("blaettern",a);document.forms["filterbox"].submit();}
function bl_ui()
{var a=getcookie("blaettern");document.getElementById("bl1_b").style.display='inline';if(a==-1)document.getElementById("blall").selected=true;else if(a==100)document.getElementById("bl100").selected=true;else if(a==0||a==30)document.getElementById("bl30").selected=true;else if(a==300)document.getElementById("bl300").selected=true;}
function blabla()
{var found=0;imgs=document.getElementsByTagName("img");var i;var n=imgs.length;for(i=0;i<n;i++){if(imgs[i].getAttribute("src").match(/false/)){found=1;}}
if(!found){parent.resizeframe(document.location.href.substring(document.location.href.lastIndexOf("/")+1),0,0);}}
function quote_text(){if(window.getSelection){var str=window.getSelection()+"";}else if(document.getSelection){var str=document.getSelection()+"";}else if(document.selection){var str=document.selection.createRange().text+"";}else{var str="";}
if(0==str.length){var parentBody=document.getElementById("parentBody");for(var child=parentBody.firstChild;child!=null;child=child.nextSibling){if(3==child.nodeType){str+=child.value;}}}
str="<blockquote><em> "+str.replace(/(.{1,78})( |$|\r?\n)/g,"$1\n")+"</em></blockquote>";document.getElementById("rf_body").value+=str;}
function ch_img(id){if(id>=0&&id<=images.length-1){if(id==0){document.getElementById("p_img2").style.visibility="hidden";document.getElementById("n_img2").style.visibility="visible";}else if(id==images.length-1){document.getElementById("p_img2").style.visibility="visible";document.getElementById("n_img2").style.visibility="hidden";}else{document.getElementById("p_img2").style.visibility="visible";document.getElementById("n_img2").style.visibility="visible";}
var match=/(?:bepixelung\.org\/)(\d+)/.exec(images[id]['c']);if(match!=undefined&&RegExp.$1>=0&&show_bp>0){document.getElementById('img_container').innerHTML='<div id=ghpic> <table cellpadding=0 cellspacing=0 align=center border=0> <tr class=ghpic_tr valign=top id="bp_t"><td class="ghpic_td ecke"><img src=http://b.gzhls.at/lo.gif width=12 height=12></td><td class="ghpic_td border-top"><img src=http://b.gzhls.at/blanky.gif height=12 width=12></td><td class="ghpic_td ecke"><img src=http://b.gzhls.at/ro.gif width=12 height=12></td></tr> <tr class=ghpic_tr><td class="ghpic_td border-left"><img src=http://b.gzhls.at/blanky.gif height=12 width=12></td><td class="ghpic_td" valign=top align=center> <a href="http://bepixelung.org/'+RegExp.$1+'" target=_blank title="Bild '+RegExp.$1+' auf bepixelung.org"> <img src="'+images[id]['u']+'" width='+images[id]['w']+' height='+images[id]['h']+' alt="'+images[id]['c']+'" border=0 id="prod_img"> </a> <div class=links> <a href="http://bepixelung.org/?rm=search&from_bild='+RegExp.$1+'" target=_blank>Alle Bilder anzeigen</a> <a href="http://bepixelung.org/?rm=upload_form&from_bild='+RegExp.$1+'" target=_blank>Bild hochladen</a> <a href="http://bepixelung.org/'+RegExp.$1+'#license" target=_blank title="Hinweise zu den Bildrechten f&uuml;r dieses Bild / Copyright information">Usage information</a> </div> <div class="clr"></div> </div> </td> <td class="ghpic_td border-right"> <img src=http://b.gzhls.at/blanky.gif height=12 width=12> </td> </tr> <tr class="ghpic_tr borderonly" valign=bottom height=24> <td class="ghpic_td ecke2"> <img src=http://b.gzhls.at/lu.gif width=12 height=24> </td> <td class="ghpic_td border-bot"> <a href=http://bepixelung.org target=_blank> <img src=http://b.gzhls.at/blanky.gif height=24 width=200 alt="bepixelung.org" title="bepixelung.org"></a> </td> <td class="ghpic_td ecke2"> <img src=http://b.gzhls.at/ru.gif width=12 height=24> </td> </tr> </table> </div>';document.getElementById('mapnot').style.display="none";}else{document.getElementById('img_container').innerHTML='<img height="'+images[id]['h']+'" width="'+images[id]['w']+'" border="0" alt="'+images[id]['c']+'" src="'+images[id]['u']+'"/><br><span>'+images[id]['c']+'</span>';document.getElementById('mapnot').style.display="inline";}
document.getElementById("mofn").innerHTML=(id+1)+" / "+images.length;document.getElementById("p_img2").onclick=function(){ch_img((id-1)*1)};document.getElementById("n_img2").onclick=function(){ch_img((id+1)*1)};}}
function getElByClassNam(n)
{if(document.getElementsByClassName)
return document.getElementsByClassName(n);else
{var m=new Array();var nd=document.getElementsByTagName("td");var l=nd.length;for(var i=0;i<l;i++)
{if(nd[i].getAttribute('className')==n)m.push(nd[i]);}
return m;}}
var lang_or_browser='de';var workstack=Array();var worknames=Array();function btn_compare()
{var loc=document.location.href;document.location.href=loc.replace(/\\?.*/,'')+
"?cmp="+workstack.join(",");}
function btn_clearlist()
{while(workstack.length>0)
{worklist_del(workstack[0]);}}
function worklist_add(inner,id,name)
{var x=inner.innerHTML;if(x=='')
{x=(lang_or_browser=='de'?'Vergleichsliste: ':lang_or_browser=='pl'?'Por&#243;wnanie: ':"Comparison list: ");}
else
{x+=', ';}
x+='<img border=0 src=http://b.gzhls.at/bullet_delete.png onclick="worklist_del('+id+')">';x+='<a href="a'+id+'.html">'+name+'</a>';inner.innerHTML=x;}
function rewrite_list()
{var workdiv_inner=document.getElementById('workdiv_inner');workdiv_inner.innerHTML='';for(var i=0;i<workstack.length;i++)
{worklist_add(workdiv_inner,workstack[i],worknames[i]);}}
function worklist_del(id)
{var txt;for(var i=0;i<workstack.length;i++)
{if(workstack[i]==id)
{workstack.splice(i,1);txt=worknames.splice(i,1);}}
document.getElementById("check_"+id).onclick=new Function("cog_add("+id+",'"+txt+"')");document.getElementById("check_"+id).checked=false;if(workstack.length==0)
{var bye=document.getElementById('workdiv');bye.parentNode.removeChild(bye);}
else rewrite_list();}
function cog_add(id,name)
{var workdiv_inner=document.getElementById('workdiv_inner');if(!workdiv_inner)
{var content_table=document.getElementById('content_table');workdiv=document.createElement("div");workdiv.id='workdiv';workdiv_inner=document.createElement('div');workdiv_inner.id='workdiv_inner';worklist_add(workdiv_inner,id,name);workdiv.appendChild(workdiv_inner);content_table.parentNode.insertBefore(workdiv,content_table);workdiv.innerHTML+="</div><button onclick='document.forms.compare_form.submit()'>"+(lang_or_browser=='de'?'Vergleichen':lang_or_browser=='pl'?'Por&#243;wnaj':'compare')+"</button>";workdiv.innerHTML+="</div><button onclick='btn_clearlist()'>"+
(lang_or_browser=='de'?'Zur&uuml;cksetzen':lang_or_browser=='pl'?'Wyczy&#347;&#263;':'clear')+"</button>";}
else
{for(var i=0;i<workstack.length;i++)
{if(workstack[i]==id)return;}
worklist_add(workdiv_inner,id,name);}
workstack.push(id);worknames.push(name);document.getElementById('check_'+id).onclick=new Function("worklist_del("+
id+")");}
function cog_obj(obj)
{var id=obj.value;var name;var td=obj.parentNode.nextSibling.nextSibling;var name;if(td.childNodes.length>2)name=td.childNodes[1];else name=td.childNodes[0];name=name.innerHTML.replace(/<.*?>/g,'');cog_add(id,name);}
function cog_handler(e)
{if(!e)var e=window.event;var obj=e.target?e.target:e.srcElement;if(obj.nodeType==3)
obj=obj.parentNode;if(obj)
{cog_obj(obj);}}
function add_tools(lang)
{lang_or_browser=lang;var e=getElByClassNam('chk');var n=e.length;if(n==0)return;for(var i=0;i<n;i++)
{var checkbox=e[i].childNodes[0];var id=checkbox.value;try{if(checkbox.checked)cog_obj(checkbox);else checkbox.onclick=cog_handler;}catch(x)
{}
if(lang=='de')
checkbox.title='Zur Vergleichsliste hinzufuegen';else if(lang=='pl')
checkbox.title='dodaj do listy';else
checkbox.title='add to comparison list';}
document.getElementById('cmp_reset').onclick=document.getElementById('cmp_reset2').onclick=btn_clearlist;}
function gh_addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}
function gh_load_ads()
{var h=window.location.hostname;if(h!='geizhals.at'&&h!='test.geizhals.at'&&h!='geizhals.de'&&h!='gh.de'||window.location.protocol=='https:'||(typeof XMLHttpRequest=="undefined"))return;function load(f)
{if(window.attachEvent)
window.attachEvent('onload',f);else if(window.addEventListener)
window.addEventListener('load',f,false);}
function bld(eid,w,h,adworx)
{var el=document.getElementById(eid);if(!el||el.style.display=="hidden"||el.style.display=="none")
return null;var n=el.getAttribute("name");if(!n)return null;var id=n.substring(n.lastIndexOf('/')+1);if(adworx)
{n="/b/adworx_"+escape(n);id="iframe_"+eid;}
load(function(){var i0=document.createElement('iframe');i0.style.display='none';i0.setAttribute('src',n);i0.width=w;i0.height=h;i0.scrolling="no";i0.marginWidth=0;i0.marginHeight=0;i0.frameBorder=0;i0.id=id;el.appendChild(i0);});}
bld('gha_wrb_600x120',1,1,1);bld('gha_sky',200,600,1);bld('gha_btn',1,1,1);bld('gha_contentad',1,1,1);bld('gha_startad',300,250,1);}
var gh_drg={};function pos(e)
{if("number"==typeof e.pageX)return{x:e.pageX,y:e.pageY};return{x:e.clientX+document.body.scrollLeft-document.body.clientLeft,y:e.clientY+document.body.scrollLeft+document.body.clientLeft};}
function tgt(e){return e.target||e.srcElement;}
function end_move(e)
{if(!e)var e=window.event;var t=tgt(e);gh_drg.id.style.cursor='auto';document.onmousemove=null;gh_drg.bar.onmousedown=begin_move;document.onmouseup=null;}
function do_move(e)
{if(!e)var e=window.event;var t=tgt(e);var p=pos(e);var s=gh_drg.id.style;s.left=p.x-gh_drg.xo+"px";s.top=p.y-gh_drg.yo+"px";gh_drg.bar.onmousedown=null;document.onmouseup=end_move;return true;}
function begin_move(e)
{if(!e)var e=window.event;var t=tgt(e);gh_drg.bar=t;var id=t.parentNode;gh_drg.id=id;id.style.cursor="move";document.onmousemove=do_move;var p=pos(e);gh_drg.xo=p.x-id.offsetLeft;gh_drg.yo=p.y-id.offsetTop;return true;}
function ghp_show(id,ev)
{var e=document.getElementById(id);e.style.display='block';if(window.innerHeight)
{e.style.top="200px";e.style.left=window.innerWidth*0.5-e.offsetWidth/2+'px';}
return false;}
function ghp_submit(e)
{var h=document.createElement("input");h.type="hidden";h.name="do_not_reply";h.value="1";e.appendChild(h);e.target='ghp_hidden';e.submit();e.parentNode.parentNode.style.display='none';ghp_show('ghp_tnx');setTimeout(function(){document.getElementById('ghp_tnx').style.display='none'},2000);return false;}
function ref_arg(x)
{var r=document.referrer.split('?');if(r.length>1)
{var m=r[1].split('&');for(i=0;i<m.length;i++)
{var t=m[i].split('=');if(t[0]==x)return unescape(t[1].replace(/\+/g,' '));}}}
function oewa(p)
{gh_addLoadEvent(function(){var t=document.getElementById('gh_oewa');var i=document.createElement('img');i.setAttribute('src','http://geizhals.oewabox.at/cgi-bin/ivw/CP/'+p+
'?r='+escape(document.referrer));i.width=1;i.height=1;i.border=0;t.appendChild(i);});}
jx={getHTTPObject:function(){var http=false;if(typeof ActiveXObject!='undefined'){try{http=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{http=new ActiveXObject("Microsoft.XMLHTTP");}
catch(E){http=false;}}
}else if(window.XMLHttpRequest){try{http=new XMLHttpRequest();}
catch(e){http=false;}}
return http;},load:function(url,callback,format,method,opt,error){var http=this.init();if(!http||!url)return;if(http.overrideMimeType)http.overrideMimeType('text/xml');if(!method)method="GET";if(!format)format="text";if(!opt)opt={};format=format.toLowerCase();method=method.toUpperCase();var parameters=null;if(method=="POST"){var now="uid="+new Date().getTime();url+=(url.indexOf("?")+1)?"&":"?";url+=now;var parts=url.split("\?");url=parts[0];parameters=parts[1];}
http.open(method,url,true);if(method=="POST"){http.setRequestHeader("Content-type","application/x-www-form-urlencoded");}
var ths=this;if(opt.handler){http.onreadystatechange=function(){opt.handler(http);};}else{http.onreadystatechange=function(){if(http.readyState==4){if(http.status==200||http.status==204){var result="";if(http.responseText)result=http.responseText;if(format.charAt(0)=="j"){result=result.replace(/[\n\r]/g,"");result=eval('('+result+')');}else if(format.charAt(0)=="x"){result=http.responseXML;}
if(callback)callback(result);}else{if(opt.loadingIndicator)document.getElementsByTagName("body")[0].removeChild(opt.loadingIndicator);if(opt.loading)document.getElementById(opt.loading).style.display="none";if(error)error(http.status);}}}}
http.send(parameters);},bind:function(user_options){var opt={'url':'','onSuccess':false,'onError':false,'format':"text",'method':"GET",'update':"",'loading':"",'loadingIndicator':""}
for(var key in opt){if(user_options[key]){opt[key]=user_options[key];}}
if(!opt.url)return;var div=false;if(opt.loadingIndicator){div=document.createElement("div");div.setAttribute("style","position:absolute;top:0px;left:0px;");div.setAttribute("class","loading-indicator");div.innerHTML=opt.loadingIndicator;document.getElementsByTagName("body")[0].appendChild(div);this.opt.loadingIndicator=div;}
if(opt.loading)document.getElementById(opt.loading).style.display="block";this.load(opt.url,function(data){if(opt.onSuccess)opt.onSuccess(data);if(opt.update)document.getElementById(opt.update).innerHTML=data;if(div)document.getElementsByTagName("body")[0].removeChild(div);if(opt.loading)document.getElementById(opt.loading).style.display="none";},opt.format,opt.method,opt);},init:function(){return this.getHTTPObject();}}
