function openBlank(o)

{

	var link = getLink(o);

	var win = window.open(link);

	trace('openBlank: ' + link);

	return false;

}



function openPopup(o)

{

	var properties = { 

		width: screen.width,

	    height: screen.height,

	    scrollbars: 	'no',

	    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 );

	

	var link = getLink(o);

	var newWindow = window.open(link, '_blank', prop_str );

	if( newWindow )

	{

		if(newWindow.focus)

			newWindow.focus();

		return false;

	}

	return true;

}

	

function specificLinks()

{

	var rel, links;

	

	links = document.getElementsByTagName('a');

	for(var i=0; i < links.length; i++)

	{

		if(links[i].getAttribute('rel'))

		{

			if(links[i].getAttribute('rel') == 'popup') 

				links[i].onclick = popup;

			if(links[i].getAttribute('rel') == 'new')

				links[i].onclick = reachURL;

		}

	}

}



function getLink(o)

{

	if(o instanceof  String || typeof o == "string")

		return o;

	else

		return o.getAttribute('href')

}



function addToBookmark()

{

	if (navigator.appName != 'Microsoft Internet Explorer')

		window.sidebar.addPanel(pageTitle, window.location.href, "");

	else

		window.external.AddFavorite(window.location.href, pageTitle);

}