
function get_id(id_name)
{
	if (document.all)
	{
		element_id = eval("document.all." + id_name);
	}
	else if (document.getElementById)
	{
		element_id = eval("document.getElementById('" + id_name + "')");
	}
	else if (document.layers)
	{
		element_id = eval("document." + id_name);
	}
	
	return element_id;
	
}

function toogle_div(div_id, status)
{
	id = get_id(div_id);
	
	switch (status)
	{
		case 1:
		{
			id.style.display = 'block';
			break;
		}
		case -1:
		{
			id.style.display = 'none';
			break;
		}
		default:
		{
			if (id.style.display == 'block')
			{
				id.style.display = 'none';
			}
			else
			{
				id.style.display = 'block';
			}
			break;
		}
		
	}
	
	return true;
}

function external_links() 
{
	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 = external_links;


function open_popup(url) 
{

	w = 520;

	h = 520;

	sw = screen.width;

	sh = screen.height;

	l = (sw - w) / 2;

	t = (sh - h) / 2;

	window.open(url, 'evomediasoft', 'width='+w+',height='+h+',top='+t+',left='+l+',scrollbars=no,resizable=no');	

}


function show_top_pic()
{
	
	var ax;
	var ax2;
	var ay;
	var ay2;
	
	
	get_id('top1_div').style.position = 'absolute';
	
	ax = get_id('top1_div').offsetLeft;
	ay = get_id('top1_div').offsetTop;
	
	ax2 = parseInt(ax) + 620;
	ay2 = parseInt(ay) - 39;
	
	get_id('top_pic').style.position = 'absolute';
	get_id('top_pic').style.left = ax2 + 'px';
	get_id('top_pic').style.top = ay2 + 'px';
	
	get_id('top1_div').style.position = 'relative';
	
	get_id('top_pic').style.display = 'block';
	
}

