// -------------------------------------- disable mouse right klick -------------------------------------------
/*
var message="RikudMushhat סוכנות למסיבות רווקים\\רווקות";
function clickIE4() {
	if (event.button==2){
		alert(message);
		return false;
	}
}
function clickNS4(e) {
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){
			alert(message);
			return false;
		}
	}
}
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
	document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
*/
// -------------------------------------- end disable mouse right klick ----------------------------------------
function addLoadEvent(func)
{
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} 
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}
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 + "\n" + xmlhttp.responseText);
				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 xmlHttpAx() // Make xml request
{
   var xmlHttp = null;
   try { 
       // Firefox, Opera 8.0+, Safari
       xmlHttp=new XMLHttpRequest();
   }
   catch (e) {
       // Internet Explorer
       try { 
           xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); 
       }
       catch (e) {
          try { 
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); 
          }
          catch (e) {
              alert("Your browser does not support AJAX!");
              return false;
          }
       }
    }
    return xmlHttp;
}

function openPage(url)
{
	var w = 785;
	var h = 550;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	args = "top=0,left=" + winl + ",status=no, toolbar=no, menubar=no, scrollbars=yes, location=nos" + ",width="+ w + ",height="+ h;
	window.open(url, "popupPage", args);
}

