
function tzah_the_king(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable) { 
	toolbar_str = toolbar ? 'yes' : 'no'; 
	menubar_str = menubar ? 'yes' : 'no'; 
	statusbar_str = statusbar ? 'yes' : 'no'; 
	scrollbar_str = scrollbar ? 'yes' : 'no'; 
	resizable_str = resizable ? 'yes' : 'no'; 
	nw=window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',men ubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str); 

	nw.focus();
} 

function makedialog(url,width,height) {
	thisdate = new Date();
	return window.showModalDialog(url +"&mishforref="+ thisdate.getTime(),window,"dialogWidth:"+width+"px;dialogHeight:"+height+"px;edge:Raised;center:Yes;help:No;Resizable:Yes;Maximize:Yes");
}
function makedialog2(url,width,height){
	thisdate = new Date();
	window.showModelessDialog(url +"&mishforref="+ thisdate.getTime(),window,"dialogWidth:"+width+"px;dialogHeight:"+height+"px;edge:Raised;center:1;help:0;resizable:1;");
}

function pirsum (id) {
	url="empg.php?mod=pirsum&amp;mod2=goto&id=";
	url=url + id;
	top.location.replace(url);
}

function show_me(id_no) {
	if (document.getElementById('message_' + id_no).style.display == "none") {
		document.getElementById('message_' + id_no).style.display = "block";
	} else {
		document.getElementById('message_' + id_no).style.display = "none";
	}
}

function makedivwin(url,idform,params,params2){	


	var _params = [];
	for(var p in params){
		_params.push(params2[p] +"="+params[p]);
	}
	_params = _params.join("");


	thisdate = new Date();

	if (document.getElementById){
		var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
	}
			
	if (x){
		x.onreadystatechange = function(){
			if (x.readyState == 4 && x.status == 200){
				el = document.getElementById(idform);
				el.innerHTML = x.responseText;
			}
		}
		x.open("POST",url +"&mishforref="+ thisdate.getTime() +"&"+_params, true);
		if (params!="") x.send(_params);
		else x.send(null);
	}
}

function fnOnlyNumbers() {
        window.status=event.keyCode;
        if((event.keyCode-48>=0)&&(event.keyCode-48<=9)){
                event.returnValue=true;
        } else{
                event.returnValue=false;
        }
}
