
function Opener(e, url, width, height, scroll)	{

	var x=y=0;
    y = e.clientY;
	x = e.clientX;

	var sc_X = sc_Y = 0;

	scX = screen.Width;
	scY = screen.Height;

	var OS_top = 0;
	OS_top = Number(height) + Number(y) + 40;

	var OS_right = 0;
	OS_right = Number(width) + Number(x) + 40;


	if(OS_top > scY) {
	
		new_y = Number(scY) - Number(height);
		y = new_y - 70;
	}

	if(OS_right > scX) {
	
		new_x = Number(scX) - Number(width);
		x = new_x - 70;
	}

	newwin=window.open(url, "", "left=" + x + ", top=" + y + ", toolbar=no, menubar=no, location=no, scrollbars=" + scroll + ", resizable=yes, width=" + width + ", height=" + height);

}

function confirm_action(where, msg, newwindow)	{

	input_box=confirm(msg);
				
	if (input_box==true)	{
		
		if(newwindow == 1)	window.open(where);  
		else				window.location.href=where;
	
	}

}

