<!--
function MyWindow(){
	this.appVersion = new AppVersion();
	this.url='';
	this.name='';
	this.attributes='';
	this.isOpened=isOpened;
	this.openMyWindow = openMyWindow;
	this.privOpenMyWindow = privOpenMyWindow;			
	this.closeMyWindow = closeMyWindow;
	this.focusMyWindow = focusMyWindow;
	this.hwnd = 0;
}

function focusMyWindow(){
//			if (this.appVersion.editor=='NETSCAPE' || (this.appVersion.editor=='MICROSOFT' && this.appVersion.version4 )){
		this.hwnd.focus();
//			}
}

function isOpened(){
	if (this.hwnd==0){				
		return false;
	}
	else{
		if (this.hwnd.closed){					
			this.hwnd=0;
			return false;
		}
		else{		
			return true;
		}				
	}
}

function privOpenMyWindow(url,name,attributes){
	this.url=url;
	this.name=name;
	this.attributes=attributes;		
	this.hwnd = window.open(url,name,attributes)							
	return true;
}	

function openMyWindow(url,name,attributes){
	if (!this.isOpened()){
		this.privOpenMyWindow(url,name,attributes);
		this.focusMyWindow();
	}
	else{
		if ( this.name!=name || this.attributes!=attributes){
			this.closeMyWindow()
			this.privOpenMyWindow(url,name,attributes);
			this.focusMyWindow();
		}
		else{
			if (this.url!=url){
				this.url=url
				this.hwnd.location.href = this.url ;		
			}
			this.focusMyWindow();
		}					
	}
	return void(0);
}

function closeMyWindow(){
	if (this.isOpened()){
		eval(this.hwnd.close());
	}
	return void(0);
}

function AppVersion(){
	if (navigator.appName.toUpperCase().indexOf('NETSCAPE')!=-1){
		this.editor='NETSCAPE';
	}
	else{
		if (navigator.appName.toUpperCase().indexOf('MICROSOFT')!=-1){
			this.editor='MICROSOFT';
		}
		else{
			this.editor='UNKNOWN';
		}
	}

	this.editor = '';
	this.version4 = (document.all || document.layers);
}

MyWindow();
//-->