// JavaScript Document for Sides.ca

///////// standards compliant solution for new window links
///////////////////////////////////////////////////////////
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;

///////// pop-up window script ///////////////////////////
///////////////////////////////////////////////////////////
function openLink(popup){
	form = window.open(popup,"costs","height=600,width=400,scrollbars");
	form.moveTo(0,0);
	}
//Add Text / Add an Ojbect JS	
function showNewsItem(item)
{
	document.getElementById('add_text').style.display = 'none';
	document.getElementById('add_object').style.display = 'none';

	if( document.getElementById(item).style.display == 'block')
	{
		document.getElementById(item).style.display = 'none';
	}
	else
	{
		document.getElementById(item).style.display = 'block';
	}
}