// JavaScript Document
function isWord ( w, message, aflag ) {
	var rexp = new RegExp("\\\w"); 
	
	if (rexp.test ( w ) ) {
		return true;
	}
	alert (w);
	return false;
}

function isValidEmail ( m, message, aflag ) {
	var email = /^[^@]+@[^@.]+\.[^@]*\w\w$/
	
	if ( email.test ( m ) ) {
		return true;
	}
	if ( aflag == true ) {
		alert ( message );
	}
	return false;
}

var winRef;
function globalMakeWindow(url,width,height,menubar,location,resizable,scrollbars,status,titlebar) {
	if (winRef && (! winRef.closed)) { winRef.close() }
	//remote = window.open("","popupwindow","scrollbars=yes,resizable=yes,width="+width+",height="+height);
	if ( ! menubar ) { menubar = "yes";}		
	if ( ! location ) { location = "yes";}		
	if ( ! resizable ) { resizable = "yes";}		
	if ( ! scrollbars ) { scrollbars = "yes";}		
	if ( ! status ) { status = "yes";}		
	if ( ! titlebar ) { titlebar = "yes";}
	
	if ( ! width ) {
		width = window.screen.width;
	}
	if ( ! height ) {
		height = window.screen.height;
	}

	remote = window.open(url, "GanIsrael", "menubar=" + menubar + ",location=" + location + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",status=" + status + ",width=" + width + ",height=" + height + ",left=0,top=0,titlebar=" + titlebar);

	remote.location.href = url;
	if (remote.opener == null) window.opener = window;
	winRef = remote;
	remote.focus();
}
