window.onerror=function(){return true;}
window.onload=function(){pload=1;}
document.domain="walla.co.il";
var aid,url,walla_cfocus=TopOpenPopup=null,pload=0;
var dataObj,cacheObj=new Array();
function GetXmlHttpObject(){
	var xmlHttp;
	try{ xmlHttp=new XMLHttpRequest(); }
	catch(e){ try{ xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e){	try{ xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ return false; } } }
	return xmlHttp;
}
function getURL(u,a){
	url=u;aid=a;
	if(cacheObj[url] != null) {
	 	try{
			document.getElementById(aid).style.display="block";
	 		document.getElementById(aid).innerHTML = cacheObj[url]; 
	 	}catch(e){}
		return;
	}
	if(!dataObj) dataObj=GetXmlHttpObject();
	dataObj.open("POST",url,true);
	dataObj.onreadystatechange=function(){
		if (dataObj.readyState==4){ 
			if (dataObj.status==200){
		    	try{
					document.getElementById(aid).style.display="block"; 
					document.getElementById(aid).innerHTML = cacheObj[url] = dataObj.responseText; 
				}catch(e){}
		    }
		}
	}
	dataObj.send(null);
}
var fetchRows = function(){ getURL("http://"+arguments[0]+"/?w=/"+arguments[1]+"/"+arguments[2]+"/"+arguments[3]+"/@@/"+arguments[4],arguments[5]); }
function TopHidePopup(){
	if (TopOpenPopup!=null){
		TopOpenPopup.style.display="none";
		TopOpenPopup=null;
	}
	document.onclick=null;
}
function TopShowPopup(objname,e){
	var obj=document.getElementById(objname);
	if (obj==null)return;
	if (TopOpenPopup!=null){
		if (TopOpenPopup==obj){	TopHidePopup();return; }
		TopHidePopup();
	}
	TopOpenPopup=obj; 
	obj.style.display="block";
	if (!e) var e = window.event; 
	e.cancelBubble= true;
	if(e.stopPropagation)e.stopPropagation();
	document.onclick=TopHidePopup;
}
function containsDOM (container, containee){
  var isParent = false;
  do{
    if ((isParent = container == containee)) break;
    containee = containee.parentNode;
  } while(containee != null);
  return isParent;
}
function zoomOver(elem){
	if(pload){
		try{
			elem.style.height=elem.offsetHeight+"px"; 
			elem.style.width=elem.offsetWidth+"px";
			var imgs=elem.getElementsByTagName("img");
			for(var i=0;i<imgs.length;i++) if(imgs[i].className.indexOf("zoom")>=0) addClass(imgs[i],"zoomOver");
		}catch(e){}
	}
}
function zoomOut(elem){
	var imgs=elem.getElementsByTagName("img");
	for(var i=0;i<imgs.length;i++) if(imgs[i].className.indexOf("zoom")>=0) removeClass(imgs[i],"zoomOver"); 
}
function divHider(iid){ try{document.getElementById(iid).style.display="none";}catch(e){} }
function SetIframeHeight(iid,h,w){ try{ document.getElementById(iid).height=h; document.getElementById(iid).width=w; }catch(e){} }
function addClass(elem,className){elem.className=elem.className+" "+className;}
function removeClass(elem,className){var regx=new RegExp(className,"g");elem.className=elem.className.replace(regx,"");}
function openWindow(url,wwidth,wheight){if(!wwidth)wwidth=800; if(!wheight)wheight=""; window.open(url,null,"width="+wwidth+",height="+wheight+",status=yes,toolbar=no,menubar=no,location=no");}
function showFlash(divName,obj){ document.getElementById(divName).innerHTML=obj; }
function include_once(func_name,func_file){	if(eval("typeof window."+func_name+" != 'function'")){ try{ document.write(unescape("%3Cscript src='http://www.walla.co.il/2009/@/js/"+func_file+".js' type='text/javascript'%3E%3C/script%3E")); } catch(e){} } }
