function stopError() { return true;}
window.onerror = stopError;

var myRemote;
window.onunload=CloseRemote;

function CloseRemote()
{
	if (myRemote!=null) myRemote.close();
}

function ShowWindow(i,newURL,x,y,w,h) {
	
	if (myRemote==null) {
		  myRemote = window.open(newURL, '', 'height='+h+',width='+w+',screenX='+x+',left='+x+',screenY='+y+',top='+y+',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0', 'myWindow');
		  myRemote.focus();
	}
	else{
		if(!myRemote.closed)	// Mora zaradi Netscape oti ako myRemote e zatvoren od strana na korisnikot puka
		{
			myRemote.close();

		}
		myRemote = window.open(newURL, "myRemote", "height="+h+",width="+w+",screenX="+x+",left="+x+",screenY="+y+",top="+y+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0", "myWindow");
		myRemote.focus();
	}	
}

function ShowWindowEx(i,newURL,x,y,w,h) {
	
	if (myRemote==null) {
		  myRemote = window.open(newURL, '', 'height='+h+',width='+w+',screenX='+x+',left='+x+',screenY='+y+',top='+y+',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0', 'myWindow');
		  myRemote.focus();
	}
	else{
		if(!myRemote.closed)	// Mora zaradi Netscape oti ako myRemote e zatvoren od strana na korisnikot puka
		{
			myRemote.close();
		}
		
		myRemote = window.open(newURL, "myRemote", "height="+h+",width="+w+",screenX="+x+",left="+x+",screenY="+y+",top="+y+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0", "myWindow");
		myRemote.focus();
	}	
}

function ShowWindowEx1(i,newURL,x,y,w,h) {
	var NS6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));
	if (!NS6)
	{
		IE = (document.all) ? true : false;
		NS4 = (document.layers) ? true : false;
	}
	else
	{
		IE = false;
		NS4 = false;
	}
	
	if(NS4)
	{
		if (myRemote==null) {
			  myRemote = window.open(newURL, '', 'height='+h+',width='+w+',screenX='+x+',left='+x+',screenY='+y+',top='+y+',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0', 'myWindow');
			  myRemote.focus();
		}
		else{
			if(!myRemote.closed)	// Mora zaradi Netscape oti ako myRemote e zatvoren od strana na korisnikot puka
			{
				myRemote.close();
			}
			
			myRemote = window.open(newURL, "myRemote", "height="+h+",width="+w+",screenX="+x+",left="+x+",screenY="+y+",top="+y+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0", "myWindow");
			myRemote.focus();
		}	
	}
	else
	{
		if (myRemote==null) {
			  myRemote = window.open(newURL, '', 'height='+h+',width='+w+',screenX='+x+',left='+x+',screenY='+y+',top='+y+',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0', 'myWindow');
			  myRemote.focus();
		}
		else{
			if(!myRemote.closed)	// Mora zaradi Netscape oti ako myRemote e zatvoren od strana na korisnikot puka
			{
				myRemote.close();
			}
			
			myRemote = window.open(newURL, "myRemote", "height="+h+",width="+w+",screenX="+x+",left="+x+",screenY="+y+",top="+y+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0", "myWindow");
			myRemote.focus();
		}	
	}
}



function dummy(){
}
