//======================================================

var ie=document.all
var ns=document.layers
var ns6=document.getElementById&&!document.all
var divajax;
var divcalday;
var divextratxt;
var divextrapic;

	
//======================================================
function getEventsAjax(mallid,dtstart,dtend){
	divajax = document.getElementById? document.getElementById("eteasers") : document.all[eval("eteasers")];
	
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				//alert("Your browser broke!");
				return false;
			}
		}
	}
	//======================================================
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		divajax.innerHTML = "<br>&nbsp;<br>&nbsp;<br><div align=\"center\"><img src='http://www.kenyonim.com/images/ajaxCircle24x24.gif' width='24' height='24' border='0'></div><br>&nbsp;<br>&nbsp;<br>"
				
		if(ajaxRequest.readyState == 1){
			//== Display Loading Image ==
			}
		if(ajaxRequest.readyState == 4){
			// (4 = response is complete and we can get our data.)
			// Get the data from the server's response
			
			//== Display Vote Results ==
			a_res = ajaxRequest.responseText;
			window.setTimeout("divajax.innerHTML = a_res;",100);
			}
			
		}
	
		//======================================================
		//== Get Form Params And Send to asp page ==
		//== Send Filter Request ==
		ajaxRequest.open("GET", "http://www.kenyonim.com/include/eventsMallPageAjaxResults.asp?mid="+mallid+"&dtstart="+dtstart+"&dtend="+dtend, true);
		ajaxRequest.send(null);
		
	}
//======================================================
function setDiv(str){
	alert("in");
	if (ie||ns6){
		divajax.innerHTML = str;
		return 1;
		}
	else
		return 0;
	}
//======================================================
function showitem(divname,txt,pic,linkpage,paramname,id){
 divextratxt = document.getElementById? document.getElementById(divname) : document.all[eval(divname)];
 divextratxt.innerHTML = "<div class=\"blues\">" + txt + "</div>" + "<div class=\"bottomleft\"><a href='"+linkpage+"?"+paramname+"="+id+"' class='blues'><b>פרטים נוספים  <img src='http://www.kenyonim.com/images/arrowsLeftBlue7x10.gif' alt='לפרטים נוספים' width='7' height='10' border='0' align='absmiddle'></b></a></div>";
 
 divextrapic = document.getElementById? document.getElementById(divname+"pic") : document.all[eval(divname+"pic")];
 divextrapic.innerHTML = "<span class='eventsextrapicframe'><a href='"+linkpage+"?"+paramname+"="+id+"'>"+pic+"</a></span>";
 }
//======================================================
function hideitem(divname){
 divextratxt = document.getElementById? document.getElementById(divname) : document.all[eval(divname)];
 divextratxt.innerHTML = "";
 
 divextrapic = document.getElementById? document.getElementById(divname+"pic") : document.all[eval(divname+"pic")];
 divextrapic.innerHTML = "";
 }
//======================================================
function showpic(divname,pic,linkpage,paramname,id){
 divextrapic = document.getElementById? document.getElementById(divname) : document.all[eval(divname)];
 divextrapic.innerHTML = "<a href='"+linkpage+"?"+paramname+"="+id+"'>"+pic+"</a>";
 }
//======================================================
function hidepic(divname){
 divextrapic = document.getElementById? document.getElementById(divname) : document.all[eval(divname)];
 divextrapic.innerHTML = "";
 }
//======================================================

