function fill(combo, name, src)
{
	var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4)
		{
			if (xmlhttp.status != 200)
			{
				alert("שגיאה! - " + xmlhttp.status);
				return;
			}
			var doc = new ActiveXObject("Microsoft.XMLDOM");
			doc.async = false;
			doc.loadXML(xmlhttp.responseText);
			var nodes = doc.selectNodes("xml/rs:data/z:row");
			combo.length = 1;
			for (i=0; i < nodes.length; i++)
			{
				var opt = document.createElement("OPTION");
				opt.value = nodes[i].getAttribute("ID");
				opt.text = nodes[i].getAttribute("Name");
				combo.add(opt);
			}
			xmlhttp = null;
			doc = null;
		}
	}
	xmlhttp.open("GET", "getxml.asp?" + name + "=" + src.value, true);
//	xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlhttp.send();
}

function fill2(combo, name, src)
{
	var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4)
		{
			if (xmlhttp.status != 200)
			{
				alert("שגיאה! - " + xmlhttp.status);
				return;
			}
			var doc = new ActiveXObject("Microsoft.XMLDOM");
			doc.async = false;
			doc.loadXML(xmlhttp.responseText);
			var nodes = doc.selectNodes("xml/rs:data/z:row");
			combo.length = 1;
			for (i=0; i < nodes.length; i++)
			{
				var opt = document.createElement("OPTION");
				opt.value = nodes[i].getAttribute("ID");
				opt.text = nodes[i].getAttribute("Name");
				combo.add(opt);
			}
			xmlhttp = null;
			doc = null;
		}
	}
	xmlhttp.open("GET", "getxml2.asp?" + name + "=" + src.value, true);
//	xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlhttp.send();
}

function redirectSearch()
{
	oForm = document.searchPortals;
	if (oForm.query.value == "")
	{
		alert("יש לרשום מילת חיפוש");
		return false;
	}
	for (i=0; i<oForm.rdSearchSite.length; i++)
		if (oForm.rdSearchSite[i].checked)
		{
			window.open(oForm.rdSearchSite[i].value + oForm.query.value);
			return true;
		}
	alert("יש לבחור מנוע חיפוש");
	return false;
}

function btnSubmit_Click(oForm)
{
	oForm.submit();
}

function window.onscroll()
{
	obj = document.getElementById("sidebanner");
	if (!obj) return;
	obj.style.top = document.body.scrollTop;
}

function printPage()
{
	args = "top=100, left=100, height=500, width=700, status=no, toolbar=no, menubar=no, scrollbars=yes, location=no";
	window.open("print.asp", "Print", args);
}

function overData()
{
	var obj = window.event.srcElement;
	if (obj.tagName == "TD")
	{
		if (obj.parentElement.className.indexOf("click") < 0)
			obj.parentElement.className += " over";
	}
	else if (obj.tagName == "TH")
	{
		obj.className = "over";
	}
}

function outData()
{
	var obj = window.event.srcElement;
	if (obj.tagName == "TD")
	{
		if (obj.parentElement.className.indexOf("over") > 0)
			obj.parentElement.className = obj.parentElement.className.replace(" over", "");
	}
	else if (obj.tagName == "TH")
	{
		obj.className = "";
	}
}

function showHotAd(ID,Type)
{
	args = "top=0, left=0, height=675, width=785, status=no, toolbar=no, menubar=no, scrollbars=yes, location=no";
	window.open("showhotad.asp?AdvertiseID=" + ID + "&Type=" + Type, "Advertise"+ID, args);
}

function showCoupon(CouponID)
{
	var w = 350;
	var h = 250;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = "top=" + wint + ",left=" + winl + ",resizable=no,scrollbars=yes" + ",width="+ w + ",height="+ h;
	winMovie = window.open("showCoupon.asp?CouponID=" + CouponID , "popupShowCoupon" + CouponID, winprops)
	if (parseInt(navigator.appVersion) >= 4) { winMovie.window.focus(); }
}

function showAdPic(ID)
{
	args = "top=0, left=0, height=675, width=785, status=no, toolbar=no, menubar=no, scrollbars=yes, location=no";
	window.open("showPhotos.asp?AdvertiseID=" + ID, "Advertise"+ID, args);
}

function showItem(GalleryID,PhotoID)
{
	args = "top=0, left=0, height=675, width=785, status=no, toolbar=no, menubar=no, scrollbars=yes, location=no";
	window.open("showItem.asp?GalleryID=" + GalleryID + "&PhotoID=" + PhotoID, "Item"+PhotoID, args);
}

function newsItem(id)
{
	args = "top=0, left=0, height=675, width=785, status=no, toolbar=no, menubar=no, scrollbars=yes, location=no";
	window.open("newsItem.asp?NewsID=" + id, "News_"+id, args);
}

function showPhoto(Photo,Details)
{
	args = "top=0, left=0, height=675, width=785, status=no, toolbar=no, menubar=no, scrollbars=yes, location=no";
	window.open("showPhoto.asp?Photo=" + Photo + "&Details=" + Details, "Photo", args);
}

function rankSite(ID)
{
	args = "top=0, left=0, height=675, width=785, status=no, toolbar=no, menubar=no, scrollbars=yes, location=no";
	window.open("Site.asp?SiteID=" + ID, "Site"+ID, args);
}

function openPage(url)
{
	args = "top=0, left=0, height=764, width=785, status=no, toolbar=no, menubar=no, scrollbars=yes, location=no";
	window.open(url, "popupPage", args);
}

function img_onmouseover(source_pic){
	var imgSrc = new Image();
	imgSrc.src=source_pic;
	img_0.src=imgSrc.src;
}

function mov_onmouseover(source_mov){
	obj = document.getElementById("mov_0");
	obj.fileName = source_mov;
}

function showHide(id)
{
	var obj = window.event.srcElement;
	oDiv = document.getElementById(id);
	if (oDiv)
	{
		if (oDiv.style.display == "none")
		{
			oDiv.style.display = "";
		}
		else
		{
			oDiv.style.display = "none";
		}
	}
}
function showAd(url,id)
{			
	var obj = window.event.srcElement;
	URL = url + "_result_box.asp?AdvertiseID="+id;
	if(document.all("AdDetails_" + id).innerHTML=="")
	{
  		document.all("AdDetails_" + id).innerHTML="";
		obj.parentElement.className += " click";
	 }
	else
	 {
		document.all("AdDetails_" + id).innerHTML="";
		obj.parentElement.className = obj.parentElement.className.replace(" click", "");
	 }	
}

function loadPage(url)
{
	var obj = window.event.srcElement;
	window.location.replace(url + obj.value);
}

<!--
function writeLayer(text) {
document.frames['myFrame'].location.href = text;
//document.form1.location.value = text;
}
function setLayer(text) {
if (text.indexOf("http://",0) <= 0)
text = "http://" +text;
document.frames['myFrame'].location.href = text;
//document.form1.location.value = text;
}
function onLoad(text) {
if (text != "Microsoft Internet Explorer") {
alert("netscape not supported");
history.back();
}
return true;
}
//  End -->

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
//-->


