/**********************************
 * DGEMU FUNCTIONS
 *********************************/
function stop_dblclick( anchor )
{
	anchor.setAttribute( 'onclick', 'show_dblclick_msg();return false' );
}

function show_dblclick_msg( )
{
	document.getElementById( 'dblclick_msg' ).style.display = 'block';
}

function reset_link( )
{
	document.getElementById( 'dl_link' ).setAttribute( 'onclick', 'stop_dblclick(this)' );
	document.getElementById( 'dblclick_msg' ).style.display = 'none';
}

function show_dps( )
{
	// To be implemented
}


/**********************************
 * GENERAL FUNCTIONS
 *********************************/

/**
 * New-window links while keeping it xhtml compatible
 */
function externalLinks() 
{
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
         	if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
		     	anchor.target = "_blank";
	}
}

window.onload = externalLinks;
