function popup(target, name, width, height)
{
	// set default popup dimensions
	if(isNaN(width))
		width = 500;
	if(isNaN(height))
		height = 400;
		
	// build new window property string
	var properties = { 
		width: width,
	    height: height,
	    scrollbars: 	'yes',
	    resizable:	 	'no',
		location: 		'no',
		status: 		'no',
		menubar : 		'no',
		toolbar: 		'no'
		};
	var prop_str = '';
	for(prop in properties )
		prop_str = prop_str + prop + '=' + properties[prop] + ',';
	prop_str = prop_str.substr( 0, prop_str.length - 1 );
	
	// get link
	var link = getLink(target);
	
	// open popup
	var newWindow = window.open(link, '', prop_str );
	if(newWindow ){
		if(newWindow.focus)
			newWindow.focus();
	}
	newWindow.resizeTo(width,height);
	return false;
}

function blank(target)
{
	var link = getLink(target);
	var win = window.open(link);
	win.focus();
	return false;
}

function getLink(target)
{
	return (target instanceof  String || typeof target == "string") ? target : target.getAttribute('href');
}