// JavaScript Document

function goPrint(bob,ted)
/*
Opens the div contents in new window
Prints the div contents
Closes window
*/
{
	var a = window. open('','','scrollbars=1,width=900,height=300,resizable=1');
	
	a.document.open("text/html");
	a.document.write('<html><head><link rel="stylesheet" href="css/print-forecast.css" /></head><body>');
	a.document.write('<div style="border: 1px solid #000000; padding: 8px;"><h1>Manchester Restaurants Guide</h1>');
	if (ted != '') {
			a.document.write('<div style="text-align: center"><img src="'+ted+'" border="0" /></div><br><br>');
	}
	a.document.write(document.getElementById(bob).innerHTML);
	a.document.write('<div class="foot">&copy; 2009 Manchester.com</div>');
	a.document.write('</div></body></html>');
	a.document.close();
	a.print();
	a.window.close();
}

function goNext(a)
{
	this.location.href="info.php?id="+a;	
}

function getImage(pExistingImageID, pImageURL){
    var img = document.createElement('img');
    img.onload = function (evt) {
        document.getElementById(pExistingImageID).src=this.src;
        document.getElementById(pExistingImageID).width=this.width;
        document.getElementById(pExistingImageID).height=this.height;
    }
    img.src = pImageURL;
    return false;
}
