//Changes CSS to printable stylesheet, calls the print function, then sets the stylesheet back after a pausing alert
function printweb()
{
	//Hides the nav list at the top
	document.getElementById('hideme').style.display='none';
	//Switches to the printable CSS
	document.getElementById('curstyle').href='/css/dyndns-print.css';

	//Hides any additional elements with the printhide class
	var alltags = document.getElementsByTagName('*');

	for(i = 0; i < alltags.length; i++) {
		if (alltags[i].className=='printhide') { 
			alltags[i].style.display='none';
		}
	}

	//Calls the print function
	window.print();
	//Javascript appears to prefer completing all script before printing, which makes sense
	//  in most cases but interferes in this one. The JS alert pauses the script from changing
	//  the CSS back while continuing to print.
	alert("Thank you for using DynDNS.com!");

	//Reveals the nav list
	document.getElementById('hideme').style.display='block';
	//Sets the CSS back
	document.getElementById('curstyle').href='/css/dyndns.css';

	//Reveals hidden items
	for (i = 0; i < alltags.length; i++) {
		if (alltags[i].className=='printhide') { 
			alltags[i].style.display='block';
		}
	}
}
